https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95336
Bug ID: 95336 Summary: Bad code gen omnetpp_r aarch64 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: erick.oc...@theobroma-systems.com CC: marxin at gcc dot gnu.org Target Milestone: --- Hello, I have been using a configuration file to compile and run CPU2017. This configuration file worked well with gcc9, but it doesn't seem to work well with gcc10. I am aware of the instructions outlined in "Porting to GCC 10" [0] and I believe I have followed them. However, at least for omnetpp_r there still seemed to be an issue. Compilation succeeded, gave several warnings (including the following): simulator/matchexpression.tab.cc: In function 'matchexpressionyyparse.constprop.isra': simulator/matchexpression.tab.cc:1444:37: warning: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 1444 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); | and immediately segfaulted. I used the following compiler flags: -flto -fcommon -O3 I noticed that if I reduce the optimization level to -O2, there is no segfault. I did a bisection from commit f47f687a97260b1a1305cbf2d7ee3d74b2916a74 Author: Richard Biener <rguent...@suse.de> Date: Thu Apr 25 17:58:56 2019 +0000 to: commit 4945b4c2c8628bdd61b348ea5bd1f9b72537a36e (HEAD) Author: Martin Liska <mli...@suse.cz> Date: Tue May 26 09:01:41 2020 +0200 and I found that the following commit may have introduced the error: commit ff6686d2e5f797d6c6a36ad14a7084bc1dc350e4 Author: Martin Jambor <mjam...@suse.cz> Date: Fri Sep 20 00:25:04 2019 +0200 I am not sure if this is a known issue or if I'm doing something wrong. This is the latest GCC version that I know reproduces the error: [eochoa@osprey1 ~]$ $HOME/code/gcc-inst/bin/gcc -v Using built-in specs. COLLECT_GCC=/home/eochoa/code/gcc-inst/bin/gcc COLLECT_LTO_WRAPPER=/home/eochoa/code/gcc-inst/libexec/gcc/aarch64-unknown-linux-gnu/11.0.0/lto-wrapper Target: aarch64-unknown-linux-gnu Configured with: /home/eochoa/code/gcc/configure --disable-bootstrap --disable-libsanitizer --enable-__cxa_atexit --enable-shared --disable-libsanitizer --enable-languages=c,c++,fortran --enable-lto --enable-gold --enable-linker-build-id --with-cpu-emag --prefix=/home/eochoa/code/gcc-inst/ Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200526 (experimental) (GCC) [0] https://gcc.gnu.org/gcc-10/porting_to.html