summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/O3-vect-pr32243.c
blob: 0116c33fbb32c3901e19f920271241512256fe1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile } */

typedef struct __GLcontextRec GLcontext;

struct gl_renderbuffer
{
  struct gl_renderbuffer *Wrapped;
  void (*PutValues) (GLcontext * ctx, struct gl_renderbuffer * rb,
		     int count, const int x[], const int y[],
		     const void *values, const char *mask);
};

void
put_mono_values_s8 (GLcontext * ctx, struct gl_renderbuffer *s8rb,
		    int count, const int x[], const int y[],
		    const void *value, const char *mask)
{
  struct gl_renderbuffer *dsrb = s8rb->Wrapped;
  int temp[4096], i;
  const char val = *((char *) value);
  for (i = 0; i < count; i++)
    if (!mask || mask[i])
      temp[i] = (temp[i] & 0xffffff) | val;
  dsrb->PutValues (ctx, dsrb, count, x, y, temp, mask);
}

/* { dg-final { cleanup-tree-dump "vect" } } */