[Bug fortran/14568] New: Gfortran should not warn about unused variables in common blocks
schnetter at aei dot mpg dot de
gcc-bugzilla@gcc.gnu.org
Sat Mar 13 10:23:00 GMT 2004
Gfortran should not warn about unused variables in common blocks. (Unless,
possibly, the whole common block is unused.) The following piece of code
shows the problem:
subroutine a
implicit none
integer b, c
common /block/ b, c
c = 1
end subroutine a
The compiler says
$ ~/gcc-3.5-tree-ssa/bin/gfortran -S unusedcommon.f90 -Wall
unusedcommon.f90: In function `a':
unusedcommon.f90:1: warning: unused variable `b'
My build is
$ ~/gcc-3.5-tree-ssa/bin/gfortran -v
Reading specs
from /home/eschnett/gcc-3.5-tree-ssa/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/specs
Configured with: ../gcc/configure --prefix=/home/eschnett/gcc-3.5-tree-ssa
--enable-languages=c,c++,f95
Thread model: posix
gcc version 3.5-tree-ssa 20040312 (merged 20040307)
--
Summary: Gfortran should not warn about unused variables in
common blocks
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14568
More information about the Gcc-bugs
mailing list