------- Comment #3 from atgraham at gmail dot com 2006-09-27 04:28 ------- Ack! Sorry--I had indicated the wrong target on that one. The target is vxworks, not linux. My 4.1.1 powerpc-linux compiler *does* get this optimization right. So something in the vxworks-specific code is causing this:
/opt/vxppc/libexec/gcc/powerpc-wrs-vxworks/4.1.1> ./cc1 -m32 -Os ~/foo.c -o - -quiet .file "foo.c" .section ".text" .align 2 .globl foo .type foo, @function foo: stwu 1,-16(1) li 3,1 addi 1,1,16 blr .size foo, .-foo .align 2 .globl bar .type bar, @function bar: stwu 1,-16(1) addi 1,1,16 blr .size bar, .-bar .ident "GCC: (GNU) 4.1.1" In my opinion, this is a very low priority problem, despite that this is one of my primary development environments. Sorry for wasting your time with the wrong target. -- atgraham at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |regression GCC target triplet|powerpc-linux |powerpc-wrs-vxworks http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248