public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
@ 2012-09-02 10:04 zsojka at seznam dot cz
  2012-09-02 10:49 ` [Bug rtl-optimization/54455] " ubizjak at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: zsojka at seznam dot cz @ 2012-09-02 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54455
           Summary: [4.7/4.8 Regression] ICE: RTL check: expected elt 3
                    type 'B', have '0' (rtx barrier) in
                    compute_bb_for_insn, at cfgrtl.c:418
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 28118
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28118
reduced testcase (from gcc.c-torture/compile/pr51767.c)

Compiler output:
$ gcc -fschedule-insns -fselective-scheduling --param
max-sched-extend-regions-iters=8 testcase.c
testcase.c: In function 'bar':
testcase.c:11:1: internal compiler error: RTL check: expected elt 3 type 'B',
have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  0x0000000001131fc0 in internal_error(char const*, ...) ()
#1  0x000000000096d82b in rtl_check_failed_type1(rtx_def const*, int, int, char
const*, int, char const*) () at /mnt/svn/gcc-trunk/gcc/rtl.c:753
#2  0x00000000006a94b8 in compute_bb_for_insn() () at
/mnt/svn/gcc-trunk/gcc/cfgrtl.c:418
#3  0x0000000000c29723 in ix86_reorg() () at
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:33774
#4  0x000000000096d27a in rest_of_handle_machine_reorg() ()
#5  0x000000000090092f in execute_one_pass(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2157
#6  0x0000000000900ce5 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2212
#7  0x0000000000900cf7 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2213
#8  0x0000000000900cf7 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2213
#9  0x00000000006bdd88 in expand_function(cgraph_node*) () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1609
#10 0x00000000006bff02 in compile() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1803
#11 0x00000000006c0225 in finalize_compilation_unit() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2089
#12 0x00000000005a1dc0 in c_write_global_declarations() () at
/mnt/svn/gcc-trunk/gcc/c/c-decl.c:10116
#13 0x00000000009e8475 in compile_file() () at
/mnt/svn/gcc-trunk/gcc/toplev.c:560
#14 0x00000000009ea03a in toplev_main(int, char**) () at
/mnt/svn/gcc-trunk/gcc/toplev.c:1863
#15 0x00007ffff6e784bd in __libc_start_main () from /lib64/libc.so.6
#16 0x0000000000584d01 in _start ()

Tested revisions:
r190830 - crash
4.7 r188682 - crash
4.6 r188682 - OK


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
@ 2012-09-02 10:49 ` ubizjak at gmail dot com
  2012-09-02 11:25 ` ubizjak at gmail dot com
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-02
   Target Milestone|---                         |4.7.2
     Ever Confirmed|0                           |1

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 10:49:33 UTC ---
Patch:

Index: cfgrtl.c
===================================================================
--- cfgrtl.c    (revision 190857)
+++ cfgrtl.c    (working copy)
@@ -415,7 +415,8 @@ compute_bb_for_insn (void)

       for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
        {
-         BLOCK_FOR_INSN (insn) = bb;
+         if (!BARRIER_P (insn))
+           BLOCK_FOR_INSN (insn) = bb;
          if (insn == end)
            break;
        }


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
  2012-09-02 10:49 ` [Bug rtl-optimization/54455] " ubizjak at gmail dot com
@ 2012-09-02 11:25 ` ubizjak at gmail dot com
  2012-09-02 11:47 ` steven at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-09/msg00031.htm
                   |                            |l
         AssignedTo|unassigned at gcc dot       |ubizjak at gmail dot com
                   |gnu.org                     |

--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 11:24:51 UTC ---
Patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00031.html


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
  2012-09-02 10:49 ` [Bug rtl-optimization/54455] " ubizjak at gmail dot com
  2012-09-02 11:25 ` ubizjak at gmail dot com
@ 2012-09-02 11:47 ` steven at gcc dot gnu.org
  2012-09-02 12:11 ` ubizjak at gmail dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-09-02 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2012-09-02 11:47:18 UTC ---
The patch is incorrect. There can't be a BARRIER in the middle of a basic
block. This problem typically indicates that either a BARRIER was emitted in
the wrong place, or BB_END wasn't updated properly after a BARRIER was inserted
somewhere. BARRIERs never appear inside a basic block.

What does the insns list look like around the BARRIER? (From GDB do:
"p debug_rtx_list(barrier_insn, -7)" and show the result here.)


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-09-02 11:47 ` steven at gcc dot gnu.org
@ 2012-09-02 12:11 ` ubizjak at gmail dot com
  2012-09-02 12:28 ` steven at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 12:10:45 UTC ---
(In reply to comment #3)

> What does the insns list look like around the BARRIER? (From GDB do:
> "p debug_rtx_list(barrier_insn, -7)" and show the result here.)

(gdb) p debug_rtx_list(r, -7)
(note 28 12 29 3 NOTE_INSN_EPILOGUE_BEG)

(insn/f 29 28 30 3 (set (reg/f:DI 6 bp)
        (mem:DI (post_inc:DI (reg/f:DI 7 sp)) [0 S8 A8])) pr54455.c:16 -1
     (expr_list:REG_CFA_DEF_CFA (plus:DI (reg/f:DI 7 sp)
            (const_int 8 [0x8]))
        (nil)))

(jump_insn 30 29 31 3 (simple_return) pr54455.c:16 -1
     (nil)
 -> simple_return)

(barrier 31 30 15)

(note 15 31 21 ("lab") NOTE_INSN_DELETED_LABEL 3)

(note 21 15 24 NOTE_INSN_DELETED)

(note 24 21 0 NOTE_INSN_DELETED)


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-09-02 12:11 ` ubizjak at gmail dot com
@ 2012-09-02 12:28 ` steven at gcc dot gnu.org
  2012-09-02 12:44 ` ubizjak at gmail dot com
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-09-02 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-09-02 12:27:27 UTC ---
(In reply to comment #4)

> (jump_insn 30 29 31 3 (simple_return) pr54455.c:16 -1
>      (nil)
>  -> simple_return)
>

This should be BB_END(BASIC_BLOCK(3)). If it's not then someone forgot to
update the basic block boundaries at some point.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2012-09-02 12:28 ` steven at gcc dot gnu.org
@ 2012-09-02 12:44 ` ubizjak at gmail dot com
  2012-09-02 14:58 ` steven at gcc dot gnu.org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
                URL|http://gcc.gnu.org/ml/gcc-p |
                   |atches/2012-09/msg00031.htm |
                   |l                           |
         AssignedTo|ubizjak at gmail dot com    |unassigned at gcc dot
                   |                            |gnu.org

--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 12:44:18 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> 
> > (jump_insn 30 29 31 3 (simple_return) pr54455.c:16 -1
> >      (nil)
> >  -> simple_return)
> >
> 
> This should be BB_END(BASIC_BLOCK(3)). If it's not then someone forgot to
> update the basic block boundaries at some point.

(gdb) p debug_bb_n_slim (3)
basic block 3, loop depth 0
 pred:       2
L9:
   10 NOTE_INSN_BASIC_BLOCK
    11: ax=0x1
    12: dx=0x2
   28 NOTE_INSN_EPILOGUE_BEG
    29: bp=[sp++]
      REG_CFA_DEF_CFA: sp+0x8
    30: jump simple_return
i  31: barrier
 succ:       EXIT

This is now beyond my RTL-optimization fu.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2012-09-02 12:44 ` ubizjak at gmail dot com
@ 2012-09-02 14:58 ` steven at gcc dot gnu.org
  2012-09-02 15:15 ` steven at gcc dot gnu.org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-09-02 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> 2012-09-02 14:58:24 UTC ---
Before thread_prologue_and_epilogue_insns:

basic block 3, loop depth 0
 pred:       2
L9:
   10 NOTE_INSN_BASIC_BLOCK
    11: ax=0x1
    12: dx=0x2
    13: jump {asm_operands;clobber fpsr;clobber flags;clobber [scratch];}
 succ:       EXIT

and after:

basic block 3, loop depth 0
 pred:       2
L9:
   10 NOTE_INSN_BASIC_BLOCK
    11: ax=0x1
    12: dx=0x2
   28 NOTE_INSN_EPILOGUE_BEG
    29: bp=[sp++]
      REG_CFA_DEF_CFA: sp+0x8
    30: jump simple_return
i  31: barrier
 succ:       EXIT


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2012-09-02 14:58 ` steven at gcc dot gnu.org
@ 2012-09-02 15:15 ` steven at gcc dot gnu.org
  2012-09-03  8:04 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-09-02 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 from Steven Bosscher <steven at gcc dot gnu.org> 2012-09-02 15:14:58 UTC ---
(In reply to comment #7)
But actually the problem is only visible if you print non-slim rtl. Before
sched1:

(jump_insn 13 12 15 3 (parallel [
            (asm_operands/v ("") ("") 0 [
                    (reg:SI 62)
                    (reg:SI 63)
                ]   
                 [
                    (asm_input:SI ("r") (null):0)
                    (asm_input:SI ("r") (null):0)
                ] 
                 [
                    (label_ref:DI 17)
                ] t.c:11)
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
            (clobber (mem:BLK (scratch) [0 A8]))
        ]) t.c:3 -1
     (nil)      
 -> 17)
(note 15 13 17 ("lab") NOTE_INSN_DELETED_LABEL 3)
(code_label 17 15 18 4 1 "" [1 uses])
(note 18 17 0 4 [bb 4] NOTE_INSN_BASIC_BLOCK)

After sched1:

(jump_insn 13 12 15 3 (parallel [
            (asm_operands/v ("") ("") 0 [
                    (reg:SI 62)
                    (reg:SI 63) 
                ]
                 [   
                    (asm_input:SI ("r") (null):0)
                    (asm_input:SI ("r") (null):0)
                ]
                 [   
                    (label_ref:DI 17)     <--- ref to code_label 17
                ] t.c:11)
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
            (clobber (mem:BLK (scratch) [0 A8]))
        ]) t.c:3 -1
     (expr_list:REG_DEAD (reg:SI 63)
        (expr_list:REG_DEAD (reg:SI 62) 
            (expr_list:REG_UNUSED (reg:QI 18 fpsr)
                (expr_list:REG_UNUSED (reg:QI 17 flags)
                    (nil)))))
 -> 17)
(note 15 13 21 ("lab") NOTE_INSN_DELETED_LABEL 3)
...but code_label 17 has disappeared...
(note 21 15 0 NOTE_INSN_DELETED)

Note that the jump_insn now jumps to a non-existing label.

There are two problems here:

1. verify_flow_info should detect that a jump references a non-existing label,
and abort if that happens

2. The code_label 17 shouldn't be removed by the selective scheduler because
it's still referenced.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2012-09-02 15:15 ` steven at gcc dot gnu.org
@ 2012-09-03  8:04 ` jakub at gcc dot gnu.org
  2012-09-03  8:21 ` abel at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-03  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-03 08:03:45 UTC ---
Created attachment 28121
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28121
gcc48-pr54455.patch

Patch for 2).  asm goto with fallthru labels is pretty hard case, handled in
cfgrtl.c hopefully right, but sel-sched apparently wants to do everything on
its own.  Best is to punt in that case and leave it to cfgrtl.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2012-09-03  8:04 ` jakub at gcc dot gnu.org
@ 2012-09-03  8:21 ` abel at gcc dot gnu.org
  2012-09-03  8:29 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: abel at gcc dot gnu.org @ 2012-09-03  8:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrey Belevantsev <abel at gcc dot gnu.org> 2012-09-03 08:21:20 UTC ---
(In reply to comment #9)
> Created attachment 28121 [details]
> gcc48-pr54455.patch
> 
> Patch for 2).  asm goto with fallthru labels is pretty hard case, handled in
> cfgrtl.c hopefully right, but sel-sched apparently wants to do everything on
> its own.  Best is to punt in that case and leave it to cfgrtl.

The patch looks perfectly fine, some thoughts:
1) a test case with sel-sched specific flags should be added,
2) the new code looks like a good helper for cfgrtl.c, would it be good to add
it there?
3) re. cfgrtl handling of asm goto, what do you think of PR 51106?  Last time
we discussed this we ended up with
http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00161.html

I can pick up your patch and do 1) and 2) with testing etc.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2012-09-03  8:21 ` abel at gcc dot gnu.org
@ 2012-09-03  8:29 ` jakub at gcc dot gnu.org
  2012-09-03 10:17 ` zsojka at seznam dot cz
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-03  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-03 08:29:10 UTC ---
As for 1), I haven't added the testcase because I partially agree with Eric
Botcazou on that scheduling just shouldn't be enabled for -O0, and in that case
the testcase would immediately stop testing this issue.  For 2), perhaps, but
not sure what other spots would use that helper, while e.g. one spot in
cfgrtl.c has similar code, it doesn't have the same code, it tests for two bbs,
not just one, and has different behavior based on which one of them it is.
Sure, if you have time and can take over testing this, go ahead.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (10 preceding siblings ...)
  2012-09-03  8:29 ` jakub at gcc dot gnu.org
@ 2012-09-03 10:17 ` zsojka at seznam dot cz
  2012-09-03 17:45 ` zsojka at seznam dot cz
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: zsojka at seznam dot cz @ 2012-09-03 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Zdenek Sojka <zsojka at seznam dot cz> 2012-09-03 10:17:15 UTC ---
If I remember correctly, the original testcase ICEs the same way with -O.
eg.
$ gcc -fschedule-insns -fselective-scheduling --param
max-sched-extend-regions-iters=8 gcc.c-torture/compile/pr51767.c -O

This reduced testcase ICEs at a different place with -O. (I cannot test it
right now)


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (11 preceding siblings ...)
  2012-09-03 10:17 ` zsojka at seznam dot cz
@ 2012-09-03 17:45 ` zsojka at seznam dot cz
  2012-09-06  7:29 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: zsojka at seznam dot cz @ 2012-09-03 17:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Zdenek Sojka <zsojka at seznam dot cz> 2012-09-03 17:44:57 UTC ---
(In reply to comment #12)
> If I remember correctly, the original testcase ICEs the same way with -O.
> eg.
> $ gcc -fschedule-insns -fselective-scheduling --param
> max-sched-extend-regions-iters=8 gcc.c-torture/compile/pr51767.c -O
> 
> This reduced testcase ICEs at a different place with -O. (I cannot test it
> right now)

Actually, with -O1, the ICE is at a different place:
$ gcc -fschedule-insns -fselective-scheduling --param
max-sched-extend-regions-iters=8 gcc.c-torture/compile/pr51767.c -O
gcc.c-torture/compile/pr51767.c: In function ‘bar’:
gcc.c-torture/compile/pr51767.c:23:1: internal compiler error: RTL check:
expected elt 3 type 'B', have '0' (rtx barrier) in rtl_verify_flow_info_1, at
cfgrtl.c:2052
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

So it might be a different problem.


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

* [Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (12 preceding siblings ...)
  2012-09-03 17:45 ` zsojka at seznam dot cz
@ 2012-09-06  7:29 ` jakub at gcc dot gnu.org
  2012-09-06  7:36 ` [Bug rtl-optimization/54455] [4.7 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-06  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-06 07:29:24 UTC ---
Author: jakub
Date: Thu Sep  6 07:29:12 2012
New Revision: 191013

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191013
Log:
    PR rtl-optimization/54455
    * sel-sched-ir.c (maybe_tidy_empty_bb): Give up if previous fallthru
    bb ends up with asm goto referencing bb's label.

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

Added:
    trunk/gcc/testsuite/gcc.dg/54455.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/sel-sched-ir.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/54455] [4.7 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (13 preceding siblings ...)
  2012-09-06  7:29 ` jakub at gcc dot gnu.org
@ 2012-09-06  7:36 ` jakub at gcc dot gnu.org
  2012-09-07  9:35 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-06  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.0
            Summary|[4.7/4.8 Regression] ICE:   |[4.7 Regression] ICE: RTL
                   |RTL check: expected elt 3   |check: expected elt 3 type
                   |type 'B', have '0' (rtx     |'B', have '0' (rtx barrier)
                   |barrier) in                 |in compute_bb_for_insn, at
                   |compute_bb_for_insn, at     |cfgrtl.c:418
                   |cfgrtl.c:418                |
      Known to fail|4.8.0                       |

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-06 07:36:05 UTC ---
Fixed on the trunk so far.


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

* [Bug rtl-optimization/54455] [4.7 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (14 preceding siblings ...)
  2012-09-06  7:36 ` [Bug rtl-optimization/54455] [4.7 " jakub at gcc dot gnu.org
@ 2012-09-07  9:35 ` jakub at gcc dot gnu.org
  2012-09-07  9:36 ` jakub at gcc dot gnu.org
  2012-09-07  9:36 ` jakub at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-07  9:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-07 09:35:33 UTC ---
Author: jakub
Date: Fri Sep  7 09:35:21 2012
New Revision: 191060

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191060
Log:
2012-09-07  Jakub Jelinek  <jakub@redhat.com>

    Backported from mainline
    2012-09-06  Jakub Jelinek  <jakub@redhat.com>

    PR rtl-optimization/54455
    * sel-sched-ir.c (maybe_tidy_empty_bb): Give up if previous fallthru
    bb ends up with asm goto referencing bb's label.

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

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/54455.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/sel-sched-ir.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/54455] [4.7 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (15 preceding siblings ...)
  2012-09-07  9:35 ` jakub at gcc dot gnu.org
@ 2012-09-07  9:36 ` jakub at gcc dot gnu.org
  2012-09-07  9:36 ` jakub at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-07  9:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-07 09:35:33 UTC ---
Author: jakub
Date: Fri Sep  7 09:35:21 2012
New Revision: 191060

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191060
Log:
2012-09-07  Jakub Jelinek  <jakub@redhat.com>

    Backported from mainline
    2012-09-06  Jakub Jelinek  <jakub@redhat.com>

    PR rtl-optimization/54455
    * sel-sched-ir.c (maybe_tidy_empty_bb): Give up if previous fallthru
    bb ends up with asm goto referencing bb's label.

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

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/54455.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/sel-sched-ir.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-07 09:36:00 UTC ---
Fixed.


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

* [Bug rtl-optimization/54455] [4.7 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
  2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
                   ` (16 preceding siblings ...)
  2012-09-07  9:36 ` jakub at gcc dot gnu.org
@ 2012-09-07  9:36 ` jakub at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-07  9:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-07 09:36:00 UTC ---
Fixed.


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

end of thread, other threads:[~2012-09-07  9:36 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-02 10:04 [Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418 zsojka at seznam dot cz
2012-09-02 10:49 ` [Bug rtl-optimization/54455] " ubizjak at gmail dot com
2012-09-02 11:25 ` ubizjak at gmail dot com
2012-09-02 11:47 ` steven at gcc dot gnu.org
2012-09-02 12:11 ` ubizjak at gmail dot com
2012-09-02 12:28 ` steven at gcc dot gnu.org
2012-09-02 12:44 ` ubizjak at gmail dot com
2012-09-02 14:58 ` steven at gcc dot gnu.org
2012-09-02 15:15 ` steven at gcc dot gnu.org
2012-09-03  8:04 ` jakub at gcc dot gnu.org
2012-09-03  8:21 ` abel at gcc dot gnu.org
2012-09-03  8:29 ` jakub at gcc dot gnu.org
2012-09-03 10:17 ` zsojka at seznam dot cz
2012-09-03 17:45 ` zsojka at seznam dot cz
2012-09-06  7:29 ` jakub at gcc dot gnu.org
2012-09-06  7:36 ` [Bug rtl-optimization/54455] [4.7 " jakub at gcc dot gnu.org
2012-09-07  9:35 ` jakub at gcc dot gnu.org
2012-09-07  9:36 ` jakub at gcc dot gnu.org
2012-09-07  9:36 ` 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).