This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24156] New: sibling call with -O2 copies parameters twice
- From: "mrnobo1024 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2005 00:40:49 -0000
- Subject: [Bug c/24156] New: sibling call with -O2 copies parameters twice
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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