This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/25345] redundant opcodes before function call.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Dec 2005 04:05:54 -0000
- Subject: [Bug other/25345] redundant opcodes before function call.
- References: <bug-25345-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-12-11 04:05 -------
I should note that doing:
static void *a0ra, *a1ra;
void __attribute__((noinline)) a0(void) { a0ra = __builtin_return_address(0); }
void __attribute__((noinline)) a1(void) { a1ra = __builtin_return_address(0); }
int foo(void) { a0(); a1(); return a1ra - a0ra; }
int main()
{
printf("pd=%d\n", foo());
return 0;
}
You get the code which you want.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25345