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