This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.2, mainline] Fix for g77.f-torture/execute/f90-intrinsic-numeric.f on x86-64
- From: Jan Hubicka <jh at suse dot cz>
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org,rth at cygnus dot com, aj at suse dot de, patches at x86-64 dot org
- Date: Tue, 3 Sep 2002 14:12:25 +0200
- Subject: Re: [3.2, mainline] Fix for g77.f-torture/execute/f90-intrinsic-numeric.f on x86-64
- References: <20020902151128.A27003@chimera.suse.cz> <3D73E0F5.9040302@moene.indiv.nluug.nl>
> Jan Hubicka wrote:
> >Hi,
> >g77.f-torture/execute/f90-intrinsic-numeric.f fails to compile on x86-64
> >because it uses TFmode for converting fp->integer in unsigned way and later
> >promotes the TFmode argument to be constant in CSE. CSE attempts to force
> >constant into memory in order to make instruction match that needs to get
> >constant_alignment, for that it needs type of the constants that gets into
> >ffe_type_for_mode that returns NULL and we get nice crash.
> >
> >This patch fixes the problem by adding long_double_type_node to it.
> >
> >Bootstrapped/regtested 3.2 release and mainline. OK for 3.2 branch and
> >mainline?
>
> As far as mainline is concerned, this patch is OK with me. BTW, doesn't
> long_double_type_node mean different things on different hardware (i.e.,
> isn't a long double 80 bits on a plain x86 ?)
Yes, it has different mode and different size, however the i386 backend
is condigured in a way that it never allows TFmode in 32bit compilation
and XFmode in 64bit compilation exactly for the reason that typing
doesn't work.
In longer term, I would like to have GCC fixed to allow multiple FP
representations, but that is a lot of work.
(both x86_64 and IA-64 defines long double to be 128bit but use only
80bit format, while they allows __float128 too that is fully 128bit type
that brings us trouble). The fix is involved.
Honza
>
> --
> Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
> Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
> Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
> Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)