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

            Bug ID: 23247
           Summary: L-values produced by casts to volatile references
                    aren't tracked as volatile
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

static int global = 4;
int main() {
  const_cast<volatile int &>(global) = 4;
}

IRGen marks this store volatile if the cast is a reinterpret_cast, but not if
it's a static_cast, const_cast, or C-style cast.

Storing to the dereferenced result of casting to a volatile pointer type seems
to work in all cases.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to