https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104753
Bug ID: 104753 Summary: Sporadic '-fcompare-debug' failure w/ -mcpu=phecda -O2 -funroll-all-loops -fno-tree-reassoc Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: compare-debug-failure Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: aarch64-linux-gnu Created attachment 52544 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52544&action=edit Testcase gfortran 12.0.1 20220227 snapshot (g:d1574a9b820f17adb9004255e2018967e9be063b) sporadically fails -fcompare-debug check when compiling the attached testcase w/ -mcpu=phecda -O2 -funroll-all-loops -fno-tree-reassoc: % for i in {1..10}; do aarch64-linux-gnu-gfortran-12.0.1 -mcpu=phecda -O2 -fcompare-debug -funroll-all-loops -fno-tree-reassoc -c l9imhim5.f; done aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure aarch64-linux-gnu-gfortran-12.0.1: error: l9imhim5.f: '-fcompare-debug' failure -fno-rename-registers "fixes" the error.