[LLVMbugs] [Bug 1641] New: ICE: Global initializer should be constant!
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Sep 6 02:52:16 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1641
Summary: ICE: Global initializer should be constant!
Product: tools
Version: trunk
Platform: All
OS/Version: MacOS X
Status: NEW
Severity: enhancement
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs at nondot.org
ReportedBy: isanbard at gmail.com
CC: llvmbugs at cs.uiuc.edu
This program:
struct A {
unsigned long l;
};
static void bork() {
const unsigned long vcgt = 'vcgt';
struct A a = { vcgt };
}
void foo() {
bork();
}
Compiles under GCC but gives this error for LLVM-GCC:
$ llvm-gcc -arch ppc -Os -c testcase.i
Assertion failed: ((TREE_CONSTANT(DECL_INITIAL(decl)) ||
TREE_CODE(DECL_INITIAL(decl)) == STRING_CST) && "Global initializer should be
constant!"), function emit_global_to_llvm, file
../../llvm-gcc-4.0.src/gcc/llvm-backend.cpp, line 777.
testcase.i: In function 'foo':
testcase.i:9: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs> for instructions.
--
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