From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.17-14 i686; en-US; Galeon) Gecko/20010129 g77 from gcc-g77-2.96-75 ignores fortran variable declarations when interleaved with #line cpp generated constructions. Reproducible: Always Steps to Reproduce: 1. g77 f.f where f.f is the attached program. It is enough to remove cpp-generated #line directives from the code to make the program compile Actual Results: ../tmp.F:3: ANTI = .FALSE. 1 2 Type disagreement between expressions at (1) and (2) Expected Results: Silient, error-free compilation.
Created attachment 12983 [details] t.f
This has been broken also e.g. in egcs 1.1.2, gcc 2.95.x, gcc-3_0-branch and gcc-3_1-branch. Anyway, I've fixed this in: http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01512.html and the fix will appear in the next gcc-f77 build.
The fix is in gcc-g77-2.96-80.