3 int __attribute__ ((noinline
)) debug (void) { return 1; }
6 struct s
{ int elt
; int (*compare
) (int); };
9 compare (const void *x
, const void *y
)
11 const struct s
*s1
= x
, *s2
= y
;
12 int (*compare1
) (int);
15 compare1
= s1
->compare
;
17 if (elt2
!= 0 && debug () && compare1 (s1
->elt
) != 0)
19 return compare1 (elt2
);
22 int bad_compare (int x
) { return -x
; }
23 struct s array
[2] = { { 1, bad_compare
}, { -1, bad_compare
} };
28 qsort (array
, 2, sizeof (struct s
), compare
);