------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-08-14 14:28 ------- I'll try to deal with that one, it looks nasty (although target-specific). Thanks for the bug-report.
1. Can you report what HP-PA architecture this is happening on? And the OS? (I have access to HP testdrive, if need arise I can try it there once I know the answer to these questions.) 2. It may or may not be of help, but I should note that there was a powerpc back-end bug at some point that this behaviour: PR30406. Can you try compiling the following code, without -fdefault-integer-8 (and, in case it does not fail, with -fdefault-integer-8)? function f(l) logical(8) :: f logical(8) :: l f = .not.l end function f 3. Actually, thinking about it more, the code in gcc/config/pa/pa.c looks close to that in gcc/config/rs6000/rs6000.c where the problem was fixed. Could you also try the following patch? Index: gcc/config/pa/pa.c =================================================================== --- gcc/config/pa/pa.c (revision 127394) +++ gcc/config/pa/pa.c (working copy) @@ -9075,7 +9075,7 @@ function_value (tree valtype, tree func } 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 4. Do you have testresults on this platform, and does gfortran.dg/logical_3.f90 PASS? -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-08-14 14:28:08 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33062