aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/loongarch/stack-check-alloca.h
blob: 8c75f6c0f703ef3d661309fddf046e0f89e4b58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

/* Avoid inclusion of alloca.h, unavailable on some systems.  */
#define alloca __builtin_alloca

__attribute__((noinline, noipa))
void g (char* ptr, int y)
{
  ptr[y] = '\0';
}

void f_caller (int y)
{
  char* pStr = alloca(SIZE);
  g (pStr, y);
}