diff mbox

[Fortran] PR fortran/46794: Fix ICE with powers of integers

Message ID 4D0B83F3.2020600@domob.eu
State New
Headers show

Commit Message

Daniel Kraft Dec. 17, 2010, 3:38 p.m. UTC
Tobias Burnus wrote:
> Dear Daniel,
> 
> Daniel Kraft wrote:
>> I do not entirely like the way this is done in the patch (with the two 
>> variables and "special casing"), but don't see a better implementation 
>> -- what do you think?
> 
> I think it is OK - at least I have trouble finding a better solution.
> 
>> Regression-tested on x86_64-unknown-linux-gnu without failures -- 
>> though the run somehow looked strange to me (on the compile-farm); 
>> I'll try again to be sure.  Ok for trunk?
> 
> OK for the trunk. Can you check whether one needs to likewise for the 
> 4.5 and 4.4 branch? (I think one should check on source level - the 
> verify_tree might not always catch it. For some reasons, it ICEs here 
> with 4.4 and 4.6 but not with 4.5; however, I think that's rather by 
> chance and not because of a proper casting.)

Finally after 4.5 is open again, I committed the attached as test-case 
fix for 4.5 after a successful test on x86_64-unknown-linux-gnu. 
Closing the PR now.

Daniel
diff mbox

Patch

Index: gcc/testsuite/gfortran.dg/power2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/power2.f90	(revision 167582)
+++ gcc/testsuite/gfortran.dg/power2.f90	(working copy)
@@ -13,6 +13,9 @@ 
   INTEGER(KIND=1) :: k1
   INTEGER(KIND=2) :: k2
 
+  k1 = 1_1
+  k2 = 1_2
+
   k1 = 1_1 + 1_1**k1
   k2 = 1_2 + 1_2**k2