aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-05-02 10:47:01 -0400
committerJason Merrill <jason@redhat.com>2025-05-03 09:30:19 -0400
commita63d871eac0e57002b4ab4e1522f3f3851183b5e (patch)
tree55be0a8c22673ec4ffa1a17f94855e8252d69408
parent20d184e3f84d859e7e9f44a8d91772a02b658872 (diff)
downloadgcc-a63d871eac0e57002b4ab4e1522f3f3851183b5e.zip
gcc-a63d871eac0e57002b4ab4e1522f3f3851183b5e.tar.gz
gcc-a63d871eac0e57002b4ab4e1522f3f3851183b5e.tar.bz2
c++: add fixed testcase [PR85944]
This testcase was incidentally fixed by r16-325 for PR119162. PR c++/85944 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-temp3.C: New test.
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C8
1 files changed, 8 insertions, 0 deletions
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 0000000..584472c
--- /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);