[LLVMbugs] [Bug 4556] New: Assertion initialising global with address of " extern void foo"

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jul 14 04:53:08 PDT 2009


           Summary: Assertion initialising global with address of "extern
                    void foo"
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: richard at xmos.com
                CC: llvmbugs at cs.uiuc.edu

With the following code:

extern void foo;
void *bar = &foo;

llvm-gcc built from trunk asserts:

$ ./cc1 test.c -emit-llvm 
cc1: /local/richard/llvm/lib/VMCore/Type.cpp:1327: static llvm::PointerType*
llvm::PointerType::get(const llvm::Type*, unsigned int): Assertion `ValueType
!= Type::VoidTy && "Pointer to void is not valid, use i8* instead!"' failed.
test.c:2: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.

This code compiles without error using the 2.5 release.

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