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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr20100.c] - Blame information for rev 315

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
 
4
int func_pure (void) __attribute__ ((pure));
5
void func_other (int);
6
int global_int;
7
void abort ();
8
void func_other(int a)
9
{
10
  if (a != global_int)
11
   abort ();
12
  global_int++;
13
}
14
 
15
int func_pure(void)
16
{
17
  return global_int;
18
}
19
 
20
int
21
func_loop (int arg)
22
{
23
 // global_int ++;
24
  while (arg--)
25
      func_other (func_pure ());
26
}
27
 
28
int main(void)
29
{
30
  func_loop(10);
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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