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

            Bug ID: 104054
           Summary: '-fcompare-debug' failure (length) w/ -Os
                    -funroll-loops
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-unknown-linux-gnu

Created attachment 52207
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52207&action=edit
diff -u j2sfd9at.*.gkd

gcc 12.0.0 20220109 snapshot (g:49d73c9fb644673323845efebfe6b3106e70af8a) fails
-fcompare-debug check when compiling the following testcase w/ -Os
-funroll-loops:

short int i;
int m;
__int128 n;

void
foo (__int128 x)
{
  int a = !!n;
  __int128 b = 1;

  if (a < x)
    m = 1;

  for (i = 0; i < 4; ++i)
    {
      b <<= a || n;
      n = b;
    }
}

% x86_64-unknown-linux-gnu-gcc-12.0.0 -Os -fcompare-debug -funroll-loops -c
j2sfd9at.c
x86_64-unknown-linux-gnu-gcc-12.0.0: error: j2sfd9at.c: '-fcompare-debug'
failure (length)

gkd diff attached.

Reply via email to