[committed] Fix PR target/33062

John David Anglin dave@hiauly1.hia.nrc.ca
Sat Sep 15 23:45:00 GMT 2007


The enclosed patch fixes two ICEs that occur when using f951 because
we have a difference between precision and bitsize for logical types.
The Fortran rules require that logical types be passed in the same
manner as the integer kind of the same bitsize.  Thus, we need to
check bitsize rather than precision.

A similar patch was applied to rs6000.c some time ago.

Tested on hppa-unknown-linux-gnu with no regressions.  Committed to
trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2007-09-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/33062
	* pa.c (function_value): Use GET_MODE_BITSIZE instead of TYPE_PRECISION.

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 128485)
+++ config/pa/pa.c	(working copy)
@@ -9075,7 +9075,7 @@
     }
 
   if ((INTEGRAL_TYPE_P (valtype)
-       && TYPE_PRECISION (valtype) < BITS_PER_WORD)
+       && GET_MODE_BITSIZE (TYPE_MODE (valtype)) < BITS_PER_WORD)
       || POINTER_TYPE_P (valtype))
     valmode = word_mode;
   else



More information about the Gcc-patches mailing list