https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
--- Comment #7 from Andrew Pinski ---
Specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32455#c4 .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
Andrew Pinski changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
--- Comment #5 from Andrew Pinski ---
Oh the definition of __builtin_clz does not have return value so the value is
undefined to begin with.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
--- Comment #3 from Krister Walfridsson ---
The C program is obviously UB. But the optimization is done on GIMPLE, and it
is not obvious to me that the GIMPLE code is UB -- we have a function called
__builtin_clz that calls an internal function,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
--- Comment #2 from Andrew Pinski ---
defining __builtin_clz makes this code undefined. Especially when it comes to
calling itself.
That is the ranges here are ok and correct but rather the usage is undefined.
gcc.dg/pr100521.c is just testing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112949
--- Comment #1 from Andrew Pinski ---
I think the testcase is broken rather than anything else.