This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ICE 373


> 	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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]