https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88635
Bug ID: 88635 Summary: Assembler error when building with "-g -O2 -m32" Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: a1ba.omarov at gmail dot com Target Milestone: --- Created attachment 45308 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45308&action=edit generated sv_init.i 1) The exact version of GCC: $ gcc --version gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 2) The system type: x86_64-linux-gnu. On Ubuntu 18.10. Also happens on Arch Linux with GCC 8.2.1. 3) the options given when GCC was configured/built; See attachment. 4) the complete command line that triggers the bug /usr/bin/cc -DCOLORIZE_CONSOLE -DSINGLE_BINARY -DUSE_SELECT -DVECTORIZE_SINCOS -DXASH_BUILD_COMMIT=\"b5b493b1\" -DXASH_DEDICATED -DXASH_FASTSTR -DXASH_FORCEINLINE -DXASH_USE_STB_SPRINTF -I/home/a1ba/projects/xash/xash3d/engine/. -I/home/a1ba/projects/xash/xash3d/engine/common -I/home/a1ba/projects/xash/xash3d/engine/common/imagelib -I/home/a1ba/projects/xash/xash3d/engine/common/soundlib -I/home/a1ba/projects/xash/xash3d/engine/client -I/home/a1ba/projects/xash/xash3d/engine/client/vgui -I/home/a1ba/projects/xash/xash3d/engine/server -I/home/a1ba/projects/xash/xash3d/engine/../common -I/home/a1ba/projects/xash/xash3d/engine/../pm_shared -m32 -save-temps -g -O2 -fvisibility=hidden -o CMakeFiles/xash.dir/server/sv_init.c.o -c /home/a1ba/projects/xash/xash3d/engine/server/sv_init.c or in case of just sv_init.i gcc -m32 -save-temps -g -O2 -fvisibility=hidden -o sv_init.o sv_init.i 5) the compiler output (error messages, warnings, etc.) sv_init.s: Assembler messages: sv_init.s:31551: Error: can't resolve `L0' {*ABS* section} - `.LC28' {.rodata.str1.1 section} 6) the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command See attachment. I tried to compile without -O2, -g or -m32 and it seems only this combination makes assembler to fail.