globalopt crash for packed structs #1863
Labels
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
ipo
Interprocedural optimizations
Extended Description
I compile this program to LLVM bytecode:
#include
std::map<int, int> someMap;
Using this command line:
$ llvm-g++ -O2 --emit-llvm -o mapbug.bc -c mapbug.cc
Then when I try to use the resulting bytecode module, the LLVM tools will
complain about it being invalid. For example:
$ llvm-link -f -o mapbug.linked.bc mapbug.bc
Global variable initializer type does not match global variable type!
"struct.std::map<int,int,std::less,std::allocator<std::pair<const int,
int> > >"* @someMap
Broken module found, compilation aborted!
This problem disappears if I remove "-O2" or replace it by "-O0".
I'm using LLVM 2.0 and its g++ front-end, compiled from source with GCC 4.1.3.
The text was updated successfully, but these errors were encountered: