Consider the following two functions: int foo() { return 1; } void bar() {}
Disassembly when compiled with gcc 2.95.2: (-Os) 00000000 <foo(void)>: 0: 38 60 00 01 li r3,1 4: 4e 80 00 20 blr 00000008 <bar(void)>: 8: 4e 80 00 20 blr Disassembly when compiled with gcc 4.1.1: (-Os) 00000000 <foo()>: 0: 94 21 ff f0 stwu r1,-16(r1) 4: 38 60 00 01 li r3,1 8: 38 21 00 10 addi r1,r1,16 c: 4e 80 00 20 blr 00000010 <bar()>: 10: 94 21 ff f0 stwu r1,-16(r1) 14: 38 21 00 10 addi r1,r1,16 18: 4e 80 00 20 blr -- Summary: Stack pointer is modified in functions that don't use the stack Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: regression AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: atgraham at gmail dot com GCC host triplet: i686 GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248