[ARM] Fix PR85203: cmse_nonsecure_caller returns wrong result
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / test_frame_16.c
blob28f3826adadd5eaa6486659e4d6b6d7c5960b9d2
1 /* Verify:
2 * with outgoing.
3 * single int register push.
4 * varargs and callee-save size >= 256
5 * Use 2 stack adjustments. */
7 /* { dg-do compile } */
8 /* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
10 #define REP8(X) X,X,X,X,X,X,X,X
11 #define REP64(X) REP8(REP8(X))
13 void outgoing (__builtin_va_list, ...);
15 double vararg_outgoing (int x1, ...)
17 double a1 = x1, a2 = x1 * 2, a3 = x1 * 3, a4 = x1 * 4, a5 = x1 * 5, a6 = x1 * 6;
18 __builtin_va_list vl;
19 __builtin_va_start (vl, x1);
20 outgoing (vl, a1, a2, a3, a4, a5, a6, REP64 (1));
21 __builtin_va_end (vl);
22 return a1 + a2 + a3 + a4 + a5 + a6;
25 /* { dg-final { scan-assembler-times "sub\tsp, sp, #\[0-9\]+" 2 } } */