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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr28243.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR rtl-optimization/28243 */
2
/* Reported by Mike Frysinger <vapier@gentoo.org> */
3
 
4
/* { dg-do compile } */
5
/* { dg-require-effective-target fpic } */
6
/* { dg-options "-O2 -ftracer -fPIC" } */
7
/* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */
8
 
9
struct displayfuncs {
10
  void (*init) ();
11
} funcs;
12
 
13
struct gpsdisplay {
14
  struct displayfuncs *funcs;
15
};
16
 
17
static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
18
                    double ta)
19
{
20
  double ea;
21
  double temp;
22
  ea = sa + ta;
23
  while (sa < ea) {
24
    temp = ((sa + 90) / 90) * 90;
25
    PSDoArc(cx, sa, ea < temp ? ea : temp);
26
    sa = temp;
27
  }
28
}
29
 
30
static void PSDrawElipse()
31
{
32
  float cx;
33
  float cy;
34
  float radx;
35
  float rady;
36
  if (radx != rady)
37
    PSMyArc(cx, cy, radx, rady, 0, 360);
38
}
39
 
40
static void PSDrawFillCircle()
41
{
42
  PSDrawElipse();
43
}
44
 
45
static struct displayfuncs psfuncs[] = {
46
  PSDrawFillCircle
47
};
48
 
49
void _GPSDraw_CreateDisplay()
50
{
51
  struct gpsdisplay *gdisp;
52
  gdisp->funcs = (void *)&psfuncs;
53
}

powered by: WebSVN 2.1.0

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