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

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Created attachment 47484
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47484&action=edit
123.c: C test case.

Confirmed with the attached test case compiler with

$ avr-gcc -mmcu=atmega128 123.c -flto -Os -save-temps -o 123.elf

Then 123.elf.ltrans0.s reads:

xyz_prog:
        .byte   123
...
        .set    xyz,xyz_prog

Which is obviously wrong.  With -ffat-lto-objects (so that 123.s has asm code)
it is correct: xyz and xyz_prog are distinct objects, the first in .data and
the latter in .progmem.data.

Reply via email to