https://gcc.gnu.org/g:a63d871eac0e57002b4ab4e1522f3f3851183b5e
commit r16-368-ga63d871eac0e57002b4ab4e1522f3f3851183b5e Author: Jason Merrill <ja...@redhat.com> Date: Fri May 2 10:47:01 2025 -0400 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: --- gcc/testsuite/g++.dg/cpp0x/constexpr-temp3.C | 8 ++++++++ 1 file changed, 8 insertions(+) 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 000000000000..584472c7c846 --- /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);