public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111259] New: [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build
@ 2023-08-31 18:22 zsojka at seznam dot cz
2023-08-31 18:24 ` [Bug target/111259] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2023-08-31 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111259
Bug ID: 111259
Summary: [14 Regression] ICE: RTL check: expected code 'reg',
have 'subreg' in rhs_regno, at rtl.h:1934 during
riscv64 build
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: build, ice-checking, ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: riscv64-unknown-linux-gnu
Build: x86_64-pc-linux-gnu
Created attachment 55826
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55826&action=edit
reduced testcase
Building GCC for the riscv64-unknown-linux-gnu target with RTL checking enabled
fails during libgcc build:
$ make
# If this is the top-level multilib, build all the other
# multilibs.
/repo/build-gcc-trunk-riscv64/./gcc/xgcc -B/repo/build-gcc-trunk-riscv64/./gcc/
-B/repo/gcc-trunk//binary-trunk-r14-3602-20230831181644-ga335cf241b9-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/bin/
-B/repo/gcc-trunk//binary-trunk-r14-3602-20230831181644-ga335cf241b9-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/lib/
-isystem
/repo/gcc-trunk//binary-trunk-r14-3602-20230831181644-ga335cf241b9-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/include
-isystem
/repo/gcc-trunk//binary-trunk-r14-3602-20230831181644-ga335cf241b9-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/sys-include
-g -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -I. -I.
-I../.././gcc -I/repo/gcc-trunk/libgcc -I/repo/gcc-trunk/libgcc/.
-I/repo/gcc-trunk/libgcc/../gcc -I/repo/gcc-trunk/libgcc/../include
-DHAVE_CC_TLS -Wno-missing-prototypes -Wno-type-limits -o fixunshfti.o -MT
fixunshfti.o -MD -MP -MF fixunshfti.dep -c
/repo/gcc-trunk/libgcc/soft-fp/fixunshfti.c -fvisibility=hidden -DHIDE_EXPORTS
during RTL pass: combine
/repo/gcc-trunk/libgcc/soft-fp/fixunshfti.c: In function '__fixunshfti':
/repo/gcc-trunk/libgcc/soft-fp/fixunshfti.c:45:1: internal compiler error: RTL
check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934
45 | }
| ^
0x90f65c rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
/repo/gcc-trunk/gcc/rtl.cc:770
0xb7b026 rhs_regno(rtx_def const*)
/repo/gcc-trunk/gcc/rtl.h:1934
0xb7b132 rhs_regno(rtx_def const*)
/repo/gcc-trunk/gcc/common.md:26
0xb7b132 zcmp_mv_sreg_operand(rtx_def*, machine_mode)
/repo/gcc-trunk/gcc/config/riscv/predicates.md:180
0x2236a11 recog_564
/repo/gcc-trunk/gcc/config/riscv/iterators.md:60
0x2249d2b recog(rtx_def*, rtx_insn*, int*)
/repo/gcc-trunk/gcc/config/riscv/iterators.md:58
0x227e442 recog_for_combine_1
/repo/gcc-trunk/gcc/combine.cc:11382
0x22819de recog_for_combine
/repo/gcc-trunk/gcc/combine.cc:11652
0x229c022 try_combine
/repo/gcc-trunk/gcc/combine.cc:3546
0x22a1544 combine_instructions
/repo/gcc-trunk/gcc/combine.cc:1264
0x22a1544 rest_of_handle_combine
/repo/gcc-trunk/gcc/combine.cc:15063
0x22a1544 execute
/repo/gcc-trunk/gcc/combine.cc:15107
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.
make: *** [/repo/gcc-trunk/libgcc/shared-object.mk:14: fixunshfti.o] Error 1
$ /repo/build-gcc-trunk-riscv64/./gcc/cc1 -O -march=rv64imafdc -mabi=lp64d
testcase.c
__fixunshfti
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> {heap 872k} <visibility> {heap 872k} <build_ssa_passes>
{heap 872k} <opt_local_passes> {heap 1148k} <remove_symbols> {heap 1608k}
<targetclone> {heap 1608k} <free-fnsummary> {heap 1608k}Streaming LTO
<whole-program> {heap 1608k} <profile_estimate> {heap 1608k} <fnsummary> {heap
1608k} <inline> {heap 1608k} <pure-const> {heap 1608k} <modref> {heap 1608k}
<free-fnsummary> {heap 1608k} <static-var> {heap 1608k} <single-use> {heap
1608k} <comdats> {heap 1608k}Assembling functions:
__fixunshftiduring RTL pass: combine
testcase.c: In function '__fixunshfti':
testcase.c:10:1: internal compiler error: RTL check: expected code 'reg', have
'subreg' in rhs_regno, at rtl.h:1934
10 | }
| ^
0x90f65c rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
/repo/gcc-trunk/gcc/rtl.cc:770
0xb7b026 rhs_regno(rtx_def const*)
/repo/gcc-trunk/gcc/rtl.h:1934
0xb7b132 rhs_regno(rtx_def const*)
/repo/gcc-trunk/gcc/common.md:26
0xb7b132 zcmp_mv_sreg_operand(rtx_def*, machine_mode)
/repo/gcc-trunk/gcc/config/riscv/predicates.md:180
0x2236a11 recog_564
/repo/gcc-trunk/gcc/config/riscv/iterators.md:60
0x2249d2b recog(rtx_def*, rtx_insn*, int*)
/repo/gcc-trunk/gcc/config/riscv/iterators.md:58
0x227e442 recog_for_combine_1
/repo/gcc-trunk/gcc/combine.cc:11382
0x22819de recog_for_combine
/repo/gcc-trunk/gcc/combine.cc:11652
0x229c022 try_combine
/repo/gcc-trunk/gcc/combine.cc:3546
0x22a1544 combine_instructions
/repo/gcc-trunk/gcc/combine.cc:1264
0x22a1544 rest_of_handle_combine
/repo/gcc-trunk/gcc/combine.cc:15063
0x22a1544 execute
/repo/gcc-trunk/gcc/combine.cc:15107
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.
$ /repo/build-gcc-trunk-riscv64/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/repo/build-gcc-trunk-riscv64/./gcc/xgcc
Target: riscv64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-isa-spec=2.2
--with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-3602-20230831181644-ga335cf241b9-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230831 (experimental) (GCC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/111259] [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build
2023-08-31 18:22 [Bug target/111259] New: [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build zsojka at seznam dot cz
@ 2023-08-31 18:24 ` pinskia at gcc dot gnu.org
2023-09-15 20:44 ` cvs-commit at gcc dot gnu.org
2023-10-17 12:29 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-31 18:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111259
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/111259] [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build
2023-08-31 18:22 [Bug target/111259] New: [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build zsojka at seznam dot cz
2023-08-31 18:24 ` [Bug target/111259] " pinskia at gcc dot gnu.org
@ 2023-09-15 20:44 ` cvs-commit at gcc dot gnu.org
2023-10-17 12:29 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-15 20:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111259
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick O'Neill <poneill@gcc.gnu.org>:
https://gcc.gnu.org/g:d7b6020276a843e97f6135259b4ab3b53a5850e2
commit r14-4044-gd7b6020276a843e97f6135259b4ab3b53a5850e2
Author: Fei Gao <gaofei@eswincomputing.com>
Date: Fri Sep 15 01:20:08 2023 +0000
fix PR 111259 invalid zcmp mov predicate.
The code changes are from Palmer.
root cause:
In a gcc build with --enable-checking=yes, REGNO (op) checks
rtx code and expected code 'reg'. so a rtx with 'subreg' causes
an internal compiler error.
solution:
Restrict predicate to allow 'reg' only.
gcc/ChangeLog:
* config/riscv/predicates.md: Restrict predicate
to allow 'reg' only.
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/111259] [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build
2023-08-31 18:22 [Bug target/111259] New: [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build zsojka at seznam dot cz
2023-08-31 18:24 ` [Bug target/111259] " pinskia at gcc dot gnu.org
2023-09-15 20:44 ` cvs-commit at gcc dot gnu.org
@ 2023-10-17 12:29 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-17 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111259
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed I assume.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-17 12:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 18:22 [Bug target/111259] New: [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build zsojka at seznam dot cz
2023-08-31 18:24 ` [Bug target/111259] " pinskia at gcc dot gnu.org
2023-09-15 20:44 ` cvs-commit at gcc dot gnu.org
2023-10-17 12:29 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).