typedef float __attribute__( ( vector_size( 16 ) ) ) float32x4_t; constexpr float32x4_t fill(float x) { float32x4_t v{0}; constexpr auto vs = sizeof(v)/sizeof(v[0]); for (auto i=0U; i<vs; ++i) v[i]=i; return v+x; } float32x4_t foo(float32x4_t x) { constexpr float32x4_t v = fill(1.f); return x+v; } gcc version 6.0.0 20151028 (experimental) [trunk revision 229474] (GCC) ICE in c++ -O2 avxconst.cc -std=c++17 -S avxconst.cc: In function ‘float32x4_t foo(float32x4_t)’: avxconst.cc:10:33: in constexpr expansion of ‘fill(1.0e+0f)’ avxconst.cc:10:37: internal compiler error: tree check: expected constructor, have vector_cst in cxx_eval_store_expression, at cp/constexpr.c:2768 constexpr float32x4_t v = fill(1.f); ^ avxconst.cc:10:37: internal compiler error: Abort trap: 6 c++: internal compiler error: Abort trap: 6 (program cc1plus)
t88.cc: In function ‘float32x4_t foo(float32x4_t)’: t88.cc:10:33: in constexpr expansion of ‘fill(1.0e+0f)’ t88.cc:10:37: internal compiler error: tree check: expected constructor, have vector_cst in cxx_eval_store_expression, at cp/constexpr.c:3051 constexpr float32x4_t v = fill(1.f); ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://www.cavium.com/support.html> for instructions. This should not be hard to fix. Basically after: ctx->values->get (object) You convert VECTOR_CST back into a CONSTRUCTOR. Then the rest will work.
Author: paolo Date: Thu Nov 17 09:59:07 2016 New Revision: 242541 URL: https://gcc.gnu.org/viewcvs?rev=242541&root=gcc&view=rev Log: 2016-11-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/68180 * g++.dg/cpp1y/pr68180.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp1y/pr68180.C Modified: trunk/gcc/testsuite/ChangeLog
Author: jakub Date: Fri Nov 18 23:51:30 2016 New Revision: 242610 URL: https://gcc.gnu.org/viewcvs?rev=242610&root=gcc&view=rev Log: PR c++/68180 * g++.dg/cpp1y/pr68180.C: Add -Wno-psabi as dg-additional-options. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp1y/pr68180.C
Testcase is now rejected with error: modification of ‘(float [4])v’ is not a constant-expression constexpr float32x4_t v = fill(1.f); since r236630. ICE is gone. Closing.