[LLVMdev] initializer does not match global variable type.

Anderson, Todd A todd.a.anderson at intel.com
Mon Oct 16 14:04:31 PDT 2006


>-----Original Message-----
>From: llvmdev-bounces at cs.uiuc.edu 
>[mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Lattner
>Sent: Monday, October 16, 2006 2:09 PM
>To: LLVM Developers Mailing List
>Subject: Re: [LLVMdev] initializer does not match global variable type.
>
>On Mon, 16 Oct 2006, Anderson, Todd A wrote:
>> I have an objective-c file, bar.m, that I try to process in the
>> following way generating the error shown below.  Any  help would
>> be appreciated.  I suspect the error is in the first few lines
>> of output.
>
>That is really really strange.  Can you please file a bugzilla 
>report and 
>indicate what target you have llvm-gcc configured for?

I don't understand what llvm-gcc has to do with this.  Maybe I wasn't
clear.  The "g++" is ordinary vanilla g++, not llvm-g++.  Are there
any versioning issues with regular g++ compiling llvm2cpp generated
C++ files?  I believe cfrontend-g++ comes from the cfrontend tarball.
llvm2cpp came from the llvm tarball.  My g++ was 4.1.1.  The LLVM
libs are from the llvm tarball I believe and the objc library is
probably the gcc 4.1.1 one.  What other information would help?

>>> cfrontend-g++ -o bar.bc bar.m
>>> llvm2cpp -o bar.cpp bar.bc
>>> g++ -c bar.o bar.cpp
>>> ld -o bar bar.o -l objc -l LLVMCore -l LLVMSupport -l LLVMSystem
>>> ./bar
>>
>> Global variable initializer type does not match global variable type!
>> [13 x sbyte]* %.str_2
>> Global variable initializer type does not match global variable type!
>> [9 x sbyte]* %.str_3
>> Global variable initializer type does not match global variable type!
>> [2 x sbyte]* %.str_4
>> Broken module found, verification continues.




More information about the llvm-dev mailing list