Re: [PATCH v6 11/11] Add rvalue reference tests and NEWS entry

Yao Qi
2017-04-04T11:10:07Z

Keith Seitz <keiths@redhat.com> writes:

Hi Keith,
> +# Test lvalue vs rvalue function overloads
> +setup_kfail "c++/15372" "*-*-*"
> +gdb_test "print f (i)" "= 1" "lvalue reference overload"
> +

I got KPASS and FAIL in this test. On x86_64-linux (g++ 5.4.0)

print f (i)^M
$3 = 1^M
(gdb) KPASS: gdb.cp/rvalue-ref-overload.exp: lvalue reference overload
(PRMS c++/15372)

> +gdb_test "print f (ci)" "= 2" "lvalue reference to const overload"
> +

print f (ci)^M
Attempt to take address of value not located in memory.^M
(gdb) FAIL: gdb.cp/rvalue-ref-overload.exp: lvalue reference to const overload

> +setup_kfail "c++/15372" "*-*-*"
> +gdb_test "print f (3)" "= 3" "rvalue reference overload"

They also exist in the test result on aarch64-linux and s390x-linux,
https://gdb-build.sergiodj.net/builders/RHEL-s390x-m64/builds/3700/steps/test%20gdb/logs/stdio
https://gdb-build.sergiodj.net/builders/Ubuntu-AArch64-m64/builds/1666/steps/test%20gdb/logs/stdio

--
Yao (齐尧)