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

            Bug ID: 95271
           Summary: ice in vect_get_constant_vectors, at
                    tree-vect-slp.c:3638
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

int a;
struct b c;
long d;
struct b {
  unsigned long address;
  unsigned long e;
};
void f() {
  {
    d = (long)(&a)[0] << 56 | (long)((unsigned char *)&a)[1] << 48 |
        (long)((unsigned char *)&a)[2] << 40 |
        (long)((unsigned char *)&a)[3] << 32 |
        (long)((unsigned char *)&a)[4] << 24 | ((unsigned char *)&a)[5] << 16 |
        ((unsigned char *)&a)[6] << 8 | ((unsigned char *)&a)[7];
  }
  c.address = c.e = d;
}

compiled with recent gcc trunk and compiler flags -c -w -O3 -march=cooperlake
does this:

during GIMPLE pass: slp
bug612.c: In function ‘f’:
bug612.c:8:6: internal compiler error: in vect_get_constant_vectors, at
tree-vect-slp.c:3638
    8 | void f() {
      |      ^
0xf95b4b vect_get_constant_vectors(vec_info*, _slp_tree*, unsigned int,
vec<tree
_node*, va_heap, vl_ptr>*)
        ../../trunk.git/gcc/tree-vect-slp.c:3635
0xf95b4b vect_get_slp_defs(vec_info*, _slp_tree*, vec<vec<tree_node*, va_heap,
v
l_ptr>, va_heap, vl_ptr>*, unsigned int)
        ../../trunk.git/gcc/tree-vect-slp.c:3872
0xf4529a vect_get_vec_defs(vec_info*, tree_node*, tree_node*, _stmt_vec_info*,
v
ec<tree_node*, va_heap, vl_ptr>*, vec<tree_node*, va_heap, vl_ptr>*,
_slp_tree*)
        ../../trunk.git/gcc/tree-vect-stmts.c:1636
0xf48bfc vectorizable_bswap(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*,
_
stmt_vec_info**, _slp_tree*, tree_node*, vec<stmt_info_for_cost, va_heap,
vl_ptr
>*)

The bug first appears sometime between 20200521 and 20200522, marked 
by git hashes f094665d465..e740f3d7314.

Reply via email to