public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15620] Statement functions and optimization cause IC
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
@ 2004-05-24 1:56 ` pinskia at gcc dot gnu dot org
2004-05-24 2:02 ` pbrook at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 1:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-23 19:10 -------
Confirmed, a fortran problem and not an optimization issue:
z = t;
z is of a reference type to a complex but t is of complex type, this tree is invalid.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-05-23 19:10:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/15620] New: Statement functions and optimization cause IC
@ 2004-05-24 1:56 gcc-bugzilla at gcc dot gnu dot org
2004-05-24 1:56 ` [Bug fortran/15620] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-05-24 1:56 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/15620] Statement functions and optimization cause IC
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
2004-05-24 1:56 ` [Bug fortran/15620] " pinskia at gcc dot gnu dot org
@ 2004-05-24 2:02 ` pbrook at gcc dot gnu dot org
2004-05-31 16:36 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-05-24 2:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pbrook at gcc dot gnu dot org 2004-05-23 21:52 -------
We have much deeper problems.
function foo (x)
integer z, y, foo, x
bar(Z) = Z*z
z = 42
t = bar(x)
foo = t + z
END function
program prog
integer foo
if (foo(1) .ne. 43) call abort
end program
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/15620] Statement functions and optimization cause IC
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
2004-05-24 1:56 ` [Bug fortran/15620] " pinskia at gcc dot gnu dot org
2004-05-24 2:02 ` pbrook at gcc dot gnu dot org
@ 2004-05-31 16:36 ` cvs-commit at gcc dot gnu dot org
2004-05-31 16:38 ` pbrook at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-31 16:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-30 14:37 -------
Subject: Bug 15620
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pbrook@gcc.gnu.org 2004-05-30 14:37:25
Modified files:
gcc/fortran : ChangeLog trans-decl.c trans-expr.c
trans-stmt.c trans.h
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.fortran-torture/execute:
st_function_1.f90
st_function_2.f90
Log message:
PR fortran/15620
* trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
* trans-expr.c (gfc_trans_string_copy): New function.
(gfc_conv_statement_function): Use them. Create temp vars. Enforce
character lengths.
(gfc_conv_string_parameter): Use gfc_trans_string_copy.
* trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
* trans.h (struct gfc_saved_var): Define.
(gfc_shadow_sym, gfc_restore_sym): Add prototypes.
testsuite/
* gfortran.fortran-torture/execute/st_function_1.f90: New test.
* gfortran.fortran-torture/execute/st_function_2.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.52&r2=1.53
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-expr.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-stmt.c.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans.h.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3794&r2=1.3795
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/st_function_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/st_function_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/15620] Statement functions and optimization cause IC
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-05-31 16:36 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-31 16:38 ` pbrook at gcc dot gnu dot org
2004-05-31 17:06 ` pinskia at gcc dot gnu dot org
2004-06-09 18:25 ` pbrook at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-05-31 16:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pbrook at gcc dot gnu dot org 2004-05-30 14:48 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/15620] Statement functions and optimization cause IC
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-05-31 16:38 ` pbrook at gcc dot gnu dot org
@ 2004-05-31 17:06 ` pinskia at gcc dot gnu dot org
2004-06-09 18:25 ` pbrook at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31 17:06 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/15620] Statement functions and optimization cause IC
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-05-31 17:06 ` pinskia at gcc dot gnu dot org
@ 2004-06-09 18:25 ` pbrook at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-06-09 18:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pbrook at gcc dot gnu dot org 2004-06-09 18:25 -------
*** Bug 14054 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bdavis9659 at comcast dot
| |net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15620
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-06-09 18:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24 1:56 [Bug fortran/15620] New: Statement functions and optimization cause IC gcc-bugzilla at gcc dot gnu dot org
2004-05-24 1:56 ` [Bug fortran/15620] " pinskia at gcc dot gnu dot org
2004-05-24 2:02 ` pbrook at gcc dot gnu dot org
2004-05-31 16:36 ` cvs-commit at gcc dot gnu dot org
2004-05-31 16:38 ` pbrook at gcc dot gnu dot org
2004-05-31 17:06 ` pinskia at gcc dot gnu dot org
2004-06-09 18:25 ` pbrook at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).