public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880
@ 2012-03-25 17:41 dan at danny dot cz
  2012-03-25 19:00 ` [Bug c/52714] " mikpe at it dot uu.se
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: dan at danny dot cz @ 2012-03-25 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52714
           Summary: ICE in fixup_reorder_chain, at cfglayout.c:880
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dan@danny.cz


Created attachment 26985
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26985
preprocessed source file

m68k-linux-gnu cross-compiler throws an internal error when compiling the file
from attachment with -O1 (-O0 and -O2 are OK), same error exist also 4.6.[23]

[dan@eagle tmp]$ m68k-linux-gnu-gcc -O1 -c regex.i 
../posix/regex.c: In function ‘re_match_2_internal’:
../posix/regex.c:5255:1: internal compiler error: in fixup_reorder_chain, at
cfglayout.c:880


[dan@eagle tmp]$ m68k-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=m68k-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/m68k-linux-gnu/4.7.0/lto-wrapper
Target: m68k-linux-gnu
Configured with: ../gcc-4.7.0-RC-20120302/configure
--disable-dependency-tracking --disable-silent-rules --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=m68k-linux-gnu --enable-targets=all
--program-prefix=m68k-linux-gnu- --enable-languages=c --without-headers
--enable-sjlj-exceptions --with-system-libunwind --disable-nls
--disable-threads --disable-shared --disable-libmudflap --disable-libssp
--disable-libgomp --disable-libquadmath --disable-gold --disable-decimal-float
--enable-checking= --enable-gnu-unique-object --enable-linker-build-id
--disable-plugin --enable-nls --with-system-zlib
--with-bugurl=http://bugzilla.redhat.com/bugzilla/ --enable-obsolete
Thread model: single
gcc version 4.7.0 20120302 (Red Hat 4.7.0-0.11.4) (GCC)


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

* [Bug c/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
@ 2012-03-25 19:00 ` mikpe at it dot uu.se
  2012-03-25 20:52 ` mikpe at it dot uu.se
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2012-03-25 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-03-25 17:40:43 UTC ---
I can reproduce the ICE with gcc 4.8-20120318, 4.7-20120324, and 4.6-20120323,
but 4.5-20120315 and 4.4.7 don't ICE.


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

* [Bug c/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
  2012-03-25 19:00 ` [Bug c/52714] " mikpe at it dot uu.se
@ 2012-03-25 20:52 ` mikpe at it dot uu.se
  2012-03-25 22:28 ` [Bug rtl-optimization/52714] " steven at gcc dot gnu.org
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2012-03-25 20:52 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2012-03-25 20:49:24 UTC ---
It's caused by Jakub's r164431:
http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00727.html

There are several HAVE_cc0 changes in that patch.


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
  2012-03-25 19:00 ` [Bug c/52714] " mikpe at it dot uu.se
  2012-03-25 20:52 ` mikpe at it dot uu.se
@ 2012-03-25 22:28 ` steven at gcc dot gnu.org
  2012-03-25 22:33 ` mikpe at it dot uu.se
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu.org @ 2012-03-25 22:28 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-25
                 CC|                            |steven at gcc dot gnu.org
          Component|c                           |rtl-optimization
     Ever Confirmed|0                           |1


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (2 preceding siblings ...)
  2012-03-25 22:28 ` [Bug rtl-optimization/52714] " steven at gcc dot gnu.org
@ 2012-03-25 22:33 ` mikpe at it dot uu.se
  2012-12-09 18:03 ` tg at mirbsd dot org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2012-03-25 22:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2012-03-25 22:30:05 UTC ---
Created attachment 26988
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26988
reduced test case


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (3 preceding siblings ...)
  2012-03-25 22:33 ` mikpe at it dot uu.se
@ 2012-12-09 18:03 ` tg at mirbsd dot org
  2012-12-09 20:23 ` mikpe at it dot uu.se
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: tg at mirbsd dot org @ 2012-12-09 18:03 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Thorsten Glaser <tg at mirbsd dot org> 2012-12-09 18:03:08 UTC ---
Created attachment 28910
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28910
preprocessed source, xz compressed

I ran into this as well, native compilation on Debian/m68k:

  CC     src/proxy-bio-unittest.o
gcc -DHAVE_CONFIG_H -I.     -g -O1 -Wall -fno-strict-aliasing
-D_FORTIFY_SOURCE=2 -fstack-protector-all -fwrapv -fPIE -Wstack-protector
--param=ssp-buffer-size=1 -c -o src/proxy-bio-unittest.o
src/proxy-bio-unittest.c
src/proxy-bio-unittest.c: In function 'need_out_bytes':
src/proxy-bio-unittest.c:38:5: warning: stack protector not protecting local
variables: variable length buffer [-Wstack-protector]
src/proxy-bio-unittest.c:60:1: internal compiler error: in fixup_reorder_chain,
at cfglayout.c:877
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccqReOfy.out file, please attach this to
your bugreport.
make[2]: *** [src/proxy-bio-unittest.o] Error 1

(pbuild3928)root@ara5:/ # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-4.6.real
COLLECT_LTO_WRAPPER=/usr/lib/gcc/m68k-linux-gnu/4.6/lto-wrapper
Target: m68k-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+m68k.2'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--disable-libssp --enable-plugin --enable-objc-gc --disable-werror
--disable-multilib --enable-checking=release --build=m68k-linux-gnu
--host=m68k-linux-gnu --target=m68k-linux-gnu
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+m68k.2) 

That’s from building
http://lists.debian.org/debian-devel-changes/2012/12/msg00549.html


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (4 preceding siblings ...)
  2012-12-09 18:03 ` tg at mirbsd dot org
@ 2012-12-09 20:23 ` mikpe at it dot uu.se
  2013-01-05 11:58 ` mikpe at it dot uu.se
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2012-12-09 20:23 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> 2012-12-09 20:22:53 UTC ---
Thorsten's test case also ICEs gcc-4.7-20121208 and gcc-4.8 r194325.


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (5 preceding siblings ...)
  2012-12-09 20:23 ` mikpe at it dot uu.se
@ 2013-01-05 11:58 ` mikpe at it dot uu.se
  2013-01-05 14:35 ` tg at mirbsd dot org
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2013-01-05 11:58 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Mikael Pettersson <mikpe at it dot uu.se> 2013-01-05 11:57:52 UTC ---
Created attachment 29086
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29086
revert gcc 4.6 to gcc 4.5 version of PR45695 fix

The ICE is caused by the gcc-4.6 version of the PR45695 fix.  That fix was
applied in different form to gcc-4.5, and there it doesn't cause any ICE.  This
patch reverts gcc-4.6 to the gcc-4.5 version of the PR45695 fix, which fixes
the ICE with gcc-4.6.  Bootstrapped and regression-tested on x86_64, m68k, arm,
sparc64, and powerpc64.

I still don't know why the 4.6 version of PR45695 causes the ICE, so I don't
intend to submit this patch at this time, but at least it could help other m68k
users.


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (6 preceding siblings ...)
  2013-01-05 11:58 ` mikpe at it dot uu.se
@ 2013-01-05 14:35 ` tg at mirbsd dot org
  2013-01-07 23:19 ` tg at mirbsd dot org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: tg at mirbsd dot org @ 2013-01-05 14:35 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Thorsten Glaser <tg at mirbsd dot org> 2013-01-05 14:35:37 UTC ---
Cool, thanks! I got another one where it fails (centerim) and will test it with
this patch, then report back (that should take a few days).


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

* [Bug rtl-optimization/52714] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (7 preceding siblings ...)
  2013-01-05 14:35 ` tg at mirbsd dot org
@ 2013-01-07 23:19 ` tg at mirbsd dot org
  2013-11-19  9:50 ` [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] " rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: tg at mirbsd dot org @ 2013-01-07 23:19 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Thorsten Glaser <tg at mirbsd dot org> 2013-01-07 23:19:01 UTC ---
OK, this helped. Wonderful, thanks!


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (8 preceding siblings ...)
  2013-01-07 23:19 ` tg at mirbsd dot org
@ 2013-11-19  9:50 ` rguenth at gcc dot gnu.org
  2013-11-22 10:37 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.4
            Summary|[4.6/4.7/4.8/4.9            |[4.7/4.8/4.9 regression]
                   |regression] ICE in          |ICE in fixup_reorder_chain,
                   |fixup_reorder_chain, at     |at cfglayout.c:880
                   |cfglayout.c:880             |


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (9 preceding siblings ...)
  2013-11-19  9:50 ` [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] " rguenth at gcc dot gnu.org
@ 2013-11-22 10:37 ` rguenth at gcc dot gnu.org
  2013-12-24 23:59 ` steven at gcc dot gnu.org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-22 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |m68k-linux-gnu
           Priority|P3                          |P4


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (10 preceding siblings ...)
  2013-11-22 10:37 ` rguenth at gcc dot gnu.org
@ 2013-12-24 23:59 ` steven at gcc dot gnu.org
  2013-12-25  0:15 ` tg at mirbsd dot org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu.org @ 2013-12-24 23:59 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #9 from Steven Bosscher <steven at gcc dot gnu.org> ---
So... still a bug here?


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (11 preceding siblings ...)
  2013-12-24 23:59 ` steven at gcc dot gnu.org
@ 2013-12-25  0:15 ` tg at mirbsd dot org
  2013-12-25  8:12 ` steven at gcc dot gnu.org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: tg at mirbsd dot org @ 2013-12-25  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Thorsten Glaser <tg at mirbsd dot org> ---
Yes, we still run with the code reverted to the 4.5 version in Debian.

http://patch-tracker.debian.org/patch/series/view/gcc-4.8/4.8.2-10/pr52714.diff


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (12 preceding siblings ...)
  2013-12-25  0:15 ` tg at mirbsd dot org
@ 2013-12-25  8:12 ` steven at gcc dot gnu.org
  2013-12-29 15:56 ` schwab@linux-m68k.org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu.org @ 2013-12-25  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
   Last reconfirmed|2012-03-25 00:00:00         |2013-12-25


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (13 preceding siblings ...)
  2013-12-25  8:12 ` steven at gcc dot gnu.org
@ 2013-12-29 15:56 ` schwab@linux-m68k.org
  2014-02-06 21:08 ` law at redhat dot com
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: schwab@linux-m68k.org @ 2013-12-29 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Andreas Schwab <schwab@linux-m68k.org> ---
try_combine is called with

i1 = (insn 14 13 16 2 (set (reg/v/f:SI 34 [ stack ])
        (reg/f:SI 15 %sp)) pr52714.c:9 38 {*movsi_m68k2}
     (nil))
i2 = (insn 16 14 17 2 (set (cc0)
        (compare (reg/v/f:SI 34 [ stack ])
            (const_int 0 [0]))) pr52714.c:10 4 {*tstsi_internal_68020_cf}
     (nil))
i3 = (jump_insn 17 16 18 2 (set (pc)
        (if_then_else (eq (cc0)
                (const_int 0 [0]))
            (label_ref 40)
            (pc))) pr52714.c:10 390 {beq}
     (int_list:REG_BR_PROB 1014 (nil))
 -> 40)

This is then combined into
newpat = (parallel [
        (set (pc)
            (pc))
        (set (reg/v/f:SI 34 [ stack ])
            (reg/f:SI 15 %sp))
    ])

This isn't a recognized insn, and it needs to be split.  In the 4.5
version the condition "use_crosses_set_p (SET_SRC (XVECEXP (newpat, 0,
1)), DF_INSN_LUID (i2))" (which returns 1 due to PUSH_ROUNDING) prevents
this from being done, so the whole try fails.

In the post-4.5 version the condition is used to select which of the parts to
put first.  The result are the two insn
(insn 16 14 17 2 (set (pc)
        (pc)) pr52714.c:10 2147483647 {NOOP_MOVE}
     (nil))
(jump_insn 17 16 18 2 (set (reg/v/f:SI 34 [ stack ])
        (reg/f:SI 15 %sp)) pr52714.c:10 38 {*movsi_m68k2}
     (int_list:REG_BR_PROB 1014 (nil))
 -> 40)

This is obviously bogus, since the latter is no longer a valid jump_insn.


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (14 preceding siblings ...)
  2013-12-29 15:56 ` schwab@linux-m68k.org
@ 2014-02-06 21:08 ` law at redhat dot com
  2014-02-06 21:52 ` law at redhat dot com
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: law at redhat dot com @ 2014-02-06 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com
           Assignee|unassigned at gcc dot gnu.org      |law at redhat dot com

--- Comment #12 from Jeffrey A. Law <law at redhat dot com> ---
So the problem here is try_combine is playing things a bit fast and loose when
it rips apart the PARALLEL into two independent sets (one of which is a nop). 
In particular it assumes that I3 is an INSN as opposed to a JUMP_INSN or
CALL_INSN.  As a result combine is happy to create the bogus RTL as seen in
Andreas's last comment.

It's easily fixed and a patch for that is in testing.


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (15 preceding siblings ...)
  2014-02-06 21:08 ` law at redhat dot com
@ 2014-02-06 21:52 ` law at redhat dot com
  2014-02-27 19:29 ` law at gcc dot gnu.org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: law at redhat dot com @ 2014-02-06 21:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jeffrey A. Law <law at redhat dot com> ---
BTW, compiling with -O2 rather than -O1 makes this problem go away.

The problematical sequence (testing that the result of an alloca call is
nonzero) is eliminated by the VRP optimizers which only run at -O2 and above.


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

* [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (16 preceding siblings ...)
  2014-02-06 21:52 ` law at redhat dot com
@ 2014-02-27 19:29 ` law at gcc dot gnu.org
  2014-06-12 13:43 ` [Bug rtl-optimization/52714] [4.7/4.8 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: law at gcc dot gnu.org @ 2014-02-27 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Thu Feb 27 19:28:40 2014
New Revision: 208204

URL: http://gcc.gnu.org/viewcvs?rev=208204&root=gcc&view=rev
Log:
    PR rtl-optimization/52714
    * combine.c (try_combine): When splitting an unrecognized PARALLEL
    into two independent simple sets, if I3 is a jump, ensure the
    pattern we place into I3 is a (set (pc) ...)

    PR rtl-optimization/52714
    * gcc.c-torture/compile/pr52714.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr52714.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/52714] [4.7/4.8 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (17 preceding siblings ...)
  2014-02-27 19:29 ` law at gcc dot gnu.org
@ 2014-06-12 13:43 ` rguenth at gcc dot gnu.org
  2014-12-03  6:01 ` [Bug rtl-optimization/52714] [4.8 " segher at gcc dot gnu.org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52714

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.4                       |4.8.4

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.


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

* [Bug rtl-optimization/52714] [4.8 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (18 preceding siblings ...)
  2014-06-12 13:43 ` [Bug rtl-optimization/52714] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2014-12-03  6:01 ` segher at gcc dot gnu.org
  2014-12-19 13:39 ` jakub at gcc dot gnu.org
  2015-01-19 22:33 ` law at redhat dot com
  21 siblings, 0 replies; 23+ messages in thread
From: segher at gcc dot gnu.org @ 2014-12-03  6:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52714

--- Comment #16 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Wed Dec  3 06:00:54 2014
New Revision: 218302

URL: https://gcc.gnu.org/viewcvs?rev=218302&root=gcc&view=rev
Log:
    PR rtl-optimization/52714
    * combine.c (try_combine): Allow combining two insns into two
    new insns if at least one of those is a noop.

gcc/testsuite/
    * gcc.target/m68k/pr52714.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.target/m68k/pr52714.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/52714] [4.8 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (19 preceding siblings ...)
  2014-12-03  6:01 ` [Bug rtl-optimization/52714] [4.8 " segher at gcc dot gnu.org
@ 2014-12-19 13:39 ` jakub at gcc dot gnu.org
  2015-01-19 22:33 ` law at redhat dot com
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52714

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug rtl-optimization/52714] [4.8 regression] ICE in fixup_reorder_chain, at cfglayout.c:880
  2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
                   ` (20 preceding siblings ...)
  2014-12-19 13:39 ` jakub at gcc dot gnu.org
@ 2015-01-19 22:33 ` law at redhat dot com
  21 siblings, 0 replies; 23+ messages in thread
From: law at redhat dot com @ 2015-01-19 22:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52714

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #18 from Jeffrey A. Law <law at redhat dot com> ---
Fixed in 4.9 and on trunk.  Not planning to backport to 4.8.


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

end of thread, other threads:[~2015-01-19 22:33 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-25 17:41 [Bug c/52714] New: ICE in fixup_reorder_chain, at cfglayout.c:880 dan at danny dot cz
2012-03-25 19:00 ` [Bug c/52714] " mikpe at it dot uu.se
2012-03-25 20:52 ` mikpe at it dot uu.se
2012-03-25 22:28 ` [Bug rtl-optimization/52714] " steven at gcc dot gnu.org
2012-03-25 22:33 ` mikpe at it dot uu.se
2012-12-09 18:03 ` tg at mirbsd dot org
2012-12-09 20:23 ` mikpe at it dot uu.se
2013-01-05 11:58 ` mikpe at it dot uu.se
2013-01-05 14:35 ` tg at mirbsd dot org
2013-01-07 23:19 ` tg at mirbsd dot org
2013-11-19  9:50 ` [Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] " rguenth at gcc dot gnu.org
2013-11-22 10:37 ` rguenth at gcc dot gnu.org
2013-12-24 23:59 ` steven at gcc dot gnu.org
2013-12-25  0:15 ` tg at mirbsd dot org
2013-12-25  8:12 ` steven at gcc dot gnu.org
2013-12-29 15:56 ` schwab@linux-m68k.org
2014-02-06 21:08 ` law at redhat dot com
2014-02-06 21:52 ` law at redhat dot com
2014-02-27 19:29 ` law at gcc dot gnu.org
2014-06-12 13:43 ` [Bug rtl-optimization/52714] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-12-03  6:01 ` [Bug rtl-optimization/52714] [4.8 " segher at gcc dot gnu.org
2014-12-19 13:39 ` jakub at gcc dot gnu.org
2015-01-19 22:33 ` law at redhat 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).