mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-06 11:50:31 +08:00
re PR c++/7788 (g++-3.2 internal error: Segmentation fault)
cp: PR c++/7788 * rtti.c (unemitted_tinfo_decl_p): Check it has a field. testsuite: * g++.dg/rtti/crash1.C: New test. From-SVN: r57630
This commit is contained in:
parent
6ca6193b82
commit
03357c23e9
@ -1,3 +1,8 @@
|
||||
2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR c++/7788
|
||||
* rtti.c (unemitted_tinfo_decl_p): Check it has a field.
|
||||
|
||||
2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* cp-tree.h: Fix comment typos.
|
||||
|
@ -1419,11 +1419,13 @@ unemitted_tinfo_decl_p (t, data)
|
||||
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 */
|
||||
/* whose name's type is non-null */
|
||||
&& TREE_TYPE (DECL_NAME (t))
|
||||
/* and whos type is a struct */
|
||||
/* and whose type is a struct */
|
||||
&& TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE
|
||||
/* with a first field of our pseudo type info */
|
||||
/* 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;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* g++.dg/rtti/crash1.C: New test.
|
||||
|
||||
2002-09-29 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* gcc.dg/sibcall-1.c, gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c,
|
||||
|
10
gcc/testsuite/g++.dg/rtti/crash1.C
Normal file
10
gcc/testsuite/g++.dg/rtti/crash1.C
Normal file
@ -0,0 +1,10 @@
|
||||
// { 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;
|
Loading…
Reference in New Issue
Block a user