This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[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: 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: Mon, 2 Sep 2002 15:11:28 +0200
- Subject: [3.2, mainline] Fix for g77.f-torture/execute/f90-intrinsic-numeric.f on x86-64
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?
Honza
Mon Sep 2 15:08:08 CEST 2002 Jan Hubicka <jh@suse.cz>
* com.c (ffe_type_for_mode): Handle long double.
Index: com.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/com.c,v
retrieving revision 1.177
diff -c -3 -p -r1.177 com.c
*** com.c 31 Aug 2002 14:40:23 -0000 1.177
--- com.c 2 Sep 2002 13:07:54 -0000
*************** ffe_type_for_mode (mode, unsignedp)
*** 14879,14884 ****
--- 14879,14887 ----
if (mode == TYPE_MODE (double_type_node))
return double_type_node;
+ if (mode == TYPE_MODE (long_double_type_node))
+ return long_double_type_node;
+
if (mode == TYPE_MODE (build_pointer_type (char_type_node)))
return build_pointer_type (char_type_node);