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

            Bug ID: 109583
           Summary: [14 Regression] ICE in related_vector_mode, at
                    stor-layout.cc:537 since r14-22-g2349e69125335d
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

The following crashes:

$ cat ice.c
typedef float v8sf __attribute__((vector_size(32)));
typedef int v8si __attribute__((vector_size(32)));
v8sf foo1 (v8sf x, v8sf y)
{
  v8sf tem0 = x - y;
  v8sf tem1 = x + y;
  return __builtin_shuffle (tem0, tem1, (v8si) { 0, 9, 2, 11, 4, 13, 6, 15 });
}

$ gcc ice.c -O -c
ice.c: In function ‘foo1’:
ice.c:4:1: warning: AVX vector return without AVX enabled changes the ABI
[-Wpsabi]
    4 | {
      | ^
ice.c:3:6: note: the ABI for passing parameters with 32-byte alignment has
changed in GCC 4.6
    3 | v8sf foo1 (v8sf x, v8sf y)
      |      ^~~~
during GIMPLE pass: ccp
ice.c:8:1: internal compiler error: Floating point exception
    8 | }
      | ^
0xbbbc0f crash_signal
        /home/marxin/Programming/gcc/gcc/toplev.cc:314
0xbb7a2b mode_to_bytes(machine_mode)
        /home/marxin/Programming/gcc/gcc/machmode.h:551
0xbb7a2b if_nonpoly<scalar_mode::measurement_type,
scalar_mode::measurement_type,
poly_int_traits<scalar_mode::measurement_type>::is_poly>::type
GET_MODE_SIZE<scalar_mode>(scalar_mode const&)
        /home/marxin/Programming/gcc/gcc/machmode.h:648
0xbb7a2b default_vectorize_related_mode(machine_mode, scalar_mode, poly_int<1u,
unsigned long>)
        /home/marxin/Programming/gcc/gcc/targhooks.cc:1560
0xfe3635 gimple_simplify_211
        /dev/shm/objdir/gcc/gimple-match.cc:18417
0x10edb5c gimple_simplify_VEC_PERM_EXPR
        /dev/shm/objdir/gcc/gimple-match.cc:208860
0xf641b9 gimple_resimplify3
        /home/marxin/Programming/gcc/gcc/gimple-match-head.cc:399
0xfa1197 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
        /home/marxin/Programming/gcc/gcc/gimple-match-head.cc:1115
0x8f8c4e gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*),
tree_node* (*)(tree_node*))
        /home/marxin/Programming/gcc/gcc/gimple-fold.cc:7444
0xca8913 ccp_fold
        /home/marxin/Programming/gcc/gcc/tree-ssa-ccp.cc:1289
0xca8913 evaluate_stmt
        /home/marxin/Programming/gcc/gcc/tree-ssa-ccp.cc:2220
0xcaa1cd visit_assignment
        /home/marxin/Programming/gcc/gcc/tree-ssa-ccp.cc:2853
0xd399c3 ssa_propagation_engine::simulate_stmt(gimple*)
        /home/marxin/Programming/gcc/gcc/tree-ssa-propagate.cc:220
0xd39c3a ssa_propagation_engine::simulate_block(basic_block_def*)
        /home/marxin/Programming/gcc/gcc/tree-ssa-propagate.cc:327
0xd3a0b8 ssa_propagation_engine::ssa_propagate()
        /home/marxin/Programming/gcc/gcc/tree-ssa-propagate.cc:477
0xc9be51 do_ssa_ccp
        /home/marxin/Programming/gcc/gcc/tree-ssa-ccp.cc:2972
0xc9be51 execute
        /home/marxin/Programming/gcc/gcc/tree-ssa-ccp.cc:3018
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to