Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr28243.c
blob3fc8b7e0edd50f9d2789765df344cd978f780f94
1 /* PR rtl-optimization/28243 */
2 /* Reported by Mike Frysinger <vapier@gentoo.org> */
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-*-* } } */
9 struct displayfuncs {
10 void (*init) ();
11 } funcs;
13 struct gpsdisplay {
14 struct displayfuncs *funcs;
17 void PSDoArc ();
19 static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
20 double ta)
22 double ea;
23 double temp;
24 ea = sa + ta;
25 while (sa < ea) {
26 temp = ((sa + 90) / 90) * 90;
27 PSDoArc(cx, sa, ea < temp ? ea : temp);
28 sa = temp;
32 static void PSDrawElipse()
34 float cx;
35 float cy;
36 float radx;
37 float rady;
38 if (radx != rady)
39 PSMyArc(cx, cy, radx, rady, 0, 360);
42 static void PSDrawFillCircle()
44 PSDrawElipse();
47 static struct displayfuncs psfuncs[] = {
48 PSDrawFillCircle
51 void _GPSDraw_CreateDisplay()
53 struct gpsdisplay *gdisp;
54 gdisp->funcs = (void *)&psfuncs;