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/] [pr20115.c] - Blame information for rev 298

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);
5
void func_other (int);
6
int global_int;
7
int func_pure (void) { return global_int; }
8
void func_other (int a)
9
{
10
  global_int = a + 1;
11
}
12
int f(void)
13
{
14
  int a;
15
  a = func_pure();
16
  func_other (a);
17
  a = func_pure (); // We were removing this function call
18
  return a;
19
}
20
void abort (void);
21
 
22
int main(void)
23
{
24
  global_int = 10;
25
  if (f() != 11)
26
    abort ();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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