URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 816 |
Rev 826 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-fwrapv" } */
|
/* { dg-options "-fwrapv" } */
|
|
|
int __attribute__((noinline))
|
int __attribute__((noinline))
|
foo (long i, long j)
|
foo (long i, long j)
|
{
|
{
|
if (i >= 1)
|
if (i >= 1)
|
if (j > -(long)(((unsigned long)(long)-1)>>1))
|
if (j > -(long)(((unsigned long)(long)-1)>>1))
|
{
|
{
|
long x;
|
long x;
|
j--;
|
j--;
|
x = i + j;
|
x = i + j;
|
if (x >= 0)
|
if (x >= 0)
|
return 1;
|
return 1;
|
}
|
}
|
return 0;
|
return 0;
|
}
|
}
|
extern void abort (void);
|
extern void abort (void);
|
int main()
|
int main()
|
{
|
{
|
if (foo (1, 1) != 1)
|
if (foo (1, 1) != 1)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.