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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20040326-1.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-O2 -fno-inline-functions" } */
2
/* { dg-do run } */
3
/* When there are no call-clobbered variables, we should still create
4
   a .GLOBAL_VAR to model the side effects of functions.  Without it,
5
   we were moving the call to Faref() inside the second call to
6
   Faset().  */
7
extern void abort (void);
8
extern void exit (int);
9
 
10
main ()
11
{
12
  int table, c, elt;
13
  int tem = Faref (table, elt);
14
  Faset (table, elt, c);
15
  Faset (table, c, tem);/* tem cannot be replaced with Faref (table, elt) */
16
  exit (0);
17
}
18
 
19
int j = 0;
20
 
21
int __attribute__ ((noinline)) Faref (table, elt)
22
{
23
  j = 1;
24
  return 0;
25
}
26
 
27
int __attribute__ ((noinline)) Faset (table, elt, c)
28
{
29
  if (j != 1)
30
    abort ();
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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