OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr46675.c] - Blame information for rev 706

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
 
4
extern void abort (void);
5
 
6
int j;
7
 
8
void
9
__attribute__((noinline))
10
foo (int n)
11
{
12
  int npairs, i;
13
  npairs = n - (-__INT_MAX__ - 1);
14
 
15
  if (npairs > 0)
16
    for (i = 0; i < npairs; i++)
17
      j++;
18
}
19
 
20
int
21
main ()
22
{
23
  foo (5 - __INT_MAX__ - 1);
24
 
25
  if (j != 5)
26
    abort ();
27
 
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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