PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20180226-1.c
blobe2b678c8fc79c4448aa01038cb801ff93905b091
1 /* PR rtl-optimization/83496 */
2 /* Reported by Hauke Mehrtens <gcc@hauke-m.de> */
4 extern void abort (void);
6 typedef unsigned long mp_digit;
8 typedef struct { int used, alloc, sign; mp_digit *dp; } mp_int;
10 int mytest(mp_int *a, mp_digit b) __attribute__((noclone, noinline));
12 int mytest(mp_int *a, mp_digit b)
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;
25 int main (void)
27 mp_int i = { 2, 0, -1 };
28 if (mytest (&i, 0) != 1)
29 abort ();
30 return 0;