1 /* PR target/70566. */ 2 3 #define NULL 0 4 5 struct mystruct 6 { 7 unsigned int f1 : 1; 8 unsigned int f2 : 1; 9 unsigned int f3 : 1; 10 }; 11 12 __attribute__ ((noinline)) void myfunc(int a,void * b)13myfunc (int a, void *b) 14 { 15 } 16 __attribute__ ((noinline)) int myfunc2(void * a)17myfunc2 (void *a) 18 { 19 return 0; 20 } 21 22 static void set_f2(struct mystruct * user,int f2)23set_f2 (struct mystruct *user, int f2) 24 { 25 if (user->f2 != f2) 26 myfunc (myfunc2 (NULL), NULL); 27 else 28 __builtin_abort (); 29 } 30 31 __attribute__ ((noinline)) void foo(void * data)32foo (void *data) 33 { 34 struct mystruct *user = data; 35 if (!user->f2) 36 set_f2 (user, 1); 37 } 38 39 int main(void)40main (void) 41 { 42 struct mystruct a; 43 a.f1 = 1; 44 a.f2 = 0; 45 foo (&a); 46 return 0; 47 } 48