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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030913-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Assignments via pointers pointing to global variables were being killed
2
   by SSA-DCE.  Test contributed by Paul Brook <paul@nowt.org>  */
3
 
4
int glob;
5
 
6
void
7
fn2(int ** q)
8
{
9
  *q = &glob;
10
}
11
 
12
void test()
13
{
14
  int *p;
15
 
16
  fn2(&p);
17
 
18
  *p=42;
19
}
20
 
21
int main()
22
{
23
  test();
24
  if (glob != 42) abort();
25
  exit (0);
26
}

powered by: WebSVN 2.1.0

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