[LLVMbugs] [Bug 15839] New: [C99] clang crashes on compound literal initialization with address-of as element.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 24 15:02:05 PDT 2013


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

            Bug ID: 15839
           Summary: [C99] clang crashes on compound literal initialization
                    with address-of as element.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pichet2000 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

given test.c:

int x;
struct S { int x : 2; };
struct S b = (struct S){ &x };

clang test.c

This will crash clang. 
I believe this is invalid c99 code since &x is not a constant expression.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130424/7bf496bf/attachment.html>


More information about the llvm-bugs mailing list