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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20001101-1.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target sparc*-*-* } } */
2
/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
int foo(double a, int b, int c, double *d, int h)
8
{
9
  int f, g;
10
  double e;
11
 
12
l:
13
  f = (int) a;
14
  a -= (double) f;
15
  if (b == 1)
16
    {
17
      g = c;
18
      f += g;
19
      c -= g;
20
    }
21
  if (b == 2)
22
    {
23
      f++;
24
      h = c;
25
    }
26
  if (!h)
27
    {
28
      for (g = 0; g <= 10; g++)
29
        for (h = 0; h <= 10; h++)
30
          e += d [10 + g - h];
31
      goto l;
32
    }
33
  return f & 7;
34
}
35
 
36
int main()
37
{
38
  if (foo(0.1, 1, 3, 0, 1) != 3)
39
    abort ();
40
  exit (0);
41
}

powered by: WebSVN 2.1.0

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