diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C new file mode 100644 index 0000000..4fa3a83 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C @@ -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; |