public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
@ 2013-10-09 15:41 sebastien at debian dot org
  2013-10-09 17:25 ` [Bug target/58668] " ktkachov at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: sebastien at debian dot org @ 2013-10-09 15:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58668
           Summary: [arm with hardfp ABI]: internal compiler error: in
                    cond_exec_process_insns, at ifcvt.c:339
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sebastien at debian dot org

Created attachment 30969
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30969&action=edit
Preprocessed source to replicate the ICE

See the attached preprocessed source for replicating the ICE.

Here are the compiler specs:

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.8.1-10'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.8.1 (Debian 4.8.1-10) 


Note that I was also able to replicate the ICE with a GCC snapshot from Sept
17, 2013. On the contrary, GCC 4.7.3 is not affected.


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

* [Bug target/58668] [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
@ 2013-10-09 17:25 ` ktkachov at gcc dot gnu.org
  2013-10-10  9:33 ` ktkachov at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-10-09 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

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

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Hmmm... I can't seem to reproduce it with current trunk and 4.8.2


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

* [Bug target/58668] [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
  2013-10-09 17:25 ` [Bug target/58668] " ktkachov at gcc dot gnu.org
@ 2013-10-10  9:33 ` ktkachov at gcc dot gnu.org
  2013-10-10  9:48 ` [Bug rtl-optimization/58668] [4.8, 4.9 regression][arm]: " rearnsha at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-10-10  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|arm-linux-gnueabihf         |arm-linux-gnueabihf,
                   |                            |arm-none-eabi
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-10-10
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.2, 4.9.0

--- Comment #2 from ktkachov at gcc dot gnu.org ---
After trying out some option combinations, I managed to reproduce it on 4.8 and
trunk. For me it ICEs with -O2, but works with -O3 _unless_ I add -fPIC, in
which case it ICEs.


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

* [Bug rtl-optimization/58668] [4.8, 4.9 regression][arm]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
  2013-10-09 17:25 ` [Bug target/58668] " ktkachov at gcc dot gnu.org
  2013-10-10  9:33 ` ktkachov at gcc dot gnu.org
@ 2013-10-10  9:48 ` rearnsha at gcc dot gnu.org
  2013-11-19  9:50 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2013-10-10  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization
      Known to work|                            |4.7.4
            Summary|[arm with hardfp ABI]:      |[4.8, 4.9 regression][arm]:
                   |internal compiler error: in |internal compiler error: in
                   |cond_exec_process_insns, at |cond_exec_process_insns, at
                   |ifcvt.c:339                 |ifcvt.c:339

--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
cond_exec_process_insns is throwing a wobbly, since it is not expecting to
handle a jump insn (in this case a return).

(jump_insn 62 61 51 4 (parallel [
            (return)
            (set/f (reg/f:SI 13 sp)
                (plus:SI (reg/f:SI 13 sp)
                    (const_int 16 [0x10])))
            (set/f (reg:SI 3 r3)
                (mem/c:SI (reg/f:SI 13 sp) [25 S4 A32]))
            (set/f (reg:SI 4 r4)
                (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                        (const_int 4 [0x4])) [25 S4 A32]))
            (set/f (reg:SI 5 r5)
                (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                        (const_int 8 [0x8])) [25 S4 A32]))
            (set/f (reg:SI 15 pc)
                (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                        (const_int 12 [0xc])) [25 S4 A32]))
        ]) image.c:1709 -1
     (expr_list:REG_UNUSED (reg:SI 15 pc)
        (expr_list:REG_UNUSED (reg:SI 3 r3)
            (expr_list:REG_CFA_RESTORE (reg:SI 5 r5)
                (expr_list:REG_CFA_RESTORE (reg:SI 4 r4)
                    (expr_list:REG_CFA_RESTORE (reg:SI 3 r3)
                        (nil))))))
 -> return)

Seems to work with 4.7, so a regression.


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

* [Bug rtl-optimization/58668] [4.8, 4.9 regression][arm]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (2 preceding siblings ...)
  2013-10-10  9:48 ` [Bug rtl-optimization/58668] [4.8, 4.9 regression][arm]: " rearnsha at gcc dot gnu.org
@ 2013-11-19  9:50 ` rguenth at gcc dot gnu.org
  2013-11-19  9:57 ` [Bug rtl-optimization/58668] [4.8/4.9 regression] " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ 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=58668

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.3


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (3 preceding siblings ...)
  2013-11-19  9:50 ` rguenth at gcc dot gnu.org
@ 2013-11-19  9:57 ` rguenth at gcc dot gnu.org
  2013-12-17 21:14 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
            Summary|[4.8, 4.9 regression][arm]: |[4.8/4.9 regression]
                   |internal compiler error: in |internal compiler error: in
                   |cond_exec_process_insns, at |cond_exec_process_insns, at
                   |ifcvt.c:339                 |ifcvt.c:339


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (4 preceding siblings ...)
  2013-11-19  9:57 ` [Bug rtl-optimization/58668] [4.8/4.9 regression] " rguenth at gcc dot gnu.org
@ 2013-12-17 21:14 ` jakub at gcc dot gnu.org
  2013-12-18 10:07 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-17 21:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the problem is that ifcvt relies on consistent counting of insns, but
the various functions count different things.
- count_bb_insns counts CALL_INSN and INSN
- flow_find_cross_jump counts in some cases the jump insn (quite complicated
test whether it counts it or not), and doesn't count insns with USE or CLOBBER
PATTERNs
- flow_find_head_matching_sequence counts all CALL_INSN/INSN, including USE and
CLOBBER
- first_active_insn finds what count_bb_insns counts
- last_active_insn (..., TRUE) finds what count_bb_insns except it skips over
USE patterns

I guess best would be to count/skip/etc. the same things consistently, the
problem is that some of the functions have other uses etc.

So, perhaps
1) let count_bb_insns not count insns with USE or CLOBBER PATTERNs
2) perhaps not count any JUMP_INSNs in flow_find_cross_jump if dir_p == NULL
(i.e.
when called from ifcvt)?
3) perhaps not count USE/CLOBBER insns in flow_find_head_matching_sequence if
stop_after is non-zero?
4) perhaps add also skip_use argument to first_active_insn and if TRUE, ignore
USE insns and for both {first,last}_active_insn if skip_use is TRUE, also
ignore CLOBBER insns
5) in find_active_insn_{before,after} ignore USE/CLOBBER insns
and document this properly?


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (5 preceding siblings ...)
  2013-12-17 21:14 ` jakub at gcc dot gnu.org
@ 2013-12-18 10:07 ` ebotcazou at gcc dot gnu.org
  2013-12-18 11:20 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-12-18 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Perhaps we can ignore those always in flow_find_head_matching_sequence?

Yes, that seems to be the most sensible thing to do, so that count_bb_insns,
flow_find_cross_jump and flow_find_head_matching_sequence agree about them.

> Perhaps, though I'd say it might be a ticking bomb.

If the bomb would be an ICE, that's good enough for now in my opinion.


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (6 preceding siblings ...)
  2013-12-18 10:07 ` ebotcazou at gcc dot gnu.org
@ 2013-12-18 11:20 ` ebotcazou at gcc dot gnu.org
  2014-01-07  7:54 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-12-18 11:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> So like this?  Note, the USE/CLOBBER change for flow_find_cross_jump
> has been added in 2011 for 4.7 as PR43920 fix:
> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02246.html

Yes, let's try that, but use the same idiom in flow_find_cross_jump as yours
(i.e. remove the useless p1) added by the above fix so that your patch will
have an explicit link to the above fix.


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (7 preceding siblings ...)
  2013-12-18 11:20 ` ebotcazou at gcc dot gnu.org
@ 2014-01-07  7:54 ` jakub at gcc dot gnu.org
  2014-01-07 16:51 ` jakub at gcc dot gnu.org
  2014-01-07 16:52 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-07  7:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jan  7 07:54:47 2014
New Revision: 206385

URL: http://gcc.gnu.org/viewcvs?rev=206385&root=gcc&view=rev
Log:
    PR rtl-optimization/58668
    * cfgcleanup.c (flow_find_cross_jump): Don't count
    any jumps if dir_p is NULL.  Remove p1 variable, use active_insn_p
    to determine what is counted.
    (flow_find_head_matching_sequence): Use active_insn_p to determine
    what is counted.
    (try_head_merge_bb): Adjust for the flow_find_head_matching_sequence
    counting change.
    * ifcvt.c (count_bb_insns): Use active_insn_p && !JUMP_P to
    determine what is counted.

    * gcc.dg/pr58668.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr58668.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c
    trunk/gcc/ifcvt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (8 preceding siblings ...)
  2014-01-07  7:54 ` jakub at gcc dot gnu.org
@ 2014-01-07 16:51 ` jakub at gcc dot gnu.org
  2014-01-07 16:52 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-07 16:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jan  7 16:51:16 2014
New Revision: 206398

URL: http://gcc.gnu.org/viewcvs?rev=206398&root=gcc&view=rev
Log:
    PR rtl-optimization/58668
    * cfgcleanup.c (flow_find_cross_jump): Don't count
    any jumps if dir_p is NULL.  Remove p1 variable and make USE/CLOBBER
    check consistent with other places.
    (flow_find_head_matching_sequence): Don't count USE or CLOBBER insns.
    (try_head_merge_bb): Adjust for the flow_find_head_matching_sequence
    counting change.
    * ifcvt.c (count_bb_insns): Don't count USE or CLOBBER insns.

    * gcc.dg/pr58668.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr58668.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/cfgcleanup.c
    branches/gcc-4_8-branch/gcc/ifcvt.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339
  2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
                   ` (9 preceding siblings ...)
  2014-01-07 16:51 ` jakub at gcc dot gnu.org
@ 2014-01-07 16:52 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-07 16:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Hopefully fixed.


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

end of thread, other threads:[~2014-01-07 16:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-09 15:41 [Bug target/58668] New: [arm with hardfp ABI]: internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 sebastien at debian dot org
2013-10-09 17:25 ` [Bug target/58668] " ktkachov at gcc dot gnu.org
2013-10-10  9:33 ` ktkachov at gcc dot gnu.org
2013-10-10  9:48 ` [Bug rtl-optimization/58668] [4.8, 4.9 regression][arm]: " rearnsha at gcc dot gnu.org
2013-11-19  9:50 ` rguenth at gcc dot gnu.org
2013-11-19  9:57 ` [Bug rtl-optimization/58668] [4.8/4.9 regression] " rguenth at gcc dot gnu.org
2013-12-17 21:14 ` jakub at gcc dot gnu.org
2013-12-18 10:07 ` ebotcazou at gcc dot gnu.org
2013-12-18 11:20 ` ebotcazou at gcc dot gnu.org
2014-01-07  7:54 ` jakub at gcc dot gnu.org
2014-01-07 16:51 ` jakub at gcc dot gnu.org
2014-01-07 16:52 ` jakub at gcc dot gnu.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).