This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/68677] New: Sibcall doesn't work on function with no return


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

            Bug ID: 68677
           Summary: Sibcall doesn't work on function with no return
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-6 tmp]$ cat x.c
extern void bar (void) __attribute__ ((noreturn));

void
foo (void)
{
  bar ();
}
[hjl@gnu-6 tmp]$ gcc -S x.c -O3
[hjl@gnu-6 tmp]$ cat x.s
        .file   "x.c"
        .section        .text.unlikely,"ax",@progbits
.LCOLDB0:
        .text
.LHOTB0:
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        subq    $8, %rsp
        .cfi_def_cfa_offset 16
        call    bar
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .section        .text.unlikely
.LCOLDE0:
        .text
.LHOTE0:
        .ident  "GCC: (GNU) 5.2.1 20151104 (Red Hat 5.2.1-4)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-6 tmp]$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]