[LLVMbugs] [Bug 81] New: "Tree check" ICE on partial initialization of auto struct

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Sat Nov 1 13:33:19 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=81

           Summary: "Tree check" ICE on partial initialization of auto
                    struct
           Product: tools
           Version: 1.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: sabre at nondot.org
        ReportedBy: gaeke+bugs at uiuc.edu


Reduced from linux-2.4.22/kernel/kmod.c:call_usermodehelper().
Ordinary gcc accepts this code, which makes use of the ancient
pre-C99 syntax for partial structure initialization, so it's
technically a "C extension". Linux seems to use this syntax a
lot.

419 gally> cat kmod4.c
typedef struct { int foo; } spinlock_t;
typedef struct wait_queue_head_t { spinlock_t lock; } wait_queue_head_t;
void call_usermodehelper(void) { struct wait_queue_head_t work = { lock:
(spinlock_t) { 0 }, }; }

420 gally> llvm-gcc -c kmod4.c
kmod4.c: In function `call_usermodehelper':
kmod4.c:3: internal compiler error: tree check: expected constructor, have
compound_literal_expr in llvm_expand_constructor_elements, at llvm-expand.c:3305



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list