public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler
@ 2024-02-23 12:29 pheeck at gcc dot gnu.org
2024-02-23 17:08 ` [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32 pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pheeck at gcc dot gnu.org @ 2024-02-23 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114077
Bug ID: 114077
Summary: ICE in do_SUBST at combine.cc with aarch64
crosscompiler
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: pheeck at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux
Target: aarch64-gnu-linux
While compiling the gcc.dg/asan/pr107317.c testsuite testcase using aarch64
crosscompiler:
aarch64-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/asan/pr107317.c
-fno-optimize-sibling-calls -fharden-control-flow-redundancy -mabi=ilp32 -Ofast
we hit this ICE:
during RTL pass: combine
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/asan/pr107317.c:
In function ‘foo’:
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/asan/pr107317.c:13:1:
internal compiler error: in do_SUBST, at combine.cc:698
13 | }
| ^
0x78f6e1 do_SUBST
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:698
0x199342c subst
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:5583
0x199337d subst
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:5536
0x1996348 try_combine
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:3302
0x199afd4 combine_instructions
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:1264
0x199afd4 rest_of_handle_combine
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:15091
0x199afd4 execute
/home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/combine.cc:15135
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.
There's an open PR for an ICE with roughly the same stacktrace: pr81874. Maybe
it's the same problem.
The testcase:
/* PR middle-end/107317 */
/* { dg-do compile { target ilp32 } } */
/* { dg-options "-fsanitize=address -ffat-lto-objects" } */
void bar (float *, float *);
void
foo (void) /* { dg-error "exceeds maximum" } */
{
float a[400000000];
float b[200000000];
bar (a, b);
}
The compiler configuration:
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.1/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.1 20240222 (experimental)
37127ed975e09813eaa2d1cf1062055fce45dd16 (GCC)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32
2024-02-23 12:29 [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler pheeck at gcc dot gnu.org
@ 2024-02-23 17:08 ` pinskia at gcc dot gnu.org
2024-02-23 17:11 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-23 17:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114077
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I get a different ICE:
t5.c: In function ‘foo’:
|
t5.c:9:1: internal compiler error: in decompose, at rtl.h:2298
|
9 | foo (void) /* { dg-error "exceeds maximum" } */
|
| ^~~
|
0x4e82fc wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*,
unsigned int, std::pair<rtx_def*, machine_mode> const&)
../../gcc/rtl.h:2298
0x4e82fc wide_int_ref_storage<false,
true>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
../../gcc/wide-int.h:1089
0x4e82fc generic_wide_int<wide_int_ref_storage<false, true>
>::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
../../gcc/wide-int.h:847
0x4e82fc simplify_const_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
../../gcc/simplify-rtx.cc:1991
0xd46d92 simplify_context::simplify_unary_operation(rtx_code, machine_mode,
rtx_def*, machine_mode)
../../gcc/simplify-rtx.cc:889
0x90aea8 simplify_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
../../gcc/rtl.h:3486
0x90aea8 convert_memory_address_addr_space_1(scalar_int_mode, rtx_def*,
unsigned char, bool, bool)
../../gcc/explow.cc:330
0x90b0c9 convert_memory_address_addr_space_1(scalar_int_mode, rtx_def*,
unsigned char, bool, bool)
../../gcc/explow.cc:375
0x90b1b9 convert_memory_address_addr_space(scalar_int_mode, rtx_def*, unsigned
char)
../../gcc/explow.cc:429
0x90b1b9 memory_address_addr_space(machine_mode, rtx_def*, unsigned char)
../../gcc/explow.cc:443
0x930da4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.cc:11720
0x94148a expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
../../gcc/expr.h:316
0x94148a expand_assignment(tree_node*, tree_node*, bool)
../../gcc/expr.cc:6397
0x7fab67 expand_gimple_stmt_1
../../gcc/cfgexpand.cc:3992
0x7fab67 expand_gimple_stmt
../../gcc/cfgexpand.cc:4071
0x7ffc40 expand_gimple_basic_block
../../gcc/cfgexpand.cc:6127
0x801d06 execute
../../gcc/cfgexpand.cc:6866
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32
2024-02-23 12:29 [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler pheeck at gcc dot gnu.org
2024-02-23 17:08 ` [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32 pinskia at gcc dot gnu.org
@ 2024-02-23 17:11 ` pinskia at gcc dot gnu.org
2024-02-23 17:12 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-23 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114077
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh yes because I am building without `--enable-checking=release` .
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32
2024-02-23 12:29 [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler pheeck at gcc dot gnu.org
2024-02-23 17:08 ` [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32 pinskia at gcc dot gnu.org
2024-02-23 17:11 ` pinskia at gcc dot gnu.org
@ 2024-02-23 17:12 ` pinskia at gcc dot gnu.org
2024-02-23 17:15 ` pinskia at gcc dot gnu.org
2024-02-23 17:21 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-23 17:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114077
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#5 0x000000000110cb3f in simplify_const_unary_operation (code=ZERO_EXTEND,
mode=E_DImode, op=0x7ffff76e0440, op_mode=E_SImode) at
../../gcc/simplify-rtx.cc:2131
2131 result = wide_int::from (op0, width, UNSIGNED);
(gdb) p op0
$1 = {<std::__pair_base<rtx_def*, machine_mode>> = {<No data fields>}, first =
0x7ffff76e0440, second = E_SImode}
(gdb) p width
|
$2 = 64
(gdb) p op0.first
|
$3 = (rtx_def *) 0x7ffff76e0440
(gdb) p debug_rtx(op0.first)
(const_int -2400000008 [0xffffffff70f2e7f8])
$4 = void
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32
2024-02-23 12:29 [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler pheeck at gcc dot gnu.org
` (2 preceding siblings ...)
2024-02-23 17:12 ` pinskia at gcc dot gnu.org
@ 2024-02-23 17:15 ` pinskia at gcc dot gnu.org
2024-02-23 17:21 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-23 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114077
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=81874 |
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It has nothing to do with PR 81874 .
The issue happens much earlier. During expand, should have rejected this as the
arrays being too large.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32
2024-02-23 12:29 [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler pheeck at gcc dot gnu.org
` (3 preceding siblings ...)
2024-02-23 17:15 ` pinskia at gcc dot gnu.org
@ 2024-02-23 17:21 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-23 17:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114077
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This fixes patch causes the code to be rejected:
```
diff --git a/gcc/function.cc b/gcc/function.cc
index 5ffd438475e..7a0f7faa2d7 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -242,7 +242,7 @@ frame_offset_overflow (poly_int64 offset, tree func)
{
poly_uint64 size = FRAME_GROWS_DOWNWARD ? -offset : offset;
unsigned HOST_WIDE_INT limit
- = ((HOST_WIDE_INT_1U << (GET_MODE_BITSIZE (Pmode) - 1))
+ = ((HOST_WIDE_INT_1U << (GET_MODE_BITSIZE (ptr_mode) - 1))
/* Leave room for the fixed part of the frame. */
- 64 * UNITS_PER_WORD);
```
Though I am not 100% sure if it is correct.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-23 17:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 12:29 [Bug target/114077] New: ICE in do_SUBST at combine.cc with aarch64 crosscompiler pheeck at gcc dot gnu.org
2024-02-23 17:08 ` [Bug target/114077] ICE in do_SUBST at combine.cc with aarch64 crosscompiler with -fharden-control-flow-redundancy and -mabi=ilp32 pinskia at gcc dot gnu.org
2024-02-23 17:11 ` pinskia at gcc dot gnu.org
2024-02-23 17:12 ` pinskia at gcc dot gnu.org
2024-02-23 17:15 ` pinskia at gcc dot gnu.org
2024-02-23 17:21 ` 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).