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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20030805-1.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test that gcc understands that the call to g might clobber i.  */
2
 
3
/* { dg-do run } */
4
/* { dg-options "-O2" } */
5
 
6
__inline int f ()
7
{
8
  static int i;
9
  int i2 = i;
10
  i = i2 + 1;
11
  return i;
12
}
13
 
14
int g () { return f (); }
15
 
16
int main ()
17
{
18
  if (f() != 1
19
      || g() != 2
20
      || f() != 3)
21
    return 1;
22
  return 0;
23
}

powered by: WebSVN 2.1.0

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