The following reply was made to PR c++/7721; it has been noted by GNATS. From: =?iso-8859-1?Q?Pop_S=E9bastian?= To: Gabriel Dos Reis Cc: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, johnc@parore.tait.co.nz, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/7721: Very simple (but incorrect) template chokes g++ Date: Wed, 9 Oct 2002 00:30:49 +0200 On Sun, Sep 29, 2002 at 04:36:45PM +0200, Gabriel Dos Reis wrote: > Pop Sébastian writes: > > [...] > > | Maybe we could give a better diagnostic for this error... > | Gaby, can you help to fix this error? > > Yes, actually there are several instances of this ICE in tthe GNATS -- > sorry I can't tell you off hand which ones (but I know there are more > than two :-). I should submit a patch this week -- I've been gotten > busy by more pressing things. > Seems like PR#7721 and PR#7803 are the same bug ... More explicitly G++ dies on the same statement switch (TREE_CODE (decl)) { [...] default: => my_friendly_assert (0, 20020917); decl is on both PRs a template_decl: for PR#7721 (gdb) p debug_tree (decl) type_5 VOID align 8 symtab 0 alias set -1 n_parents 0 use_template=0 interface-unknown pointer_to_this chain >> VOID file pr7721.ii line 2 align 1 arguments value elt 0 >> result type > decl_2 VOID file pr7721.ii line 2 align 1 chain decl_0 VOID file pr7721.ii line 1 align 1>> chain > $2 = void (gdb) for PR#7803 (gdb) p debug_tree (decl) type_1 type_2 type_5 VOID size align 8 symtab 0 alias set -1 fields > ignored in_system_header VOID file ../usr/include/c++/3.3/bits/stl_alloc.h line 657 align 1 context > arguments value elt 0 > chain value >>> result > chain > context ~X() X() X(constX&) n_parents 0 use_template=0 interface-unknown member-functions elt 1 elt 2 elt 3 elt 4 elt 5 elt 6 elt 7 > pointer_to_this chain >> in_system_header VOID file ../usr/include/c++/3.3/bits/stringfwd.h line 57 align 1 context arguments value elt 0 >> result type > in_system_header decl_2 VOID file ../usr/include/c++/3.3/bits/stl_alloc.h line 644 align 1 context chain in_system_header decl_0 VOID file ../usr/include/c++/3.3/bits/stringfwd.h line 56 align 1>> chain > $3 = void (gdb)