annotate gcc/testsuite/g++.dg/ext/vector32a.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 c++/68703
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 template <int N>
kono
parents:
diff changeset
4 struct D {
kono
parents:
diff changeset
5 int v __attribute__((vector_size (N * sizeof (int))));
kono
parents:
diff changeset
6 int f1 () { return this->v[N-1]; }
kono
parents:
diff changeset
7 int f2 () { return v[N-1]; }
kono
parents:
diff changeset
8 };
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 int
kono
parents:
diff changeset
11 main ()
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 D<4> a = { { 0, 1, 2, 3 } };
kono
parents:
diff changeset
14 D<8> b = { { 0, 1, 2, 3, 4, 5, 6, 7 } };
kono
parents:
diff changeset
15 if (a.f1 () != 3 || a.f2 () != 3
kono
parents:
diff changeset
16 || b.f1 () != 7 || b.f2 () != 7)
kono
parents:
diff changeset
17 __builtin_abort ();
kono
parents:
diff changeset
18 }