summaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-01-10 05:32:45 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-01-09 21:32:45 -0800
commit975421be9e4f094f3958c264cc7f793221d90d39 (patch)
tree70d98eafb097c3d2a7585e486e79ca3de1b767dc /gcc/dbxout.c
parent7e4bd541a55ca095801384e1b3f387ab3246771a (diff)
downloadgcc-975421be9e4f094f3958c264cc7f793221d90d39.tar.gz
re PR debug/11231 (undefined array size inside struct cause segfault with -g)
2004-01-09 Andrew Pinski <pinskia@physics.uc.edu> PR debug/11231 * dbxout.c (dbxout_type_fields): Return if any item is error_mark_node or the type is error_mark_node. From-SVN: r75628
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index dee3839974a..e0044902357 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -864,6 +864,11 @@ 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