]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Add testcase for recently fixed PR [PR69681]
authorPatrick Palka <ppalka@redhat.com>
Thu, 6 Jan 2022 15:42:50 +0000 (10:42 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 6 Jan 2022 15:42:50 +0000 (10:42 -0500)
Fixed ever since r12-6188.

PR c++/69681

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/constexpr-compare2.C: New test.

gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C
new file mode 100644 (file)
index 0000000..b1bc472
--- /dev/null
@@ -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