Commit e6799923 by Eric Botcazou

Re-add test.

From-SVN: r257998
parent 70a1af61
/* PR rtl-optimization/83496 */
/* Reported by Hauke Mehrtens <gcc@hauke-m.de> */
extern void abort (void);
typedef unsigned long mp_digit;
typedef struct { int used, alloc, sign; mp_digit *dp; } mp_int;
int mytest(mp_int *a, mp_digit b) __attribute__((noclone, noinline));
int mytest(mp_int *a, mp_digit b)
{
if (a->sign == 1)
return -1;
if (a->used > 1)
return 1;
if (a->dp[0] > b)
return 1;
if (a->dp[0] < b)
return -1;
return 0;
}
int main (void)
{
mp_int i = { 2, 0, -1 };
if (mytest (&i, 0) != 1)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment