This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ICE 373
- To: Theodore dot Papadopoulo at sophia dot inria dot fr
- Subject: Re: ICE 373
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Thu, 24 Sep 1998 10:02:31 +0200
- CC: egcs-bugs at cygnus dot com, egcs-patches at cygnus dot com
- References: <199809221003.MAA23823@mururoa.inria.fr>
> The following buggy code cause an ICE in both egcs1.1 and
> gcc version egcs-2.92.04 19980914.
Thanks for your report. Here is a patch.
Martin
1998-09-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
* decl.c (lookup_namespace_name): If the name is a namespace,
return it immediately.
Index: decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.213
diff -c -p -r1.213 decl.c
*** decl.c 1998/09/22 12:05:50 1.213
--- decl.c 1998/09/24 07:59:34
*************** lookup_namespace_name (namespace, name)
*** 4753,4758 ****
--- 4753,4763 ----
tree val;
my_friendly_assert (TREE_CODE (namespace) == NAMESPACE_DECL, 370);
+
+ /* This happens for A::B<int> when B is a namespace. */
+ if (TREE_CODE (name) == NAMESPACE_DECL)
+ return name;
+
my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 373);
val = binding_init (&_b);