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

            Bug ID: 83660
           Summary: ICE with vec_extract inside expression statement
           Product: gcc
           Version: 7.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zoltan at hidvegi dot com
                CC: wschmidt at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc64

Compile the following with g++ -mcpu=power7 -S ppc_vec_extract_ice.C
This probably happens with ppc64le as well. -mcpu=power7 is needed to make the
move go through memory, with power8 direct move instruction is used and there
is no coredump.

#include <altivec.h>

typedef __vector unsigned int  uvec32_t  __attribute__((__aligned__(16)));

unsigned get_word(uvec32_t v)
{
    return ({const unsigned _B1 = 32;
            vec_extract((uvec32_t)v, 2);});
}

Reply via email to