[Bug c/82599] Assignments from statically initialized flexible arrays copy too much
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 18 09:15:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82599
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid, wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-10-18
Version|5.4.0 |7.2.1
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. I think the issue is that we make the new type created by
constructing the object compatible (or the same) as the second. Then we get to
invalid GIMPLE
being simply
second = first;
which ends up using expr_size from the source. Iff the C FE wants to support
this kind of assignments (not sure if it really should!) then it needs to
tack appropriate WITH_SIZE_EXPRs on the decls.
More information about the Gcc-bugs
mailing list