https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92932
Bug ID: 92932 Summary: Optimizers generate wrong code due to aggressive data optimization. Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- GCC sometimes aliases symbols if they refer to identical data. However, in order for this to be legitimate optimization, it must be ensured that the code will be accessed in the same way. This is not always the case, an example where this generates wrong code is PR92606. Such a new hook needs at least the following information to disallow aliasing by means of .set or similar means: * The attributes specified for either objects. * The address spaces specified for either objects.