https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47307
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2017-12-30 00:00:00 |2021-4-9 CC| |msebor at gcc dot gnu.org --- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> --- The warning has disappeared at -O1 and above. The expected one for the uninitialized read from the lopt array is issued now but only at -O0. With optimization the read is eliminated. Given the large number of open bugs for -Wuninitialized (pr24639) I'm not sure it's worth keeping this open as well. $ gcc -O0 -S -Wall pr47307.f90 ../pr47307.f90:13:13: 13 | if ( lopt(j,i) < 0 ) then | ^ Warning: ‘lopt’ may be used uninitialized [-Wmaybe-uninitialized] ../pr47307.f90:8:34: 8 | integer, dimension(3,5) :: lopt | ^ note: ‘lopt’ declared here