This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix fold_indirect_ref


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]