Message ID | 20191120225810.GC3791@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] Add test for c++/92443 | expand |
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;