[Bug c++/68180] New: [ICE] at cp/constexpr.c:2768 in initializing __vector in a loop

vincenzo.innocente at cern dot ch gcc-bugzilla@gcc.gnu.org
Mon Nov 2 14:20:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68180

            Bug ID: 68180
           Summary: [ICE]  at cp/constexpr.c:2768 in initializing __vector
                    in a loop
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch
  Target Milestone: ---

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)


More information about the Gcc-bugs mailing list