URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* PR 25718: invalid constant operand to the "bound" insn; error at
|
/* PR 25718: invalid constant operand to the "bound" insn; error at
|
assembly time. We'll make sure the code is correct to: run a few
|
assembly time. We'll make sure the code is correct to: run a few
|
example values. */
|
example values. */
|
|
|
extern void exit (int);
|
extern void exit (int);
|
extern void abort (void);
|
extern void abort (void);
|
unsigned __attribute__ ((__noinline__)) foo(unsigned a)
|
unsigned __attribute__ ((__noinline__)) foo(unsigned a)
|
{
|
{
|
unsigned l;
|
unsigned l;
|
l = (a >= (~0u - 512) ? (~0u - 512) : a);
|
l = (a >= (~0u - 512) ? (~0u - 512) : a);
|
return l;
|
return l;
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
if (foo ((unsigned) -512) != (unsigned) -513
|
if (foo ((unsigned) -512) != (unsigned) -513
|
|| foo ((unsigned) -514) != (unsigned) -514
|
|| foo ((unsigned) -514) != (unsigned) -514
|
|| foo ((unsigned) -513) != (unsigned) -513
|
|| foo ((unsigned) -513) != (unsigned) -513
|
|| foo ((unsigned) -1) != (unsigned) -513
|
|| foo ((unsigned) -1) != (unsigned) -513
|
|| foo (513) != 513
|
|| foo (513) != 513
|
|| foo (0) != 0)
|
|| foo (0) != 0)
|
abort ();
|
abort ();
|
|
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.