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

--- Comment #6 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Richard Biener from comment #4)
> If it is undefined it should be unreachable, not switch to a random static
> branch ;)  (defeating uninit diagnostics, of course)

Well, its not unreachable.. we reach that code always and have to take one of
the branches. It just uses an automatic variable which hasn't been initialized,
making it undefined.

We could choose whatever value we want for it.  If we chose non-zero, the call
would be eliminated.  It would take analysis of some sort to decide which
branch is more profitable to remove in the presence of undefined...  

THis seems like something that maybe uninit could do :-)  Hey, this is
uninitialized, tell the user and then see what the most profitable value to
assume for it going forward would be and set it to that value :-)

Reply via email to