Fix all tests that fail with -sanitize=return.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr31307.C
blob1080c2c650546582de8a408e3e078bf113e6777a
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
4 union MY_M128
6   double i;
7 };
9 struct RegFile
11   MY_M128 dst[4];
14 __inline__ __attribute__((always_inline)) static void
15 MEM_OPT_LOAD(MY_M128* reg, double* mem)
17   reg[0].i = *mem;
20 void _ia32_movntdq (double *, double);
22 __inline__ __attribute__((always_inline)) static void
23 MEM_OPT_STORE(MY_M128* reg, double* mem)
25   _ia32_movntdq ((double*)mem, (double)reg[0].i);
28 double _mm_adds_epu8 (double __A, double __B);
30 int test(unsigned char *d)
31
32   RegFile r;
33   MEM_OPT_LOAD((r.dst) , ((double*) d)); 
34   r.dst[0].i = _mm_adds_epu8(r.dst[0].i, r.dst[0].i);
35   MEM_OPT_STORE((r.dst), (double*) d);
36   return 0;
39 /* { dg-final { scan-tree-dump-not "r.dst" "optimized" } } */