FX Coudert - [rs6000,patch] Fix ppc-specific problem with functions returning logical (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: FX Coudert
- To: gcc-patches List
- Cc: geoffk at geoffk dot org, dje at watson dot ibm dot com, Andrew Pinski , Dominique Dhumieres
- Date: Sat, 10 Feb 2007 18:22:26 +0100
- Subject: [rs6000,patch] Fix ppc-specific problem with functions returning logical(8) value
:ADDPATCH rs6000:The following patch, by Andrew Pinski, fixes PR target/30406, a ppc- specific issue triggered by Fortran code for a function returning a logical(8) value. The patch was built and successfully regtested by Dominique Dhumières.OK for mainline, 4.2 and 4.1?
Thanks, FX
Index: gcc/config/rs6000/rs6000.c
--- gcc/config/rs6000/rs6000.c (revision 121773) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -20437,7 +20437,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)) mode = TARGET_32BIT ? SImode : DImode; else Index: gcc/testsuite/gfortran.dg/logical_2.f90
--- gcc/testsuite/gfortran.dg/logical_2.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/logical_2.f90 (revision 0) @@ -0,0 +1,10 @@ +! { dg-do compile } +! This checks the fix for PR30406. +! +! Contributed by Francois-Xavier Coudert fxcoudert@gcc.gnu.org +!=============================================================== + +function f()
- logical(8) :: f
- f=.false._8 +end function f
2007-02-10 Andrew Pinski <andrew_pinski@playstation.sony.com> PR target/30406
* config/rs6000/rs6000.c (rs6000_function_value): Look at bit size instead
of precision.
2007-02-10 Francois-Xavier Coudert coudert@clipper.ens.fr
PR target/30406
* gfortran.dg/logical_2.f90: New test.
- Follow-Ups:
- Re: [rs6000,patch] Fix ppc-specific problem with functions returning logical(8) value
* From: David Edelsohn
- Re: [rs6000,patch] Fix ppc-specific problem with functions returning logical(8) value
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |