Bug 42285 - ICE in Graphite's scan_tree_for_params for 416.gamess
Summary: ICE in Graphite's scan_tree_for_params for 416.gamess
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Sebastian Pop
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-12-04 20:43 UTC by Janis Johnson
Modified: 2009-12-09 04:56 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-12-05 02:31:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2009-12-04 20:43:31 UTC
GCC trunk gets an internal compiler error when building SPEC CPU2006 test 416.gamess with "-O2 -floop-interchange" on powerpc-linux, as demonstrated by this minimized testcase:

      SUBROUTINE EFGRDM(NCF,NFRG,G,RTRMS,GM,IOPT,K1)
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      DIMENSION G(*),RTRMS(*),GM(*)

      DUM = 0
      DO I=1,NFRG
         DO J=1,3
            IF (IOPT.EQ.0) THEN
               GM(K1)=G(K1)
            END IF
         END DO
         DO J=1,3
            JDX=NCF*9+IOPT*9*NFRG
            DO M=1,3
               DUM=DUM+RTRMS(JDX+M)
            END DO
            GM(K1)=DUM
         END DO
      END DO
      RETURN
      END

elm3b187% /opt/gcc-nightly/trunk/bin/gfortran -c -O2 -floop-interchange bug.f
bug.f: In function ‘efgrdm’:
bug.f:1:0: internal compiler error: in scan_tree_for_params, at graphite-sese-to-poly.c:815
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

A Graphite-enabled trunk build is broken during the 19-hour range from r150250 to 150300.  The test passes with the build just before that range and fails with r150301, the first revision that builds after a merge from the Graphite branch.
Comment 1 Dominique d'Humieres 2009-12-04 21:41:09 UTC
Confirmed on x86_64-apple-darwin10.
Comment 2 Sebastian Pop 2009-12-09 04:55:10 UTC
Subject: Bug 42285

Author: spop
Date: Wed Dec  9 04:54:54 2009
New Revision: 155100

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155100
Log:
Fix PR42285.

2009-12-08  Sebastian Pop  <sebpop@gmail.com>

	PR middle-end/42285
	* graphite-scop-detection.c (graphite_can_represent_init): Also
	handle more complex MULT_EXPRs containing parameters by recursion
	on the structure.

	* testsuite/gfortran.dg/graphite/pr42285.f90: New.

Added:
    branches/graphite/gcc/testsuite/gfortran.dg/graphite/pr42285.f90
Modified:
    branches/graphite/gcc/ChangeLog.graphite
    branches/graphite/gcc/graphite-scop-detection.c

Comment 3 Sebastian Pop 2009-12-09 04:56:22 UTC
Fixed in the Graphite branch, I will commit this to trunk once it passes regtest on the branch.

Sebastian
Comment 4 Sebastian Pop 2009-12-09 15:18:38 UTC
Subject: Bug 42285

Author: spop
Date: Wed Dec  9 15:18:22 2009
New Revision: 155108

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155108
Log:
Fix PR42285.

2009-12-08  Sebastian Pop  <sebpop@gmail.com>

	PR middle-end/42285
	* graphite-scop-detection.c (graphite_can_represent_init): Also
	handle more complex MULT_EXPRs containing parameters by recursion
	on the structure.

	* testsuite/gfortran.dg/graphite/pr42285.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/graphite/pr42285.f90
Modified:
    trunk/gcc/ChangeLog.graphite
    trunk/gcc/graphite-scop-detection.c