This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/31830] Input parameter trashed with optimization -O when using a union and bit field
- From: "gmorain at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2007 01:17:42 -0000
- Subject: [Bug rtl-optimization/31830] Input parameter trashed with optimization -O when using a union and bit field
- References: <bug-31830-14504@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from gmorain at gmail dot com 2007-05-19 02:17 -------
(In reply to comment #2)
> I can reproduce the failure on powerpc-linux-gnu with 4.1.0 but it works on the
> trunk. combine is doing something wrong.
>
I tested it on 4.2.0, and it works OK. Except, I can't understand why the
stack frame is 32 bytes instead of 16.
powerpc-elf-objdump -S foo.o
foo.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <foo>:
0: 94 21 ff e0 stwu r1,-32(r1)
4: 7c 08 02 a6 mflr r0
8: 93 a1 00 14 stw r29,20(r1)
c: 90 01 00 24 stw r0,36(r1)
10: 7c 7d 1b 78 mr r29,r3
14: 48 00 00 01 bl 14 <foo+0x14>
18: 53 a3 c0 0e rlwimi r3,r29,24,0,7
1c: 48 00 00 01 bl 1c <foo+0x1c>
20: 80 01 00 24 lwz r0,36(r1)
24: 7c 08 03 a6 mtlr r0
28: 83 a1 00 14 lwz r29,20(r1)
2c: 38 21 00 20 addi r1,r1,32
30: 4e 80 00 20 blr
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31830