From: Jakub Jelinek Date: Tue, 10 Oct 2017 20:11:21 +0000 (+0200) Subject: re PR middle-end/70887 (internal compiler error in trunc_int_for_mode, at explow... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9a0dec5eeba1d8f8cd94506e7e51fe8d3bfc51e;p=gcc.git re PR middle-end/70887 (internal compiler error in trunc_int_for_mode, at explow.c:78) 2017-10-10 Jakub Jelinek PR middle-end/70887 * g++.dg/cpp0x/pr70887.C: New test. From-SVN: r253616 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 43fb756f6ff..3dcc261d131 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-10-10 Jakub Jelinek + PR middle-end/70887 + * g++.dg/cpp0x/pr70887.C: New test. + PR c++/70338 * g++.dg/cpp0x/pr70338.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr70887.C b/gcc/testsuite/g++.dg/cpp0x/pr70887.C new file mode 100644 index 00000000000..f5b31b22900 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr70887.C @@ -0,0 +1,31 @@ +// PR middle-end/70887 +// { dg-do compile { target { { i?86-*-* x86_64-*-* } && c++11 } } } +// { dg-options "-O2 -msse2" } + +#include + +enum R { S }; +template struct C { static constexpr int value = 10; }; +template class T, R... r> +struct A { + template struct B; + template + struct B { + static constexpr int d = T::value; + static __m128i generate() + { + __attribute__((__vector_size__(16))) long long + a = generate(), + b = _mm_bslli_si128 (a, 1), + c = _mm_bsrli_si128 (_mm_set1_epi32(d), 12); + return _mm_or_si128 (b, c); + } + }; + A () { B<0, r...>::generate(); } +}; + +int +main () { + using RI = A; + RI ri; +}