[llvm-bugs] [Bug 30922] New: static volatile is not honored by the optimizer

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 4 20:44:36 PDT 2016


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

            Bug ID: 30922
           Summary: static volatile is not honored by the optimizer
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kcc at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Test case: 

static volatile int *VAR;
void FOO() { VAR = 0; }

Using fresh trunk on Linux x86_64

At O1 and above this function compiles into empty one,
removing the store to VAR. At O0 the store is preserved. 

gcc honors volatile and does not remove the store.

-- 
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/20161105/8b3978ce/attachment.html>


More information about the llvm-bugs mailing list