This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fold_indirect_ref
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 May 2005 14:42:37 -0400
- Subject: Re: [PATCH] Fix fold_indirect_ref
- References: <Pine.LNX.4.44.0505101735140.5176-100000@alwazn.tat.physik.uni-tuebingen.de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 10, 2005 at 05:40:32PM +0200, Richard Guenther wrote:
> 2005-04-28 Richard Guenther <rguenth@gcc.gnu.org>
>
> * fold-const.c (fold_indirect_ref_1): Avoid removing
> NOP_EXPRs with type qualifiers like const.
This patch causes a regression on gcc-4_0-branch in g++.dg/opt/temp1.C,
which is now miscompiled on at least i386/x86_64/ppc/ppc64/ia64.
Can you please look into it or revert?
Thanks.
> *** gcc/fold-const.c 27 Apr 2005 19:38:57 -0000 1.573
> --- gcc/fold-const.c 28 Apr 2005 13:31:37 -0000
> *************** fold_indirect_ref_1 (tree t)
> *** 11310,11316 ****
> tree sub = t;
> tree subtype;
>
> ! STRIP_NOPS (sub);
> subtype = TREE_TYPE (sub);
> if (!POINTER_TYPE_P (subtype))
> return NULL_TREE;
> --- 11315,11321 ----
> tree sub = t;
> tree subtype;
>
> ! STRIP_TYPE_NOPS (sub);
> subtype = TREE_TYPE (sub);
> if (!POINTER_TYPE_P (subtype))
> return NULL_TREE;
Jakub