This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR fortran/46794: Fix ICE with powers of integers
- From: Daniel Kraft <d at domob dot eu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Dec 2010 16:38:27 +0100
- Subject: Re: [Patch, Fortran] PR fortran/46794: Fix ICE with powers of integers
- References: <4CF97314.4000206@domob.eu> <4CFA00A1.6020101@net-b.de>
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
--
http://www.pro-vegan.info/
--
Done: Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Mon-Pri
2010-12-17 Daniel Kraft <d@domob.eu>
PR fortran/46794
* gfortran.dg/power2.f90: Initialize variables.
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