------- Comment #7 from raj dot khem at gmail dot com  2010-04-30 04:34 -------
calls to _savegpr_31 and _restgpr_31_x are only generated when compiling libgcc
with -Os same compiled with -O2 it does not emit the calls

here is a reduced testcase from crtstuff.c compile it will -Os and then with
-O2 

typedef void (*func_ptr) (void);
static func_ptr __CTOR_END__[1]
  __attribute__((section(".ctors"), aligned(sizeof(func_ptr))))
  = { (func_ptr) 0 };
static void __attribute__((used))
__do_global_ctors_aux (void)
{
  func_ptr *p;
  for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
    (*p) ();
}


-- 


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

Reply via email to