From 8a29ce604bdb9588fa66aaabe27c92bf955cab3d Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 11 May 2005 07:43:33 +0000 Subject: [PATCH] fold-const.c (fold_indirect_ref_1): Avoid removing NOP_EXPRs with type qualifiers like const. 2005-05-11 Richard Guenther * fold-const.c (fold_indirect_ref_1): Avoid removing NOP_EXPRs with type qualifiers like const. From-SVN: r99566 --- gcc/ChangeLog | 5 +++++ gcc/fold-const.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9e5d1498a2..1621f15b3e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-05-11 Richard Guenther + + * fold-const.c (fold_indirect_ref_1): Avoid removing + NOP_EXPRs with type qualifiers like const. + 2005-05-11 Richard Henderson PR c/21502 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 0f3c8dd29e7..dc8d417a0c9 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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; -- 2.30.2