summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-01 04:08:54 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-01 04:08:54 +0000
commit5d1cbc1db397a6325dc16e56c0d0d10725e0fce3 (patch)
tree12857d39a7bf55c73f1280f11bfdf2d1560fc75d /gcc/expr.c
parent1ff8dee7c716a5682cdecd426e8302f6f263b0e2 (diff)
downloadgcc-5d1cbc1db397a6325dc16e56c0d0d10725e0fce3.tar.gz
* expr.c (readonly_fields_p): Ignore everything except FIELD_DECLs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30306 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 59ae687c5d8..69c6f56bced 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5573,9 +5573,10 @@ readonly_fields_p (type)
tree field;
for (field = TYPE_FIELDS (type); field != 0; field = TREE_CHAIN (field))
- if (TREE_READONLY (field)
- || (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE
- && readonly_fields_p (TREE_TYPE (field))))
+ if (TREE_CODE (field) == FIELD_DECL
+ && (TREE_READONLY (field)
+ || (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE
+ && readonly_fields_p (TREE_TYPE (field)))))
return 1;
return 0;