[LLVMbugs] [Bug 1744] New: llvm-gcc crash on valid initializer

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 26 13:57:24 PDT 2007


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

           Summary: llvm-gcc crash on valid initializer
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dalej at apple.com
                CC: llvmbugs at cs.uiuc.edu


The following (derived from a gcc test) shows a form of global initializer too
complex for llvm-gcc to handle.
now what? llvm-gcc yy.c
../../llvm-gcc-4.0/gcc/llvm-backend.cpp:782: failed assertion
`(TREE_CONSTANT(DECL_INITIAL(decl)) || TREE_CODE(DECL_INITIAL(decl)) ==
STRING_CST) && "Global initializer should be constant!"'


typedef struct foo { int x; char *p; } FOO;
FOO     yy[] =
{
        {1, "1"},
        {2, "2"}
};
int     *z=  (int *) &((yy + 1)->x);


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