xref: /llvm-project/llvm/test/Verifier/inalloca1.ll (revision b05c71814c3b9f91a2e00af891d67a83790a109c)
1; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
2
3declare void @a(ptr byval(i64) inalloca(i64) %p)
4; CHECK: Attributes {{.*}} are incompatible
5
6declare void @b(ptr inreg inalloca(i64) %p)
7; CHECK: Attributes {{.*}} are incompatible
8
9declare void @c(ptr sret(i64) inalloca(i64) %p)
10; CHECK: Attributes {{.*}} are incompatible
11
12declare void @d(ptr nest inalloca(i64) %p)
13; CHECK: Attributes {{.*}} are incompatible
14
15declare void @e(ptr readonly inalloca(i64) %p)
16; CHECK: Attributes {{.*}} are incompatible
17
18declare void @f(ptr inalloca(void()) %p)
19; CHECK: Attribute 'inalloca' does not support unsized types
20
21declare void @g(ptr inalloca(i32) %p, i32 %p2)
22; CHECK: inalloca isn't on the last parameter!
23
24; CHECK: Attribute 'inalloca(i8)' applied to incompatible type!
25; CHECK-NEXT: ptr @inalloca_not_pointer
26define void @inalloca_not_pointer(i8 inalloca(i8)) {
27  ret void
28}
29