[Bug fortran/58100] Spurious DO loop at (1) will be executed zero times warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 Thomas Koenig tkoenig at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #6 from Thomas Koenig tkoenig at gcc dot gnu.org --- So, let's close this as WONTFIX (because moving dead code elimination into the front end will not happen anytime soon - unless somebody volunteers, of course ;-)
[Bug fortran/58100] Spurious DO loop at (1) will be executed zero times warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 --- Comment #5 from Roland Kaufmann roland.kaufmann at uni dot no --- (In reply to Tobias Burnus from comment #3) Roland: Is the new warning option -W(no-)zerotrip sufficient for you? As a general principle: I believe that the compiler should not issue any warnings if run without options on correct code. If you are compiling code you didn't write yourself, on a new architecture, then every warning should be a flag for further checking. Having spurious warnings erodes this and increases the likelihood of real problems being drowned, because no-one pays attention anymore. That said, I perfectly understand the problem of separating the various compiler stages and Fortran is not the easiest language to do static analysis for either. It seems from r201658 of resolve.c it will not surface with no option anymore, surface with -Wall and disappear again with -Wall -Wno-zerotrip, so that'll have to be good enough.
[Bug fortran/58100] Spurious DO loop at (1) will be executed zero times warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 --- Comment #4 from Thomas Koenig tkoenig at gcc dot gnu.org --- In principle, we could also introduce a !GCC$ NOWARN directive, which could suppress all warnings on the following statement. I'm not volunteering, though :-)
[Bug fortran/58100] Spurious DO loop at (1) will be executed zero times warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #1) Still present after r201658 (pr5, after it -Wall is needed). With that patch, -W(no-)zerotrip permits to toggle the warning, which I think it sufficient. Everything else requires more analysis (e.g. the if's else branch is never executed in this case), which I believe is not worthwhile. Roland: Is the new warning option -W(no-)zerotrip sufficient for you? (Side remark: there are conflicts with early optimization: For debugging, no folding/simplification should be done by front-ends. On the other hand, some simplification is useful - and the ME is too late for it.]
[Bug fortran/58100] Spurious DO loop at (1) will be executed zero times warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 Thomas Koenig tkoenig at gcc dot gnu.org changed: What|Removed |Added CC||tkoenig at gcc dot gnu.org --- Comment #2 from Thomas Koenig tkoenig at gcc dot gnu.org --- To fix this would require folding of the IF in the front end, something that we rely on the middle end to do.
[Bug fortran/58100] Spurious DO loop at (1) will be executed zero times warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 Dominique d'Humieres dominiq at lps dot ens.fr changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-08-13 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr --- Still present after r201658 (pr5, after it -Wall is needed).