[LLVMbugs] [Bug 2958] New: ICE with global initialised to address of incomplete static

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Oct 27 09:04:17 PDT 2008


           Summary: ICE with global initialised to address of incomplete
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: richard at xmos.com
                CC: llvmbugs at cs.uiuc.edu

llvm-gcc dies trying to compile the following (invalid) program:

static struct foo s;
struct foo *p = &s;

cc1: /homelocal/richard/llvm-upstream/llvm/lib/VMCore/Constants.cpp:128: static
llvm::Constant* llvm::Constant::getNullValue(const llvm::Type*): Assertion
`!"Cannot create a null constant of that type!"' failed.
test.c:2: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

Instead llvm-gcc should give the error "storage size of 's' isn't known" and
halt compilation, as gcc does.

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