public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/97840] [11 regression] Bogus -Wmaybe-uninitialized
Date: Sun, 15 Nov 2020 17:15:59 +0000	[thread overview]
Message-ID: <bug-97840-4-1uzs1MfHAz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97840-4@http.gcc.gnu.org/bugzilla/>

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-11-15
             Status|UNCONFIRMED                 |NEW
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Confirmed. Reproduces on aarch64 cross for me, not on x86-64 native.

Warning is on:
#1  0x0000000001343ad5 in maybe_warn_pass_by_reference (stmt=0x7ffff32ec558,
wlims=...) at ../../gcc/tree-ssa-uninit.c:530
530           tree argbase = maybe_warn_operand (ref, stmt, NULL_TREE, arg,
wlims);
(gdb) down
#0  maybe_warn_operand (ref=..., stmt=0x7ffff32ec558, lhs=0x0,
rhs=0x7ffff55b93f0, wlims=...) at ../../gcc/tree-ssa-uninit.c:434
434         warned = warning_at (location, OPT_Wmaybe_uninitialized,
(gdb) p debug_generic_stmt (rhs)
D.89878

std::filesystem::__cxx11::recursive_directory_iterator::pop (struct
recursive_directory_iterator * const this)
{                                                                               
  struct error_code ec;                                                         
  struct allocator D.89878;                                                     
....
  std::__cxx11::basic_string<char>::basic_string<> (&D.89879, iftmp.99_1,
&D.89878);
....
  D.89878 ={v} {CLOBBER};                                                       
....

and is otherwise unused.

Function looks identical with -fno-ipa-modref.

std::__cxx11::basic_string<char>::basic_string<> is defined locally and the
last parameter (__a) is unused.

modref determines flags 

parm 2 flags: direct noclobber noescape unused

That seems all OK to me, so it seems that somehow uninit pass gets more active
because of different alias info.

  reply	other threads:[~2020-11-15 17:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 16:14 [Bug middle-end/97840] New: " schwab@linux-m68k.org
2020-11-15 17:15 ` hubicka at gcc dot gnu.org [this message]
2020-11-15 17:31 ` [Bug middle-end/97840] " hubicka at gcc dot gnu.org
2020-11-15 17:57 ` hubicka at gcc dot gnu.org
2020-11-15 18:03 ` hubicka at gcc dot gnu.org
2020-11-16  1:22 ` msebor at gcc dot gnu.org
2020-11-16  7:27 ` rguenth at gcc dot gnu.org
2020-11-16  7:34 ` hubicka at gcc dot gnu.org
2020-11-16 15:32 ` cvs-commit at gcc dot gnu.org
2020-11-16 16:43 ` schwab@linux-m68k.org
2020-11-16 18:18 ` hubicka at gcc dot gnu.org
2020-11-16 20:11 ` jakub at gcc dot gnu.org
2020-11-16 20:18   ` Jan Hubicka
2020-11-16 20:18 ` hubicka at ucw dot cz
2020-11-16 20:30 ` jakub at gcc dot gnu.org
2020-11-16 20:37   ` Jan Hubicka
2020-11-16 20:37 ` hubicka at ucw dot cz
2020-11-16 21:54 ` msebor at gcc dot gnu.org
2020-11-16 22:01   ` Jan Hubicka
2020-11-16 22:01 ` hubicka at ucw dot cz
2020-11-17  3:02 ` cvs-commit at gcc dot gnu.org
2020-11-24  0:35 ` msebor 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-97840-4-1uzs1MfHAz@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).