[Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious may be used uninitialized warning for check of optional argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org --- Indeed, this regressed with r182211.
[Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious may be used uninitialized warning for check of optional argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org --- Until we get more fine-grained warning control, I believe the only way to fix this is make sure TREE_NO_WARNING is set on Fortran optional argument related variables (not just the data pointer (b.0 here), but I think the others too (bounds, size, ...).
[Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious may be used uninitialized warning for check of optional argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 --- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org --- Created attachment 32107 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32107action=edit gcc49-pr52370.patch So, how about this patch?
[Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious may be used uninitialized warning for check of optional argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 --- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org --- Author: jakub Date: Tue Feb 11 20:48:26 2014 New Revision: 207698 URL: http://gcc.gnu.org/viewcvs?rev=207698root=gccview=rev Log: PR fortran/52370 * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING on decl if sym-attr.optional. * gfortran.dg/pr52370.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr52370.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious may be used uninitialized warning for check of optional argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.7.4
[Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious may be used uninitialized warning for check of optional argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 Dominique d'Humieres dominiq at lps dot ens.fr changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-12-14 Summary|Spurious may be used |[4.7/4.8/4.9 Regression] |uninitialized warning for |Spurious may be used |check of optional argument |uninitialized warning for ||check of optional argument Ever confirmed|0 |1 --- Comment #4 from Dominique d'Humieres dominiq at lps dot ens.fr --- I get the warning with 4.6.4 up to trunk (r205944), but not for 4.5.4. The change occurred between revisions r182107 (2011-12-08) and r182980 (2012-01-07). That the warning only shows up in 4.7 but not in 4.7.2 is probably due to the patch for PR 50923. (The warning is only printed for -O1 but not for -O2 or -O0.) The fix for PR 50923 is in the above range.