diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-11-15 10:03:41 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-11-15 10:03:41 +0000 |
commit | 36a68fe705785961c143e33c0d52aa4d4ef85097 (patch) | |
tree | 0641d81cf0e6078472b02b99684118322500976f /gcc/testsuite | |
parent | f5e99456f19b80978984f781e1d847b90d09b30a (diff) | |
download | gcc-36a68fe705785961c143e33c0d52aa4d4ef85097.zip gcc-36a68fe705785961c143e33c0d52aa4d4ef85097.tar.gz gcc-36a68fe705785961c143e33c0d52aa4d4ef85097.tar.bz2 |
re PR c++/3154 (Tree check: expected class 't', have 'd' (type_decl) in is_aggr_type, at cp/init.c:1435)
cp:
PR g++/3154
* init.c (sort_base_init): Remove unreachable code.
(expand_member_init): Adjust comment to reflect reality. Simplify
and remove unreachable code.
testsuite:
* g++.dg/other/init1.C: New test.
From-SVN: r47047
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/init1.C | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 924e3b1..e544dcc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-11-15 Nathan Sidwell <nathan@codesourcery.com> + + * g++.dg/other/init1.C: New test. + 2001-11-14 Geoffrey Keating <geoffk@redhat.com> * gcc.dg/noncompile/920923-1.c: xstormy16 produces an extra error diff --git a/gcc/testsuite/g++.dg/other/init1.C b/gcc/testsuite/g++.dg/other/init1.C new file mode 100644 index 0000000..bf4c079 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/init1.C @@ -0,0 +1,28 @@ +// { dg-do compile } + +// Copyright (C) 2001 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 "type `T::Foo' is not" "" } +}; + +struct S : B +{ + int Parent; + + S () :Parent (1) {} +}; |