rnk added a comment. Ultimately, Sema should be responsible for rejecting this, correct? In the meantime we can have CodeGen reject this and emit a null value to avoid crashing.
================ Comment at: lib/CodeGen/CGCUDABuiltin.cpp:105 @@ -99,3 +104,3 @@ llvm::Value *P = Builder.CreateStructGEP(AllocaTy, Alloca, I - 1); llvm::Value *Arg = Args[I].RV.getScalarVal(); Builder.CreateAlignedStore(Arg, P, DL.getPrefTypeAlignment(Arg->getType())); ---------------- I assume this is what's asserting. Probably this code should do something like: if (Args[I].RV.isScalar()) { Arg = Args[I].RV.getScalarVal(); } else { ErrorUnsupported(E, "non-scalar variadic argument"); Arg = CGM.getNullValue(...); } http://reviews.llvm.org/D17103 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits