On Sat, Jun 27, 2026 at 5:28 AM H.J. Lu <[email protected]> wrote:
>
> 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).
>

Tested with build-many-glibcs.py for aarch64-linux-gnu and on x86-64.
I am checking it in as an obvious change.

-- 
H.J.

Reply via email to