Message ID | 51DDEB8E.9040108@oracle.com |
---|---|
State | New |
Headers | show |
Index: g++.dg/cpp0x/constexpr-ice7.C =================================================================== --- g++.dg/cpp0x/constexpr-ice7.C (revision 0) +++ g++.dg/cpp0x/constexpr-ice7.C (working copy) @@ -0,0 +1,15 @@ +// PR c++/57827 +// { dg-do compile { target c++11 } } + +struct C +{ + constexpr int fun (int x) + { + return x + 1; + } + + int a = 2; + int b = fun(a); +}; + +C c;