[Bug target/27538] execute/20030128-1.c FAILs

kazu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu May 11 18:54:00 GMT 2006



------- Comment #2 from kazu at gcc dot gnu dot org  2006-05-11 18:54 -------
Here is a reduced testcase.

volatile short y;

int
foo (void)
{
  return y;
}

With -O1, this function magically turns into "return 0;" like so

foo:
        @ Function supports interworking.
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        @ lr needed for prologue
        mov     r0, #0
        bx      lr


-- 


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



More information about the Gcc-bugs mailing list