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

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-06-17 
12:02:10 UTC ---
One of the differences I must say I noticed is that at O2 - the call to y has a
NORETURN attribute marked to it but there's no reason why this should be marked
as NORETURN - surely there is a flow of control that allows control to go out
of the function. 


x(a)
{
  __label__ xlab;
  void y(a)
    {
      void *x = &&llab;
      if (a==-1)
 goto *x;
      if (a==0)
 goto xlab;
    llab:
      y (a-1);
    }
  y (a);
 xlab:;
  return a;
}




(call_insn/c/i 11 10 12 3 (parallel [
            (call (mem:SI (symbol_ref:SI ("y.2104") [flags 0x3]  <function_decl
0xb7499400 y>) [0 y S4 A32])
                (const_int 0 [0]))
            (use (const_int 0 [0]))
            (clobber (reg:SI 14 lr))
        ])
/home/ramrad01/sources/fsf/trunk/gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c:23
-1
     (expr_list:REG_NORETURN (const_int 0 [0])
        (expr_list:REG_EH_REGION (const_int 0 [0])
            (nil)))
    (expr_list:REG_DEP_TRUE (use (reg:SI 0 r0))
        (expr_list:REG_DEP_TRUE (use (reg:SI 12 ip))
            (nil))))

Reply via email to