diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash10.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/crash10.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash10.C b/gcc/testsuite/g++.dg/template/crash10.C new file mode 100644 index 000000000..62647ca72 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash10.C @@ -0,0 +1,27 @@ +//Origin: benko@sztaki.hu +//PR c++/11432 +// The mainline ICE on this one between 2003-01-16 and 2003-07-29. + +// { dg-do compile } + + extern "C" void abort(); + + +template <int A> +struct a +{ + static int const value = A - 1; +}; + + +template <int B> +struct b +{ + static int foo() + { + return a<L>::value; + } + + + static int const L = a<B + 1>::value; +}; |