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
6 {
7   int color_depth;
8   unsigned char *line[];
9 }
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
_linear_hline15(BITMAP * dst,int dx1,int dy,int dx2,int color)18 _linear_hline15 (BITMAP * dst, int dx1, int dy, int dx2, int color)
19 {
20   int w;
21   if (_drawing_mode == 0)
22   {
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)
33     {
34     }
35     else if (_drawing_mode == 3)
36     {
37       do
38       {
39         w -= curw;
40         do
41         {
42           unsigned long c = (*(s));
43           if (!((unsigned long) (c) == 0x7C1F))
44           {
45             (*((uint16_t *) ((uintptr_t) (d))) = ((color)));
46           }
47           ((s)++);
48         }
49         while (--curw > 0);
50         s = sline;
51         curw =
52           (((w) <
53             ((int) _drawing_x_mask +
54              1)) ? (w) : ((int) _drawing_x_mask + 1));
55       }
56       while (curw > 0);
57     }
58   }
59 }
60