public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization
@ 2013-01-09 17:09 amylaar at gcc dot gnu.org
  2013-01-09 17:10 ` [Bug middle-end/55921] " amylaar at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-01-09 17:09 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55921
           Summary: Crash in verify_ssa for asm to side-steps complex
                    pessimization
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: amylaar@gcc.gnu.org


Created attachment 29126
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29126
testcase

verify_ssa crashes during expand for a simple testcase that uses a pair of
asms to avoid the tree pass pessimization of complex type data moves.

Observed with GCC 4.7.0 i686-pc-linux-gnu X epiphany-elf,
i686-pc-linux-gnu native Red Hat 4.7.2-2, and
i686-pc-linux-gnu native 4.8.0 20130109 (experimental) (revision 195054)

(gdb) run
Starting program: /ssd/fsf/inst/libexec/gcc/i686-pc-linux-gnu/4.8.0/cc1
-fpreprocessed tc3.i -quiet -dumpbase tc3.c -mtune=generic -march=pentiumpro
-auxbase tc3 -version -o tc3.s
GNU C (GCC) version 4.8.0 20130109 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.8.0 20130109 (experimental), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.8.0 20130109 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.8.0 20130109 (experimental), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 7fd55bd33553a03a09fb094c59fe563c

Program received signal SIGSEGV, Segmentation fault.
verify_ssa (check_modified_stmt=true) at ../../gcc/gcc/tree-ssa.c:942
942               if (!gimple_nop_p (stmt))
(gdb) bt
#0  verify_ssa (check_modified_stmt=true) at ../../gcc/gcc/tree-ssa.c:942
#1  0x084c6fbe in execute_function_todo (data=data@entry=0x8001c)
    at ../../gcc/gcc/passes.c:1969
#2  0x084c7788 in do_per_function (
    callback=0x84c6f20 <execute_function_todo(void*)>, data=0x8001c)
    at ../../gcc/gcc/passes.c:1703
#3  0x084c78ba in execute_todo (flags=524316) at ../../gcc/gcc/passes.c:2001
#4  0x084cabff in execute_one_pass (pass=pass@entry=0x8dced80)
    at ../../gcc/gcc/passes.c:2321
#5  0x084cb035 in execute_pass_list (pass=0x8dced80)
    at ../../gcc/gcc/passes.c:2383
#6  0x0826186e in expand_function (node=0xb7be93f0)
    at ../../gcc/gcc/cgraphunit.c:1641
#7  0x08263bb4 in output_in_order () at ../../gcc/gcc/cgraphunit.c:1834
#8  compile () at ../../gcc/gcc/cgraphunit.c:2038
#9  0x08263f2a in finalize_compilation_unit ()
    at ../../gcc/gcc/cgraphunit.c:2120
#10 0x08137e45 in c_write_global_declarations ()
    at ../../gcc/gcc/c/c-decl.c:10120
#11 0x0856d85d in compile_file () at ../../gcc/gcc/toplev.c:559
#12 0x0856f82c in do_compile () at ../../gcc/gcc/toplev.c:1878
#13 toplev_main (argc=13, argv=0xbfffeda4) at ../../gcc/gcc/toplev.c:1954
#14 0x0811a2cb in main (argc=13, argv=0xbfffeda4) at ../../gcc/gcc/main.c:36
(gdb) frame 0
#0  verify_ssa (check_modified_stmt=true) at ../../gcc/gcc/tree-ssa.c:942
942               if (!gimple_nop_p (stmt))
(gdb) p stmt
$1 = (gimple_statement_d *) 0x0


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

* [Bug middle-end/55921] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
@ 2013-01-09 17:10 ` amylaar at gcc dot gnu.org
  2013-01-09 17:20 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-01-09 17:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2013-01-09 17:10:22 UTC ---
Created attachment 29127
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29127
preprocessed test case


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

* [Bug middle-end/55921] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
  2013-01-09 17:10 ` [Bug middle-end/55921] " amylaar at gcc dot gnu.org
@ 2013-01-09 17:20 ` pinskia at gcc dot gnu.org
  2013-01-09 18:39 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-01-09 17:20 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-01-09 17:19:33 UTC ---
> verify_ssa crashes during expand for a simple testcase that uses a pair of
> asms to avoid the tree pass pessimization of complex type data moves.

Can you file a bug about that missed optimization also but it is actually a
pessimization of complex types.


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

* [Bug middle-end/55921] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
  2013-01-09 17:10 ` [Bug middle-end/55921] " amylaar at gcc dot gnu.org
  2013-01-09 17:20 ` pinskia at gcc dot gnu.org
@ 2013-01-09 18:39 ` jakub at gcc dot gnu.org
  2013-01-09 20:29 ` [Bug middle-end/55921] [4.6/4.7/4.8 Regression] " jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-09 18:39 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-01-09
                 CC|                            |jakub at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-09 18:38:04 UTC ---
expand_complex_operations_1 needs to handle inline asm like
expand_complex_move.


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

* [Bug middle-end/55921] [4.6/4.7/4.8 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-01-09 18:39 ` jakub at gcc dot gnu.org
@ 2013-01-09 20:29 ` jakub at gcc dot gnu.org
  2013-01-09 20:32 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-09 20:29 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |UNCONFIRMED
   Last reconfirmed|2013-01-09 00:00:00         |
         AssignedTo|jakub at gcc dot gnu.org    |unassigned at gcc dot
                   |                            |gnu.org
   Target Milestone|---                         |4.6.4
            Summary|Crash in verify_ssa for asm |[4.6/4.7/4.8 Regression]
                   |to side-steps complex       |Crash in verify_ssa for asm
                   |pessimization               |to side-steps complex
                   |                            |pessimization
     Ever Confirmed|1                           |0

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-09 20:29:03 UTC ---
For -O0 this regressed with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160903
for -O2 the ICE started between r100000 and r102000.


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

* [Bug middle-end/55921] [4.6/4.7/4.8 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-01-09 20:29 ` [Bug middle-end/55921] [4.6/4.7/4.8 Regression] " jakub at gcc dot gnu.org
@ 2013-01-09 20:32 ` jakub at gcc dot gnu.org
  2013-01-10  9:26 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-09 20:32 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-01-09
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-09 20:31:36 UTC ---
Created attachment 29131
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29131
gcc48-pr55921.patch

Untested fix.


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

* [Bug middle-end/55921] [4.6/4.7/4.8 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-01-09 20:32 ` jakub at gcc dot gnu.org
@ 2013-01-10  9:26 ` jakub at gcc dot gnu.org
  2013-01-10  9:32 ` [Bug middle-end/55921] [4.6/4.7 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-10  9:26 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-10 09:25:27 UTC ---
Author: jakub
Date: Thu Jan 10 09:25:12 2013
New Revision: 195080

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195080
Log:
    PR tree-optimization/55921
    * tree-complex.c (expand_complex_asm): New function.
    (expand_complex_operations_1): Call it for GIMPLE_ASM.

    * gcc.c-torture/compile/pr55921.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr55921.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-complex.c


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

* [Bug middle-end/55921] [4.6/4.7 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-01-10  9:26 ` jakub at gcc dot gnu.org
@ 2013-01-10  9:32 ` jakub at gcc dot gnu.org
  2013-01-12  2:03 ` danglin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-10  9:32 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7/4.8 Regression]    |[4.6/4.7 Regression] Crash
                   |Crash in verify_ssa for asm |in verify_ssa for asm to
                   |to side-steps complex       |side-steps complex
                   |pessimization               |pessimization

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-10 09:31:53 UTC ---
Fixed for 4.8+ so far.


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

* [Bug middle-end/55921] [4.6/4.7 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-01-10  9:32 ` [Bug middle-end/55921] [4.6/4.7 " jakub at gcc dot gnu.org
@ 2013-01-12  2:03 ` danglin at gcc dot gnu.org
  2013-01-30  2:57 ` danglin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2013-01-12  2:03 UTC (permalink / raw)
  To: gcc-bugs


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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #8 from John David Anglin <danglin at gcc dot gnu.org> 2013-01-12 02:03:05 UTC ---
Testsuite fails on hppa64-hp-hpux11.11:

spawn /test/gnu/gcc/objdir64/gcc/xgcc -B/test/gnu/gcc/objdir64/gcc/
-fno-diagnostics-show-caret -O0 -w -c -o pr55921.o
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-tor
ture/compile/pr55921.c
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr55921.c: In function
'fo
o':/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr55921.c:21:1:
internal compiler error: in gen_reg_rtx, at emit-rtl.c:866

With i686-apple-darwin9 cross, I see:

Breakpoint 1, gen_reg_rtx (mode=SFmode) at ../../gcc/gcc/emit-rtl.c:866
866      gcc_assert (can_create_pseudo_p ());
(gdb) bt
#0  gen_reg_rtx (mode=SFmode) at ../../gcc/gcc/emit-rtl.c:866
#1  0x002cda1a in extract_bit_field_using_extv (extv=0xbfffe8e8,
op0=0x4209e2d0, bitsize=32, bitnum=4294967264, unsignedp=1, target=0x0,
mode=SFmode, tmode=SFmode) at ../../gcc/gcc/expmed.c:1254
#2  0x002d1d63 in extract_bit_field_1 (str_rtx=0x420994b0, bitsize=32,
bitnum=0, unsignedp=1, packedp=false, target=0x0, mode=SFmode, tmode=SFmode,
fallback_p=true) at ../../gcc/gcc/expmed.c:1577
#3  0x002d21d9 in extract_bit_field (str_rtx=0x420994b0, bitsize=32, bitnum=0,
unsignedp=1, packedp=<value temporarily unavailable, due to optimizations>,
target=0x0, mode=SFmode, tmode=SFmode) at ../../gcc/gcc/expmed.c:1658
#4  0x002ec8a1 in read_complex_part (cplx=0x420994b0, imag_p=false) at
../../gcc/gcc/expr.c:3023
#5  0x002f01b2 in emit_move_complex_parts (x=0x1c, y=0x420994b0) at
../../gcc/gcc/expr.c:3216
#6  0x00553138 in get_insns [inlined] () at emit-rtl.h:4783
#7  0x00553138 in gen_move_insn (x=0x420990e0, y=0x420994b0) at
../../gcc/gcc/optabs.c:4784
#8  0x005c4167 in gen_reload (out=0x420990e0, in=0x420994b0, opnum=0,
type=RELOAD_OTHER) at ../../gcc/gcc/reload1.c:8705
#9  0x005c5d07 in emit_output_reload_insns (chain=0x41815268, rl=0xbd0cc0, j=0)
at ../../gcc/gcc/reload1.c:7731
#10 0x005ce813 in emit_reload_insns (chain=0x41815268) at
../../gcc/gcc/reload1.c:8070
#11 0x005d010f in reload_as_needed (live_known=0) at
../../gcc/gcc/reload1.c:4645
#12 0x005d3833 in reload (first=0x4200fa20, global=0) at
../../gcc/gcc/reload1.c:1051
#13 0x004a0461 in rest_of_handle_reload () at ../../gcc/gcc/ira.c:4635
#14 0x00571c33 in execute_one_pass (pass=0xbc7300) at
../../gcc/gcc/passes.c:2333
#15 0x0057215d in execute_pass_list (pass=0xbc7300) at
../../gcc/gcc/passes.c:2381
#16 0x00572170 in execute_pass_list (pass=0xbc93a0) at
../../gcc/gcc/passes.c:2382
#17 0x001e2ba5 in invoke_plugin_callbacks [inlined] () at plugin.h:1640
#18 expand_function (node=0x42095000) at ../../gcc/gcc/cgraphunit.c:1643
#19 0x001e35b3 in output_in_order () at ../../gcc/gcc/cgraphunit.c:1833
#20 0x001e4952 in compile () at ../../gcc/gcc/cgraphunit.c:2037
#21 0x001e4e11 in timevar_pop [inlined] () at timevar.h:2119
#22 0x001e4e11 in finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:2121
#23 0x00016c97 in c_write_global_declarations () at
../../gcc/gcc/c/c-decl.c:10118
#24 0x00658495 in compile_file () at ../../gcc/gcc/toplev.c:557
#25 0x0065993c in toplev_main (argc=14, argv=0xbffff3c4) at
../../gcc/gcc/toplev.c:1876
#26 0x009c8e18 in main (argc=14, argv=0xbffff3c4) at ../../gcc/gcc/main.c:36
Current language:  auto; currently c++
(gdb) p reload_in_progress
$1 = 1


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

* [Bug middle-end/55921] [4.6/4.7 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2013-01-12  2:03 ` danglin at gcc dot gnu.org
@ 2013-01-30  2:57 ` danglin at gcc dot gnu.org
  2013-02-01 14:09 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2013-01-30  2:57 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> 2013-01-30 02:56:52 UTC ---
Return NULL_RTX in extract_bit_field_using_extv when it's not
possible to create pseudos just results in another similar error
a little further down the road:

#0  gen_reg_rtx (mode=DImode) at ../../gcc/gcc/emit-rtl.c:866
#1  0x40000000006242f4 in maybe_legitimize_operand (op=0x800003fffdff1ff8, 
    opno=0, icode=CODE_FOR_lshrdi3) at ../../gcc/gcc/optabs.c:8055
#2  maybe_legitimize_operands (icode=CODE_FOR_lshrdi3, opno=0, nops=3, 
    ops=<optimized out>) at ../../gcc/gcc/optabs.c:8128
#3  0x40000000006245a4 in maybe_gen_insn (icode=CODE_FOR_lshrdi3, 
    nops=<optimized out>, ops=0x800003fffdff1ff8)
    at ../../gcc/gcc/optabs.c:8146
#4  0x400000000062c9c4 in expand_binop_directly (mode=DImode, 
    binoptab=lshr_optab, op0=0x800003fffdebc260, op1=0x800003fffddbc670, 
    target=0x0, unsignedp=1, methods=OPTAB_DIRECT, last=0x0)
    at ../../gcc/gcc/optabs.c:1450
#5  0x4000000000626370 in expand_binop (mode=DImode, binoptab=lshr_optab, 
    op0=0x800003fffdebc260, op1=0x800003fffddbc670, target=0x0, unsignedp=1, 
    methods=OPTAB_DIRECT) at ../../gcc/gcc/optabs.c:1519
#6  0x400000000042e3bc in expand_shift_1 (code=RROTATE_EXPR, mode=BLKmode, 
    shifted=0x3e, amount=<optimized out>, target=0x0, unsignedp=-35928464)
    at ../../gcc/gcc/expmed.c:2210
#7  0x400000000043112c in expand_shift (code=RSHIFT_EXPR, mode=DImode, 
    shifted=<optimized out>, amount=<optimized out>, target=<optimized out>, 
    unsignedp=1) at ../../gcc/gcc/expmed.c:2254
#8  0x4000000000431688 in extract_fixed_bit_field (tmode=SImode, 
    op0=0x800003fffdebc260, bitsize=32, bitnum=32, target=0x0, unsignedp=1, 
    packedp=<optimized out>) at ../../gcc/gcc/expmed.c:1790
#9  0x40000000004322f4 in extract_bit_field_1 (str_rtx=<optimized out>, 
    bitsize=1, bitnum=32, unsignedp=1, packedp=<optimized out>, target=0x7, 
    mode=64, tmode=<optimized out>, fallback_p=false)
    at ../../gcc/gcc/expmed.c:1635

After ira, we have the following insns:

(insn 26 25 27 2 (set (reg:SC 85 [ cf ])        (asm_operands:SC ("") ("=r") 0
[
                (reg:DI 72 [ D.1406 ])
            ]
             [
                (asm_input:DI ("r") :0)            ]
             []
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr55921.c:
17)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr55921.c:17 -1
     (expr_list:REG_DEAD (reg:DI 72 [ D.1406 ])
        (nil)))
(insn 27 26 29 2 (set (reg:DI 86)
        (subreg:DI (reg:SC 85 [ cf ]) 0))
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-
torture/compile/pr55921.c:17 121 {*pa.md:4189}
     (nil))

It seems insn 27 needs to expanded before reload as extraction of the SUBREG
needs an intermediate general register.


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

* [Bug middle-end/55921] [4.6/4.7 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2013-01-30  2:57 ` danglin at gcc dot gnu.org
@ 2013-02-01 14:09 ` jakub at gcc dot gnu.org
  2013-02-01 14:30 ` [Bug middle-end/55921] [4.6 " jakub at gcc dot gnu.org
  2013-04-03 18:20 ` jakub at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 14:09 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 14:08:39 UTC ---
Author: jakub
Date: Fri Feb  1 14:08:32 2013
New Revision: 195655

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195655
Log:
    Backported from mainline
    2013-01-10  Jakub Jelinek  <jakub@redhat.com>

    PR tree-optimization/55921
    * tree-complex.c (expand_complex_asm): New function.
    (expand_complex_operations_1): Call it for GIMPLE_ASM.

    * gcc.c-torture/compile/pr55921.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr55921.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-complex.c


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

* [Bug middle-end/55921] [4.6 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2013-02-01 14:09 ` jakub at gcc dot gnu.org
@ 2013-02-01 14:30 ` jakub at gcc dot gnu.org
  2013-04-03 18:20 ` jakub at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 14:30 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7 Regression] Crash  |[4.6 Regression] Crash in
                   |in verify_ssa for asm to    |verify_ssa for asm to
                   |side-steps complex          |side-steps complex
                   |pessimization               |pessimization

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 14:29:54 UTC ---
Fixed for 4.7.3+.


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

* [Bug middle-end/55921] [4.6 Regression] Crash in verify_ssa for asm to side-steps complex pessimization
  2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2013-02-01 14:30 ` [Bug middle-end/55921] [4.6 " jakub at gcc dot gnu.org
@ 2013-04-03 18:20 ` jakub at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-03 18:20 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-03 18:19:55 UTC ---
Author: jakub
Date: Wed Apr  3 18:00:52 2013
New Revision: 197446

URL: http://gcc.gnu.org/viewcvs?rev=197446&root=gcc&view=rev
Log:
    Backported from mainline
    2013-01-10  Jakub Jelinek  <jakub@redhat.com>

    PR tree-optimization/55921
    * tree-complex.c (expand_complex_asm): New function.
    (expand_complex_operations_1): Call it for GIMPLE_ASM.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/tree-complex.c


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

end of thread, other threads:[~2013-04-03 18:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-09 17:09 [Bug middle-end/55921] New: Crash in verify_ssa for asm to side-steps complex pessimization amylaar at gcc dot gnu.org
2013-01-09 17:10 ` [Bug middle-end/55921] " amylaar at gcc dot gnu.org
2013-01-09 17:20 ` pinskia at gcc dot gnu.org
2013-01-09 18:39 ` jakub at gcc dot gnu.org
2013-01-09 20:29 ` [Bug middle-end/55921] [4.6/4.7/4.8 Regression] " jakub at gcc dot gnu.org
2013-01-09 20:32 ` jakub at gcc dot gnu.org
2013-01-10  9:26 ` jakub at gcc dot gnu.org
2013-01-10  9:32 ` [Bug middle-end/55921] [4.6/4.7 " jakub at gcc dot gnu.org
2013-01-12  2:03 ` danglin at gcc dot gnu.org
2013-01-30  2:57 ` danglin at gcc dot gnu.org
2013-02-01 14:09 ` jakub at gcc dot gnu.org
2013-02-01 14:30 ` [Bug middle-end/55921] [4.6 " jakub at gcc dot gnu.org
2013-04-03 18:20 ` 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).