From: Jason Merrill Date: Thu, 5 Mar 2020 15:11:36 +0000 (-0500) Subject: c++: Add test for PR91607. X-Git-Tag: upstream/12.2.0~17991 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a258e46458043b11495faef119489a776eb68f60;p=platform%2Fupstream%2Fgcc.git c++: Add test for PR91607. PR c++/91607 * g++.dg/cpp0x/constexpr-const3.C: New. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C new file mode 100644 index 0000000..83e3155 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C @@ -0,0 +1,12 @@ +// PR c++/91607 +// { dg-do compile { target c++11 } } + +enum A { a }; +constexpr A f(const A x) { return x; } + +int main() +{ + constexpr A a0 = f(a); + constexpr A a1 {}; + constexpr A a2 = f(a1); +}