https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
--- Comment #6 from Sanjoy Das ---
(In reply to Andrew Pinski from comment #5)
> Oh I see pure/const behavior.
>
> The problem is more complex, in that in one TU, the comdat function is
> figured out to be pure/const so we remove the store befor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
Andrew Pinski changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resolution|INVALID
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
--- Comment #4 from Sanjoy Das ---
(In reply to Andrew Pinski from comment #2)
> So in summary what you are seeing is two effects going into effect here:
> undefined behavior of division by 0 and ODR.
There is no division by zero (or any other
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
--- Comment #3 from Sanjoy Das ---
(In reply to Andrew Pinski from comment #1)
> In C++ code, the one definition rule says that all TU that contains an
> inline function, they need to have the same definition. If they have
> different definition
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
--- Comment #2 from Andrew Pinski ---
Also one more point, in this example both inline functions have the same
definition. Both answers are valid answers for this case. That is doing the
division (causing the trap on x86_64) don't have to happe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---