This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix debug/11231, error-recovery
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Wed, 24 Dec 2003 14:00:10 -0500
- Subject: [PATCH] Fix debug/11231, error-recovery
One more error recovery problem, this time in the debugging, dbx-format
symbol table.
OK, bootstrapped on powerpc-apple-darwin with no regressions?
ChangeLog:
* dbxout.c (dbxout_type_fields): Return if any item is error_mark_node
or the
type is error_mark_node.
Patch:
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.167
diff -u -p -r1.167 dbxout.c
--- dbxout.c 8 Nov 2003 18:48:59 -0000 1.167
+++ dbxout.c 24 Dec 2003 18:57:34 -0000
@@ -864,6 +864,10 @@ dbxout_type_fields (tree type)
field that we can support. */
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
{
+ /* If on of the nodes is an error_mark or its type is then
return early. */
+ if (tem == error_mark_node || TREE_TYPE (tem) == error_mark_node)
+ return;
+
/* Omit here local type decls until we know how to support them.
*/
if (TREE_CODE (tem) == TYPE_DECL
/* Omit fields whose position or size are variable or too large to