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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr36343.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
 
3
void __attribute__((noinline))
4
bar (int **p)
5
{
6
  float *q = (float *)p;
7
  *q = 0.0;
8
}
9
 
10
float __attribute__((noinline))
11
foo (int b)
12
{
13
  int *i = 0;
14
  float f = 1.0;
15
  int **p;
16
  if (b)
17
    p = &i;
18
  else
19
    p = (int **)&f;
20
  bar (p);
21
  if (b)
22
    return **p;
23
  return f;
24
}
25
 
26
int main()
27
{
28
  if (foo(0) != 0.0)
29
    abort ();
30
  return 0;
31
}
32
 

powered by: WebSVN 2.1.0

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