2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53701.c
blob15bf07d61e7d9a686d56d709ae840b54a3761faa
1 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O3 -fselective-scheduling2 -fsel-sched-pipelining" } */
3 typedef unsigned short int uint16_t;
4 __extension__ typedef __UINTPTR_TYPE__ uintptr_t;
5 typedef struct GFX_VTABLE
7 int color_depth;
8 unsigned char *line[];
10 BITMAP;
11 extern int _drawing_mode;
12 extern BITMAP *_drawing_pattern;
13 extern int _drawing_y_anchor;
14 extern unsigned int _drawing_x_mask;
15 extern unsigned int _drawing_y_mask;
16 extern uintptr_t bmp_write_line (BITMAP *, int);
17 void
18 _linear_hline15 (BITMAP * dst, int dx1, int dy, int dx2, int color)
20 int w;
21 if (_drawing_mode == 0)
23 int x, curw;
24 unsigned short *sline =
25 (unsigned short *) (_drawing_pattern->
26 line[((dy) -
27 _drawing_y_anchor) & _drawing_y_mask]);
28 unsigned short *s;
29 unsigned short *d =
30 ((unsigned short *) (bmp_write_line (dst, dy)) + (dx1));
31 s = ((unsigned short *) (sline) + (x));
32 if (_drawing_mode == 2)
35 else if (_drawing_mode == 3)
39 w -= curw;
42 unsigned long c = (*(s));
43 if (!((unsigned long) (c) == 0x7C1F))
45 (*((uint16_t *) ((uintptr_t) (d))) = ((color)));
47 ((s)++);
49 while (--curw > 0);
50 s = sline;
51 curw =
52 (((w) <
53 ((int) _drawing_x_mask +
54 1)) ? (w) : ((int) _drawing_x_mask + 1));
56 while (curw > 0);