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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipa-pta-12.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
static int i, j;
2
 
3
static void __attribute__((noinline,noclone))
4
foo (void) { i = 1; }
5
 
6
static void __attribute__((noinline,noclone))
7
bar (void) { j = 1; }
8
 
9
typedef void (*fn_t)(void);
10
void escapeme (fn_t);
11
fn_t getme (void);
12
 
13
extern void link_error (void);
14
 
15
int main()
16
{
17
  fn_t fn;
18
  escapeme (foo);
19
  fn = getme();
20
 
21
  i = 0;
22
  fn();
23
  if (i != 1)
24
    return 100;
25
  j = 0;
26
  fn();
27
  if (j != 0)
28
    link_error ();
29
  bar();
30
  if (j != 1)
31
    return 200;
32
 
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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