When compiling with -O2, a sibling call will sometimes copy all the arguments
twice: first into temporaries at the beginning of the function, then back to
their original places before the call.

Here's a test case that demonstrates it:

extern void f2(), f3();
void f(int a,int b,int c,int d,int e,int ff,int g,int h,int i,int j) {
  f2();
  f3(a,b,c,d,e,ff,g,h,i,j);
}

(the problem only shows up if there's other stuff in the function besides the
sibling call)

-- 
           Summary: sibling call with -O2 copies parameters twice
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrnobo1024 at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to