diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-70204b.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-70204b.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-70204b.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-70204b.C new file mode 100644 index 00000000000..2b07d4fec9e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-70204b.C @@ -0,0 +1,10 @@ +// PR c++/70204 +// { dg-do compile { target c++11 } } + +int a; + +void fn1 () +{ + const int x = 0 * a; + constexpr int y = x; // { dg-error "constant" } +} |