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

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
This commit is contained in:
Richard Guenther 2005-05-11 07:43:33 +00:00 committed by Richard Biener
parent 317a9ac39e
commit 8a29ce604b
2 changed files with 6 additions and 1 deletions

View 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

View 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;