1 /* PR rtl-optimization/83496 */
2 /* Reported by Hauke Mehrtens <gcc@hauke-m.de> */
3 
4 extern void abort (void);
5 
6 typedef unsigned long mp_digit;
7 
8 typedef struct { int used, alloc, sign; mp_digit *dp; } mp_int;
9 
10 int mytest(mp_int *a, mp_digit b) __attribute__((noclone, noinline));
11 
mytest(mp_int * a,mp_digit b)12 int mytest(mp_int *a, mp_digit b)
13 {
14   if (a->sign == 1)
15     return -1;
16   if (a->used > 1)
17     return 1;
18   if (a->dp[0] > b)
19     return 1;
20   if (a->dp[0] < b)
21     return -1;
22   return 0;
23 }
24 
main(void)25 int main (void)
26 {
27   mp_int i = { 2, 0, -1 };
28   if (mytest (&i, 0) != 1)
29     abort ();
30   return 0;
31 }
32