[Bug tree-optimization/81884] Invalid code generation with zero size arrays or flexible array members
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 18 11:57:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81884
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2017-08-18
Component|c++ |tree-optimization
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Mine. DSE is optimizing
void initialize() ()
{
long unsigned int SR.19;
struct value_t D.2321;
struct X * x.0_1;
struct X * x.3_4;
<bb 2> [100.00%]:
x.0_1 = x;
x.0_1->arr[0] = 11;
x.0_1->arr[1] = 12;
MEM[(struct X *)x.0_1] = 10;
x.3_4 = x;
x.3_4->arr[2] = 13;
x.3_4->arr[3] = 14;
return;
to
__attribute__((noinline, noclone))
void initialize() ()
{
long unsigned int SR.19;
struct value_t D.2321;
struct X * x.0_1;
struct X * x.3_4;
<bb 2> [100.00%]:
x.0_1 = x;
MEM[(struct X *)x.0_1] = 10;
x.3_4 = x;
x.3_4->arr[2] = 13;
x.3_4->arr[3] = 14;
return;
so it appears that it treats the "aggregate" assignment as a must-def.
More information about the Gcc-bugs
mailing list