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

David Blaikie <dblai...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dblai...@gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from David Blaikie <dblai...@gmail.com> ---
That variable 'z' has external linkage, I believe - so it could be modified
from some other file.

If you give it local linkage (make it "static" or "const") then the variable
will be optimized away and the test() function will get the constant value
inlined into it.

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

Reply via email to