| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-g -fno-var-tracking-assignments" } */ |
| 3 |
/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O1" } } */ |
| 4 |
|
| 5 |
typedef __UINTPTR_TYPE__ uintptr_t; |
| 6 |
|
| 7 |
__attribute__((noinline, noclone)) int |
| 8 |
sub (int a, int b) |
| 9 |
{ |
| 10 |
return a - b; |
| 11 |
} |
| 12 |
|
| 13 |
typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t |
| 14 |
__attribute__ ((aligned (2 * __alignof__ (uintptr_t)))); |
| 15 |
|
| 16 |
__attribute__((noinline, noclone)) void |
| 17 |
foo (fatp_t str, int a, int b) |
| 18 |
{ |
| 19 |
int i = sub (a, b); |
| 20 |
if (i == 0) /* BREAK */ |
| 21 |
foo (str, a - 1, b); |
| 22 |
} |
| 23 |
|
| 24 |
int |
| 25 |
main (void) |
| 26 |
{ |
| 27 |
fatp_t ptr = { 31415927, 27182818 }; |
| 28 |
foo (ptr, 1, 2); |
| 29 |
return 0; |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { gdb-test 20 "str.pa" "31415927" } } */ |
| 33 |
/* { dg-final { gdb-test 20 "str.pb" "27182818" } } */ |