[Bug middle-end/27409] ICE in get_constraint_for_component_ref
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed May 3 16:05:00 GMT 2006
------- Comment #1 from rguenth at gcc dot gnu dot org 2006-05-03 16:05 -------
Confirmed. We access a zero-sized part of the structure:
arg 1 <field_decl 0x2a959f2180 f type <record_type 0x2a959dfb00 thang_t>
BLK file t.c line 16 size <integer_cst 0x2a958ab750 0> unit size
<integer_cst 0x2a95891720 0>
align 8 offset_align 128
offset <integer_cst 0x2a958ab0f0 constant invariant 16>
bit offset <integer_cst 0x2a95891bd0 constant invariant 32> context
<record_type 0x2a959dfe70>
chain <field_decl 0x2a959f2240 g type <record_type 0x2a959dfdc0
thing_t>
BLK file t.c line 17
size <integer_cst 0x2a958ab0c0 constant invariant 128> unit size
<integer_cst 0x2a958ab0f0 16>
align 64 offset_align 128 offset <integer_cst 0x2a958ab0f0 16>
bit offset <integer_cst 0x2a95891d80 constant invariant 64> context
<record_type 0x2a959dfe70>>>>
The following testcase also ICEs on 32bit targets:
typedef struct {
struct { } z;
} thang_t;
struct {
short e;
thang_t f;
int g;
} my_struct;
void function(int blaz)
{ thang_t *fp = &my_struct.f; foo(fp);}
the important thing is that there has to be padding after e and the zero-sized
f.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-05-03 16:05:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27409
More information about the Gcc-bugs
mailing list