Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.dg / template / nontype4.C
blobab39ed443976216cc6997a69e5ec7f7d7e80b088
1 // { dg-do compile }
3 // Origin: Ivan Godard <igodard@pacbell.net>
4 //         Volker Reichelt <reichelt@gcc.gnu.org>
6 // PR c++/13797: ICE invalid nontype template parameter
8 template <int> struct A
10     typedef A<0> B;             // { dg-error "previous declaration" }
11     template <B> struct B {};   // { dg-error "not a valid type|typedef" }
14 A<0> a;