diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error10.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/error10.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error10.C b/gcc/testsuite/g++.dg/other/error10.C new file mode 100644 index 000000000..26f7ca53f --- /dev/null +++ b/gcc/testsuite/g++.dg/other/error10.C @@ -0,0 +1,15 @@ +// PR c++/21930 +// Test case by Volker Reichelt +// { dg-do compile } + +template<int> struct A {}; + +template<int N> +void foo(const A<N> &a) +{ -A<N>(a); } // { dg-error "\\(\\* & a\\)" "" } + +void bar() +{ + foo(A<0>()); // { dg-message "instantiated from here" "" } +} + |