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

            Bug ID: 19238
           Summary: Debug info not generated correctly for function static
                    variables
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

#include<stdio.h>
int main() {
    static int X = 10;
    {
        static bool X = false;
        printf("...");
    }
    printf("...");
}

If you compile the code above with clang 3.4 and break at the printf()
statements (gdb or lldb) then p X will always show X to be 10. The same code
compiled with GCC shows X to be false in the first case and 10 in the second as
expected.

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