Tested x86_64-pc-linux-gnu, applying to trunk.

-- 8< --

This testcase was incidentally fixed by r16-325 for PR119162.

        PR c++/85944

gcc/testsuite/ChangeLog:

        * g++.dg/cpp0x/constexpr-temp3.C: New test.
---
 gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C

diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C 
b/gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C
new file mode 100644
index 00000000000..584472c7c84
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C
@@ -0,0 +1,8 @@
+// PR c++/85944
+// { dg-do compile { target c++11 } }
+
+constexpr bool f(int const & x) {
+    return &x;
+}
+
+constexpr auto x = f(0);

base-commit: 20d184e3f84d859e7e9f44a8d91772a02b658872
-- 
2.49.0

Reply via email to