[llvm-bugs] [Bug 41918] incorrect code generated in llvm Early CSE w/ MemorySSA phase

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 17 15:06:58 PDT 2019


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

Eli Friedman <efriedma at quicinc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED
                 CC|                            |efriedma at quicinc.com

--- Comment #2 from Eli Friedman <efriedma at quicinc.com> ---
In C, it is only legal to access a variable while it's live.  (From the
standard: "its lifetime extends from entry into the block with which it is
associated until execution of that block ends in any way".)  The code in your
testcase declares a variable inside a block, then tries to access it after the
block exits.

Of course, statement expressions aren't part of the standard, but I can't think
of any reason why we would treat them differently from regular blocks in this
context.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190517/a3c73805/attachment.html>


More information about the llvm-bugs mailing list