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

            Bug ID: 129196
           Summary: [17 regression] ICE on lame-4.0: during GIMPLE pass:
                    vect SIGSEGV
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Noticed ICE on gcc-master from r17-6983-g79ab2338936e1b, did not bisect.

Minimized example:

// $ cat vbrquantize.c.c
float adj43asm[];
typedef union {
  float f;
  int i
} fi_union;
double quantize_x34_x;
float *quantize_x34_xr34_orig;
int quantize_x34_i;
fi_union quantize_x34_fi;
int *quantize_x34_l3;
void quantize_x34() {
  while (quantize_x34_i--) {
    quantize_x34_x = quantize_x34_xr34_orig[3];
    quantize_x34_fi.f = quantize_x34_x;
    quantize_x34_fi.f = adj43asm[quantize_x34_fi.i];
    quantize_x34_l3[2] = quantize_x34_l3[3] = quantize_x34_fi.i;
    quantize_x34_l3 += 4;
    quantize_x34_xr34_orig += 4;
  }
}

Crashing:

$ gcc/xgcc -Bgcc -O2 -c vbrquantize.c.c
vbrquantize.c.c:5:1: warning: no semicolon at end of struct or union
    5 | } fi_union;
      | ^
vbrquantize.c.c:1:7: warning: array 'adj43asm' assumed to have one element
    1 | float adj43asm[];
      |       ^~~~~~~~
during GIMPLE pass: vect
vbrquantize.c.c: In function 'quantize_x34':
vbrquantize.c.c:11:6: internal compiler error: Segmentation fault
   11 | void quantize_x34() {
      |      ^~~~~~~~~~~~
0x2aca75b diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x2abc3e3 internal_error(char const*, ...)
        ???:0
0x11bbfb5 crash_signal(int)
        ???:0
0x15f7c2a integer_zerop(tree_node const*)
        ???:0
0x28c43fb vect_preserves_scalar_order_p(dr_vec_info*, dr_vec_info*)
        ???:0
0x28c516c vect_analyze_data_ref_dependence(data_dependence_relation*,
_loop_vec_info*, unsigned int*)
        ???:0
0x28c7071 vect_analyze_data_ref_dependences(_loop_vec_info*, unsigned int*)
        ???:0
0x15731bf vect_analyze_loop_2(_loop_vec_info*, int, bool&, unsigned int*,
bool&)
        ???:0
0x1574db7 vect_analyze_loop_1(loop*, vec_info_shared*, vect_loop_form_info
const*, _loop_vec_info*, vec<machine_mode, va_heap, vl_ptr> const&, unsigned
int&, int, machine_mode&, bool&)
        ???:0
0x157611c vect_analyze_loop(loop*, gimple*, vec_info_shared*)
        ???:0
0x15e07c2 try_vectorize_loop(hash_table<simduid_to_vf, false, xcallocator>*&,
unsigned int*, loop*, function*)
        ???:0
0x15e0e3e (anonymous namespace)::pass_vectorize::execute(function*)
        ???:0

Built compiler as:

$ gcc/xgcc -Bgcc -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
--disable-bootstrap --disable-lto --disable-libsanitizer --enable-languages=c
CFLAGS='-O1 -g0' CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20261201 (experimental) (GCC)

Reply via email to