diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/init1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/init1.C | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/init1.C b/gcc/testsuite/g++.dg/other/init1.C new file mode 100644 index 000000000..7fc7db66a --- /dev/null +++ b/gcc/testsuite/g++.dg/other/init1.C @@ -0,0 +1,28 @@ +// { dg-do compile } + +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 13 Nov 2001 <nathan@codesourcery.com> + +// Bug 3154 + +class A {}; + +struct B : A +{ + typedef A Parent; + + B () : Parent () {} +}; + +class T +{ + typedef int Foo; + T () : Foo () {} // { dg-error "T::Foo' is not" "" } +}; + +struct S : B +{ + int Parent; + + S () :Parent (1) {} +}; |