From 33c43069281380cfc02f130cc10e28830ba8a711 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sun, 21 Jul 2019 21:20:27 +0000 Subject: [PATCH] re PR c++/67853 (decltype of parenthesized xvalue does not correctly yield rvalue-reference) PR c++/67853 * g++.dg/cpp0x/decltype72.C: New test. From-SVN: r273652 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/decltype72.C | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype72.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 234bc10442c..12774c06466 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-21 Marek Polacek + + PR c++/67853 + * g++.dg/cpp0x/decltype72.C: New test. + 2019-07-22 Stafford Horne * gcc.target/or1k/ror-4.c: New file. diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype72.C b/gcc/testsuite/g++.dg/cpp0x/decltype72.C new file mode 100644 index 00000000000..071e0e76210 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype72.C @@ -0,0 +1,19 @@ +// PR c++/67853 +// { dg-do compile { target c++11 } } + +template +struct is_same +{ + static const bool value = false; +}; + +template +struct is_same +{ + static const bool value = true; +}; + +struct Member {}; +struct A { Member x; }; +A MakeA(); +static_assert(is_same::value, ""); -- 2.30.2