This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/28493] Wrong address of stack object used for destructor call on PPC
- From: "atgraham at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Aug 2006 16:58:15 -0000
- Subject: [Bug target/28493] Wrong address of stack object used for destructor call on PPC
- References: <bug-28493-12114@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from atgraham at gmail dot com 2006-08-05 16:58 -------
This may not be related to 19774 as I had originally thought. This failure
case is new as of 4.1.0. GCC version 4.0.3 gets it right:
g++-4.0.3 -Os -msoft-float -mcpu=405 -c bug.cc -fno-inline -Wall -dA
00000000 <tryfunc()>:
0: 3d 20 00 00 lis r9,0
2: R_PPC_ADDR16_HA __gxx_personality_sj0
4: 94 21 ff 60 stwu r1,-160(r1)
8: 7c 08 02 a6 mflr r0
c: 39 29 00 00 addi r9,r9,0
e: R_PPC_ADDR16_LO __gxx_personality_sj0
10: 91 21 00 30 stw r9,48(r1)
14: 3d 20 00 00 lis r9,0
16: R_PPC_ADDR16_HA .gcc_except_table
18: 90 01 00 a4 stw r0,164(r1)
1c: 39 29 00 00 addi r9,r9,0
1e: R_PPC_ADDR16_LO .gcc_except_table
20: 80 01 00 00 lwz r0,0(r1)
24: 7d 80 00 26 mfcr r12
28: 91 21 00 34 stw r9,52(r1)
2c: 3d 20 00 00 lis r9,0
2e: R_PPC_ADDR16_HA .text+0x84
30: 39 29 00 84 addi r9,r9,132
32: R_PPC_ADDR16_LO .text+0x84
34: 38 61 00 18 addi r3,r1,24
38: 90 01 00 40 stw r0,64(r1)
3c: 38 01 00 08 addi r0,r1,8
40: 90 01 00 38 stw r0,56(r1)
44: 91 81 00 54 stw r12,84(r1)
48: 91 21 00 3c stw r9,60(r1)
4c: bd c1 00 58 stmw r14,88(r1)
50: 90 21 00 44 stw r1,68(r1)
54: 48 00 00 01 bl 54 <tryfunc()+0x54>
54: R_PPC_REL24 _Unwind_SjLj_Register
58: 38 61 00 08 addi r3,r1,8
5c: 48 00 00 01 bl 5c <tryfunc()+0x5c>
5c: R_PPC_REL24 Command::Command()
60: 38 60 00 04 li r3,4
64: 48 00 00 01 bl 64 <tryfunc()+0x64>
64: R_PPC_REL24 __cxa_allocate_exception
68: 38 00 00 01 li r0,1
6c: 90 03 00 00 stw r0,0(r3)
70: 3c 80 00 00 lis r4,0
72: R_PPC_ADDR16_HA typeinfo for int
74: 90 01 00 1c stw r0,28(r1)
78: 38 84 00 00 addi r4,r4,0
7a: R_PPC_ADDR16_LO typeinfo for int
7c: 38 a0 00 00 li r5,0
80: 48 00 00 01 bl 80 <tryfunc()+0x80>
80: R_PPC_REL24 __cxa_throw
84: 80 01 00 20 lwz r0,32(r1)
88: 38 61 00 08 addi r3,r1,8
8c: 90 01 00 4c stw r0,76(r1)
90: 48 00 00 01 bl 90 <tryfunc()+0x90>
90: R_PPC_REL24 Command::~Command()
94: 80 61 00 4c lwz r3,76(r1)
98: 38 00 ff ff li r0,-1
9c: 90 01 00 1c stw r0,28(r1)
a0: 48 00 00 01 bl a0 <tryfunc()+0xa0>
a0: R_PPC_REL24 _Unwind_SjLj_Resume
Additionally, I tested this case in 3.4.1, 3.4.2, and 4.0.0, and they all get
it right as well.
--
atgraham at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn|19774 |
Keywords| |sjlj-eh, wrong-code
Known to fail| |4.1.0 4.1.1
Known to work| |3.4.1 3.4.2 4.0.0 4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28493