From: Patrick Palka Date: Thu, 6 Jan 2022 15:42:50 +0000 (-0500) Subject: c++: Add testcase for recently fixed PR [PR69681] X-Git-Tag: basepoints/gcc-13~2028 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2793af17db239429ea3a2e26834e74daa6cff2c0;p=thirdparty%2Fgcc.git c++: Add testcase for recently fixed PR [PR69681] Fixed ever since r12-6188. PR c++/69681 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-compare2.C: New test. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C new file mode 100644 index 000000000000..b1bc47208055 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C @@ -0,0 +1,10 @@ +// PR c++/69681 +// { dg-do compile { target c++11 } } + +void f(); +void g(); +static_assert(f != g, ""); + +#if __cpp_constexpr >= 201603L +static_assert([]{} != []{}, ""); +#endif