diff mbox

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

Message ID 4CFB66E6.20500@domob.eu
State New
Headers show

Commit Message

Daniel Kraft Dec. 5, 2010, 10:18 a.m. UTC
Steve Kargl wrote:
> On Sat, Dec 04, 2010 at 10:35:16AM +0100, Daniel Kraft wrote:
>> Hi Tobias,
>>
>> Tobias Burnus wrote:
>>>> 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.)
>> No further problems with the regtest, thanks for the review!  I 
>> committed as rev. 167453 to trunk.  I will look at the source for 4.4 
>> and 4.5 accordingly.
>>
> 
> Can you fix the test case to be valid Fortran.  k1 and k2
> are used uninitialized.

This is only a compile-test.  But I committed the attached patch as 
obvious fix to trunk after a successful test on x86_64-unknown-linux-gnu 
and will consider this of course also for the backports.

Daniel

Comments

Steve Kargl Dec. 5, 2010, 5:33 p.m. UTC | #1
On Sun, Dec 05, 2010 at 11:18:14AM +0100, Daniel Kraft wrote:
> Steve Kargl wrote:
> >On Sat, Dec 04, 2010 at 10:35:16AM +0100, Daniel Kraft wrote:
> >>Hi Tobias,
> >>
> >>Tobias Burnus wrote:
> >>>>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.)
> >>No further problems with the regtest, thanks for the review!  I 
> >>committed as rev. 167453 to trunk.  I will look at the source for 4.4 
> >>and 4.5 accordingly.
> >>
> >
> >Can you fix the test case to be valid Fortran.  k1 and k2
> >are used uninitialized.
> 
> This is only a compile-test.  But I committed the attached patch as 
> obvious fix to trunk after a successful test on x86_64-unknown-linux-gnu 
> and will consider this of course also for the backports.
> 

Thanks!  I knew it was only a compile, but i would prefer valid
Fortran in the testsuite (when possible) because we do not know
if anyone else is try to use it as a validation suite.
diff mbox

Patch

Index: gcc/testsuite/gfortran.dg/power2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/power2.f90	(revision 167470)
+++ 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