[LLVMbugs] [Bug 2528] New: False positive "dead store" for aliased pointer

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jul 7 13:31:53 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2528

           Summary: False positive "dead store" for aliased pointer
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu


The attached file contains the lines

/*10*/    const void *bytes = data;
/*11*/    unsigned bg = *((unsigned*)bytes); bytes += sizeof(unsigned);
/*12*/    printf("%d", bg);

Running `scan_build xcodebuild` with a project containing just the attached
file, clang reports "Value stored to 'bytes' is never read" for line 11.
However, the value is read and copied into `bg`, which is then printed.


-- 
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