public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gnu at gonsoe dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/99689] Initialized local variable becomes uninitialized after use
Date: Tue, 23 Mar 2021 01:52:47 +0000	[thread overview]
Message-ID: <bug-99689-4-QI00xFAoRK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99689-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Soren Soe <gnu at gonsoe dot com> ---
I should maybe mention that the same problem is reproducible using qemu-aarch64
and qemu-aarch64-static on an x86_64 host.

% aarch64-linux-gnu-g++ -O3 -static bug.cpp
% qemu-aarch64-static ./a.out 
a.out: bug.cpp:78: void bad(): Assertion `m == 3' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted (core dumped)

Works fine with -O2 or the size_t variant I mentioned.

% aarch64-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/aarch64-linux-gnu/9/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,gm2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-9 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --without-target-system-zlib
--enable-libpth-m2 --enable-multiarch --enable-fix-cortex-a53-843419
--disable-werror --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=aarch64-linux-gnu
--program-prefix=aarch64-linux-gnu- --includedir=/usr/aarch64-linux-gnu/include
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

  parent reply	other threads:[~2021-03-23  1:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-20 20:11 [Bug c++/99689] New: " soren.soe at gonsoe dot com
2021-03-20 20:11 ` [Bug c++/99689] " soren.soe at gonsoe dot com
2021-03-20 20:46 ` [Bug middle-end/99689] " pinskia at gcc dot gnu.org
2021-03-22  8:11 ` marxin at gcc dot gnu.org
2021-03-22  8:17 ` jakub at gcc dot gnu.org
2021-03-22 19:42 ` gnu at gonsoe dot com
2021-03-23  1:52 ` gnu at gonsoe dot com [this message]
2024-02-28  7:26 ` pinskia at gcc dot gnu.org
2024-02-28  7:51 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99689-4-QI00xFAoRK@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).