19 Apr 1996
                        FORTRAN 77 4.0 

File: ... /READMEs/fortran_77

f77 4.0 runs on SPARC(TM) systems, in the Solaris(TM) 2.3 (and later) 
operating environment.

    Solaris 2.3 environment implies:

    o   SunOS(TM) 5.3 operating system
    o   OpenWindows(TM) 3.x application development platform

    Solaris 1.x or x86 Documentation

    Some features in the documentation are tagged `Solaris 1.x' or `x86'
    because some previous releases of f77 were ported to Solaris 1.x 
    and some were ported to Intel(R) 80386-compatible computers on 
    Solaris 2.x.

Table of Contents:

          A. New Features
          B. Software Incompatibilities
          C. Current Software Bugs
          D. Fixed Software Bugs
          E. Documentation Errata


A. New and Changed Features

   Note: The XView toolkit will not be supported in future releases of f77.

   f77 4.0 has the following features new or changed since 3.0/3.0.1:

   Directives

      The DOSERIAL and DOSERIAL* parallel directives have been added.
      See Appendix C iMPact: Multiple Processors, in the FORTRAN 77 4.0 
      User's Guide.
  
      A directive for unrolling loops has been added.
      See Section 2.9 Directives, in the FORTRAN 77 4.0 User's Guide.
  
   -I<dir>

      The -I<dir> option now also affects the f77 INCLUDE statement, 
      not only the preprocessor #include directive.

   Incremental Linker

      An Incremental Linker is available. It provides faster linking 
      and speeds up development. See -xildon.

   -stackvar

      The -stackvar restrictions EQUIVALENCE, NAMELIST, STRUCTURE, and
      RECORD have been removed. See -stackvar.

   DO-loops

      DO-loop code is now implemented differently to allow better 
      optimization and loop parallelization. Legal DO-loops behave exactly 
      the same as before. The following illegal DO loops may display a 
      different behavior:
        o   Zero step size
        o   Loop variable modified within the loop

   64-bit Integers

      Full 64-bit integers have been added with -dbl, integers not declared 
      with a specified size are turned into full 64-bit integers. See -dbl.

      Example: With -dbl, the statement 'INTEGER A' defines A as a 
               64-bit integer.  Without -dbl, A is a 32-bit integer.

      -dbl also turns default-size reals and logicals into 64-bit reals and 
      logicals. That is, with -dbl, the X in `LOGICAL X' is a 64-bit logical 
      and the Y in `REAL Y' is a 64-bit real.
  
      Also,with -dbl, the statement 'INTEGER*8 A' is allowed and A is 
      defined as a 64-bit integer. However, without -dbl, the statement 
      does not compile. Use of `INTEGER A' with -dbl is preferred over
      `INTEGER*8 A' as a way to obtain 64-bit integers.

   libV77 Routines

      The following libV77 library routines: date, mvbits, ran, and secnds,
      are now folded into the libF77 library. That is, you no longer need to
      compile with the -lV77 option to get these routines.

   OPEN

      The OPEN statement now contains a new keyword specifier, ACTION=<act>,
      where <act> is READ, WRITE, or READWRITE. See the description in the 
      chapter, "Statements," in the FORTRAN 77 4.0 Reference Manual.

   Performance Library

      The SunSoft Performance Library is available as a standalone library
      or with the High Performance Workshop. It is callable from f77 or f90.
   
      This is a library of optimized and parallelized subroutines and 
      functions to perform useful operations in computational linear algebra 
      and Fourier transforms.

      It is based on the standard libraries BLAS1, BLAS2, BLAS3, LINPACK,
      LAPACK, FFTPACK, and VFFTPACK.

      Each subprogram in the SunSoft Performance Library performs the same
      function and has the same interface as the standard version, but
      is generally much faster and sometimes more accurate.

   Faster I/O
   
      f77 I/O is now faster for coalesced, implied DO loops.

   Increased dbx Support for f77
   
      dbx now supports complex expressions, logical expressions, and
      all of the f77 intrinsic functions.

   New Directives

      C$PRAGMA SUN UNROLL=<n>  Unroll loops <n> times.
                   See Reference Manual, Chapter 1.
  
      C$PAR DOSERIAL       Exclude a loop from parallelization.
      C$PAR DOSERIAL*      Exclude whole nest of loops from 
                           parallelization.
  
      For MP directives, qualifiers, and scheduling types, see the User's 
      Guide, Appendix C.
  
      The DOALL directive has the following new optional qualifiers:

        PRIVATE, SHARED, MAXCPUS, READONLY, SAVELAST, STOREBACK,
        REDUCTION, and SCHEDTYPE

        The SCHEDTYPE qualifier of the DOALL directive has the following
        scheduling types available:

         STATIC, SELF[(n)], FACTORING[( m )],and GSS[( m )] 

      Cray-Style Directives

        MP directives are available in Cray-style. Cray-style 
        directives start with !MIC$, !mic$, *mic$, ..., such as:

        !MIC$ directive SHARED(varlist)
        !MIC$& PRIVATE(varlist)
        !MIC$& [optional qualifiers]

   Changed Options

         -G:      The -G option no longer automatically provides -pic and -ztext.

         -I<loc>: The -I<loc> option also affects the FORTRAN INCLUDE statement,
                  not only the preprocessor #include directive.

         -O5:     -O[n] now has five levels of optimization, up to -O5.

         -xl:     The -xl option continues to be valid; however, it is now a 
                  macro that is translated to the option, -vax=misalign.
                  Not specifying -vax=misalign is equivalent to -vax=no.

         You can now use -vax=align to instruct the compiler to use the 
         pre-release-3.0 -xl behavior.

   New Options

      -arg=local
          Pass by value result.
  
      -copyargs
          Allow assignment to constant arguments.
  
      -dbl
          Double the default size for integers, reals, logicals,...
  
      -ext_names=<e>
          Make external names with or without underscores.
  
      -fns
          Turn on the SPARC non-standard floating-point mode.
  
      -fround=<r>
          Set the IEEE rounding mode in effect at startup.
  
      -fsimple[=n]
          Allow levels of simple floating-point model.
  
      -ftrap=<t>
          Set the IEEE trapping mode in effect at startup.
  
      -mp=<x>
          Specify which style of MP directives. 
          <x> must be cray or sun. The default is sun.
  
      -O5
          Attempt the highest level of optimization.
  
      -pad=<p>
          Pad local variables or common blocks, or both, for efficient 
          use of cache.
  
      -vax=v
          Specify a choice of VMS features to use.
  
      -xarch=<a>
          Limit the set of instructions the compiler may use.
  
      -xcache=<c>
          Define the cache properties for use by the optimizer.
  
      -xchip=<c>
          Specify the target processor for use by the optimizer.
  
      -xhelp=h
          Show help information for README file or for options (flags).
  
      -xildoff 
          Turn off the Incremental Linker.
  
      -xildon 
          Turn on the Incremental Linker.
  
      -xprofile=<p>
          Collect data for a profile or use a profile to optimize.
  
      -xregs=<r>
          Specify the usage of registers for the generated code.
  
      -xsafe=mem
          Allow the compiler to assume no memory-based traps occur.
  
      -xspace
          Do no optimizations that increase the code size.
  
      -xtarget=<t>
          Specify target system for instruction set and optimization.
  
      -ztext
          Do not make the library if relocations remain.
  
      Synonyms
          The following new synonym options have been added: 
  
          -xautopar, -xdepend, -xexplicitpar, -xloopinfo, -xparallel, 
          -xreduction, and -xvpara.
  
         For details, see the f77(1) man page or the FORTRAN 77 4.0 
         User's Guide.

 
   Shippable Libraries

      A new subsection, "Shippable Libraries," has been added to Chapter 6,
      "Libraries," of the FORTRAN 77 4.0 User's Guide, that explains which 
      Sun dynamic libraries you can redistribute to your customer.


B. Software Incompatibilities

   Libraries

       If you compile with f77 4.0, you can link only with the 4.0 Sun libraries,
       not with earlier versions. Programs already compiled with f77 3.0.1 can
       also link with the 4.0 libraries.

   I/O in Mixed F77/F90 Programs

       Fortran 90 and FORTRAN 77 use different I/O libraries. However,
       this should be transparent to the user. That is, programs can do I/O
       to the same unit from both the Fortran 90 and FORTRAN 77 parts of
       the code.

       Caveat: I/O compatibility requires that FORTRAN 77 4.0 programs
        be linked with programs compiled with Fortran 90 1.1. FORTRAN 77 4.0 
        I/O is only compatible with FORTRAN 90 1.1, and not f90 1.0 .


C. Current Software Bugs

   There is no new information at this time.   

D. Fixed Software Bugs

	The following bugs are fixed in the 4.0 release.

bug ID      Synopsis
======      ========
1160825     f77pass0 ERR should not halt compilation if f77pass1 would have succeeded
1158471     abrupt_underflow not known to verifier
1166345     f77pass0 returns redundant warnings 
1166351     f77pass0 internal error results in empty .lst file
1166358     gives incorrect error messages for ef1asc 
1166522     f77 -C -Xlistv3 produced a misleading message
1173471     f77pass0 produces the incorrect warning 
1173474     f77pass0 internal error
1173476     f77pass0 internal error
1173494     Three of warnings are missing for entry
1173496     Missing warning #415 
1173498     f77pass0 internal error for duplicate program and function 
1183399     we get "modify" and defined confused in block data
1183798     fails to note dangerous loop 
1176058     -Xlist with equivalence can cause output loop 
1169899     use of undefined variables ought to be an error -u 
1198858     cycling of f77pass0 for incorrect program 
1199841     VERIFICATION FAILED error with F77 and xref 
1200691     bad output for option -Xlisth
1043673     Logical constant .true. not passed to logical*1 dummy argument
1140032     Compilation aborted when logical variable used as argument 
1060661     Q edit descriptor does not work correctly with pipes
1052342     -u option did not catch incorrect use of a variable
1071442     "ld Undefined symbol ARR_SEG1" error occurred by large dimension
1092520     Fortran will give a segmentation fault during compile if "or" typed w/ zero
1095252     ld Undefined symbol __cbrt (make cbrt intrinsic)
1158079     sind function generates incorrect output
1149592     Bad IR being generated by f77pass1 causes cg to die (VFE)
1125791     Fix CALL(FOO,(BAR)) bug    (expressions) handled badly
1153338     Record of structure with double not aligned on double boundary
1034765     Can't read into a byte variable from file  
1090641     Compiler may segment fault with -u and statement function 
1089167     Fix CALL(FOO,(BAR)) bug 
1159743     Compiler generates sra for LRSHFT intrinsic
1033476     Read of a namelist with logical variable results always false 
1071290     write/read hex data is broken 
1061678     floating exception during constant evaluation generated when pointers used 
1154791     Assertion failure when compiled with -u 
1036929     Formatted I/O performance and rewrite VFEs 
1149356     Formatted I/O    read gives no error with bad float data 
1149559     Multiple entry point procedures 
1148293     Rewrite VFE compiler generates error message on legal vfe
1149564     VFE optimize vfe's gets core dump during runtime 
1064682     Compiler falls in infinite loop on a recursive statement function
1116116     Reading internal files with real*8 and octal/hexadecimal format
1148751     etime() function can cause process file descriptors to be exha
1147635     Confusing error messages about character*(*) function 
1129219     Nested struct with initialized array fails, impossible tag bad
1042420     Format conversion error reading floating pt from strings start
1127753     Unreferenced equivalenced variable is sometimes missing its stabs
1082062     t-format does not work with form=print
1145329     Need to give better warning messages for parallel compilations
1133653     Programs with line numbers greater than 64K can not be debug
1076629     Make Formats conform to ANSI standard
1153196     Bad stabs so dbx generates incorrect evaluation of datatype 
1097563     -ansi does not detect gotos into loops 
1031594     Z Format fails for character* 
1081198     Incorrect trip count
1093870     Unused variable allocated storage but no debug info, no warning
1130406     Fix functions with character arguments 
1061921     jump to endif statement issues warning (FCVS impact)
1144711     Tape IO when read data of 64K or over, dumps core "read sue: [22] Invalid argument"
1152969     Error incompatible type declaration for "xx" 
1066421     Tape IO IOT trap (core dumped) when writing sequential unform
1114617     err=iostat ignored for bad format 
1127093     Boundless variables in DIMENSION statements
1069904     Tape IO write() for 1/2" and 8mm tapes fails with Fortran 1.4
1076699     VMS intrinsic jidint returns integer it should return int*4 
1038650     Warning data value too large for most negative integer -2147 
1158283     #include generates line numbering thrown off with -sb flag 
1120471     For source starting with #include, sbquery confuses header 
1120060     No bd file created if source has #include near end  
1042700     -xl opens with blank='null' instead of vms default  blank='zero'
1086732     INQUIRE doesn't examine files correctly..   
1047544     recursive entry point problem 
1173462     f77pass1 return illegal warning
1173463     f77pass1 internal error
1173466     f77pass1 Segmentation Fault 
1177381     new libF77 incompatible with old object files using fileopt=  
1178425     addr of array field in array of structures containing arrays p
1171264     Fortran compiler needs loooooong time to compile
1138412     f77 -stackvar gives "bad storage class in equiv.."  for arrays
1154125     Fortran generates incorrect and incomplete stabs info
1155345     alice in /valid fails with -O 
1160800     Two successive calls taking a trig functional parameter aborts
1162382     -g  complains about undefined symbols during the loading phase
1029369     FORTRAN has problems reading from NAMED PIPES  
1176555     no repeatable edit descriptor    [1000] error in format
1177598     i = char( c(j:j) ) fails in cg when optimized
1177710     namelist i/o breaks when -O is used 
1169354     Formatted input does not always spot errors in input.
1175650     parentheses are not sacred to f77pass1
1175935     fortran compiler loops indefinitely with many equivalent stmts.
1178228     f77 compiler option -i2 truncates pointers
1178885     f77 generates ELF FUNC symbols with negative size!
1179108     open/error "hangs" in MP program
1182514     Constants are not being converted to the correct precision before folding
1183273     f77 doesn't permit automatic variables to be equivalenced
1183540     -xl with -O -O2 -O3 -O4  treats logical*4  4 byte variables as misaligned
1176600     INCLUDE search path omits documented /opt/SUNWspro/SC*.*/include
1177713     unbalanced quotes causes f77pass1 Segmentation Fault
1180772     b(a(1)) no longer allowed adjustable array confusion 
1185383     binaries do not link  with some at no opt and some at -O1
1186005     Fortran dumps core when using -autopar option 
1187996     INQUIRE statement not compatible between 3.0.1 and 4.0 libraries
1188996     f77pass1 uses any -I substring as INCLUDE statement modifier
1189660     quad zero always gets displayed with exponent width 2 no matte
1189898     c$par bcs and c$par ecs are not directives 
1190666     F77 compiler aborting with DATA,EQUIVALENCE statement in cg386
1179751     private03 Seg faults at -O3 -parallel
1176554     explicit exponent width ignored when printing out 0.Q0
1172497     Nested structure field address wrong when substructure name is omitted
1168868     JINT does not return correct value with -i2 option on  SPARCompiler2.0.1 on Solaris2.3
1170291     compilation of barroll test from /valid (routine fem) fails 
1192653     loopinfo (baffle) data structures not initialized correctly
1194323     Pass-by-value-result does not work, causes compiler error
1195096     "y.f", line 57 Warning unmatched directive "doall" not understandable
1196044     Backward-running loop doesn't work 
1196295     dflmin behaves differently between solaris 2.x and solaris 1.x
1196658     Bad SunIR for by-value struct 
1196915     f77pass1 does not put the right procname for multiple entrypoint routines
1196973     Bad result using ISHFT on an integer*2 with an integer
1194257     Fortran qabs mishandles -0 
1197689     list-directed read of internal file that is character constant core dumps
1199586     changed memory orders from f77pass1 causes 047.tomcatv slow down
1199660     Q edit descriptor does not work correctly when no characters are input
1200417     pragma unroll doesn not set the appropriate field in loopinfo 
1200747     Address stored in '__entry' variable is wrong.

E. Documentation Errata

   FORTRAN 77 User's Guide (802-2997-10):
     p55: The Solaris 2.x path to include files indicated in Table 2-14
          should read: SC4.0 and not SC3.0.1 .
     p91: Table 2-17 of -xtarget expansions should read ultra2 and not
          ultra1 for the last three entries:
              ultra1/1170  should read  ultra2/1170
              ultra1/2170  should read  ultra2/2170
              ultra1/2220  should read  ultra2/2220

   f77 man page:
     The last three entries in the list of accepted -xtarget system names
     should read ultra2 and not ultra1, as shown above.

____________________________________________________________________________

Solaris, SunOS, and OpenWindows are trademarks or registered trademarks
of Sun Microsystems, Inc.  All SPARC trademarks, including the SCD Compliant
Logo, are trademarks or registered trademarks of SPARC International, Inc.

AnswerBook is a registered trademark of Sun Microsystems, Inc.

Intel is a registered trademark of Intel Corporation.


Last Date Changed 09/29/95
