1/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ 2 3#include "test-unwind.h" 4 5#if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ 6/* Test situation 3: Stack realign really happen with DRAP reg DI */ 7void __attribute__ ((noinline)) __attribute__ ((regparm(3))) 8bar (int arg1, int arg2, int arg3) 9{ 10 int __attribute__ ((aligned(64))) a=1; 11 char * s = (char *) __builtin_alloca (arg3 + 1); 12 13 copy (s, arg3); 14 if (__builtin_strncmp (s, "good", arg3) != 0) 15 { 16#ifdef DEBUG 17 s[arg3] = '\0'; 18 printf ("Failed: %s != good\n", s); 19#endif 20 abort (); 21 } 22 23 if (check_int (&a, __alignof__(a)) != a) 24 abort (); 25 26 ALTER_REGS(); 27 throw arg1+arg2+arg3+a; 28} 29 30void 31foo() 32{ 33 bar (1,2,3); 34} 35#endif 36