; Call graph construction crash: Not handling indirect calls right
;
-; RUN: opt -analyze -callgraph %s
+; RUN: opt < %s -analyze -print-callgraph >& /dev/null
;
-%FunTy = type int(int)
+ %FunTy = type i32 (i32)
-implementation
+define void @invoke(%FunTy* %x) {
+ %foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
+ ret void
+}
-void "invoke"(%FunTy *%x)
-begin
- %foo = call %FunTy* %x(int 123)
- ret void
-end