1 /* { dg-options "-O2 -msoft-stack" } */
4 /* See also 'gcc.target/nvptx/alloca-5.c'. */
6 static __attribute__((noinline
,noclone
)) int f(int *p
)
8 return __sync_lock_test_and_set(p
, 1);
11 static __attribute__((noinline
,noclone
)) int g(int n
)
13 /* Check that variable-length stack allocation works. */
16 /* Check that atomic operations can be applied to auto data. */
17 return f(v
) == 0 && v
[0] == 1;