This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43505] New: [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2010 08:59:39 -0000
- Subject: [Bug fortran/43505] New: [4.5 Regression] type mismatch between an SSA_NAME and its symbol with -O3
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The testcase below is a development of that in PR41056 comment #8. It,
however, does not need -fwhole-file to trigger the ICE. The ICE does not occur
with GNU Fortran (GCC) 4.4.4 20100314 (prerelease). It also does not occur if
the declaration for 'gridws' is moved to main. Therefore, it is somehow
related to the fact that 'gridws' is use associated.
[pault@localhost pr41056]# /irun/bin/gfortran -static -O3 pr*6a.f90
pr41056a.f90: In function ?anyavg.1546.clone.0?:
pr41056a.f90:28:0: error: type mismatch between an SSA_NAME and its symbol
while verifying SSA_NAME hts_1 in statement
hts_1 = (real(kind=4)[0:D.1555] * restrict) &gridws;
pr41056a.f90:28:0: error: type mismatch between an SSA_NAME and its symbol
pr41056a.f90:28:0: error: in statement
hts_1 = (real(kind=4)[0:D.1555] * restrict) &gridws;
pr41056a.f90:28:0: internal compiler error: verify_ssa failed
Cheers
Paul
MODULE MAIN1
INTEGER , PARAMETER :: MXGLVL = 87
CHARACTER(8) :: SRCTYP
REAL :: GRIDWS(MXGLVL)
REAL :: ZI, HS
END MODULE MAIN1
PROGRAM TEST
USE MAIN1
IF (HS >= ZI) THEN
ELSEIF ( SRCTYP == 'AREA' &
.OR. SRCTYP == 'AREAPOLY' &
.OR. SRCTYP == 'AREACIRC' &
.OR. SRCTYP == 'OPENPIT' ) THEN
CALL ANYAVG (MXGLVL, GRIDWS)
CALL ANYAVG (MXGLVL, GRIDWS)
ELSE
IF ( HS > 0.0 ) THEN
CALL ANYAVG (MXGLVL, GRIDWS)
CALL ANYAVG (MXGLVL, GRIDWS)
CALL ANYAVG (MXGLVL, GRIDWS)
ENDIF
ENDIF
IF (HS.LT.ZI) THEN
ZI = HS
ENDIF
contains
SUBROUTINE ANYAVG(NLVLS,HTS)
INTEGER NLVLS
REAL HTS(NLVLS)
IF (5.LT.NLVLS) THEN
CALL GINTRP (HTS(5),HTS(5+1))
ENDIF
CALL GINTRP (HTS(5-1), HTS(5))
END SUBROUTINE ANYAVG
subroutine gintrp (x1, x2)
print *, x1, x2
end subroutine
END PROGRAM TEST
--
Summary: [4.5 Regression] type mismatch between an SSA_NAME and
its symbol with -O3
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: major
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43505