OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr25718-1.c] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* PR 25718: invalid constant operand to the "bound" insn; error at
3
   assembly time.  We'll make sure the code is correct to: run a few
4
   example values.  */
5
 
6
extern void exit (int);
7
extern void abort (void);
8
unsigned __attribute__ ((__noinline__)) foo(unsigned a)
9
{
10
  unsigned l;
11
  l = (a >= (~0u - 512) ? (~0u - 512) : a);
12
  return l;
13
}
14
 
15
int
16
main (void)
17
{
18
  if (foo ((unsigned) -512) != (unsigned) -513
19
      || foo ((unsigned) -514) != (unsigned) -514
20
      || foo ((unsigned) -513) != (unsigned) -513
21
      || foo ((unsigned) -1) != (unsigned) -513
22
      || foo (513) != 513
23
      || foo (0) != 0)
24
    abort ();
25
 
26
  exit (0);
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.