From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 66BC7386074D; Wed, 12 Oct 2022 09:27:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66BC7386074D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665566820; bh=ON9/+col+j/IkuaU+tXxAIRLRdLvC/75qEoh2+BE9wk=; h=From:To:Subject:Date:From; b=h2HKp+foMRHMLffn0b+sXvyrc8TNTMnOCh7DKgbnZvuUSjcLXJf88S0L8GTXFv/Qc q5bPy4ofrr6nwG+wLht9u6gIjlaTJkpviEVKf3YUcDnQG+9+gXkxFtJ7RZQuNo8Ydt t06YY33LK+ikpSookBpyinTsEmvktc0K5zdDuUpg= From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/107231] New: [13 Regression] c-c++-common/goacc/kernels-loop-g.c: '-fcompare-debug' failure (length) Date: Wed, 12 Oct 2022 09:26:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: compare-debug-failure, openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc blocked target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107231 Bug ID: 107231 Summary: [13 Regression] c-c++-common/goacc/kernels-loop-g.c: '-fcompare-debug' failure (length) Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: compare-debug-failure, openacc Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: erozen at microsoft dot com Blocks: 104277 Target Milestone: --- In a native x86_64-pc-linux-gnu build, when also running testing with '-m32' ('RUNTESTFLAGS=3D"--target_board=3Dunix\{,-m32\}"') I'm seeing a regression= for '-m32' (but not for default '-m64'): [-PASS:-]{+FAIL:+} c-c++-common/goacc/kernels-loop-g.c (test for excess errors) PASS: c-c++-common/goacc/kernels-loop-g.c scan-tree-dump-not parloops1 "FAILED:" PASS: c-c++-common/goacc/kernels-loop-g.c scan-tree-dump-times optimized "(?n);; Function .*main._omp_fn.0" 1 PASS: c-c++-common/goacc/kernels-loop-g.c scan-tree-dump-times parloops1 "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint, noclone\\)\\)" 1 PASS: c-c++-common/goacc/kernels-loop-g.c scan-tree-dump-times parloops1 "SUCCESS: may be parallelized" 1 xgcc: error: [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c: '-fcompare-debug' failure (length) That's for both C and C++ testing. Note that this test case is a bit "degenerate" in that it needs '-fcompare-debug' to compile (safe-guard; refer to PR100400). Reproduce: $ build-gcc/gcc/xgcc -Bbuild-gcc/gcc/ source-gcc/gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c -fopenacc --param=3Dopenacc-kernels=3Ddecompose -O2 -g -S -fcompare-debug -m32 -save-= temps xgcc: error: source-gcc/gcc/testsuite/c-c++-common/goacc/kernels-loop-g= .c: =E2=80=98-fcompare-debug=E2=80=99 failure (length) $ diff -u kernels-loop-g.c.gkd kernels-loop-g.gk.c.gkd --- kernels-loop-g.c.gkd 2022-10-12 11:10:24.902809164 +0200 +++ kernels-loop-g.gk.c.gkd 2022-10-12 11:10:24.950809149 +0200 @@ -601,7 +601,7 @@ (set (reg/v:SI 0 ax [orig:96 i ] [96]) (const_int 0 [0])) (clobber (reg:CC 17 flags)) - ]) "source-gcc/gcc/testsuite/c-c++-common/goacc/kernels-loop.c":36:21 discrim = 3# {*movsi_xor} + ]) "source-gcc/gcc/testsuite/c-c++-common/goacc/kernels-loop.c":36:21# {*movsi_xor} (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))) (code_label # 0 0 7 13 (nil) [1 uses]) The issue goes away if I revert commit r13-3213-g80f414e6d73f9f1683f93d83ce63a6a482e54bee "Fix PR107193", commit r13-3172-gf30e9fd33e56a5a721346ea6140722e1b193db42 "Set discriminators for = call stmts on the same line within the same basic block". Alternatively, the issue goes away if I pass '-gno-statement-frontiers' (as= I found in the 'c-c++-common/ubsan/pr85213.c' hunk of commit r13-2921-gf1adf45b17f7f1ede463524d80032bb2ec866ead "Add instruction level discriminator support", referring to PR100733 "-fcompare-debug failure for pr85213.c at -O1 -fdisable-tree-phiopt2"). If you confirm that this is ind= eed what should currently be done, I'll push that flag onto 'c-c++-common/goacc/kernels-loop-g.c', for the time being? Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104277 [Bug 104277] [meta-bug] gstatement-frontiers causes fcompare-debug issues=