* f/com.c (ffecom_1): Properly handle TREE_READONLY for INDIRECT_REF.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Wed, 5 Dec 2001 11:56:22 +0000 (11:56 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 5 Dec 2001 11:56:22 +0000 (06:56 -0500)
From-SVN: r47667

gcc/f/ChangeLog
gcc/f/com.c

index e9728d3..7277d71 100644 (file)
@@ -1,3 +1,7 @@
+Wed Dec  5 06:49:21 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * com.c (ffecom_1): Properly handle TREE_READONLY for INDIRECT_REF.
+
 Mon Dec  3 18:56:04 2001  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * com.c: Remove leading capital from diagnostic messages, as
index 64aa8ff..7167b40 100644 (file)
@@ -9556,8 +9556,10 @@ ffecom_1 (enum tree_code code, tree type, tree node)
 
   if (TREE_SIDE_EFFECTS (node))
     TREE_SIDE_EFFECTS (item) = 1;
-  if ((code == ADDR_EXPR) && staticp (node))
+  if (code == ADDR_EXPR && staticp (node))
     TREE_CONSTANT (item) = 1;
+  else if (code == INDIRECT_REF)
+    TREE_READONLY (item) = TYPE_READONLY (type);
   return fold (item);
 }