aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr39315-check.c
blob: cb09d3f2be5a845cd7daf3298c9ab4f88547717c (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
/* { dg-do compile } */

typedef float __m128 __attribute__ ((__vector_size__ (16)));
__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;

extern void foo (__m128 *);
extern void abort (void);

__m128 y = { 0.0, 1.0, 2.0, 3.0 };

void
bar (__m128 *x, int align)
{
  if ((((ptrdiff_t) x) & (align - 1)) != 0)
    abort ();
  if (__builtin_memcmp (x, &y, sizeof (y)) != 0)
    abort ();
}

int
main ()
{
  foo (&y);
  return 0;
}