[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#894302: marked as done (g++-7: Compiler generates wrong code with warning options)



Your message dated Tue, 24 Mar 2020 21:39:38 +0000
with message-id <E1jGrGs-00071l-Ks@fasolo.debian.org>
and subject line Bug#923982: Removed package(s) from unstable
has caused the Debian Bug report #894302,
regarding g++-7: Compiler generates wrong code with warning options
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
894302: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894302
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: g++-7
Version: 7.3.0-12
Severity: important

This is an apparently impossible bug which nevertheless can be reliably
observed when using Debian versions of g++-7 and also i686-w64-mingw32-g++.
It consists in compiler generating different, and broken, code when
compiling the same input with only warning options -- which are, of course,
not supposed to affect the code generation at all -- added.

The upstream bug at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85091
contains several test cases. Using the one from
https://gcc.gnu.org/bugzilla/attachment.cgi?id=43774 it can be seen that
running

        g++-7 -S -std=c++17 -O2 gcc-7.3-x86_64-linux.cpp -o nowarn.s

and

        g++-7 -S -std=c++17 -O2 gcc-7.3-x86_64-linux.cpp -Wnonnull -Woverloaded-virtual -o warn.s

commands produces different assembly. Subsequently, Martin Liška has
created a further reduced test case which allows to reproduce the problem
using just "-O1 -Woverloaded-virtual", please see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85091#c31

The bug is really mysterious but quite worrisome, as it results in broken
code being silently generated in practice and, worse, the generated code
oscillates between correct and broken versions when any, even apparently
completely unrelated, changes are made. Another interesting detail is that
using -fchecking=2 makes the bug disappear (but -fchecking does not).

Finally, please note that the bug doesn't seem to happen with the upstream
versions nor with g++ 7.2 from Fedora, so it's highly likely that it's due
to one of the Debian-specific patches, even if I really can't see anything
that could explain it in any of them.

Thanks in advance for any help with this!

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'unstable-debug'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-0.bpo.1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages g++-7 depends on:
ii  gcc-7            7.3.0-12
ii  gcc-7-base       7.3.0-12
ii  libc6            2.27-2
ii  libgmp10         2:6.1.2+dfsg-3
ii  libisl19         0.19-1
ii  libmpc3          1.1.0-1
ii  libmpfr6         4.0.1-1
ii  libstdc++-7-dev  7.3.0-12
ii  zlib1g           1:1.2.8.dfsg-5

g++-7 recommends no packages.

Versions of packages g++-7 suggests:
pn  g++-7-multilib    <none>
pn  gcc-7-doc         <none>
pn  libstdc++6-7-dbg  <none>

-- no debconf information

Attachment: pgp5oHdeOBLOM.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 7.5.0-6+rm

Dear submitter,

as the package gcc-7 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/923982

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: