1; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s
2; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
3
4; We should not infer 'nounwind' for/from a weak function,
5; since it can be overriden by throwing implementation.
6;
7; CHECK-LABEL: define weak void @f()
8define weak void @f() {
9entry:
10        ret void
11}
12
13; CHECK-LABEL: define void @g()
14define void @g() {
15entry:
16	call void @f()
17	ret void
18}
19
20; CHECK-NOT: {{^}}attributes #{{[0-9].*}} nounwind
21