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

--- Comment #10 from Matthijs Kooijman <matthijs at stdin dot nl> ---
Also note that pr96996, that was marked as a duplicate of this report, talks
about a notable subcase of the case presented in this report. While this report
talks about constant complete objects (e.g. a variable marked const), pr96996
talks about const subobjects (e.g. a const member of a variable that might not
be const itself).

That pr has some motivation to argue that such const subobjects can be
optimized in the same way as const complete objects. Maybe this is obvious for
seasoned gcc devs, but I wanted to point it out regardless, since the cases
seem distinct enough to me that one might end up fixing this for objects and
forgetting about subobjects :-)

Reply via email to