]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/7788 (g++-3.2 internal error: Segmentation fault)
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 11 Nov 2002 12:42:17 +0000 (12:42 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 11 Nov 2002 12:42:17 +0000 (12:42 +0000)
cp:
PR c++/7788
* rtti.c (unemitted_tinfo_decl_p): Check it has a field.
testsuite:
PR c++/7788
* g++.dg/rtti/crash1.C: New test.

From-SVN: r59021

gcc/cp/ChangeLog
gcc/cp/rtti.c
gcc/testsuite/ChangeLog

index 6f7126138b330906a9d9c38ec5dbc54dbf3696d2..c492428cf6e0dd6d7c1abde098d12a2e207121de 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-11  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/7788
+       * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
+
 2002-11-02  Zack Weinberg  <zack@codesourcery.com>
 
        PR c/7353 redux
index ae23234ee66b7775bdc56fa0baf41ea6d6479f7d..39cb1c680545226469a5e5858f8d1024d645372a 100644 (file)
@@ -1413,11 +1413,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;
index 977fad8ffd0cab13ea4751a1f6175c5ff7f87afb..30d0750b86ce2acbe35b645f94ae5ce141e1260b 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-11  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/7788
+       * g++.dg/rtti/crash1.C: New test.
+
 2002-11-07  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * gcc.dg/wint_t-1.c, gcc.dg/wchar_t-1.c: Remove excess-errors