This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/32636] [4.3 Regression] 25_algorithms/search_n/iterator.cc: miscompiled on hppa2.0w-hp-hpux11.11
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Dec 2007 20:37:07 -0000
- Subject: [Bug rtl-optimization/32636] [4.3 Regression] 25_algorithms/search_n/iterator.cc: miscompiled on hppa2.0w-hp-hpux11.11
- References: <bug-32636-507@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #34 from jakub at gcc dot gnu dot org 2007-12-11 20:37 -------
Answers (note, I don't know PA at all either):
1) in a function that returns struct, %r28 is what
targetm.calls.struct_value_rtx gives:
/* Register in which address to store a structure value
is passed to a function. */
#define PA_STRUCT_VALUE_REGNUM 28
static rtx
pa_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
int incoming ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (Pmode, PA_STRUCT_VALUE_REGNUM);
}
2) the instruction to load lo_sum of the address has not been dropped, I posted
only part of the function's assembly. The bug is that dbr decides to put
ldil LR'L$C0002,%r28 instruction from branch target (L$0026) into a delay
slot
even when %r28 is in fact live (passed from caller, unmodified to foo1)
3) I have tried Richard Sandiford's dbr patch immediately when I noticed this
is dbr related, but it doesn't help.
I guess we need to ensure somehow that df knows struct_value_rtx regs are live
at the beginning of function for functions that return struct.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32636