This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR30147, fold_read_from_constant_string ICEing on aggregate return type
- From: Richard Guenther <rguenther at suse dot de>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Dec 2006 13:57:37 +0100 (CET)
- Subject: Re: [PATCH] Fix PR30147, fold_read_from_constant_string ICEing on aggregate return type
- References: <Pine.LNX.4.64.0612121312470.3105@zhemvz.fhfr.qr> <457EA143.8000005@lu.unisi.ch>
On Tue, 12 Dec 2006, Paolo Bonzini wrote:
> Richard Guenther wrote:
> > This fixes PR30147 where we try to fold
> >
> > *(charD.21[1:1] *) "K"
> >
> > to 'K' of type (charD.21[1:1] *). On fold-converting to that type we
> > ICE.
> >
> > Fixed by only folding a read if the return type is integer.
>
> Why not INTEGRAL_TYPE_P?
I wouldn't expect STRING_CSTs of enum or boolean type. We're checking
for TREE_CODE (string) == STRING_CST at least.
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs