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

            Bug ID: 110465
           Summary: [14 regression] ICE when building openssl with new
                    vector_type checking
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Created attachment 55419
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55419&action=edit
libcrypto-lib-rc5_enc.i

amd64 this time ;)

`gcc -c libcrypto-lib-rc5_enc.i -O2 -march=x86-64-v2` is enough to repro.

```
x86_64-gentoo-linux-musl-gcc  -I. -Iinclude -Iproviders/common/include
-Iproviders/implementations/include -I../openssl-3.1.1
-I../openssl-3.1.1/include -I../openssl-3.1.1/providers/common/include
-I../openssl-3.1.1/providers/implementations/include  -DAES_ASM -DBSAES_ASM
-DCMLL_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DMD5_ASM
-DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DX25519_ASM -fPIC -pthread -m64
-Wa,--noexecstack -O2 -pipe -march=native -fdiagnostics-color=always
-frecord-gcc-switches -fno-strict-aliasing -Wa,--noexecstack
-DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\""
-DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\""
-DOPENSSL_BUILDING_OPENSSL -DNDEBUG  -MMD -MF
crypto/rc5/libcrypto-lib-rc5_enc.d.tmp -MT crypto/rc5/libcrypto-lib-rc5_enc.o
-c -o crypto/rc5/libcrypto-lib-rc5_enc.o ../openssl-3.1.1/crypto/rc5/rc5_enc.c
during GIMPLE pass: ccp
../openssl-3.1.1/crypto/rc5/rc5_enc.c: In function 'RC5_32_cbc_encrypt':
../openssl-3.1.1/crypto/rc5/rc5_enc.c:20:6: internal compiler error: tree
check: expected none of vector_type, have vector_type in gimple_simplify_144,
at gimple-match-3.cc:1027
   20 | void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~~~~~~~~
0x556c8ddc26d5 tree_not_check_failed(tree_node const*, char const*, int, char
const*, ...)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.cc:8936
0x556c8e35d4a2 tree_not_check(tree_node*, char const*, int, char const*,
tree_code)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:3581
0x556c8e35d4a2 gimple_simplify_144(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node*, tree_node**, tree_code)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/build/gcc/gimple-match-3.cc:1027
0x556c8fd5720a gimple_simplify_BIT_XOR_EXPR(gimple_match_op*, gimple**,
tree_node* (*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/build/gcc/gimple-match-2.cc:9569
0x556c8f196bce gimple_resimplify2
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-match-exports.cc:967
0x556c8f197301 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-match-exports.cc:834
0x556c8e71bc25 gimple_fold_stmt_to_constant_1(gimple*, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-fold.cc:7472
0x556c8ec06e5a ccp_fold
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-ccp.cc:1289
0x556c8ec06e5a evaluate_stmt
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-ccp.cc:2222
0x556c8ec0895d visit_assignment
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-ccp.cc:2856
0x556c8ecc0b6a ssa_propagation_engine::simulate_stmt(gimple*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-propagate.cc:221
0x556c8ecc0eaa ssa_propagation_engine::simulate_block(basic_block_def*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-propagate.cc:328
0x556c8ecc1413 ssa_propagation_engine::ssa_propagate()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-propagate.cc:478
0x556c8ebffc9c do_ssa_ccp
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-ccp.cc:2975
0x556c8ebffc9c execute
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-ccp.cc:3021
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make[1]: *** [Makefile:13261: crypto/rc5/libcrypto-lib-rc5_enc.o] Error 1
```

```
gcc (Gentoo Hardened 14.0.0 p, commit 6cb33e2f39e289ec4f25f845d8153053147c5c49)
14.0.0 20230628 (experimental) 9757e4440bd8755d327601a60a73d57d712583ed
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

Reply via email to