[LLVMbugs] [Bug 1491] NEW: Type mismatch in module with global std::map
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Jun 3 05:45:53 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1491
Summary: Type mismatch in module with global std::map
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: maarten at treewalker.org
I compile this program to LLVM bytecode:
#include <map>
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<int>,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.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list