diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d6da58fec430a34904983c94b97a693d7aa61ec..5815eb44d9da00c03625519b983f91c2161f273f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Sun Oct 31 20:25:42 1999 Mark P. Mitchell <mark@codesourcery.com> + + * expr.c (readonly_fields_p): Ignore everything except FIELD_DECLs. + Sun Oct 31 20:42:17 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * hard-reg-set.h (reg_names): Constify a char*. diff --git a/gcc/expr.c b/gcc/expr.c index 59ae687c5d872599eee73e23cfe399e6984f7011..69c6f56bced139c7eec30cc66e847362ac709780 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;