This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH] Fix 7788 ICE
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Sep 2002 19:27:26 +0100
- Subject: [C++ PATCH] Fix 7788 ICE
- Organization: Codesourcery LLC
Hi,
I've installed the attached obvious fix for 7788.
built & tested on i686-pc-linux-gnu.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7788
* rtti.c (unemitted_tinfo_decl_p): Check it has a field.
Index: cp/rtti.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/rtti.c,v
retrieving revision 1.142
diff -c -3 -p -r1.142 rtti.c
*** cp/rtti.c 21 Sep 2002 12:51:56 -0000 1.142
--- cp/rtti.c 29 Sep 2002 18:24:10 -0000
*************** unemitted_tinfo_decl_p (t, data)
*** 1419,1429 ****
TREE_CODE (t) == VAR_DECL
/* whos name points back to itself */
&& IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == t
! /* whos name's type is non-null */
&& TREE_TYPE (DECL_NAME (t))
! /* and whos type is a struct */
&& TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE
! /* with a first field of our pseudo type info */
&& TREE_TYPE (TYPE_FIELDS (TREE_TYPE (t))) == ti_desc_type_node)
return 1;
return 0;
--- 1419,1431 ----
TREE_CODE (t) == VAR_DECL
/* whos name points back to itself */
&& IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == t
! /* whose name's type is non-null */
&& TREE_TYPE (DECL_NAME (t))
! /* and whose type is a struct */
&& TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE
! /* with a field */
! && TYPE_FIELDS (TREE_TYPE (t))
! /* which is our pseudo type info */
&& TREE_TYPE (TYPE_FIELDS (TREE_TYPE (t))) == ti_desc_type_node)
return 1;
return 0;
// { dg-do compile }
// Copyright (C) 2002 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 29 Sep 2002 <nathan@codesourcery.com>
// PR 7788. ICE
class foo;
extern const foo bar;
class bar;