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

            Bug ID: 108784
           Summary: '-fcompare-debug' failure (length) w/ -O1
                    -fharden-conditional-branches -funroll-all-loops
                    --param ira-simple-lra-insn-threshold=1
           Product: gcc
           Version: 13.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 54457
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54457&action=edit
gkd diff

gcc 13.0.1 20230212 snapshot (g:06ca0c9abb260266b688e2c2154c72214bb47076) fails
-fcompare-debug check when compiling the following testcase w/ -O1
-fharden-conditional-branches -funroll-all-loops --param
ira-simple-lra-insn-threshold=1:

int m;

void
foo (int x)
{
  int i;

  if (m)
    m += m;

  for (i = 0; i < 7; ++i)
    {
      __int128 a = 2;

      m += x * m && m / a;
    }

  while (x < 1)
    while (x < 1)
      ++x;
}

% aarch64-linux-gnu-gcc-13 -O1 -fcompare-debug -fharden-conditional-branches
-funroll-all-loops --param ira-simple-lra-insn-threshold=1 -c cdyfgse4.c
aarch64-linux-gnu-gcc-13: error: cdyfgse4.c: '-fcompare-debug' failure (length)

gkd diff attached.

W/ gcc 13.0.1 20230212 snapshot I get massive -fcompare-debug failures w/ all
kinds of test cases I have, either generated or real-world programs, when
compiling for aarch64-linux-gnu w/ ira-simple-lra-insn-threshold parameter
values ranging 1 to 3. I believe it has nothing to do w/
-fharden-conditional-branches, as there are many testcases that fail w/ that
omitted.

Reply via email to