This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15620] New: Statement functions and optimization cause IC
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2004 18:52:29 -0000
- Subject: [Bug fortran/15620] New: Statement functions and optimization cause IC
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider the following subroutine with a statement function.
SUBROUTINE BIM(Z,CN,W)
REAL M
COMPLEX Z, W, SZ, T
ANORM(Z) = AMAX1(ABS(REAL(Z)),ABS(AIMAG(Z)))
10 T = T*(SZ/D)
W = W + T
IF(ANORM(T) .GT. ANORM(W)) GO TO 10
END
kargl[202] gfc -c bim.f
kargl[203] gfc -c -O bim.f
bim.f: In function `bim':
bim.f:0: internal compiler error: tree check: expected record_type, union_type or qual_union_type; have reference_type in create_scalar_copies, at tree-sra.c:748
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Clearly, gfortran is generating an (optimized?) tree that breaks tree-ssa.
Environment:
System: FreeBSD c-67-168-59-70.client.comcast.net 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Sat Apr 24 10:33:08 PDT 2004 kargl@c-67-168-59-70.client.comcast.net:/usr/obj/usr/src/sys/HOTRATS i386
host: i386-unknown-freebsd5.2
build: i386-unknown-freebsd5.2
target: i386-unknown-freebsd5.2
configured with: ../gcc/configure --prefix=/home/kargl/gcc/work --enable-languages=c,f95
How-To-Repeat:
See above.
--
Summary: Statement functions and optimization cause IC
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kargl at c-67-168-59-70 dot client dot comcast dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-unknown-freebsd5.2
GCC host triplet: i386-unknown-freebsd5.2
GCC target triplet: i386-unknown-freebsd5.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620