8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C
Jason Merrill a258e46458 c++: Add test for PR91607.
PR c++/91607
     * g++.dg/cpp0x/constexpr-const3.C: New.
2020-03-05 10:14:13 -05:00

13 lines
196 B
C

// 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);
}