On Sat, Jun 27, 2026 at 4:20 AM Joseph Myers <[email protected]> wrote: > > This causes an ICE building libgcc for aarch64-linux-gnu (probably also > all the other architectures showing gcc-first build regressions at > https://sourceware.org/pipermail/libc-testresults/2026q2/014771.html but I > haven't bisected to confirm they are indeed all caused by the same > commit). > > Preprocessed source for aarch64-linux-gnu attached; compile with -O2. > > during RTL pass: expand > /notnfs/josmyers/glibc-manual/src/gcc/libgcc/unwind-dw2.c: In function > 'uw_update_context_1': > /notnfs/josmyers/glibc-manual/src/gcc/libgcc/unwind-dw2.c:1146:26: internal > compiler error: Segmentation fault > 1146 | struct _Unwind_Context orig_context = *context; > | ^~~~~~~~~~~~ > 0x22d77df internal_error(char const*, ...) > > /notnfs/josmyers/glibc-manual/src/gcc/gcc/diagnostic-global-context.cc:787 > 0xef814f crash_signal > /notnfs/josmyers/glibc-manual/src/gcc/gcc/toplev.cc:325 > 0xe713a7 rtx_equal_p(rtx_def const*, rtx_def const*, bool (*)(rtx_def > const**, rtx_def const**, rtx_def**, rtx_def**)) > /notnfs/josmyers/glibc-manual/src/gcc/gcc/rtl.cc:445 > 0x9f5e26 emit_block_move_via_pattern > /notnfs/josmyers/glibc-manual/src/gcc/gcc/expr.cc:2323 > 0xa13ce9 emit_block_move_hints(rtx_def*, rtx_def*, rtx_def*, > block_op_methods, unsigned int, long, unsigned long, unsigned long, unsigned > long, bool, bool*, bool, unsigned int) > /notnfs/josmyers/glibc-manual/src/gcc/gcc/expr.cc:2103 > 0xa14366 emit_block_move(rtx_def*, rtx_def*, rtx_def*, block_op_methods, > unsigned int) > /notnfs/josmyers/glibc-manual/src/gcc/gcc/expr.cc:2167 > 0xa176fe store_expr(tree_node*, rtx_def*, int, bool, bool) > /notnfs/josmyers/glibc-manual/src/gcc/gcc/expr.cc:6984 > 0xa19ba8 expand_assignment(tree_node*, tree_node*, bool) > /notnfs/josmyers/glibc-manual/src/gcc/gcc/expr.cc:6503 > 0xa19ba8 expand_assignment(tree_node*, tree_node*, bool) > /notnfs/josmyers/glibc-manual/src/gcc/gcc/expr.cc:5992 > 0x8be4f3 expand_gimple_stmt_1 > /notnfs/josmyers/glibc-manual/src/gcc/gcc/cfgexpand.cc:4309 > 0x8be4f3 expand_gimple_stmt > /notnfs/josmyers/glibc-manual/src/gcc/gcc/cfgexpand.cc:4390 > 0x8c0737 expand_gimple_basic_block > /notnfs/josmyers/glibc-manual/src/gcc/gcc/cfgexpand.cc:6507 > 0x8c27e7 execute > /notnfs/josmyers/glibc-manual/src/gcc/gcc/cfgexpand.cc:7255 > /notnfs/josmyers/glibc-manual/build/compilers/aarch64-linux-gnu/gcc-first/./gcc/cc1 > -fpreprocessed unwind-dw2.i -quiet -dumpbase unwind-dw2.i -dumpbase-ext .i > -mlittle-endian -mabi=lp64 -O2 -o /dev/null > 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.
commit cbc56384029c9224280b0a1018fb9502797f243d Author: H.J. Lu <[email protected]> Date: Fri Jun 26 08:43:20 2026 +0800 determine_block_size: Set len_rtx to min size if min size == max size added + gcc_assert (min_size != max_size + || rtx_equal_p (ops[2].value, ops[6].value)); But the number of operands isn't fixed and may be less than 7. Replace the min size rtx with GEN_INT (min_size) to support different numbers of operands. PR middle-end/125977 * expr.cc (emit_block_move_via_pattern): Replace ops[6].value in assert with GEN_INT (min_size). -- H.J.
From 040cb132f53f93752d8d456c5191e1143bac1c6b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <[email protected]> Date: Sat, 27 Jun 2026 05:22:21 +0800 Subject: [PATCH] Replace the min size rtx with GEN_INT (min_size) commit cbc56384029c9224280b0a1018fb9502797f243d Author: H.J. Lu <[email protected]> Date: Fri Jun 26 08:43:20 2026 +0800 determine_block_size: Set len_rtx to min size if min size == max size added + gcc_assert (min_size != max_size + || rtx_equal_p (ops[2].value, ops[6].value)); But the number of operands isn't fixed and may be less than 7. Replace the min size rtx with GEN_INT (min_size) to support different numbers of operands. PR middle-end/125977 * expr.cc (emit_block_move_via_pattern): Replace ops[6].value in assert with GEN_INT (min_size). Signed-off-by: H.J. Lu <[email protected]> --- gcc/expr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/expr.cc b/gcc/expr.cc index 43931687d63..469c4d013b4 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -2321,7 +2321,7 @@ emit_block_move_via_pattern (rtx x, rtx y, rtx size, unsigned int align, create_fixed_operand (&ops[8], NULL); } gcc_assert (min_size != max_size - || rtx_equal_p (ops[2].value, ops[6].value)); + || rtx_equal_p (ops[2].value, GEN_INT (min_size))); if (maybe_expand_insn (code, nops, ops)) return true; } @@ -4048,7 +4048,7 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align, create_fixed_operand (&ops[8], NULL); } gcc_assert (min_size != max_size - || rtx_equal_p (ops[1].value, ops[6].value)); + || rtx_equal_p (ops[1].value, GEN_INT (min_size))); if (maybe_expand_insn (code, nops, ops)) return true; } -- 2.54.0
