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

           Summary: strange failure with VLAs and debug info
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


>From a user on IRC:
--
ddun...@giles:tmp$ cat t.c
#include <stdio.h>
#include <string.h>

static void f0(const char * s, size_t len) {
    char buf2[len];
    memmove(buf2, s, len);
    fprintf(stderr, "%s\n", buf2);
}

int main() {
    const char a[] = "Hello, World!";
    f0(a, sizeof a);
    return 0;
}
ddun...@giles:tmp$ clang -m64 t.c && ./a.out
Hello, World!
ddun...@giles:tmp$ clang -g -m64 t.c && ./a.out
³.o"&Æ¡ ó¿_ÿ
--


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to