Windows-on-ARM-Experiments / mingw-woarm64-build

Build script for Windows on Arm64 GNU cross compiler aarch64-w64-mingw32.
GNU General Public License v2.0
27 stars 3 forks source link

Internal compiler error when `-flto` and `-g` is specified #144

Closed Blackhex closed 1 month ago

Blackhex commented 2 months ago

Repro case:

int main(void) { return 0; }
aarch64-w64-mingw32-gcc -c -g -flto lto-fail.c

The toolchain used was the one released at https://github.com/Windows-on-ARM-Experiments/msys2-woarm64-build/

Symptoms:

lto-fail.c:1:1: internal compiler error: in dwarf2out_die_ref_for_decl, at dwarf2out.cc:6081
    1 | int main(void) { return 0; }
      | ^~~
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
eukarpov commented 1 month ago

Fixed and validated in #149