annotate gcc/testsuite/g++.dg/cpp0x/pr70887.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 middle-end/70887
kono
parents:
diff changeset
2 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && c++11 } } }
kono
parents:
diff changeset
3 // { dg-options "-O2 -msse2" }
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 #include <x86intrin.h>
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 enum R { S };
kono
parents:
diff changeset
8 template <R> struct C { static constexpr int value = 10; };
kono
parents:
diff changeset
9 template <typename R, template <R> class T, R... r>
kono
parents:
diff changeset
10 struct A {
kono
parents:
diff changeset
11 template <int, R...> struct B;
kono
parents:
diff changeset
12 template <int N, R M, R... O>
kono
parents:
diff changeset
13 struct B<N, M, O...> {
kono
parents:
diff changeset
14 static constexpr int d = T<M>::value;
kono
parents:
diff changeset
15 static __m128i generate()
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 __attribute__((__vector_size__(16))) long long
kono
parents:
diff changeset
18 a = generate(),
kono
parents:
diff changeset
19 b = _mm_bslli_si128 (a, 1),
kono
parents:
diff changeset
20 c = _mm_bsrli_si128 (_mm_set1_epi32(d), 12);
kono
parents:
diff changeset
21 return _mm_or_si128 (b, c);
kono
parents:
diff changeset
22 }
kono
parents:
diff changeset
23 };
kono
parents:
diff changeset
24 A () { B<0, r...>::generate(); }
kono
parents:
diff changeset
25 };
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 int
kono
parents:
diff changeset
28 main () {
kono
parents:
diff changeset
29 using RI = A<R, C, S>;
kono
parents:
diff changeset
30 RI ri;
kono
parents:
diff changeset
31 }