OSDN Git Service

* typeck.c (build_component_ref): Make sure FIELD has a lang_specific
authorbrendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jun 1998 10:01:13 +0000 (10:01 +0000)
committerbrendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jun 1998 10:01:13 +0000 (10:01 +0000)
piece before checking DECL_MUTABLE_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20406 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 37ebb1b..72f629a 100644 (file)
@@ -1,3 +1,8 @@
+1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
+
+       * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
+       piece before checking DECL_MUTABLE_P.
+
 1998-06-10  John Carr  <jfc@mit.edu>
 
        * tree.c (debug_binfo): Make printf format match arguments.
index 8156398..b3a4078 100644 (file)
@@ -2114,7 +2114,7 @@ build_component_ref (datum, component, basetype_path, protect)
     TREE_READONLY (ref) = 1;
   if (TREE_THIS_VOLATILE (datum) || TREE_THIS_VOLATILE (field))
     TREE_THIS_VOLATILE (ref) = 1;
-  if (DECL_MUTABLE_P (field))
+  if (DECL_LANG_SPECIFIC (field) && DECL_MUTABLE_P (field))
     TREE_READONLY (ref) = 0;
 
   return ref;