annotate gcc/testsuite/gcc.dg/vect/vect-singleton_1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR target/59843 ICE on function taking/returning vector of one float64_t. */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 /* { dg-do compile } */
kono
parents:
diff changeset
4 /* { dg-options "-Warray-bounds -O2 -fno-inline -std=c99" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 #define TEST(BASETYPE, VECTYPE, SUFFIX) \
kono
parents:
diff changeset
7 typedef BASETYPE VECTYPE \
kono
parents:
diff changeset
8 __attribute__ ((__vector_size__ (sizeof (BASETYPE)))); \
kono
parents:
diff changeset
9 VECTYPE \
kono
parents:
diff changeset
10 test_vadd_##SUFFIX (VECTYPE a, VECTYPE b) \
kono
parents:
diff changeset
11 { \
kono
parents:
diff changeset
12 return a + b; \
kono
parents:
diff changeset
13 } \
kono
parents:
diff changeset
14 \
kono
parents:
diff changeset
15 void \
kono
parents:
diff changeset
16 test_##SUFFIX (BASETYPE val) \
kono
parents:
diff changeset
17 { \
kono
parents:
diff changeset
18 VECTYPE var = { val }; \
kono
parents:
diff changeset
19 BASETYPE v0 = var[0]; \
kono
parents:
diff changeset
20 BASETYPE v1 = var[1]; /* { dg-warning "index value is out of bound" } */ \
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 TEST (double, float64x1_t, f64)
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 /* Original bug was for above type;
kono
parents:
diff changeset
26 in a nod to completeness, test other types too. */
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 TEST (long long, int64x1_t, s64)
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 TEST (float, float32x1_t, f32)
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 TEST (long, longx1_t, l)
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 TEST (int, intx1_t, i)
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 TEST (short, int16x1_t, s16)
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 TEST (char, int8x1_t, s8)