public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/108656] New: [12/13 Regression] '-fcompare-debug' failure (length) w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=0
@ 2023-02-03 11:00 asolokha at gmx dot com
  2023-02-03 11:03 ` [Bug debug/108656] " asolokha at gmx dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: asolokha at gmx dot com @ 2023-02-03 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108656
           Summary: [12/13 Regression] '-fcompare-debug' failure (length)
                    w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param
                    early-inlining-insns=0
           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: ---

g++ 13.0.0 20220515 snapshot (g:18547874ee205d830acb31f1e3c1c89fc7725c14) fails
-fcompare-debug check when compiling the following testcase w/ -O2
-fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=0:

volatile int q;
int m, n;

int
quux (int x)
{
  return x;
}

int
corge (int x, int y)
{
  if (x < 0 || x > y)
    return 1;

 return 0;
}

int
baz (void)
{
  return m ? q : 0;
}

__attribute__ ((pure, returns_twice)) int
bar (void)
{
  (void) baz ();

  return 0;
}

int
foo (void)
{
  int a = quux (0);
  int b = corge (bar (), n);

  return 0;
}

 % gcc-13 -O2 -fcompare-debug -fno-ipa-pure-const -fno-tree-dce --param
early-inlining-insns=0 -c c46sgk3m.c
gcc-13: error: c46sgk3m.c: '-fcompare-debug' failure (length)

gkd diff:

 (note # 0 0 NOTE_INSN_DELETED)

 Declarations used by foo, sorted by DECL_UID:
-1:   static volatile int q;
-0:   static int m;
+2:   static volatile int q;
+1:   static int m;
+0:   static int n;

 ;; Function foo (foo, funcdef_no=4, cgraph_uid=5, symbol_order=7)

@@ -184,17 +185,17 @@
 (jump_insn # 0 0 2 (set (pc)
         (if_then_else (eq (reg:CCZ 17 flags)
                 (const_int 0 [0]))
-            (label_ref #)
+            (label_ref:DI #)
             (pc))) "c46sgk3m.c":22:16# {*jcc}
      (expr_list:REG_DEAD (reg:CCZ 17 flags)
         (int_list:REG_BR_PROB 536870916 (nil)))
- -> 12)
+ -> 13)
 (note # 0 0 [bb 3] NOTE_INSN_BASIC_BLOCK)
-(insn:TI # 0 0 3 (set (reg:SI 0 ax [orig:83 iftmp.0_10 ] [83])
+(insn:TI # 0 0 3 (set (reg:SI 0 ax [orig:84 iftmp.0_10 ] [84])
         (mem/v/c:SI (symbol_ref:DI ("q") [flags 0x2]  <var_decl # q>) [ q+0 S4
A32])) "c46sgk3m.c":22:16 discrim 1# {*movsi_internal}
-     (expr_list:REG_UNUSED (reg:SI 0 ax [orig:83 iftmp.0_10 ] [83])
+     (expr_list:REG_UNUSED (reg:SI 0 ax [orig:84 iftmp.0_10 ] [84])
         (nil)))
-(code_label # 0 0 4 12 (nil) [1 uses])
+(code_label # 0 0 4 13 (nil) [1 uses])
 (note # 0 0 [bb 4] NOTE_INSN_BASIC_BLOCK)
 (insn:TI # 0 0 4 (parallel [
             (set (reg:DI 0 ax)

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

end of thread, other threads:[~2024-06-20  9:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 11:00 [Bug debug/108656] New: [12/13 Regression] '-fcompare-debug' failure (length) w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=0 asolokha at gmx dot com
2023-02-03 11:03 ` [Bug debug/108656] " asolokha at gmx dot com
2023-02-03 11:12 ` [Bug debug/108656] [12/13 Regression] '-fcompare-debug' failure (length) w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=0 since r12-5236 jakub at gcc dot gnu.org
2023-02-03 13:13 ` jakub at gcc dot gnu.org
2023-02-06  7:42 ` rguenth at gcc dot gnu.org
2023-02-06  8:49 ` jakub at gcc dot gnu.org
2023-02-06  9:46 ` rguenth at gcc dot gnu.org
2023-02-06  9:56 ` jakub at gcc dot gnu.org
2023-02-06 10:03 ` rguenth at gcc dot gnu.org
2023-02-06 10:11 ` jakub at gcc dot gnu.org
2023-02-06 10:14 ` jakub at gcc dot gnu.org
2023-02-06 10:22 ` rguenther at suse dot de
2023-02-06 10:37 ` jakub at gcc dot gnu.org
2023-02-07 11:28 ` rguenther at suse dot de
2023-05-08 12:26 ` [Bug debug/108656] [12/13/14 " rguenth at gcc dot gnu.org
2024-06-20  9:11 ` [Bug debug/108656] [12/13/14/15 " 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).