aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-11-01 04:08:54 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-01 04:08:54 +0000
commit77fd6d104a302eef12ab3d5e28602b66b5017656 (patch)
tree12857d39a7bf55c73f1280f11bfdf2d1560fc75d /gcc/expr.c
parente26ef527af1d8933591cb8de133a645363508cb3 (diff)
downloadgcc-77fd6d104a302eef12ab3d5e28602b66b5017656.zip
gcc-77fd6d104a302eef12ab3d5e28602b66b5017656.tar.gz
gcc-77fd6d104a302eef12ab3d5e28602b66b5017656.tar.bz2
* expr.c (readonly_fields_p): Ignore everything except FIELD_DECLs.
From-SVN: r30306
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 59ae687..69c6f56 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;