Path: utzoo!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.fortran Subject: Fortran compiler test Keywords: fortran Message-ID: <1990Oct18.160412.8187@virtech.uucp> Date: 18 Oct 90 16:04:12 GMT Organization: Virtual Technologies Inc. Lines: 107 I am trying to tally which fortran compilers provide a compatibility with the fortran compiler delivered with masscomp systems (which is reputed to provide compatibility with the AT&T compiler). The problem area is that if we open a file with a record length of 1 the at&t compiler then will read as much data as necessary to solve the read argument list. If you have the time (it only takes a couple of minutes) pleas run the attached test & email the results to me. I will post a summary if desired. I have run the test on the following compilers: HP/UX f77, NDP Fortran, and LPI Fortran All of which failed. Thanks in advance. (To run the test, unshar the rest of this posting and run "runtest.sh") #!/bin/sh # This is a shell archive (shar 3.21) # made 10/12/1990 18:51 UTC by cpcahil@virtech # # existing files WILL be overwritten # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 425 -rw-r--r-- testio.f # 306 -rwxr-xr-x runtest.sh # if touch 2>&1 | fgrep '[-amc]' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= testio.f ============== echo "x - extracting testio.f (Text)" sed 's/^X//' << 'SHAR_EOF' > testio.f && X CHARACTER STRING*8,FNAME*12 X FNAME='wada' X OPEN(1,FILE=FNAME,RECL=1,ACCESS='direct',FORM='unformatted') X NREC=1 X READ(1,REC=NREC)STRING X IF(STRING.EQ.'!\n')THEN X WRITE(6,100)FNAME,STRING X ELSE X WRITE(6,101)FNAME,STRING X ENDIF X STOP X 100 FORMAT(' FILE=',A12,' is an archive; STRING=',A8) X 101 FORMAT(' FILE=',A12,' is not an archive; STRING=',A8) X END SHAR_EOF $TOUCH -am 1012143690 testio.f && chmod 0644 testio.f || echo "restore of testio.f failed" set `wc -c testio.f`;Wc_c=$1 if test "$Wc_c" != "425"; then echo original size 425, current size $Wc_c fi # ============= runtest.sh ============== echo "x - extracting runtest.sh (Text)" sed 's/^X//' << 'SHAR_EOF' > runtest.sh && X X# X# compile the program X# Xf77 testio.f -o testio X X# X# generate data file to be read X# Xecho banana > junk Xar r wada junk X X# X# run the test X# Xresult="`./testio | grep 'is an'`" X Xif [ ! -z "$result" ]; then X echo TEST was successful Xelse X echo TEST failed Xfi X X# X# clean up X# Xrm -f junk wada testio.o testio X SHAR_EOF $TOUCH -am 1012145190 runtest.sh && chmod 0755 runtest.sh || echo "restore of runtest.sh failed" set `wc -c runtest.sh`;Wc_c=$1 if test "$Wc_c" != "306"; then echo original size 306, current size $Wc_c fi exit 0 -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170