------- Comment #5 from dfranke at gcc dot gnu dot org 2007-06-16 21:08 ------- Erik, how did you prepare the attached file? I think I have an idea what's wrong:
Let there be "foo.inc", "bar.inc" and "pr24965.F90". The latter contains: #include "foo.inc" ! integer :: foo #include "foo.inc" ! integer :: foo #include "bar.inc" ! integer :: bar end Now running cpp and gfortran: $> cpp-svn pr24965.F90 > pr24965.f90 $> gfortran-svn -g -Wall pr24965.f90 foo.inc:1.14: Included at pr24965.F90:2: integer :: foo 1 Error: Symbol 'foo' at (1) already has basic type of INTEGER Which is the correct error message. The preprocessor lines in your file have the format '# n "filename"' where n seems to be a line number. The lines generated by my approach have the format '# n "filename" m' where m appears to be a nesting level. Removing 'm' from any lines results in the reported problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965