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 via email to