[LLVMdev] llc c backend can produce code that doesn't compile on gcc 4.x

Eric van Riet Paap ericvrp at gmail.com
Mon Jan 15 03:12:02 PST 2007


Hello,

I would like to ask the llvm developers to have a look at http:// 
llvm.org/bugs/show_bug.cgi?id=918 .
This bug has been reported 4 month ago but is none the less a  
somewhat serious one.

Below I have pasted the test case and output of the issue running on  
my ppc machine.

thank you
Eric


pb:~ eric$ cat testme.ll;llvm-as -f testme.ll;llc -march=c -f  
testme.bc;gcc -c testme.cbe.c ;gcc --version;llc --version
%structtype_s = type { i32 }
%fixarray_array3 = type [3 x %structtype_s]

define i32 %witness(%fixarray_array3* %p) {
     %q = getelementptr %fixarray_array3* %p, i32 0, i32 0, i32 0
     %v = load i32* %q
     ret i32 %v
}
testme.cbe.c:106: error: array type has incomplete element type
testme.cbe.c:119: warning: conflicting types for built-in function  
'malloc'
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc.  
build 5026)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There  
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.

Low Level Virtual Machine (http://llvm.org/):
   llvm version 2.0cvs
   Optimized build with assertions.
pb:~ eric$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070115/8c2e7bc0/attachment.html>


More information about the llvm-dev mailing list