https://bugs.llvm.org/show_bug.cgi?id=37774

rtr...@google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
                 CC|                            |rtr...@google.com
             Status|NEW                         |RESOLVED

--- Comment #1 from rtr...@google.com ---
This is working as intended.  A read from uninitialized memory has undefined
behavior.  When a program runs into undefined behavior, anything can happen. 
The optimizer detects that the condition is only evaluated after undefined
behavior has happened.  Because of that, it removes the if-branch and executes
the else-branch unconditionally.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to