This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Some help with fold_convert() on RECORD_TYPEs
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: "GCC Development" <gcc at gcc dot gnu dot org>, "Fortran List" <fortran at gcc dot gnu dot org>
- Date: Fri, 29 Feb 2008 14:59:33 +0100
- Subject: Re: Some help with fold_convert() on RECORD_TYPEs
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=uxBDmb1g2GlvuKTfRbxspNy1v4m3I3MrS7ihvk9+Ssw=; b=p1yRQdAIF6MrJrRFsycbm+JyXaOjFKyFjdjn1P/HaVPZHfomf7v2TJvi8CSbqy51wmg9ZoUpALUQaRIvho/xugRM5hJNdhm8jF8okgkiaY43pqkJBHJefATqAAEy1gxQ6f4pohyl74ajoCrVnKZSRxAUavyOqrcBgn//YYPIrn0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=H/JNiDTut2Mifim4OEWOGP4TJ9uPirtlflV9DjUH4zAy0PIM4HSNevN58H2/oIHgzxz61/mJFIDJ672wXzgnSLe99/mYkixZibDomx8anvd6zGkacEQmnhP2HhNfXNlnyU1x5rzt8zH3AVRAjdYarrco4P+ihndv2rNBMK0+evg=
- References: <19c433eb0802290401y6a1e314w2fe279e274ab83ab@mail.gmail.com> <84fc9c000802290439m22bdd0cn85df949fcfc34f55@mail.gmail.com> <19c433eb0802290548i74fc22e1xe98e92ff036036ee@mail.gmail.com>
On Fri, Feb 29, 2008 at 2:48 PM, FX <fxcoudert@gmail.com> wrote:
> > Another workaround is to use a VIEW_CONVERT_EXPR in case
> > fold_convertible_p () returns false but you still think you are ok.
>
> I'm trying that, but fold_convertible_p () return true and it still
> ICEs in in fold_convert, at fold-const.c:2643! Basically,
> fold_convert() can't handle RECORD_TYPEs, but in fold_convertible_p()
> it falls into the default case and returns TRUE, in my case. Is it
> considered a middle-end bug?
Yeah, it should return false for some classes of types, RECORD_TYPE, UNION_TYPE,
ARRAY_TYPE come to my mind here. Patch welcome ;)
Richard.