public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/40587]  New: ICE in emit_swap_insn at reg-stack.c:827
@ 2009-06-29 12:50 pmblakely at googlemail dot com
  2009-06-29 12:51 ` [Bug rtl-optimization/40587] " pmblakely at googlemail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pmblakely at googlemail dot com @ 2009-06-29 12:50 UTC (permalink / raw)
  To: gcc-bugs

See attached test-case, test.f:

> gfortran -c test.f -O1
Compiles OK

> gfortran -c test.f -O2
test.f: In function "test":
test.f:13: internal compiler error: in emit_swap_insn, at reg-stack.c:827

> gfortran -v
Using built-in specs.
Target: i586-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch=i586
--build=i586-redhat-linux
Thread model: posix
gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC) 

> uname -a
Linux pmblakely 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 16 23:19:53 EDT 2009
i686 i686 i386 GNU/Linux

This looks similar to the test-case for bug 39607 (fixed), in that the ICE
occurs when returned/class variables are only updated if a certain condition
holds, and otherwise a separate function is called, resulting in those
variables not being updated.

Note that the test-case for bug 39607 compiles correctly (i.e. no ICE) for this
version of gcc, so it's not a case of that patch not having gone through for
this compiler version.


-- 
           Summary: ICE in emit_swap_insn at reg-stack.c:827
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pmblakely at googlemail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug rtl-optimization/40587] ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
@ 2009-06-29 12:51 ` pmblakely at googlemail dot com
  2009-06-29 14:25 ` [Bug target/40587] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pmblakely at googlemail dot com @ 2009-06-29 12:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pmblakely at googlemail dot com  2009-06-29 12:51 -------
Created an attachment (id=18091)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18091&action=view)
Minimal test-case


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
  2009-06-29 12:51 ` [Bug rtl-optimization/40587] " pmblakely at googlemail dot com
@ 2009-06-29 14:25 ` pinskia at gcc dot gnu dot org
  2009-06-29 14:29 ` pmblakely at googlemail dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-06-29 14:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-06-29 14:25 -------
Didn't GCC say report the bug to http://bugzilla.redhat.com/bugzilla ?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |target
 GCC target triplet|                            |i586-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
  2009-06-29 12:51 ` [Bug rtl-optimization/40587] " pmblakely at googlemail dot com
  2009-06-29 14:25 ` [Bug target/40587] " pinskia at gcc dot gnu dot org
@ 2009-06-29 14:29 ` pmblakely at googlemail dot com
  2009-06-29 14:36 ` [Bug target/40587] [4.4/4.5 Regression] " ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pmblakely at googlemail dot com @ 2009-06-29 14:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pmblakely at googlemail dot com  2009-06-29 14:28 -------
(In reply to comment #2)
> Didn't GCC say report the bug to http://bugzilla.redhat.com/bugzilla ?
> 

Oh, yes. Sorry. I'll post it there.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (2 preceding siblings ...)
  2009-06-29 14:29 ` pmblakely at googlemail dot com
@ 2009-06-29 14:36 ` ubizjak at gmail dot com
  2009-06-29 16:18 ` hjl dot tools at gmail dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2009-06-29 14:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ubizjak at gmail dot com  2009-06-29 14:36 -------
The test also fails with FSF 4.4.1 and 4.5.0, but not with 4.3.4, which makes
for 4.4 regression.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.4.1 4.5.0
      Known to work|                            |4.3.4
   Last reconfirmed|0000-00-00 00:00:00         |2009-06-29 14:36:37
               date|                            |
            Summary|ICE in emit_swap_insn at    |[4.4/4.5 Regression] ICE in
                   |reg-stack.c:827             |emit_swap_insn at reg-
                   |                            |stack.c:827
   Target Milestone|---                         |4.4.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (3 preceding siblings ...)
  2009-06-29 14:36 ` [Bug target/40587] [4.4/4.5 Regression] " ubizjak at gmail dot com
@ 2009-06-29 16:18 ` hjl dot tools at gmail dot com
  2009-06-29 16:57 ` [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused " hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-29 16:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2009-06-29 16:18 -------
Revision 139590 (IRA):

http://gcc.gnu.org/ml/gcc-cvs/2008-08/msg01152.html

is very likely the cause.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com, vmakarov at redhat dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (4 preceding siblings ...)
  2009-06-29 16:18 ` hjl dot tools at gmail dot com
@ 2009-06-29 16:57 ` hjl dot tools at gmail dot com
  2009-07-03 12:39 ` vmakarov at redhat dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-29 16:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl dot tools at gmail dot com  2009-06-29 16:57 -------
Revision 139590 is the cause.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4/4.5 Regression] ICE in |[4.4/4.5 Regression]
                   |emit_swap_insn at reg-      |Revision 139590 caused ICE
                   |stack.c:827                 |in emit_swap_insn at reg-
                   |                            |stack.c:827


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (5 preceding siblings ...)
  2009-06-29 16:57 ` [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused " hjl dot tools at gmail dot com
@ 2009-07-03 12:39 ` vmakarov at redhat dot com
  2009-07-03 21:30 ` vmakarov at redhat dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vmakarov at redhat dot com @ 2009-07-03 12:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from vmakarov at redhat dot com  2009-07-03 12:38 -------
Thanks for reporting this.  I started to work on the PR.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (6 preceding siblings ...)
  2009-07-03 12:39 ` vmakarov at redhat dot com
@ 2009-07-03 21:30 ` vmakarov at redhat dot com
  2009-07-03 22:37 ` vmakarov at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vmakarov at redhat dot com @ 2009-07-03 21:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from vmakarov at redhat dot com  2009-07-03 21:30 -------
The problem was in usage of df_get_live_out in ira.c::build_insn_chain instead
of DF_LR_OUT.  Later contains r58 (assigned to st0 register) and it creates
restore insn for st0 after the call and prevents reg-stack crashing.

The original IRA patch used DF_LR_OUT.  After removing the old RA, accidentally
IRA started to use df_get_live_out used by the old RA.

I'll send a patch solving the problem soon.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (7 preceding siblings ...)
  2009-07-03 21:30 ` vmakarov at redhat dot com
@ 2009-07-03 22:37 ` vmakarov at gcc dot gnu dot org
  2009-07-03 22:46 ` vmakarov at gcc dot gnu dot org
  2009-07-04  8:39 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: vmakarov at gcc dot gnu dot org @ 2009-07-03 22:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from vmakarov at gcc dot gnu dot org  2009-07-03 22:36 -------
Subject: Bug 40587

Author: vmakarov
Date: Fri Jul  3 22:36:31 2009
New Revision: 149212

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149212
Log:
2009-07-03  Vladimir Makarov  <vmakarov@redhat.com>

        PR target/40587
        * ira.c (build_insn_chain): Use DF_LR_OUT instead of
        df_get_live_out.
        * testsuite/gfortran.dg/pr40587.f: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/pr40587.f
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (8 preceding siblings ...)
  2009-07-03 22:37 ` vmakarov at gcc dot gnu dot org
@ 2009-07-03 22:46 ` vmakarov at gcc dot gnu dot org
  2009-07-04  8:39 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: vmakarov at gcc dot gnu dot org @ 2009-07-03 22:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from vmakarov at gcc dot gnu dot org  2009-07-03 22:46 -------
Subject: Bug 40587

Author: vmakarov
Date: Fri Jul  3 22:46:30 2009
New Revision: 149213

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149213
Log:
2009-07-03  Vladimir Makarov  <vmakarov@redhat.com>

        PR target/40587
        * ira.c (build_insn_chain): Use DF_LR_OUT instead of
        df_get_live_out.
        * testsuite/gfortran.dg/pr40587.f: New test.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr40587.f
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/ira.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827
  2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
                   ` (9 preceding siblings ...)
  2009-07-03 22:46 ` vmakarov at gcc dot gnu dot org
@ 2009-07-04  8:39 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2009-07-04  8:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from ubizjak at gmail dot com  2009-07-04 08:39 -------
Fixed.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.4.1 4.5.0                 |
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-07-04  8:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 12:50 [Bug rtl-optimization/40587] New: ICE in emit_swap_insn at reg-stack.c:827 pmblakely at googlemail dot com
2009-06-29 12:51 ` [Bug rtl-optimization/40587] " pmblakely at googlemail dot com
2009-06-29 14:25 ` [Bug target/40587] " pinskia at gcc dot gnu dot org
2009-06-29 14:29 ` pmblakely at googlemail dot com
2009-06-29 14:36 ` [Bug target/40587] [4.4/4.5 Regression] " ubizjak at gmail dot com
2009-06-29 16:18 ` hjl dot tools at gmail dot com
2009-06-29 16:57 ` [Bug target/40587] [4.4/4.5 Regression] Revision 139590 caused " hjl dot tools at gmail dot com
2009-07-03 12:39 ` vmakarov at redhat dot com
2009-07-03 21:30 ` vmakarov at redhat dot com
2009-07-03 22:37 ` vmakarov at gcc dot gnu dot org
2009-07-03 22:46 ` vmakarov at gcc dot gnu dot org
2009-07-04  8:39 ` 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).