Compiling the fixed format file flop.f (source see below) with the command
line
gfortran -v -save-temps flop.f >& flop.log
resulted in an syntax error message in the comparison of two character
strings. I think this statement is correct though (I agree implicit typing is
ugly but some parts of the code I work on are 35 years old).
=== begin source flop.f ===
program flop
implicit character*8 (z)
read(*,*) zscftp
if (zscftp(1:3).eq.'uhf') then
write(*,*)'open shell'
else
write(*,*)'closed shell'
endif
end
=== end source flop.f ===
=== begin compiler output flop.log ===
Driving: gfortran -v -save-temps flop.f -lgfortranbegin -lgfortran -lm
-shared-libgcc
Using built-in specs.
Target: i386-linux
Configured with: ../gcc/configure --prefix=/tmp/gfortran-20050611/irun
--enable-languages=c,f95 --host=i386-linux
Thread model: posix
gcc version 4.1.0 20050611 (experimental)
/home/hvd/GnuFortran/irun/bin/../libexec/gcc/i386-linux/4.1.0/f951 flop.f
-ffixed-form -quiet -dumpbase flop.f -auxbase flop -version -o flop.s
GNU F95 version 4.1.0 20050611 (experimental) (i386-linux)
compiled by GNU C version 3.3.5 (Debian 1:3.3.5-13).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
In file flop.f:4
if (zscftp(1:3).eq.'uhf') then
1
Error: Syntax error in IF-expression at (1)
In file flop.f:6
else
1
Error: Unexpected ELSE statement at (1)
In file flop.f:8
endif
1
Error: Expecting END PROGRAM statement at (1)
=== end compiler output flop.log ===
--
Summary: Problem with sub-string operator and implicitly typed
character variables
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: h dot j dot j dot vandam at dl dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: gcc version 4.1.0 20050611 (experimental)
GCC host triplet: i386-linux
GCC target triplet: i386-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22048