public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36680] New: ICE in spill_failure, reload1.c:1995
@ 2008-06-30 17:55 dfranke at gcc dot gnu dot org
2008-06-30 18:00 ` [Bug target/36680] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-06-30 17:55 UTC (permalink / raw)
To: gcc-bugs
The code snippet below compiles on FCFLAGS="-O1" and FCFLAGS="-O2", but gives
an ICE on FCFLAGS="-O1 -fschedule-insns". The additional option is supposed to
be part of -O2, according to [1].
The problem seems to be target-related as I could not reproduce it on
i686-pc-linux-gnu.
Code is reduced, but probably not minimal yet.
$> cat ice.f90
MODULE class_dummy_atom_kdtree_types
TYPE dummy_atom_kdtree_data
INTEGER :: dummy
END TYPE
TYPE :: dummy_atom_kdtree_node
TYPE(dummy_atom_kdtree_node_private), POINTER :: p
END TYPE
TYPE :: dummy_atom_kdtree_node_private
TYPE(dummy_atom_kdtree_data) :: data
END TYPE
TYPE :: dummy_atom_kdtree
TYPE(dummy_atom_kdtree_node) :: root
END TYPE
END MODULE
FUNCTION dummy_atom_kdtree_insert(this, item)
USE class_dummy_atom_kdtree_types, ONLY: dummy_atom_kdtree,
dummy_atom_kdtree_node, dummy_atom_kdtree_data
TYPE(dummy_atom_kdtree), INTENT(inout) :: this
TYPE(dummy_atom_kdtree_data), INTENT(in) :: item
TYPE(dummy_atom_kdtree_data) :: dummy_atom_kdtree_insert
TYPE(dummy_atom_kdtree_node) :: parent, current
TYPE(dummy_atom_kdtree_node) :: node
INTEGER :: cmp, level, discriminator
parent = dummy_atom_kdtree_node(null())
current = this%root
level = 1
discriminator = 1
DO WHILE (ASSOCIATED( current%p ))
discriminator = MODULO(level-1, 3) + 1
cmp = dummy_atom_kdtree_data_compare(item, current%p%data, discriminator)
level = level + 1
END DO
dummy_atom_kdtree_insert = item
END FUNCTION
$> gfortran-svn -O1 -fschedule-insns ice.f90
ice.f90: In function 'dummy_atom_kdtree_insert':
ice.f90:42: error: unable to find a register to spill in class 'AREG'
ice.f90:42: error: this is the insn:
(insn 19 31 20 4 ice.f90:37 (parallel [
(set (reg:SI 37 r8 [69])
(truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (reg:SI 37
r8 [68]))
(zero_extend:DI (reg:SI 42 r13 [78])))
(const_int 32 [0x20]))))
(clobber (scratch:SI))
(clobber (reg:CC 17 flags))
]) 342 {*umulsi3_highpart_insn} (expr_list:REG_DEAD (reg:SI 37 r8 [68])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
ice.f90:42: internal compiler error: in spill_failure, at reload1.c:1995
Please submit a full bug report,
$> gfortran-svn -v
gcc version 4.4.0 20080629 (experimental) (GCC)
The same holds for 4.3.2.
[1] http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options
--
Summary: ICE in spill_failure, reload1.c:1995
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
2008-06-30 17:55 [Bug target/36680] New: ICE in spill_failure, reload1.c:1995 dfranke at gcc dot gnu dot org
@ 2008-06-30 18:00 ` pinskia at gcc dot gnu dot org
2009-01-03 11:34 ` tkoenig at gcc dot gnu dot org
2009-09-17 11:55 ` ubizjak at gmail dot com
2 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-06-30 18:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-06-30 17:59 -------
No -fschedule-insns is not included for x86 because of register pressure.
See PR 27001 also. There are many others due to the RA being dumb.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ra
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
2008-06-30 17:55 [Bug target/36680] New: ICE in spill_failure, reload1.c:1995 dfranke at gcc dot gnu dot org
2008-06-30 18:00 ` [Bug target/36680] " pinskia at gcc dot gnu dot org
@ 2009-01-03 11:34 ` tkoenig at gcc dot gnu dot org
2009-09-17 11:55 ` ubizjak at gmail dot com
2 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-01-03 11:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tkoenig at gcc dot gnu dot org 2009-01-03 11:32 -------
Confirmed, goes back at least to 4.2 (so not a regression).
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.4.0 4.3.3 4.2.4
Last reconfirmed|0000-00-00 00:00:00 |2009-01-03 11:32:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
2008-06-30 17:55 [Bug target/36680] New: ICE in spill_failure, reload1.c:1995 dfranke at gcc dot gnu dot org
2008-06-30 18:00 ` [Bug target/36680] " pinskia at gcc dot gnu dot org
2009-01-03 11:34 ` tkoenig at gcc dot gnu dot org
@ 2009-09-17 11:55 ` ubizjak at gmail dot com
2 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2009-09-17 11:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ubizjak at gmail dot com 2009-09-17 11:55 -------
Is this failure still triggered with recent mainline after
http://gcc.gnu.org/ml/gcc-cvs/2009-09/msg00094.html ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <bug-36680-4@http.gcc.gnu.org/bugzilla/>]
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
@ 2012-09-01 21:24 ` ubizjak at gmail dot com
2012-09-01 22:12 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-01 21:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-01 21:24:09 UTC ---
Can someone please fix fortran in the testcase, so it will compile with gcc
4.8?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
2012-09-01 21:24 ` ubizjak at gmail dot com
@ 2012-09-01 22:12 ` dominiq at lps dot ens.fr
2012-09-01 22:21 ` ubizjak at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-09-01 22:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-01 22:12:27 UTC ---
> Can someone please fix fortran in the testcase, so it will compile with gcc
> 4.8?
The mailer has split a line in two:
USE class_dummy_atom_kdtree_types, ONLY: dummy_atom_kdtree,
dummy_atom_kdtree_node, dummy_atom_kdtree_data
You can unsplit them, or replace them with (adding a & at the end of the first
line)
USE class_dummy_atom_kdtree_types, ONLY: dummy_atom_kdtree, &
dummy_atom_kdtree_node, dummy_atom_kdtree_data
I get the ICE with 4.4.6, but the code compiles with 4.5.3, 4.6.3, 4.7.1, and
trunk and '-O1 -fschedule-insns'.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
2012-09-01 21:24 ` ubizjak at gmail dot com
2012-09-01 22:12 ` dominiq at lps dot ens.fr
@ 2012-09-01 22:21 ` ubizjak at gmail dot com
2012-09-01 22:47 ` dominiq at lps dot ens.fr
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-01 22:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-01 22:21:05 UTC ---
(In reply to comment #5)
> I get the ICE with 4.4.6, but the code compiles with 4.5.3, 4.6.3, 4.7.1, and
> trunk and '-O1 -fschedule-insns'.
I propose we put the testcase in the testsuite (with -O1 -fschedule-insns for
x86) and close the bug.
Dominique, can you perhaps prepare the test in a correct way for the testsuite?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2012-09-01 22:21 ` ubizjak at gmail dot com
@ 2012-09-01 22:47 ` dominiq at lps dot ens.fr
2012-09-02 8:02 ` ubizjak at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-09-01 22:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-01 22:47:21 UTC ---
> Dominique, can you perhaps prepare the test in a correct way for the testsuite?
I have tested a slightly reduced version
! { dg-do compile }
! { dg-options "-O1 -fschedule-insns" }
MODULE class_dummy_atom_kdtree_types
TYPE dummy_atom_kdtree_data
INTEGER :: dummy
END TYPE
TYPE :: dummy_atom_kdtree_node
TYPE(dummy_atom_kdtree_node_private), POINTER :: p
END TYPE
TYPE :: dummy_atom_kdtree_node_private
TYPE(dummy_atom_kdtree_data) :: data
END TYPE
TYPE :: dummy_atom_kdtree
TYPE(dummy_atom_kdtree_node) :: root
END TYPE
END MODULE
FUNCTION dummy_atom_kdtree_insert(this, item)
USE class_dummy_atom_kdtree_types
TYPE(dummy_atom_kdtree), INTENT(inout) :: this
TYPE(dummy_atom_kdtree_data), INTENT(in) :: item
TYPE(dummy_atom_kdtree_node) :: parent, current
INTEGER :: cmp, level, discriminator
parent = dummy_atom_kdtree_node(null())
current = this%root
level = 1
discriminator = 1
DO WHILE (ASSOCIATED( current%p ))
discriminator = MODULO(level-1, 3) + 1
cmp = dummy_atom_kdtree_data_compare(item, current%p%data, discriminator)
level = level + 1
END DO
END FUNCTION
What is the magic to avoid the -O in "-O -O1 -fschedule-insns"?
For the record the original test and the reduced one compiles on
powerpc-apple-darwin9 also with 4.3.0 and 4.4.6.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2012-09-01 22:47 ` dominiq at lps dot ens.fr
@ 2012-09-02 8:02 ` ubizjak at gmail dot com
2012-09-02 8:10 ` uros at gcc dot gnu.org
2012-09-02 8:13 ` ubizjak at gmail dot com
6 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02 8:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 08:01:50 UTC ---
(In reply to comment #7)
> What is the magic to avoid the -O in "-O -O1 -fschedule-insns"?
You can't. This is how currently gfortran testsuite works.
The part that should eventually be fixed is in lib/gfortran.exp:
# look if this is dg-do-run test, in which case
# we cycle through the option list, otherwise we don't
if [expr [search_for $test "dg-do run"]] {
set option_list $torture_with_loops
} else {
set option_list [list { -O } ]
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2012-09-02 8:02 ` ubizjak at gmail dot com
@ 2012-09-02 8:10 ` uros at gcc dot gnu.org
2012-09-02 8:13 ` ubizjak at gmail dot com
6 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu.org @ 2012-09-02 8:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
--- Comment #9 from uros at gcc dot gnu.org 2012-09-02 08:10:26 UTC ---
Author: uros
Date: Sun Sep 2 08:10:21 2012
New Revision: 190855
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190855
Log:
PR target/36680
* gfortran.dg/pr36680.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/pr36680.f90
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/36680] ICE in spill_failure, reload1.c:1995
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2012-09-02 8:10 ` uros at gcc dot gnu.org
@ 2012-09-02 8:13 ` ubizjak at gmail dot com
6 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02 8:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.5.3, 4.6.3, 4.7.1
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 08:12:44 UTC ---
Closed as fixed in 4.8.0.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-09-02 8:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-30 17:55 [Bug target/36680] New: ICE in spill_failure, reload1.c:1995 dfranke at gcc dot gnu dot org
2008-06-30 18:00 ` [Bug target/36680] " pinskia at gcc dot gnu dot org
2009-01-03 11:34 ` tkoenig at gcc dot gnu dot org
2009-09-17 11:55 ` ubizjak at gmail dot com
[not found] <bug-36680-4@http.gcc.gnu.org/bugzilla/>
2012-09-01 21:24 ` ubizjak at gmail dot com
2012-09-01 22:12 ` dominiq at lps dot ens.fr
2012-09-01 22:21 ` ubizjak at gmail dot com
2012-09-01 22:47 ` dominiq at lps dot ens.fr
2012-09-02 8:02 ` ubizjak at gmail dot com
2012-09-02 8:10 ` uros at gcc dot gnu.org
2012-09-02 8:13 ` ubizjak at gmail dot com
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).