https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115527

--- Comment #5 from qinzhao at gcc dot gnu.org ---
the following code in gimple-fold.cc has issue:

4440           tree dst = build2_loc (buf->loc, MEM_REF, atype, buf->base,
4441                                  build_int_cst (buf->alias_type,
4442                                                 buf->off + end
4443                                                 - padding_bytes));

this is the place that generate the wrong:

MEM <char[4]> [(struct outer *)&o + 4B] = {};

as I checked, buf->off is 0, padding_bytes is 4, both are correct. but the
value of "end" is 8, which is not correct for the structure "outer", it should
be 72.

Reply via email to