https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127004

            Bug ID: 127004
           Summary: [17 Regression] Recent changes to lower long-multipy
                    chagnes to inline regress on avr-elf
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

This change:

commit aac02c9666184d19334a0527ec444b5e55fbd113
Author: Konstantinos Eleftheriou <[email protected]>
Date:   Thu Jul 9 02:22:54 2026 -0700

    widening_mul: Lower long-multiply chains to inline longhand

    The forwprop long-multiply recognizer canonicalizes longhand
    high-part multiplies into

      lhs = (N) (((2N) op1 * (2N) op2) >> N)
[ ... ]

Is causing an avr-elf regression:

Tests that now fail, but worked before (5 tests):

avr-sim: gcc: gcc.c-torture/execute/930921-1.c   -O2  (test for excess errors)
avr-sim: gcc: gcc.c-torture/execute/930921-1.c   -O2 -flto
-fno-use-linker-plugin -flto-partition=none  (test for excess errors)
avr-sim: gcc: gcc.c-torture/execute/930921-1.c   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess
errors)
avr-sim: gcc: gcc.c-torture/execute/930921-1.c   -O3 -g  (test for excess
errors)
avr-sim: gcc: gcc.c-torture/execute/930921-1.c   -Os  (test for excess errors)

It seems to be triggering an ICE in the AVR backend, so most likely it's a
target issue rather than something generic.  THe good news is it's an ICE, so
it should be possible to reproduce/test without a full avr-elf environment. 
I'm not currently working on this.

Reply via email to