From: Jason Merrill Date: Fri, 2 May 2025 14:47:01 +0000 (-0400) Subject: c++: add fixed testcase [PR85944] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a63d871eac0e57002b4ab4e1522f3f3851183b5e;p=thirdparty%2Fgcc.git 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. --- 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);