[Bug tree-optimization/59970] Bogus Wuninitialized warnings at low optimization levels

2021-03-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970

--- Comment #8 from CVS Commits  ---
The master branch has been updated by Martin Sebor :

https://gcc.gnu.org/g:980b12cc81979e52f491bf0dfe961d30c07fe864

commit r11-7869-g980b12cc81979e52f491bf0dfe961d30c07fe864
Author: Martin Sebor 
Date:   Fri Mar 26 16:37:34 2021 -0600

PR tree-optimization/59970 - Bogus -Wmaybe-uninitialized at low
optimization levels

PR tree-optimization/59970
* gcc.dg/uninit-pr59970.c: New test.

[Bug tree-optimization/59970] Bogus Wuninitialized warnings at low optimization levels

2021-03-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970

Martin Sebor  changed:

   What|Removed |Added

   Target Milestone|--- |7.0
 CC||msebor at gcc dot gnu.org
  Known to fail||4.8.4, 4.9.4, 5.5.0, 6.4.0
   Keywords||diagnostic
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Martin Sebor  ---
The test case in comment #0 is not diagnosed anymore.  Bisection points to
r240221 as the fix.  Ditto for attachment 35384 from comment #3.  Let me add
the one from attachment 31970 to the test suite and resolve this as fixed.

[Bug tree-optimization/59970] Bogus Wuninitialized warnings at low optimization levels

2017-01-26 Thread eyalroz at technion dot ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970

Eyal Rozenberg  changed:

   What|Removed |Added

 CC||eyalroz at technion dot ac.il

--- Comment #6 from Eyal Rozenberg  ---
Chiming in after having noticed this issue with GCC 5.4.0 20160609 on Linux
MInt 18.1 with Boost 1.58.0 (using lexical_cast). Quite annoying...

[Bug tree-optimization/59970] Bogus Wuninitialized warnings at low optimization levels

2016-09-03 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org
Summary|Bogus warnings at low   |Bogus Wuninitialized
   |optimization levels |warnings at low
   ||optimization levels

--- Comment #5 from Manuel López-Ibáñez  ---
(In reply to Thomas Schwinge from comment #0)
> It does seem appropriate to me for GCC not to do such tracking at low
> optimization levels, but then the uninitialized warning should also be
> disabled (which I assume is happening for -O0?) to avoid false positive
> warnings.

It doesn't work like that. The uninit pass sees the code as transformed by
other optimization passes, thus what the uninit pass sees depends not on a
particular level but on the passes enabled, their order and their effect on the
given code. Higher levels do not always mean better uninit warnings, either.
Nonetheless, it would be useful to identify which passes do more good than harm
for uninit (probably VRP) and enable those at lower levels somehow or even in
some limited form in the FEs.