diff mbox

Many regressions with: [patch] Cleanup fortran/convert.c

Message ID CABu31nN6LEkYHu8uP4z2wMGLJa0Db32ijPs_G7Q0eZKOENHkLg@mail.gmail.com
State New
Headers show

Commit Message

Steven Bosscher March 10, 2012, 11:21 a.m. UTC
On Sat, Mar 10, 2012 at 11:19 AM, Tobias Burnus <burnus@net-b.de> wrote:
> Steven Bosscher wrote:
>>
>> This cleans up some remnants of the ancestors of fortran's convert.c,
>> which was copied from GNAT IIRC. I would bootstrap&test this, but trunk
>> appears to be broken for x86_64-linux right now (ICE in patch_jump_insn).
>> But I can post this
>> for review, at least.
>> OK for trunk, after bootstrap+test?
>
>
> Your patch seems to have caused many Fortran regressions. At least I see
> with 185156 only one (known) failure, cf.
> http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg01069.html
>
> While starting with 185160 there are many, many gfortran failures, cf.
> http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg01073.html

Yes, it seems that different boolean types aren't allowed. I must have
looked at the wrong test results somehow.

I'm testing this fix:

Comments

Richard Biener March 12, 2012, noon UTC | #1
On Sat, Mar 10, 2012 at 12:21 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Sat, Mar 10, 2012 at 11:19 AM, Tobias Burnus <burnus@net-b.de> wrote:
>> Steven Bosscher wrote:
>>>
>>> This cleans up some remnants of the ancestors of fortran's convert.c,
>>> which was copied from GNAT IIRC. I would bootstrap&test this, but trunk
>>> appears to be broken for x86_64-linux right now (ICE in patch_jump_insn).
>>> But I can post this
>>> for review, at least.
>>> OK for trunk, after bootstrap+test?
>>
>>
>> Your patch seems to have caused many Fortran regressions. At least I see
>> with 185156 only one (known) failure, cf.
>> http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg01069.html
>>
>> While starting with 185160 there are many, many gfortran failures, cf.
>> http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg01073.html
>
> Yes, it seems that different boolean types aren't allowed. I must have
> looked at the wrong test results somehow.
>
> I'm testing this fix:
>
> Index: convert.c
> ===================================================================
> --- convert.c   (revision 185160)
> +++ convert.c   (working copy)
> @@ -95,7 +95,8 @@ convert (tree type, tree expr)
>   if (code == VOID_TYPE)
>     return fold_build1_loc (input_location, CONVERT_EXPR, type, e);
>   if (code == BOOLEAN_TYPE)
> -    return truthvalue_conversion (e);
> +    return fold_build1_loc (input_location, NOP_EXPR, type,
> +                           truthvalue_conversion (e));

   return fold_convert_loc (input_location, type, truthvalue_conversion (e));

>   if (code == INTEGER_TYPE)
>     return fold (convert_to_integer (type, e));
>   if (code == POINTER_TYPE || code == REFERENCE_TYPE)
diff mbox

Patch

Index: convert.c
===================================================================
--- convert.c   (revision 185160)
+++ convert.c   (working copy)
@@ -95,7 +95,8 @@  convert (tree type, tree expr)
   if (code == VOID_TYPE)
     return fold_build1_loc (input_location, CONVERT_EXPR, type, e);
   if (code == BOOLEAN_TYPE)
-    return truthvalue_conversion (e);
+    return fold_build1_loc (input_location, NOP_EXPR, type,
+                           truthvalue_conversion (e));
   if (code == INTEGER_TYPE)
     return fold (convert_to_integer (type, e));
   if (code == POINTER_TYPE || code == REFERENCE_TYPE)