[Bug fortran/87606] New: Wrong array reference out of bounds warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87606 Bug ID: 87606 Summary: Wrong array reference out of bounds warning Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: AstroFloyd at gmail dot com Target Milestone: --- The following Fortran program (minimum working example) gives an erroneous array reference out of bounds warning: program test implicit none integer :: i,iarr(10) do i=1,10 if(i.gt.1) iarr(i-1) = i end do end program test $ gfortran -Wdo-subscript test.f90 -o test test.f90:5:21: do i=1,10 2 if(i.gt.1) iarr(i-1) = i 1 Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
[Bug fortran/57127] New: gfortran gives unintended warning on uninitialized optional dummy array of undetermined size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57127 Bug #: 57127 Summary: gfortran gives unintended warning on uninitialized optional dummy array of undetermined size Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: astrofl...@gmail.com Created attachment 29985 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29985 Source file example.f90 used in the example in the bug report gfortran-4.7.2 -O1 -Wall gives unintended warning about uninitialized array elements when a routine is called with an optional dummy array of undetermined size (example.f90 is attached below): $ gfortran -O1 -Wall example.f90 -o example ./example example.f90: In function ‘example_routine’: example.f90:8:0: warning: ‘array.0’ may be used uninitialized in this function [-Wmaybe-uninitialized] Expected behaviour: no warning message. The warning goes away when: * -O0 is used rather than -O1 or higher * -Wall is replaced by -Wmaybe-uninitialized * the line write(op,'(A)') 'foo' is commented out
[Bug fortran/57127] gfortran gives unintended warning on uninitialized optional dummy array of undetermined size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57127 --- Comment #2 from AstroFloyd AstroFloyd at gmail dot com 2013-04-30 20:57:55 UTC --- Hmmm, this looks very strongly like http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 but is not identical(?)
[Bug fortran/55352] Erroneous gfortran warning of unused module variable when variable is only used in namelist
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55352 --- Comment #5 from AstroFloyd AstroFloyd at gmail dot com 2012-11-18 17:53:36 UTC --- Created attachment 28726 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28726 My adaptation of the patch in #3 This solves the problem for me, thank you very much - I'm impressed by your quick and competent work :-) Somehow, your patch didn't work in my Gentoo version; I applied your changes manually and created the attached patch, which can be added to the Gentoo ebuild for sys-devel/gcc-4.7.2.
[Bug fortran/55352] New: Erroneous gfortran warning of unused module variable when variable is only used in namelist
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55352 Bug #: 55352 Summary: Erroneous gfortran warning of unused module variable when variable is only used in namelist Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: astrofl...@gmail.com Created attachment 28709 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28709 Minimal example source code gfortran-4.7.2 -Wall gives a warning about unused module variables when those variables are only used in a namelist. Test: compile the attached minimal example source file test.f90 with: gfortran -v -Wall -Werror test.f90 -o test The following warning is printed: test.f90:14.6: use data, only: a 1 Warning: Unused module variable 'a' which has been explicitly imported at (1) The warning goes away when print*,a is uncommented in line 20. Verbose output is in the attached file compile_output.txt Get: warning about unused module variable Expect: no warning Reproduceable: always gfortran version: gcc version 4.7.2 (Gentoo 4.7.2 p1.3, pie-0.5.5)
[Bug fortran/55352] Erroneous gfortran warning of unused module variable when variable is only used in namelist
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55352 --- Comment #1 from AstroFloyd AstroFloyd at gmail dot com 2012-11-16 13:43:25 UTC --- Created attachment 28710 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28710 Verbose output from compilation of example source file