public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC
@ 2022-04-08  9:59 asolokha at gmx dot com
  2022-04-08 12:04 ` [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da marxin at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: asolokha at gmx dot com @ 2022-04-08  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105203
           Summary: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC
           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: ---

gfortran-12.0.1 20220403 snapshot (g:0364465e3708249ece810ca5d65164552595538c)
fails -fcompare-debug check when compiling
gcc/testsuite/gfortran.dg/g77/pr9258.f w/ -O2 -ftracer -fPIC:

% gfortran-12.0.1 -O2 -fcompare-debug -ftracer -fPIC -w -c
gcc/testsuite/gfortran.dg/g77/pr9258.f
gfortran-12.0.1: error: gcc/testsuite/gfortran.dg/g77/pr9258.f:
'-fcompare-debug' failure

gkd diff:

--- blv9apl0.f.gkd      2022-04-08 16:53:59.431343098 +0700
+++ blv9apl0.gk.f.gkd   2022-04-08 16:53:59.483343122 +0700
@@ -170,7 +170,7 @@
         (reg/f:DI 41 r13 [orig:84 m.1 ] [84]))# {*indirect_jump}
      (nil))
 (barrier # 0 0)
-(code_label/s # 0 0 7 4 ("__label_000020") [3 uses])
+(code_label/s # 0 0 7 4 ("__label_000020") [1 uses])
 (note # 0 0 [bb 7] NOTE_INSN_BASIC_BLOCK)
 (insn:TI # 0 0 7 (set (reg:SF 22 xmm2 [90])
         (reg:SF 20 xmm0 [orig:85 a.2_12 ] [85])) "blv9apl0.f":12:10#
{*movsf_internal}

% gfortran-12.0.1 -v
Using built-in specs.
COLLECT_GCC=gfortran-12.0.1
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220403/work/gcc-12-20220403/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/12.0.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/12.0.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/12.0.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/12.0.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/12.0.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/12.0.1/include/g++-v12
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/12.0.1/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --disable-nls
--disable-libunwind-exceptions --enable-checking=yes --disable-esp
--enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --with-multilib-list=m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --enable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --without-zstd --enable-lto --with-isl
--disable-isl-version-check --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220401 (experimental) (GCC)

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
@ 2022-04-08 12:04 ` marxin at gcc dot gnu.org
  2022-04-08 15:25 ` segher at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-08 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-04-08
            Summary|'-fcompare-debug' failure   |[11/12 Regression]
                   |w/ -O2 -ftracer -fPIC       |'-fcompare-debug' failure
                   |                            |w/ -O2 -ftracer -fPIC since
                   |                            |r11-3078-g69ca5f3a988266da
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.3

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-3078-g69ca5f3a988266da.

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
  2022-04-08 12:04 ` [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da marxin at gcc dot gnu.org
@ 2022-04-08 15:25 ` segher at gcc dot gnu.org
  2022-04-08 15:44 ` segher at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-08 15:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
I cannot reproduce this problem, what other flags does it need to reproduce?

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
  2022-04-08 12:04 ` [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da marxin at gcc dot gnu.org
  2022-04-08 15:25 ` segher at gcc dot gnu.org
@ 2022-04-08 15:44 ` segher at gcc dot gnu.org
  2022-04-08 16:05 ` asolokha at gmx dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-08 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Lol, this isn't a PowerPC issue at all.  Please fill out the target field?

How can there be a difference in the number of uses only (and no difference
in actual uses!)?

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-04-08 15:44 ` segher at gcc dot gnu.org
@ 2022-04-08 16:05 ` asolokha at gmx dot com
  2022-04-08 16:20 ` segher at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: asolokha at gmx dot com @ 2022-04-08 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
It is not target-dependent and, besides x86_64, can be reproduced at least at
powerpc and aarch64 as well.

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-04-08 16:05 ` asolokha at gmx dot com
@ 2022-04-08 16:20 ` segher at gcc dot gnu.org
  2022-04-11  7:46 ` [Bug rtl-optimization/105203] " marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-08 16:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> ---
It does not show up with any configuration I have tried, so clearly it needs
something more :-(

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

* [Bug rtl-optimization/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-04-08 16:20 ` segher at gcc dot gnu.org
@ 2022-04-11  7:46 ` marxin at gcc dot gnu.org
  2022-04-20  8:36 ` [Bug debug/105203] " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-11  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
@Segher: Have you tried running it on x86_64-linux-gnu?

gcc -O2 -fcompare-debug -ftracer -fPIC -w -c
gcc/testsuite/gfortran.dg/g77/pr9258.f --save-temps --verbose
Using built-in specs.
COLLECT_GCC=gcc
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d,jit
--enable-offload-targets=nvptx-none,amdgcn-amdhsa, --without-cuda-driver
--enable-host-shared --enable-checking=release --disable-werror
--with-gxx-include-dir=/usr/include/c++/11 --enable-ssp --disable-libssp
--disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-libphobos
--enable-version-specific-runtime-libs --with-gcc-major-version-only
--enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function
--program-suffix=-11 --without-system-libunwind --enable-multilib
--with-arch-32=x86-64 --with-tune=generic
--with-build-config=bootstrap-lto-lean --enable-link-mutex
--build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20220316 [revision 6a1150d1524aeda3381b2171712e1a6611d441d6]
(SUSE Linux) 
COLLECT_GCC_OPTIONS='-O2' '-fcompare-debug=-gtoggle' '-ftracer' '-fPIC' '-w'
'-c' '-save-temps' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib64/gcc/x86_64-suse-linux/11/f951
gcc/testsuite/gfortran.dg/g77/pr9258.f -ffixed-form -quiet -dumpbase pr9258.f
-dumpbase-ext .f -mtune=generic -march=x86-64 -O2 -w -version
-fcompare-debug=-gtoggle -ftracer -fPIC -fintrinsic-modules-path
/usr/lib64/gcc/x86_64-suse-linux/11/finclude
-fpre-include=/usr/include/finclude/math-vector-fortran.h
-frandom-seed=0x56af55577b39fac1 -fdump-final-insns=pr9258.f.gkd -o pr9258.s
GNU Fortran (SUSE Linux) version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6] (x86_64-suse-linux)
        compiled by GNU C version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6], GMP version 6.2.1, MPFR version
4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (SUSE Linux) version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6] (x86_64-suse-linux)
        compiled by GNU C version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6], GMP version 6.2.1, MPFR version
4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-O2' '-fcompare-debug=-gtoggle' '-ftracer' '-fPIC' '-w'
'-c' '-save-temps' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/as -v -W
--64 -o pr9258.o pr9258.s
GNU assembler version 2.38 (x86_64-suse-linux) using BFD version (GNU Binutils;
openSUSE Tumbleweed) 2.38.20220304-3
gcc: note: recompiling with ‘-fcompare-debug’
COLLECT_GCC_OPTIONS='-O2' '-fcompare-debug=-gtoggle' '-ftracer' '-fPIC' '-w'
'-c' '-save-temps' '-v' '-mtune=generic' '-march=x86-64' '-w' '-S' '-o'
'/dev/null' '-fcompare-debug-second' '-gtoggle'
 /usr/lib64/gcc/x86_64-suse-linux/11/f951
gcc/testsuite/gfortran.dg/g77/pr9258.f -ffixed-form -quiet -dumpbase
pr9258.gk.f -dumpbase-ext .f -mtune=generic -march=x86-64 -gtoggle -O2 -w -w
-version -fcompare-debug=-gtoggle -ftracer -fPIC -fcompare-debug-second -o
/dev/null -fintrinsic-modules-path /usr/lib64/gcc/x86_64-suse-linux/11/finclude
-fpre-include=/usr/include/finclude/math-vector-fortran.h
-frandom-seed=0x56af55577b39fac1 -fdump-final-insns=pr9258.gk.f.gkd
GNU Fortran (SUSE Linux) version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6] (x86_64-suse-linux)
        compiled by GNU C version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6], GMP version 6.2.1, MPFR version
4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (SUSE Linux) version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6] (x86_64-suse-linux)
        compiled by GNU C version 11.2.1 20220316 [revision
6a1150d1524aeda3381b2171712e1a6611d441d6], GMP version 6.2.1, MPFR version
4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
gcc: note: comparing final insns dumps
gcc: error: gcc/testsuite/gfortran.dg/g77/pr9258.f: ‘-fcompare-debug’ failure

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-04-11  7:46 ` [Bug rtl-optimization/105203] " marxin at gcc dot gnu.org
@ 2022-04-20  8:36 ` jakub at gcc dot gnu.org
  2022-04-20 13:31 ` segher at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-20  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52837
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52837&action=edit
gcc12-pr105203.patch

Untested fix.
Other callers of mark_jump_label like mark_all_labels only call it on non-debug
insns, but this function calls it even for those.

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2022-04-20  8:36 ` [Bug debug/105203] " jakub at gcc dot gnu.org
@ 2022-04-20 13:31 ` segher at gcc dot gnu.org
  2022-04-21  7:44 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-20 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #6)
> @Segher: Have you tried running it on x86_64-linux-gnu?

No, only with crosscompilers.  This PR does not say it needs native.

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

* [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2022-04-20 13:31 ` segher at gcc dot gnu.org
@ 2022-04-21  7:44 ` cvs-commit at gcc dot gnu.org
  2022-04-21  7:47 ` [Bug debug/105203] [11 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-21  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:504b02c70abcc31e0e9b56e69f82f85b5261bca9

commit r12-8211-g504b02c70abcc31e0e9b56e69f82f85b5261bca9
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Apr 21 09:43:30 2022 +0200

    emit-rtl: Fix -fcompare-debug bug with label references in debug insns
[PR105203]

    When we compute LABEL_NUSES from scratch, mark_all_labels doesn't call
    mark_jump_label on DEBUG_INSNs:
                  if (NONDEBUG_INSN_P (insn))
                    mark_jump_label (PATTERN (insn), insn, 0);
    and so doesn't increment LABEL_NUSES from references in DEBUG_INSNs.
    But, when we call emit_copy_of_insn_after e.g. when duplicating some
    DEBUG_INSNs, we call it even on those, which then results in LABEL_NUSES
    differences and -fcompare-debug failures.

    The following patch makes sure we don't call it on DEBUG_INSNs.

    2022-04-21  Jakub Jelinek  <jakub@redhat.com>

            PR debug/105203
            * emit-rtl.cc (emit_copy_of_insn_after): Don't call mark_jump_label
            on DEBUG_INSNs.

            * gfortran.dg/g77/pr105203.f: New test.

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

* [Bug debug/105203] [11 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2022-04-21  7:44 ` cvs-commit at gcc dot gnu.org
@ 2022-04-21  7:47 ` jakub at gcc dot gnu.org
  2022-04-21  7:51 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-21  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12 Regression]          |[11 Regression]
                   |'-fcompare-debug' failure   |'-fcompare-debug' failure
                   |w/ -O2 -ftracer -fPIC since |w/ -O2 -ftracer -fPIC since
                   |r11-3078-g69ca5f3a988266da  |r11-3078-g69ca5f3a988266da

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.

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

* [Bug debug/105203] [11 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2022-04-21  7:47 ` [Bug debug/105203] [11 " jakub at gcc dot gnu.org
@ 2022-04-21  7:51 ` rguenth at gcc dot gnu.org
  2022-04-21  9:29 ` cvs-commit at gcc dot gnu.org
  2022-04-21  9:30 ` jakub at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.3                        |11.4

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.

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

* [Bug debug/105203] [11 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (10 preceding siblings ...)
  2022-04-21  7:51 ` rguenth at gcc dot gnu.org
@ 2022-04-21  9:29 ` cvs-commit at gcc dot gnu.org
  2022-04-21  9:30 ` jakub at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-21  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:141b66c4becfa2f2c09b4a6cc0411d995ea5153a

commit r11-9897-g141b66c4becfa2f2c09b4a6cc0411d995ea5153a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Apr 21 09:43:30 2022 +0200

    emit-rtl: Fix -fcompare-debug bug with label references in debug insns
[PR105203]

    When we compute LABEL_NUSES from scratch, mark_all_labels doesn't call
    mark_jump_label on DEBUG_INSNs:
                  if (NONDEBUG_INSN_P (insn))
                    mark_jump_label (PATTERN (insn), insn, 0);
    and so doesn't increment LABEL_NUSES from references in DEBUG_INSNs.
    But, when we call emit_copy_of_insn_after e.g. when duplicating some
    DEBUG_INSNs, we call it even on those, which then results in LABEL_NUSES
    differences and -fcompare-debug failures.

    The following patch makes sure we don't call it on DEBUG_INSNs.

    2022-04-21  Jakub Jelinek  <jakub@redhat.com>

            PR debug/105203
            * emit-rtl.c (emit_copy_of_insn_after): Don't call mark_jump_label
            on DEBUG_INSNs.

            * gfortran.dg/g77/pr105203.f: New test.

    (cherry picked from commit 504b02c70abcc31e0e9b56e69f82f85b5261bca9)

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

* [Bug debug/105203] [11 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da
  2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
                   ` (11 preceding siblings ...)
  2022-04-21  9:29 ` cvs-commit at gcc dot gnu.org
@ 2022-04-21  9:30 ` jakub at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-21  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.4 as well.

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

end of thread, other threads:[~2022-04-21  9:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08  9:59 [Bug debug/105203] New: '-fcompare-debug' failure w/ -O2 -ftracer -fPIC asolokha at gmx dot com
2022-04-08 12:04 ` [Bug debug/105203] [11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftracer -fPIC since r11-3078-g69ca5f3a988266da marxin at gcc dot gnu.org
2022-04-08 15:25 ` segher at gcc dot gnu.org
2022-04-08 15:44 ` segher at gcc dot gnu.org
2022-04-08 16:05 ` asolokha at gmx dot com
2022-04-08 16:20 ` segher at gcc dot gnu.org
2022-04-11  7:46 ` [Bug rtl-optimization/105203] " marxin at gcc dot gnu.org
2022-04-20  8:36 ` [Bug debug/105203] " jakub at gcc dot gnu.org
2022-04-20 13:31 ` segher at gcc dot gnu.org
2022-04-21  7:44 ` cvs-commit at gcc dot gnu.org
2022-04-21  7:47 ` [Bug debug/105203] [11 " jakub at gcc dot gnu.org
2022-04-21  7:51 ` rguenth at gcc dot gnu.org
2022-04-21  9:29 ` cvs-commit at gcc dot gnu.org
2022-04-21  9:30 ` 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).