public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44071]  New: ICE with asm goto and __builtin_unreachable()
@ 2010-05-11  5:38 hpa at zytor dot com
  2010-05-11  5:39 ` [Bug c/44071] " hpa at zytor dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: hpa at zytor dot com @ 2010-05-11  5:38 UTC (permalink / raw)
  To: gcc-bugs

The attached test case ICE's with the __builtin_unreachable() enabled.  With
the __builtin_unreachable() disabled, it compiles, but produces bad code:

        .file   "jumptest.c"
        .text
        .p2align 4,,15
.globl xyzzy
        .type   xyzzy, @function
xyzzy:
.LFB1:
        .cfi_startproc
#APP
# 10 "jumptest.c" 1
        # Either .L2 or .L3
        jmp .L2
# 0 "" 2
#NO_APP
        movl    $1, %eax      /*** XXX: Instruction skipped by jump ***/
.L2:
        rep
        ret
        .p2align 4,,10
        .p2align 3
.L3:
        xorl    %eax, %eax
        cmpl    $6, %edi
        setne   %al
        addl    $1, %eax
        ret
        .cfi_endproc
.LFE1:
        .size   xyzzy, .-xyzzy
        .ident  "GCC: (GNU) 4.5.0"
        .section        .note.GNU-stack,"",@progbits


-- 
           Summary: ICE with asm goto and __builtin_unreachable()
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hpa at zytor dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
@ 2010-05-11  5:39 ` hpa at zytor dot com
  2010-05-11  6:32 ` ubizjak at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: hpa at zytor dot com @ 2010-05-11  5:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hpa at zytor dot com  2010-05-11 05:39 -------
Created an attachment (id=20624)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20624&action=view)
Test case

Compiled with:

gcc -O2 -fomit-frame-pointer -S -o jumptest.s jumptest.c


-- 


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
  2010-05-11  5:39 ` [Bug c/44071] " hpa at zytor dot com
@ 2010-05-11  6:32 ` ubizjak at gmail dot com
  2010-05-11  6:45 ` ubizjak at gmail dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2010-05-11  6:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ubizjak at gmail dot com  2010-05-11 06:32 -------
Confirmed with 4.6.0 mainline:

Program received signal SIGSEGV, Segmentation fault.
0x000000000056d5b8 in cfg_layout_finalize ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:477
477       if (loc == prologue_locator || loc == epilogue_locator)

Backtrace:

#0  0x000000000056d5b8 in cfg_layout_finalize ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:477
#1  0x000000000056de3a in outof_cfg_layout_mode ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:477
#2  0x000000000071ca2e in execute_one_pass (pass=0x112c760)
    at ../../gcc-svn/trunk/gcc/passes.c:293


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-05-11 06:32:26
               date|                            |
   Target Milestone|---                         |4.5.1


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
  2010-05-11  5:39 ` [Bug c/44071] " hpa at zytor dot com
  2010-05-11  6:32 ` ubizjak at gmail dot com
@ 2010-05-11  6:45 ` ubizjak at gmail dot com
  2010-05-11  8:43 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2010-05-11  6:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2010-05-11 06:45 -------
Oops, wrong cut-n-paste. This is correct:

Program received signal SIGSEGV, Segmentation fault.
0x0000000120192df8 in fixup_reorder_chain ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:889
889               if (bb->aux == e_fall->dest)
(gdb) bt
#0  0x0000000120192df8 in fixup_reorder_chain ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:889
#1  cfg_layout_finalize () at ../../gcc-svn/trunk/gcc/cfglayout.c:1325
#2  0x0000000120193840 in outof_cfg_layout_mode ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:361
#3  0x00000001203b1ab0 in execute_one_pass (pass=0x1209e9c90)
    at ../../gcc-svn/trunk/gcc/passes.c:1590
#4  0x00000001203b1df4 in execute_pass_list (pass=0x1209e9c90)
    at ../../gcc-svn/trunk/gcc/passes.c:1645


-- 


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (2 preceding siblings ...)
  2010-05-11  6:45 ` ubizjak at gmail dot com
@ 2010-05-11  8:43 ` rguenth at gcc dot gnu dot org
  2010-05-11  8:57 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-11  8:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.1                       |---


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (3 preceding siblings ...)
  2010-05-11  8:43 ` rguenth at gcc dot gnu dot org
@ 2010-05-11  8:57 ` ubizjak at gmail dot com
  2010-05-11  9:00 ` jakub at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2010-05-11  8:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ubizjak at gmail dot com  2010-05-11 08:56 -------
I don't know why locations are all mixed up here, but this is correct place of
failure:

0x000000000056598a in fixup_reorder_chain ()
    at ../../gcc-svn/trunk/gcc/cfglayout.c:866
866                       || e_fall->dest == EXIT_BLOCK_PTR)
(gdb) l
861                 }
862               else if (extract_asm_operands (PATTERN (bb_end_insn)) !=
NULL)
863                 {
864                   /* If the old fallthru is still next, nothing to do.  */
865                   if (bb->aux == e_fall->dest
866                       || e_fall->dest == EXIT_BLOCK_PTR)
867                     continue;
868     
869                   /* Otherwise we'll have to use the fallthru fixup below. 
*/
870                 }


-- 


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (4 preceding siblings ...)
  2010-05-11  8:57 ` ubizjak at gmail dot com
@ 2010-05-11  9:00 ` jakub at gcc dot gnu dot org
  2010-05-11 10:01 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11  9:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2010-05-11 09:00 -------
I'd say the testcase is invalid, of course GCC must not ICE on it though,
but you can't expect it to do what you want.
I don't think we guarantee anywhere that the jump is exactly to the user
label provided, so you should jump to %l[f_yes] or %l[f_no], certainly never to
integer argument of &&f_yes or &&f_no.  I believe GCC must be allowed to jump
to some internal label elsewhere and execute some instructions before jumping
to the user label.  Otherwise we'd have to make all these edges from asm goto
abnormal.

That said, it doesn't make a difference on the trunk in this case, as you can
see by using jmp %l[f_yes] # %P0

FYI, on redhat/gcc-4_4-branch which has asm goto and __builtin_unreachable
backported the testcase works (the user labels (%P0 and %P1) are placed
non-sensically because of PR42739) when using the %l[f_yes]/%l[f_no] and the
testcase doesn't ICE.  With PR42739 the user labels make more sense, but with
__builtin_unreachable it ICEs, so I guess this PR is related to PR42739 (the
ICE part) and to SSA expand which creates wrong RTL (the rest).

OT, we have a bug in the documentation:

@smallexample
int frob(int x)
@{
  int y;
  asm goto ("frob %%r5, %1; jc %l[error]; mov (%2), %%r5"
            : : "r"(x), "r"(&y) : "r5", "memory" : error);
  return y;
 error:
  return -1;
@}
@end smallexample

I guess that %1 should have been %0 and %2 should have been %1.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu dot org
   Target Milestone|---                         |4.5.1


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (5 preceding siblings ...)
  2010-05-11  9:00 ` jakub at gcc dot gnu dot org
@ 2010-05-11 10:01 ` jakub at gcc dot gnu dot org
  2010-05-11 10:18 ` [Bug middle-end/44071] " jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 10:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2010-05-11 10:01 -------
Created an attachment (id=20625)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20625&action=view)
partial fix of the ICE

The ICE is when going out of cfglayout mode.
When going into the cfglayout mode try_optimize_cfg deletes the following empty
block with no successors:
1988      /* Delete trivially dead basic blocks.  This is either
1989         blocks with no predecessors, or empty blocks with no
1990         successors.  However if the empty block with no
1991         successors is the successor of the ENTRY_BLOCK, it is
1992         kept.  This ensures that the ENTRY_BLOCK will have a
1993         successor which is a precondition for many RTL
1994         passes.  Empty blocks may result from expanding
1995         __builtin_unreachable ().  */
1996      if (EDGE_COUNT (b->preds) == 0
1997          || (EDGE_COUNT (b->succs) == 0
...

It is fine when asm doesn't have a fallthru edge IMHO because of this, so the
patch just handles that case.  Unfortunately, we ICE with this patch shortly
after during cfg verification once we went out of the cfglayout mode.
The problem is that the empty bb was deleted in cfglayout mode and its
il.footer
(which contained a BARRIER) got dropped on the floor.  I guess if there is a
predecessor and its fallthrough edge goes to the empty bb its il.footer
could be moved over to the predecessor.


-- 


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (6 preceding siblings ...)
  2010-05-11 10:01 ` jakub at gcc dot gnu dot org
@ 2010-05-11 10:18 ` jakub at gcc dot gnu dot org
  2010-05-11 10:20 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 10:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at gcc dot gnu dot org
          Component|c                           |middle-end
   Target Milestone|4.5.1                       |---


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (7 preceding siblings ...)
  2010-05-11 10:18 ` [Bug middle-end/44071] " jakub at gcc dot gnu dot org
@ 2010-05-11 10:20 ` jakub at gcc dot gnu dot org
  2010-05-11 12:18 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 10:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2010-05-11 10:20 -------
Created an attachment (id=20626)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20626&action=view)
gcc46-pr44071.patch

Untested fix for the ICE part (and, with __builtin_unreachable the generated
code is even correct after fixing the inline asm pattern).  Perhaps the
try_optimize_cfg change is too ugly though.

CCing Michael for SSA expansion part.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20625|0                           |1
        is obsolete|                            |


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (8 preceding siblings ...)
  2010-05-11 10:20 ` jakub at gcc dot gnu dot org
@ 2010-05-11 12:18 ` jakub at gcc dot gnu dot org
  2010-05-11 16:15 ` [Bug c/44071] " hpa at zytor dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 12:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2010-05-11 12:18 -------
Created an attachment (id=20627)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20627&action=view)
gcc46-pr44071.patch

Updated patch that fixes the rest of the issues.  The reason why testcase
without __builtin_unreachable didn't work is that then one of the labels in the
asm goto happened to be the same as fallthru bb label.  When gcc tried to
insert queued insns on that edge, it saw it is a fallthru edge and thus didn't
adjust the asm goto.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20626|0                           |1
        is obsolete|                            |
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (9 preceding siblings ...)
  2010-05-11 12:18 ` jakub at gcc dot gnu dot org
@ 2010-05-11 16:15 ` hpa at zytor dot com
  2010-05-11 16:51 ` [Bug middle-end/44071] " jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: hpa at zytor dot com @ 2010-05-11 16:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from hpa at zytor dot com  2010-05-11 16:15 -------
Thanks everyone for jumping (groan) on this.

>From the looks of it, changing the asm goto statement itself to:

  asm goto ("# Either %l[f_yes] or %l[f_no]\n\t"
            "jmp %l[f_yes]"
            : : : : f_yes, f_no);

... *and* adding:

  asm volatile("");             /* gcc bug 44071 workaround */

... immediately before __builtin_unreachable(); does make it output correct
code, at least with gcc 4.5.0.


-- 

hpa at zytor dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |c


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (10 preceding siblings ...)
  2010-05-11 16:15 ` [Bug c/44071] " hpa at zytor dot com
@ 2010-05-11 16:51 ` jakub at gcc dot gnu dot org
  2010-05-11 18:18 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 16:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2010-05-11 16:50 -------
Yeah.
BTW: you don't necessarily need to use the %l[f_yes] syntax, when there are no
input operands of the asm goto you can just as well use %l0 resp. %l1.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (11 preceding siblings ...)
  2010-05-11 16:51 ` [Bug middle-end/44071] " jakub at gcc dot gnu dot org
@ 2010-05-11 18:18 ` jakub at gcc dot gnu dot org
  2010-05-11 18:23 ` jakub at gcc dot gnu dot org
  2010-05-11 18:26 ` jakub at gcc dot gnu dot org
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 18:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2010-05-11 18:18 -------
Subject: Bug 44071

Author: jakub
Date: Tue May 11 18:17:43 2010
New Revision: 159288

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159288
Log:
        PR middle-end/44071
        * cfglayout.c (fixup_reorder_chain): Allow asm goto to have
        no fallthru edge.
        * cfgcleanup.c (try_optimize_cfg): When in cfglayout mode
        optimizing away empty bb with no successors, move over its
        footer chain to fallthru predecessor.
        * cfgrtl.c (patch_jump_insn): Update also REG_LABEL_OPERAND.
        (rtl_split_edge): For asm goto call patch_jump_insn even if
        splitting fallthru edge.

        * c-c++-common/asmgoto-4.c: New test.
        * gcc.target/i386/pr44071.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/asmgoto-4.c
    trunk/gcc/testsuite/gcc.target/i386/pr44071.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c
    trunk/gcc/cfglayout.c
    trunk/gcc/cfgrtl.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (12 preceding siblings ...)
  2010-05-11 18:18 ` jakub at gcc dot gnu dot org
@ 2010-05-11 18:23 ` jakub at gcc dot gnu dot org
  2010-05-11 18:26 ` jakub at gcc dot gnu dot org
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 18:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jakub at gcc dot gnu dot org  2010-05-11 18:23 -------
Subject: Bug 44071

Author: jakub
Date: Tue May 11 18:22:52 2010
New Revision: 159289

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159289
Log:
        PR middle-end/44071
        * cfglayout.c (fixup_reorder_chain): Allow asm goto to have
        no fallthru edge.
        * cfgcleanup.c (try_optimize_cfg): When in cfglayout mode
        optimizing away empty bb with no successors, move over its
        footer chain to fallthru predecessor.
        * cfgrtl.c (patch_jump_insn): Update also REG_LABEL_OPERAND.
        (rtl_split_edge): For asm goto call patch_jump_insn even if
        splitting fallthru edge.

        * c-c++-common/asmgoto-4.c: New test.
        * gcc.target/i386/pr44071.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/c-c++-common/asmgoto-4.c
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr44071.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/cfgcleanup.c
    branches/gcc-4_5-branch/gcc/cfglayout.c
    branches/gcc-4_5-branch/gcc/cfgrtl.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
  2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
                   ` (13 preceding siblings ...)
  2010-05-11 18:23 ` jakub at gcc dot gnu dot org
@ 2010-05-11 18:26 ` jakub at gcc dot gnu dot org
  14 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-11 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jakub at gcc dot gnu dot org  2010-05-11 18:25 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.1


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


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

* [Bug middle-end/44071] ICE with asm goto and __builtin_unreachable()
       [not found] <bug-44071-4@http.gcc.gnu.org/bugzilla/>
@ 2011-07-08 16:10 ` ramana at gcc dot gnu.org
  0 siblings, 0 replies; 17+ messages in thread
From: ramana at gcc dot gnu.org @ 2011-07-08 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mirq-gccboogs at rere dot
                   |                            |qmqm.pl

--- Comment #14 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-07-08 16:09:06 UTC ---
*** Bug 43460 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2011-07-08 16:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11  5:38 [Bug c/44071] New: ICE with asm goto and __builtin_unreachable() hpa at zytor dot com
2010-05-11  5:39 ` [Bug c/44071] " hpa at zytor dot com
2010-05-11  6:32 ` ubizjak at gmail dot com
2010-05-11  6:45 ` ubizjak at gmail dot com
2010-05-11  8:43 ` rguenth at gcc dot gnu dot org
2010-05-11  8:57 ` ubizjak at gmail dot com
2010-05-11  9:00 ` jakub at gcc dot gnu dot org
2010-05-11 10:01 ` jakub at gcc dot gnu dot org
2010-05-11 10:18 ` [Bug middle-end/44071] " jakub at gcc dot gnu dot org
2010-05-11 10:20 ` jakub at gcc dot gnu dot org
2010-05-11 12:18 ` jakub at gcc dot gnu dot org
2010-05-11 16:15 ` [Bug c/44071] " hpa at zytor dot com
2010-05-11 16:51 ` [Bug middle-end/44071] " jakub at gcc dot gnu dot org
2010-05-11 18:18 ` jakub at gcc dot gnu dot org
2010-05-11 18:23 ` jakub at gcc dot gnu dot org
2010-05-11 18:26 ` jakub at gcc dot gnu dot org
     [not found] <bug-44071-4@http.gcc.gnu.org/bugzilla/>
2011-07-08 16:10 ` ramana 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).