Mercurial > hg > CbC > CbC_gcc
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 |
rev | line source |
---|---|
111 | 1 // PR c++/68703 |
2 | |
3 template <int N> | |
4 struct D { | |
5 int v __attribute__((vector_size (N * sizeof (int)))); | |
6 int f1 () { return this->v[N-1]; } | |
7 int f2 () { return v[N-1]; } | |
8 }; | |
9 | |
10 int | |
11 main () | |
12 { | |
13 D<4> a = { { 0, 1, 2, 3 } }; | |
14 D<8> b = { { 0, 1, 2, 3, 4, 5, 6, 7 } }; | |
15 if (a.f1 () != 3 || a.f2 () != 3 | |
16 || b.f1 () != 7 || b.f2 () != 7) | |
17 __builtin_abort (); | |
18 } |