aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/vector24.C
blob: 3eca7fb0bf9c2f20dd592bdc518fc4fe56e86792 (plain)
1
2
3
4
5
6
7
8
// { dg-do compile { target c++11 } }

typedef long vec __attribute__((vector_size(2*sizeof(long))));
constexpr vec v = { 33, 42 };
constexpr auto l0 = v[0];
constexpr auto l1 = v[1];
static_assert(l0==33,"Fail");
static_assert(l1==42,"Fail");