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

            Bug ID: 127482
           Summary: [avr] wrong code for IPA + -mcall-prologues + varargs
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

Created attachment 65631
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65631&action=edit
bug.c : C test case

This test case fails when compiled with

$ avr-gcc -mmcu=atmega128 -Os -o bug.elf -mcall-prologues bug.c

Target: avr
Configured with: .../configure --target=avr --disable-nls --with-dwarf2
--with-gnu-as --with-gnu-ld --with-long-double=64 --enable-languages=c,c++
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260912 (experimental) (GCC) 

The bug goes away when

* error() is attribute noipa, or

* error() doesn't terminate with exit(0), or

* Compiled without -mcall-prologues.

Reply via email to