c++: regenerate opt urls
[official-gcc.git] / gcc / testsuite / gcc.dg / pr28243.c
blobfd08b9926fd3289119acbab5f391412b2ef0a491
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 "-std=gnu17 -O2 -ftracer -fPIC" } */
8 struct displayfuncs {
9 void (*init) ();
10 } funcs;
12 struct gpsdisplay {
13 struct displayfuncs *funcs;
16 void PSDoArc ();
18 static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
19 double ta)
21 double ea;
22 double temp;
23 ea = sa + ta;
24 while (sa < ea) {
25 temp = ((sa + 90) / 90) * 90;
26 PSDoArc(cx, sa, ea < temp ? ea : temp);
27 sa = temp;
31 static void PSDrawElipse()
33 float cx;
34 float cy;
35 float radx;
36 float rady;
37 if (radx != rady)
38 PSMyArc(cx, cy, radx, rady, 0, 360);
41 static void PSDrawFillCircle()
43 PSDrawElipse();
46 static struct displayfuncs psfuncs[] = {
47 PSDrawFillCircle
50 void _GPSDraw_CreateDisplay()
52 struct gpsdisplay *gdisp;
53 gdisp->funcs = (void *)&psfuncs;