comparison gcc/testsuite/gcc.dg/pr85467.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* PR tree-optimization/85467 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-tree-ccp" } */
4
5 #define TEST(N, T) \
6 typedef T V##N __attribute__ ((__vector_size__ (sizeof (T)))); \
7 \
8 V##N \
9 bar##N (V##N u, V##N v) \
10 { \
11 do \
12 v *= (T)((V##N){}[0] ? u[v[0]] : 0); \
13 while ((V##N){}[0]); \
14 return v; \
15 } \
16 \
17 void \
18 foo##N (void) \
19 { \
20 bar##N ((V##N){}, (V##N){}); \
21 }
22
23 TEST (1, char)
24 TEST (2, short)
25 TEST (3, int)
26 TEST (4, long)
27 TEST (5, long long)
28 #ifdef __SIZEOF_INT128__
29 TEST (6, __int128)
30 #endif