[Bug sanitizer/80386] UBSAN: false positive - constant folding and reassosiation before instrumentation
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 11 12:27:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80386
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yea, the fold call there is puzzling. Even a change in r67189 (old one!) had:
- /* Don't fold a COMPONENT_EXPR: if the operand was a CONSTRUCTOR (the
- only time it will fold), it can cause problems with PLACEHOLDER_EXPRs
- in Ada. Moreover, it isn't at all clear why we fold here at all. */
- if (TREE_CODE (t) != COMPONENT_REF)
- t = fold (t);
Does anything break if we get rid of the fold call?
More information about the Gcc-bugs
mailing list