[LLVMbugs] [Bug 8273] New: possible volatile bug

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 1 10:24:50 PDT 2010


           Summary: possible volatile bug
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu

Ok this is super nitpicky, but I think actually wrong.

We take this code:

int const volatile vol1 = 0;
int const vol2 = 0;

int main (void)
  return 0;

and then run these commands:

[regehr at gamow ~]$ clang -O vol.c -o vol
[regehr at gamow ~]$ nm vol |grep vol
00000000004005cc R vol1
00000000004005cc R vol2

They have been put at the same location.  I argue that this transformation is
illegal if any of the variables in question are volatile, because a
volatile-qualified object should only be loaded from or store to when the
abstract machine would do so.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list