summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr32230.c
blob: bdb290ab4ec8f21f99a1945c82415a1603bc6438 (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
/* { dg-do compile } */

typedef struct filter_buffer filter_buffer_t;
struct filter_buffer
{
  char buf[1];
};
typedef struct sbuf_header sbuf_header_t;
struct sbuf_header
{
  char buf[1];
}
const_f (filter_buffer_t *buf)
{
  float val;
  int i;

  for (i = 0; i < 10; i++)
    ((float*) (&((sbuf_header_t *) (__PTRDIFF_TYPE__)((buf) == (filter_buffer_t *)&(buf)->buf[0]))->buf[0]))[i] = val;
}

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