1 /* { dg-do run } */ 2 /* { dg-options "-g" } */ 3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ 4 5 typedef __UINTPTR_TYPE__ uintptr_t; 6 7 typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t 8 __attribute__ ((aligned (2 * __alignof__ (uintptr_t)))); 9 10 __attribute__((noinline, noclone)) void clear_stack(void)11clear_stack (void) 12 { 13 char a[128 * 1024 + 128]; 14 15 __builtin_memset (a + 128 * 1024, 0, 128); 16 } 17 18 __attribute__((noinline, noclone)) void foo(fatp_t str,int count)19foo (fatp_t str, int count) 20 { 21 char a[128 * 1024]; 22 23 if (count > 0) 24 foo (str, count - 1); 25 clear_stack (); 26 count--; /* BREAK */ 27 } 28 29 int main(void)30main (void) 31 { 32 fatp_t ptr = { 31415927, 27182818 }; 33 foo (ptr, 1); 34 return 0; 35 } 36 37 /* { dg-final { gdb-test 26 "str.pa" "31415927" } } */ 38 /* { dg-final { gdb-test 26 "str.pb" "27182818" } } */ 39