2015-05-04 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / drap.c
blob573bb39d08fdc362b5e5ee07d2a219625002a181
1 /* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
2 /* { dg-options "-g -mforce-drap" } */
4 volatile int v;
6 __attribute__((noinline, noclone)) int
7 bar (int a, int b)
9 #ifdef __x86_64__
10 asm volatile ("movq %%rsp, %%r10" : : : "r10");
11 #else
12 asm volatile ("movl %%esp, %%ecx" : : : "ecx");
13 #endif
14 return 0;
17 __attribute__((noinline, noclone)) int
18 foo (int v0, int v1, int v2, int v3, int v4, int v5, int a, int b)
20 __attribute__((aligned (32))) int c = bar (a, b);
21 v++; /* { dg-final { gdb-test 21 "a" "5" } } */
22 return a + b + c; /* { dg-final { gdb-test 22 "b" "6" } } */
25 int
26 main (void)
28 foo (0, 0, 0, 0, 0, 0, 5, 6);
29 return 0;