diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/template35.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/template35.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template35.C b/gcc/testsuite/g++.old-deja/g++.jason/template35.C new file mode 100644 index 000000000..d2c1a3c57 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/template35.C @@ -0,0 +1,15 @@ +// { dg-do assemble } +// Bug: instantiation of D() corrupts declaration of basis[]. + +struct B { }; +template <int t> +struct D : public B +{ + D() : B () { } +}; + +B const * basis[] = +{ + new D<0>, + new D<1>, +}; |