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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20050721-1.c] - Blame information for rev 745

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

Line No. Rev Author Line
1 688 jeremybenn
/* Test for PR target/20191.  */
2
 
3
struct S1;
4
 
5
struct S1 {
6
  struct S1 *next;
7
  float x;
8
};
9
 
10
struct S2 {
11
  float y;
12
};
13
 
14
extern int func_ex1 (float);
15
 
16
extern int f;
17
extern float n;
18
extern struct S1 *bp1;
19
extern struct S2 *bp2;
20
 
21
inline float
22
func1 (int f, struct S2 *p2)
23
{
24
  float a;
25
 
26
  if (f)
27
    a = n >= p2->y ? n : p2->y;
28
  else
29
    a = n;
30
  return a;
31
}
32
 
33
inline float
34
func2 (struct S1 *p1, struct S2 *p2)
35
{
36
  float a, b;
37
 
38
  if(n <= 1.0)
39
    b = func1 (f, p2);
40
  else
41
    {
42
       a = n <= p1->x ? 0.0 : p1->x;
43
       b = a >= p2->y ? a : p2->y;
44
    }
45
  return(b);
46
}
47
 
48
void
49
func3 (struct S1 *p)
50
{
51
  float a = 0.0;
52
 
53
  if (f)
54
    a = func2 (bp1, bp2);
55
  if (func_ex1 (a))
56
    bp1 = p;
57
}

powered by: WebSVN 2.1.0

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