------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-07 13:05 -------
Debugging this, it looks a middle-end bug, in that we get the wrong type.
The type which we get now:
Breakpoint 5, function_arg (cum=0xbffff020, mode=SImode, type=0x1c97900,
named=1) at ../../gcc/config/rs6000/rs6000.c:4940
4940 enum rs6000_abi abi = DEFAULT_ABI;
(gdb) p debug_tree(type)
<pointer_type 0x1c97900
type <union_type 0x1c8c540 type_0 SI
size <integer_cst 0x1c094a0 constant invariant 32>
unit size <integer_cst 0x1c09160 constant invariant 4>
align 32 symtab 0 alias set 4
fields <field_decl 0x1c23834 __uptr type <pointer_type 0x1c8c600>
unsigned SI file t.c line 3 size <integer_cst 0x1c094a0 32> unit
size <integer_cst 0x1c09160 4>
align 32 offset_align 128
offset <integer_cst 0x1c09180 constant invariant 0>
bit offset <integer_cst 0x1c09960 constant invariant 0> context
<union_type 0x1c8c540> chain <field_decl 0x1c23898 __iptr>> context
<translation_unit_decl 0x1c71690 D.1302>
pointer_to_this <pointer_type 0x1c97900> chain <type_decl 0x1c714d0
D.1287>>
unsigned SI size <integer_cst 0x1c094a0 32> unit size <integer_cst
0x1c09160 4>
align 32 symtab 0 alias set -1>
(gdb) p debug_generic_expr (type)
union
{
union wait * __uptrD.1289;
intD.0 * __iptrD.1290;
} *
The type we got in 4.0.x:
(gdb) p debug_tree(type)
<pointer_type 0x4147b3a0
type <union_type 0x4147b2b8 wait type_0 SI
size <integer_cst 0x414064a0 constant invariant 32>
unit size <integer_cst 0x41406160 constant invariant 4>
align 32 symtab 0 alias set -1
fields <field_decl 0x4147b740 w_status type <integer_type 0x4140e488
int>
SI file t.c line 8 size <integer_cst 0x414064a0 32> unit size
<integer_cst 0x41406160 4>
align 32 offset_align 128
offset <integer_cst 0x41406180 constant invariant 0>
bit offset <integer_cst 0x41406960 constant invariant 0> context
<union_type 0x4147b2b8 wait> arguments <integer_cst 0x41406180 0>> context
<translation_unit_decl 0x4147be80 D.1155>
pointer_to_this <pointer_type 0x4147b3a0> chain <type_decl 0x4147b32c
D.1140>>
unsigned SI size <integer_cst 0x414064a0 32> unit size <integer_cst
0x41406160 4>
align 32 symtab 0 alias set -1>
$1 = void
(gdb) p debug_generic_expr(type)
union wait *
This what we get in function_arg.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24255