From: Marek Polacek Date: Wed, 20 Nov 2019 22:59:20 +0000 (+0000) Subject: Add test for PR c++/92443. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3697264c3aabddb0d77d3ae3a5a2bd7ccaad1790;p=gcc.git Add test for PR c++/92443. * g++.dg/cpp0x/constexpr-92443.C: New test. From-SVN: r278534 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99949be253c..eb33e63ae76 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-11-20 Marek Polacek + + PR c++/92443 + * g++.dg/cpp0x/constexpr-92443.C: New test. + 2019-11-20 Richard Sandiford PR testsuite/92366 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C new file mode 100644 index 00000000000..8d03e3ed871 --- /dev/null +++ b/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;