This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34589] New: noreturn calls: gcc generates call instead of jump
- From: "vyzo at media dot mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Dec 2007 06:56:01 -0000
- Subject: [Bug c/34589] New: noreturn calls: gcc generates call instead of jump
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When noreturn functions call other noreturn functions, gcc still generates a
call instruction instead of a jump instruction. This result in slightly slower
execution and a small space leak on the stack, which affects higher level
language compilers that target gnu C as intermediate language and use CPS with
cheney on stack.
Example:
see attached whycall.c and whycall.s is gcc-4.1.2 output at -O2 for x86-64.
bar:
...
call foo
The more efficient version would be to generate 'jmp foo'
--
Summary: noreturn calls: gcc generates call instead of jump
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vyzo at media dot mit dot edu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34589