llvm-project/clang/test/CodeGen/2006-01-13-StackSave.c
Matt Arsenault 25bc999d1f Intrinsics: Add type overload to stacksave and stackstore
This allows use with non-0 address space stacks. llvm_ptr_ty should
never be used. This could use some more percolation up through mlir,
but this is enough to fix existing tests.

https://reviews.llvm.org/D156666
2023-08-09 18:33:11 -04:00

14 lines
231 B
C

// PR691
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// CHECK: call ptr @llvm.stacksave.p0()
extern void external(int[*]);
void test(int N) {
int i;
for (i = 0; i < N; ++i) {
int VLA[i];
external(VLA);
}
}