fold-const.c (fold_indirect_ref_1): Avoid removing NOP_EXPRs with type qualifiers...
authorRichard Guenther <rguenth@gcc.gnu.org>
Wed, 11 May 2005 07:43:33 +0000 (07:43 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 11 May 2005 07:43:33 +0000 (07:43 +0000)
2005-05-11  Richard Guenther  <rguenth@gcc.gnu.org>

* fold-const.c (fold_indirect_ref_1): Avoid removing
NOP_EXPRs with type qualifiers like const.

From-SVN: r99566

gcc/ChangeLog
gcc/fold-const.c

index f9e5d1498a25d49b5d7246efaf2e0fb13c68f935..1621f15b3e6cec654e15de5efce4d044a2b9c17a 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-11  Richard Guenther  <rguenth@gcc.gnu.org>
+
+       * fold-const.c (fold_indirect_ref_1): Avoid removing
+       NOP_EXPRs with type qualifiers like const.
+
 2005-05-11  Richard Henderson  <rth@redhat.com>
 
        PR c/21502
index 0f3c8dd29e7287b96e6f05ba225a1ec7fb4e34d6..dc8d417a0c9edd717b405f6d245eb839fc975463 100644 (file)
@@ -11356,7 +11356,7 @@ fold_indirect_ref_1 (tree t)
   tree sub = t;
   tree subtype;
 
-  STRIP_NOPS (sub);
+  STRIP_TYPE_NOPS (sub);
   subtype = TREE_TYPE (sub);
   if (!POINTER_TYPE_P (subtype))
     return NULL_TREE;