[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2021-07-22 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|---

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2021-07-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #17 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:b362d7947b37059fdb6de62145fa5146258dd58f commit r12-2475-gb362d7947b37059fdb6de62145fa5146258dd58f Author: Martin Sebor Date: Thu

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2020-01-14 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #16 from Leon Winter --- I just checked again with gcc 9.2.1 and the issue disappeared.

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-11 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #15 from Manuel López-Ibáñez --- (In reply to Leon Winter from comment #14) > I am not sure how smart he diagnostic of GCC is supposed to be it seems that > the source base of GCC itself has fallen victim to the false warning. -Wmayb

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-11 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #14 from Leon Winter --- I am not sure how smart he diagnostic of GCC is supposed to be it seems that the source base of GCC itself has fallen victim to the false warning. The following commit fixes a -Wmaybe-uninitialized warning: c

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-09 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #13 from Leon Winter --- The incorrect warning is only displayed when using an optimization level better than none (-O0) (this applies to your testcase and my real-world code). Your minimized test case is already wrongfully blamed by

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-03 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #12 from Leon Winter --- > Are you saying that GCC 4.9 does not warn? That would be surprising and a > regression. If you could find the revision that started warning, that would > be helpful. Funny you would ask, it turns out that o

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-03 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #11 from Leon Winter --- Created attachment 37855 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37855&action=edit Current test case gcc version 4.9.3 $ gcc -std=gnu99 -O1 -Wall -Wextra -o foo main.c $ gcc -std=gnu99 -O2 -Wal

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-03 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #10 from Manuel López-Ibáñez --- (In reply to Leon Winter from comment #9) > > If you declare it outside the loop body, gcc generates exactly the same code > > for a 'for' and a 'do-while'. > > You are right. When I did the testing,

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-03 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #9 from Leon Winter --- > If you declare it outside the loop body, gcc generates exactly the same code > for a 'for' and a 'do-while'. You are right. When I did the testing, I mistakenly left out "-O1" or such so I did not see the wa

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-02 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #8 from Manuel López-Ibáñez --- (In reply to Leon Winter from comment #7) > Maybe a better solution is to hint the compiler that the loop body will be > run at least once. A do-while seems to imply that (and the compiler does not > pr

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-02 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #7 from Leon Winter --- > #pragma GCC diagnostic ignored "-Wuninitialized" > > is your friend. We do like this warning and threat it as an error as such situations normally are a mistake which could lead to errors later on this swit

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #6 from Richard Biener --- I think the issue is that uninit doesn't even try to see whether the loop PHI node has its backedge always executed and that results in an always initialized PHI result. It's also not that easy as it doesn'

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2016-03-01 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 --- Comment #5 from Leon Winter --- Still persists.

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2015-11-23 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 Leon Winter changed: What|Removed |Added Version|5.0 |5.2.1 --- Comment #4 from Leon Winter ---

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2015-02-25 Thread winter-...@bfw-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 Leon Winter changed: What|Removed |Added Version|4.9.1 |5.0 --- Comment #3 from Leon Winter --- L

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2015-02-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 Richard Biener changed: What|Removed |Added Depends on||63278 --- Comment #2 from Richard Biene

[Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops

2015-02-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65178 Manuel López-Ibáñez changed: What|Removed |Added Keywords||diagnostic Status|UNCO