public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/104459] New: [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -funswitch-loops -fno-tree-dce
@ 2022-02-09 11:43 asolokha at gmx dot com
  2022-02-09 12:03 ` [Bug rtl-optimization/104459] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: asolokha at gmx dot com @ 2022-02-09 11:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104459
           Summary: [9/10/11/12 Regression] '-fcompare-debug' failure w/
                    -O2 -funswitch-loops -fno-tree-dce
           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: ---

gcc 12.0.1 20220206 snapshot (g:8eb329e963593342855b6072e5692659107337b7) fails
-fcompare-debug check when compiling the following testcase w/ -O2
-funswitch-loops -fno-tree-dce:

void
foo (int x, int y)
{
  unsigned int a;

  for (;;)
    {
      short int *p = (short int *) &x;
      unsigned int q = 0;

      a /= 2;
      if (a)
        {
          q -= y;
          while (q)
            {
            }
        }

      if (x)
        {
          for (q = 0; q != 1; q += 2)
            {
              unsigned int n;

              n = *p ? 0 : q;
              y += n < 1;

              n = a || *p;
              if (n % x == 0)
                y /= x;
            }
        }

    }
}

% gcc-12.0.1 -O2 -fcompare-debug -funswitch-loops -fno-tree-dce -c rfygrmu3.c
gcc-12.0.1: error: rfygrmu3.c: '-fcompare-debug' failure

--- rfygrmu3.c.gkd      2022-02-09 18:38:41.086339468 +0700
+++ rfygrmu3.gk.c.gkd   2022-02-09 18:38:41.117339440 +0700
@@ -32,7 +32,7 @@
             (pc))) "rfygrmu3.c":20:10# {*jcc}
      (expr_list:REG_DEAD (reg:CCZ 17 flags)
         (int_list:REG_BR_PROB 118111604 (nil)))
- -> 18)
+ -> 19)
 (code_label # 0 0 4 4 (nil) [1 uses])
 (note # 0 0 [bb 4] NOTE_INSN_BASIC_BLOCK)
 (insn:TI # 0 0 4 (set (reg/v:SI 36 r8 [orig:89 a ] [89])
@@ -79,7 +79,7 @@
      (nil)
  -> 3)
 (barrier # 0 0)
-(code_label # 0 0 7 18 (nil) [1 uses])
+(code_label # 0 0 7 19 (nil) [1 uses])
 (note # 0 0 [bb 7] NOTE_INSN_BASIC_BLOCK)
 (insn:TI # 0 0 7 (set (reg:CCZ 17 flags)
         (compare:CCZ (reg:HI 5 di [orig:94 x ] [94])

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-07 10:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 11:43 [Bug debug/104459] New: [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -funswitch-loops -fno-tree-dce asolokha at gmx dot com
2022-02-09 12:03 ` [Bug rtl-optimization/104459] " rguenth at gcc dot gnu.org
2022-02-09 18:56 ` jakub at gcc dot gnu.org
2022-02-09 19:07 ` jakub at gcc dot gnu.org
2022-02-09 19:13 ` jakub at gcc dot gnu.org
2022-02-11 10:24 ` cvs-commit at gcc dot gnu.org
2022-02-11 11:00 ` [Bug rtl-optimization/104459] [9/10/11 " jakub at gcc dot gnu.org
2022-05-27  9:47 ` [Bug rtl-optimization/104459] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug rtl-optimization/104459] [11 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).