http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53940
--- Comment #2 from Bil Kleb <Bil.Kleb at NASA dot gov> 2012-07-12 13:25:29 UTC
---
I guess I see the USE ONLY as similar to a declaration, and to have two of the
same declarations in a program is an error, e.g.,
$ cat duplicate_declaration.f90 << EOF
program duplicate_declaration
integer :: var
integer :: var ! should produce at least a warning?
var = 1
print*, var
end program
EOF
% gfortran duplicate_declaration.f90
duplicate_declaration.f90:3.16:
integer :: var ! should produce at least a warning?
1
Error: Symbol 'var' at (1) already has basic type of INTEGER
While the error is mostly harmless, we find it useful to know about to keep our
code clean.