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

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
To illustrate unreliable approach, please compile following test:

--cut here--
extern void foo (void *);

int test(void)
{
  __label__ bla;

  foo (&&bla);
 bla:
  return 0;
}
--cut here--

gcc -O2:

test:
.L2:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        movl    $.L2, (%esp)
        call    foo
        xorl    %eax, %eax
        leave
        ret

The passed argument doesn't represent return address.

Reply via email to