[committed] Add test for c++/92443
diff mbox series

Message ID 20191120225810.GC3791@redhat.com
State New
Headers show
Series
  • [committed] Add test for c++/92443
Related show

Commit Message

Marek Polacek Nov. 20, 2019, 10:58 p.m. UTC
This started crashing with the <=> implementation but has now been
fixed by r278465.

Tested on x86_64-linux, applying to trunk.

2019-11-20  Marek Polacek  <polacek@redhat.com>

	PR c++/92443
	* g++.dg/cpp0x/constexpr-92443.C: New test.

Patch
diff mbox series

diff --git gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C
new file mode 100644
index 00000000000..8d03e3ed871
--- /dev/null
+++ gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C
@@ -0,0 +1,12 @@ 
+// PR c++/92443
+// { dg-do compile { target c++11 } }
+
+struct a {
+  constexpr a(long) : b() {}
+  operator long() const;
+  operator bool();
+  constexpr friend a operator|(a, a c) { return c; }
+  long b;
+};
+using d = a;
+constexpr d e = 6, f = f | e;