diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/error37.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/error37.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/error37.C b/gcc/testsuite/g++.dg/template/error37.C new file mode 100644 index 000000000..7f1f9ed78 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error37.C @@ -0,0 +1,12 @@ +// { dg-do compile } +// PR C++/29388 +// We used to ICE in is_ancestor because we would use int as the context of foo +// but that is invalid. + +template<int> struct A +{ + typedef int T; + void foo(); +}; + +template<int N> void A<N>::T::foo() {} // { dg-error "" } |