is of type void*. I'll try to add the appropriate checking later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67721
91177308-0d34-0410-b5e6-
96231b3b80d8
Sema::ActOnIndirectGotoStmt(SourceLocation GotoLoc,SourceLocation StarLoc,
ExprArg DestExp) {
// FIXME: Verify that the operand is convertible to void*.
-
- return Owned(new (Context) IndirectGotoStmt((Expr*)DestExp.release()));
+ // Convert operand to void*
+ Expr* E = (Expr*)DestExp.release();
+ ImpCastExprToType(E, Context.VoidPtrTy);
+ return Owned(new (Context) IndirectGotoStmt(E));
}
Action::OwningStmtResult
--- /dev/null
+// RUN: clang-cc -emit-llvm-bc -o - %s
+// PR3869
+int a(long long b) { goto *b; }
+