public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102
@ 2023-12-01 8:08 fkastl at suse dot cz
2023-12-01 8:20 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: fkastl at suse dot cz @ 2023-12-01 8:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
Bug ID: 112804
Summary: ICE in aarch64 crosscompiler in plus_constant, at
explow.cc:102
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, needs-bisection
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: fkastl at suse dot cz
Target Milestone: ---
Host: x86_64-linux
Target: aarch64-gnu-linux
Created attachment 56748
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56748&action=edit
Log of found plus_constant ICEs
While compiling the gcc.dg/tree-ssa/pr111583-2.c testcase from GCC testsuite
using the aarch64 cross compiler with the following options:
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/tree-ssa/pr111583-2.c
-mabi=ilp32 -finline-stringops -ftrivial-auto-var-init=zero
the following ICE occurs:
during RTL pass: expand
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/tree-ssa/pr111583-2.c:
In function ‘m’:
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/tree-ssa/pr111583-2.c:18:25:
internal compiler error: in plus_constant, at explow.cc:102
18 | const unsigned short *n[65];
| ^
0x73fa6c plus_constant(machine_mode, rtx_def*, poly_int<2u, long>, bool)
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/explow.cc:102
0x89f52f try_store_by_multiple_pieces(rtx_def*, rtx_def*, unsigned int,
unsigned long, unsigned long, rtx_def*, char, unsigned int)
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/builtins.cc:4517
0x9d8870 clear_storage_hints(rtx_def*, rtx_def*, block_op_methods, unsigned
int, long, unsigned long, unsigned long, unsigned long, unsigned int)
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/expr.cc:3888
0x8a619b expand_builtin_memset_args
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/builtins.cc:4674
0xac23f7 expand_DEFERRED_INIT
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/internal-fn.cc:3357
0x8c6a37 expand_call_stmt
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:2738
0x8c6a37 expand_gimple_stmt_1
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:3881
0x8c6a37 expand_gimple_stmt
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:4045
0x8cbac7 expand_gimple_basic_block
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:6101
0x8cd7be execute
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:6836
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.
The same bug (the same stacktrace) occurs on these testcases:
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.target/aarch64/mops_4.c
-mabi=ilp32 -finline-stringops
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/pr34457-1.c
-mabi=ilp32 -finline-stringops
aarch64-linux-gnu-gfortran
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gfortran.dg/pr49308.f90
-finline-stringops -mabi=ilp32
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/ubsan/bounds-4b.c
-finline-stringops -mabi=ilp32 -Os
aarch64-linux-gnu-gfortran
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gfortran.dg/analyzer/deferred_character_25.f90
-mabi=ilp32 -finline-stringops
ICE in plus_constant (similar, but different stacktrace) also occurs here:
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.target/aarch64/test_frame_5.c
-mabi=ilp32 -ftrivial-auto-var-init=pattern -finline-stringops
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c
-ftrivial-auto-var-init=pattern -mabi=ilp32 -finline-stringops
aarch64-linux-gnu-g++
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/g++.dg/vect/pr84362.cc
-ftrivial-auto-var-init=pattern -mabi=ilp32 -finline-stringops
There are many more testcases that currently produce an ICE in plus_constant.
I'm attaching a full log of the ICEs.
Configuration of the compiler:
Using built-in specs.
COLLECT_GCC=/home/worker/cross/bin/aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/worker/cross/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with:
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/configure
--enable-languages=c,c++,fortran,rust,m2 --disable-bootstrap
--disable-libsanitizer --disable-multilib --enable-checking=release
--prefix=/home/worker/cross --target=aarch64-linux-gnu
--with-as=/usr/bin/aarch64-suse-linux-as
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231130 (experimental)
725c68c54c265fe7f6fc7babff7139f3161bdfa6 (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
@ 2023-12-01 8:20 ` pinskia at gcc dot gnu.org
2023-12-09 2:59 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops aoliva at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-01 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like -finline-stringops is not correc5 for the case where ptrmode !=
Pmode. I might take a look next week or the week afterwards.
I also suspect you might hit it on x32 also.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
2023-12-01 8:20 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 pinskia at gcc dot gnu.org
@ 2023-12-09 2:59 ` aoliva at gcc dot gnu.org
2023-12-11 18:32 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2023-12-09 2:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-12-09
--- Comment #2 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Mine.
Patch at https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639986.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
2023-12-01 8:20 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 pinskia at gcc dot gnu.org
2023-12-09 2:59 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops aoliva at gcc dot gnu.org
@ 2023-12-11 18:32 ` cvs-commit at gcc dot gnu.org
2023-12-11 18:46 ` aoliva at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-11 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:
https://gcc.gnu.org/g:76ca5ab4ef95c41c1ed67edfb34a1a455a602192
commit r14-6429-g76ca5ab4ef95c41c1ed67edfb34a1a455a602192
Author: Alexandre Oliva <oliva@adacore.com>
Date: Mon Dec 11 15:09:22 2023 -0300
-finline-stringops: don't assume ptr_mode ptr in memset [PR112804]
On aarch64 -milp32, and presumably on other such targets, ptr can be
in a different mode than ptr_mode in the testcase. Cope with it.
for gcc/ChangeLog
PR target/112804
* builtins.cc (try_store_by_multiple_pieces): Use ptr's mode
for the increment.
for gcc/testsuite/ChangeLog
PR target/112804
* gcc.target/aarch64/inline-mem-set-pr112804.c: New.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
` (2 preceding siblings ...)
2023-12-11 18:32 ` cvs-commit at gcc dot gnu.org
@ 2023-12-11 18:46 ` aoliva at gcc dot gnu.org
2024-01-04 15:45 ` fkastl at suse dot cz
2024-01-20 17:25 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2023-12-11 18:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Fixed. Thanks for the notes and testing, Andrew, here and in the mailing list.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
` (3 preceding siblings ...)
2023-12-11 18:46 ` aoliva at gcc dot gnu.org
@ 2024-01-04 15:45 ` fkastl at suse dot cz
2024-01-20 17:25 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: fkastl at suse dot cz @ 2024-01-04 15:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
Filip Kastl <fkastl at suse dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Filip Kastl <fkastl at suse dot cz> ---
Marking this as fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
` (4 preceding siblings ...)
2024-01-04 15:45 ` fkastl at suse dot cz
@ 2024-01-20 17:25 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-20 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112804
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-01-20 17:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-01 8:08 [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 fkastl at suse dot cz
2023-12-01 8:20 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 pinskia at gcc dot gnu.org
2023-12-09 2:59 ` [Bug target/112804] ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 with -mabi=ilp32 and -finline-stringops aoliva at gcc dot gnu.org
2023-12-11 18:32 ` cvs-commit at gcc dot gnu.org
2023-12-11 18:46 ` aoliva at gcc dot gnu.org
2024-01-04 15:45 ` fkastl at suse dot cz
2024-01-20 17:25 ` pinskia 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).