[LLVMdev] totally lost
Xiaodong Li
xli3 at csil-suna38.cs.uiuc.edu
Fri Nov 1 16:57:01 PST 2002
Dear LLVM:
I wrote a small testcase and I can compiler and run it with gcc, But with
llvm, I got weird error like the following. I really don't know what's
going on. Could you explain? Thanks a lot -Jerry
Error Message:
xli3|csil-suna38|~/mp2|[25]% llvmgcc testcase3.c
testcase3.c: In function `init':
testcase3.c:5: warning: cast to pointer from integer of different size
/usr/dcs/projects/cs426/Software/gcc_install/bin/../lib/gcc-lib/llvm/3.1/as:
/var/tmp//cc7nkKdc.s:428: Redefinition of value named 'reg213' in the 'int
*' type plane!
My code:
/* --------------------testcase -----------------------*/
#include <stdio.h>
int *init(int size)
{
int *a = (int *)malloc(size);
return a;
}
int main()
{
int *c;
c = init(5);
printf("c[1]=%d\n", c[1]);
free( c );
return;
}
More information about the llvm-dev
mailing list