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

            Bug ID: 123038
           Summary: AArch64: ICE at O3 during GIMPLE pass: vect
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xxs_chy at outlook dot com
  Target Milestone: ---

Reproducer: https://godbolt.org/z/zfGvcWovv
Testcase:
#define BS_VEC(type, num) type __attribute__((vector_size(num * sizeof(type))))
#include <stdint.h>
uint8_t backsmith_pure_1() {
  uint32_t BS_VAR_4;
  for (uint64_t BS_INC_1; BS_INC_1; BS_INC_1 += 1)
    BS_VAR_4 = __builtin_ffs(BS_VAR_4);
  __builtin_convertvector((BS_VEC(uint8_t, 8)){}, BS_VEC(uint16_t, 8));
  return BS_VAR_4;
  __builtin_convertvector(
      __builtin_shufflevector((BS_VEC(uint32_t, 4)){}, (BS_VEC(uint32_t, 4)){},
                              0, 0, 4, 3, 4, 0, 6, 1, 7, 5, 3, 7, 4, 0, 4, 6,
5,
                              3, 2, 1, 7, 6, 3, 0, 5, 6, 1, 1, 3, 1, 4, 7),
      BS_VEC(uint16_t, 32));
}

Dump:
during GIMPLE pass: vect
<source>: In function 'backsmith_pure_1':
<source>:3:9: internal compiler error: Segmentation fault
    3 | uint8_t backsmith_pure_1() {
      |         ^~~~~~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

Reply via email to