Is this bug in LLVM?

Hello. My name is Seung Jae Lee.
I'd like to ask you onething about converting to ARM assembly code.
I saved the simplest C code shown in your LLVM webpage as 'hello.c'
And I made 'hello.bc' by "$ llvm-gcc hello.c -o hello".
In order to make ARM assembly code, I typed "llc -march=arm hello.bc -o hello.arm"
But, I met this error.

llc: ARMISelDAGToDAG.cpp:73: llvm::SDOperand LowerCALL(llvm::SDOperand, llvm::SelectionDAG&): Assertion `isVarArg == false && "VarArg not supported"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x15)[0x850437d]
llc((anonymous namespace)::SignalHandler(int)+0x139)[0x8504645]
Aborted

I can't understand. Would you mind replying to me w.r.t this?
Thank you.

Best regards,
Seung Jae Lee

Hi Seung Jae Lee,

Hello. My name is Seung Jae Lee.
I'd like to ask you onething about converting to ARM assembly code.
I saved the simplest C code shown in your LLVM webpage as 'hello.c'
And I made 'hello.bc' by "$ llvm-gcc hello.c -o hello".

Sounds like you're using llvm-gcc3

In order to make ARM assembly code, I typed "llc -march=arm hello.bc -o hello.arm"
But, I met this error.

llc: ARMISelDAGToDAG.cpp:73: llvm::SDOperand LowerCALL(llvm::SDOperand, llvm::SelectionDAG&): Assertion `isVarArg == false && "VarArg not supported"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x15)[0x850437d]
llc((anonymous namespace)::SignalHandler(int)+0x139)[0x8504645]
Aborted

I can't understand. Would you mind replying to me w.r.t this?

The ARM back end is incomplete. It looks to me like you've used a
feature (var arg functions) that isn't implemented yet. However, I'll
let Raphael Espinodola (the ARM maintainer) answer definitively on this.

Thank you.

Best regards,
Seung Jae Lee

Thanks for your interest in LLVM.

Reid.

Hello. My name is Seung Jae Lee.
I'd like to ask you onething about converting to ARM assembly code.

ARM is still a work in progress (but make steady and good progress at
that). I don't believe all features work yet.

In this case, it looks like ARM cannot handle va_arg calls yet, aka
your call to printf.

Andrew

But, I met this error.

llc: ARMISelDAGToDAG.cpp:73: llvm::SDOperand LowerCALL(llvm::SDOperand, llvm::SelectionDAG&): Assertion `isVarArg == false && "VarArg not supported"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x15)[0x850437d]
llc((anonymous namespace)::SignalHandler(int)+0x139)[0x8504645]
Aborted

Try to download the CVS version. Varargs is already implemented in CVS :slight_smile:

I can't understand. Would you mind replying to me w.r.t this?
Thank you.

Best regards,
Seung Jae Lee

Best Regards,
Rafael