[LLVMbugs] [Bug 651] volatile incorrectly optimized away

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Nov 1 16:03:20 PST 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=651

sabre at nondot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From sabre at nondot.org  2005-11-01 18:03 -------
LLVM is correct in this case.  Because the global is being internalized, LLVM sees that it cannot be 
accessed in any way it doesn't understand, thus it optimizes the volatile away.  It does similar things for 
automatic volatile variables.

To prevent it from going away, pass -Wl,-disable-internalize or use a link-map to prevent the symbol 
from being marked internal.

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list