* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / pr36728-1.c
blob0ab475ab047806372f85f8fdc56c178a33083df9
1 /* PR debug/36728 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
5 #include "../nop.h"
7 int a, b;
9 int __attribute__((noinline))
10 foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
12 char *x = __builtin_alloca (arg7);
13 int __attribute__ ((aligned(32))) y;
15 y = 2;
16 asm (NOP : "=m" (y), "=m" (b) : "m" (y));
17 x[0] = 25;
18 asm (NOP : "=m" (x[0]), "=m" (a) : "m" (x[0]), "m" (b));
19 return y;
22 /* On s390(x) r2 and r3 are (depending on the optimization level) used
23 when adjusting the addresses in order to meet the alignment
24 requirements above. They usually hold the function arguments arg1
25 and arg2. So it is expected that these values are unavailable in
26 some of these tests. */
28 /* { dg-final { gdb-test 16 "arg1" "1" { target { ! "s390*-*-*" } } } } */
29 /* { dg-final { gdb-test 16 "arg2" "2" { target { ! "s390*-*-*" } } } } */
30 /* { dg-final { gdb-test 16 "arg3" "3" } } */
31 /* { dg-final { gdb-test 16 "arg4" "4" } } */
32 /* { dg-final { gdb-test 16 "arg5" "5" } } */
33 /* { dg-final { gdb-test 16 "arg6" "6" } } */
34 /* { dg-final { gdb-test 16 "arg7" "30" } } */
35 /* { dg-final { gdb-test 16 "y" "2" } } */
36 /* { dg-final { gdb-test 18 "arg1" "1" { target { ! "s390*-*-*" } } } } */
37 /* { dg-final { gdb-test 18 "arg2" "2" { target { ! "s390*-*-*" } } } } */
38 /* { dg-final { gdb-test 18 "arg3" "3" } } */
39 /* { dg-final { gdb-test 18 "arg4" "4" } } */
40 /* { dg-final { gdb-test 18 "arg5" "5" } } */
41 /* { dg-final { gdb-test 18 "arg6" "6" } } */
42 /* { dg-final { gdb-test 18 "arg7" "30" } } */
43 /* { dg-final { gdb-test 18 "*x" "(char) 25" } } */
44 /* { dg-final { gdb-test 18 "y" "2" } } */
46 int
47 main ()
49 int l = 0;
50 asm ("" : "=r" (l) : "0" (l));
51 a = foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
52 asm volatile ("" :: "r" (l));
53 return 0;