Debian Codegraph @

gcc/testsuite/gcc.dg/guality/drap.c

raw
1 /* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
2 /* { dg-options "-g -mforce-drap" } */
3
4 volatile int v;
5
6 __attribute__((noinline, noclone)) int
7 bar (int a, int b)
8 {
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;
15 }
16
17 __attribute__((noinline, noclone)) int
18 foo (int v0, int v1, int v2, int v3, int v4, int v5, int a, int b)
19 {
20 __attribute__((aligned (32))) int c = bar (a, b);
21 v++; /* { dg-final { gdb-test . "a" "5" } } */
22 return a + b + c; /* { dg-final { gdb-test . "b" "6" } } */
23 }
24
25 int
26 main (void)
27 {
28 foo (0, 0, 0, 0, 0, 0, 5, 6);
29 return 0;
30 }