> g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib64/gcc/riscv64-suse-linux/11/lto-wrapper Target: riscv64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d,jit --enable-host-shared --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/11 --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --program-suffix=-11 --without-system-libunwind --disable-multilib --enable-link-mutex --build=riscv64-suse-linux --host=riscv64-suse-linux Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.1 20210816 [revision 056e324ce46a7924b5cf10f61010cf9dd2ca10e9] (SUSE Linux) > g++ -v -march=rv64gzb Using built-in specs. g++: internal compiler error: in multi_letter_subset_rank, at common/config/riscv/riscv-common.c:200 Please submit a full bug report, Yeah, zb is not valid (should be zbb), but should rather yield a normal message than an ICE.
Confirmed, thanks for report this issue :)
The master branch has been updated by Kito Cheng <kito@gcc.gnu.org>: https://gcc.gnu.org/g:abe562bb01479ea2c8952ad98714f3225527aa7e commit r12-5062-gabe562bb01479ea2c8952ad98714f3225527aa7e Author: Kito Cheng <kito.cheng@sifive.com> Date: Mon Nov 8 22:45:49 2021 +0800 [PR/target 102957] Allow Z*-ext extension with only 2 char. We was assume the Z* extension should be more than 2 char, so we put an assertion there, but it should just an error or warning rather than an assertion, however RISC-V has add `Zk` extension, which just 2 char, so actually, we should just allow that. gcc/ChangeLog PR target/102957 * common/config/riscv/riscv-common.c (multi_letter_subset_rank): Remove assertion for Z*-ext. gcc/testsuite/ChangeLog * gcc.target/riscv/pr102957.c: New.
Wait another week for make sure stable and backport to gcc-11 and gcc-10 branch.
The releases/gcc-11 branch has been updated by Kito Cheng <kito@gcc.gnu.org>: https://gcc.gnu.org/g:40e9979cf531e6a1ca1db8804c80e40e0e71de4c commit r11-9700-g40e9979cf531e6a1ca1db8804c80e40e0e71de4c Author: Kito Cheng <kito.cheng@sifive.com> Date: Mon Nov 8 22:45:49 2021 +0800 [PR/target 102957] Allow Z*-ext extension with only 2 char. We was assume the Z* extension should be more than 2 char, so we put an assertion there, but it should just an error or warning rather than an assertion, however RISC-V has add `Zk` extension, which just 2 char, so actually, we should just allow that. gcc/ChangeLog PR target/102957 * common/config/riscv/riscv-common.c (multi_letter_subset_rank): Remove assertion for Z*-ext. gcc/testsuite/ChangeLog * gcc.target/riscv/pr102957.c: New. (cherry picked from commit abe562bb01479ea2c8952ad98714f3225527aa7e)
Backported to GCC 11.
The master branch has been updated by Tsukasa OI <a4lg@gcc.gnu.org>: https://gcc.gnu.org/g:8b0662254cdac3e0b670c1c54752e1d43113b0f4 commit r14-3544-g8b0662254cdac3e0b670c1c54752e1d43113b0f4 Author: Tsukasa OI <research_trasio@irq.a4lg.com> Date: Fri Aug 11 06:09:34 2023 +0000 RISC-V: Make PR 102957 tests more comprehensive Commit c283c4774d1c ("RISC-V: Throw compilation error for unknown extensions") changed how do we handle unknown extensions and commit 6f709f79c915a ("[committed] [RISC-V] Fix expected diagnostic messages in testsuite") "fixed" test failures caused by that change (on pr102957.c, by testing the error message after the first change). However, the latter change will partially break the original intent of PR 102957 test case because we wanted to make sure that we can parse a valid two-letter extension name. Fortunately, there is a valid two-letter extension name, 'Zk' (standard scalar cryptography extension superset with NIST algorithm suite). This commit adds pr102957-2.c to make sure that there will be no errors if we parse a valid two-letter extension name. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr102957-2.c: New test case using the 'Zk' extension to continue testing whether we can use valid two-letter extensions.