public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/104263] New: [10/11/12 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions
@ 2022-01-28  2:51 asolokha at gmx dot com
  2022-01-28  8:16 ` [Bug debug/104263] " rguenth at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: asolokha at gmx dot com @ 2022-01-28  2:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104263
           Summary: [10/11/12 Regression] '-fcompare-debug' failure
                    (length) w/ -O2 -fnon-call-exceptions
                    -fno-inline-small-functions
           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 20220123 snapshot (g:2da90ad39bf8fa9ee287e040d1f4411cb7a2e7ed) fails
-fcompare-debug check when compiling the following testcase w/ -O2
-fnon-call-exceptions -fno-inline-small-functions:

int n;

int
bar (void)
{
  int a;

  n = 0;
  a = 0;

  return n;
}

__attribute__ ((pure, returns_twice)) int
foo (void)
{
  n = bar () + 1;
  foo ();

  return 0;
}

% gcc-12.0.1 -O2 -fcompare-debug -fnon-call-exceptions
-fno-inline-small-functions -gno-statement-frontiers -c ovslsrlb.c
x86_64-pc-linux-gnu-gcc-12.0.1: error: ovslsrlb.c: '-fcompare-debug' failure
(length)

For x86_64 the difference looks like this, though the failure is not
target-specific:

--- ovslsrlb.c.gkd      2022-01-28 09:42:43.969435346 +0700
+++ ovslsrlb.gk.c.gkd   2022-01-28 09:42:43.987435394 +0700
@@ -40,8 +40,8 @@
 (note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK)
 (note # 0 0 NOTE_INSN_PROLOGUE_END)
 (note # 0 0 NOTE_INSN_FUNCTION_BEG)
-(insn:TI # 0 0 2 (set (mem/c:SI (symbol_ref:DI ("n") [flags 0x2]  <var_decl #
n>) [ MEM[(int *)&n]+0 S4 A32])
-        (const_int 1 [0x1])) "ovslsrlb.c":8:5# {*movsi_internal}
+(insn:TI # 0 0 2 (set (mem/c:SI (symbol_ref:DI ("n") [flags 0x2]  <var_decl #
n>) [ n+0 S4 A32])
+        (const_int 1 [0x1])) "ovslsrlb.c":17:5# {*movsi_internal}
      (nil))
 (insn # 0 0 2 (parallel [
             (set (reg:DI 0 ax)

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

end of thread, other threads:[~2022-05-10 10:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  2:51 [Bug debug/104263] New: [10/11/12 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions asolokha at gmx dot com
2022-01-28  8:16 ` [Bug debug/104263] " rguenth at gcc dot gnu.org
2022-01-28  8:22 ` [Bug tree-optimization/104263] " rguenth at gcc dot gnu.org
2022-01-28  9:33 ` jakub at gcc dot gnu.org
2022-01-28  9:50 ` [Bug tree-optimization/104263] [10/11/12 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions since r10-3575-g629387a6586a7531 marxin at gcc dot gnu.org
2022-01-28  9:54 ` rguenth at gcc dot gnu.org
2022-01-28  9:54 ` rguenth at gcc dot gnu.org
2022-01-28 10:37 ` jakub at gcc dot gnu.org
2022-01-28 10:48 ` ebotcazou at gcc dot gnu.org
2022-01-28 12:30 ` cvs-commit at gcc dot gnu.org
2022-01-28 18:03 ` cvs-commit at gcc dot gnu.org
2022-01-28 18:05 ` [Bug tree-optimization/104263] [10/11 " jakub at gcc dot gnu.org
2022-02-19  8:02 ` cvs-commit at gcc dot gnu.org
2022-02-19  8:07 ` [Bug tree-optimization/104263] [10 " jakub at gcc dot gnu.org
2022-02-25  1:20 ` cvs-commit at gcc dot gnu.org
2022-05-10  8:23 ` cvs-commit at gcc dot gnu.org
2022-05-10 10:19 ` jakub 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).