Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ftn.v.10.7.pmx__notes() — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought









                        Domain FORTRAN Software Release Document

                    Versions 10.7.p, 10.7.pmx, 10.7.m, and 10.7.mpx

                                    August 21, 1989

     This  document  describes  the  features  of  Domain  FORTRAN  that are new in
     Version 10.7.  It supplements the Domain__FORTRAN__Language__Reference__Manual
     (000530-A00)  and  all  other  Domain  FORTRAN  release documents issued since
     SR10.




                                Restricted Rights Notice

     Use, duplication, or disclosure by the Government is subject  to  restrictions
     as  set  forth  in  subparagraph (c) (1) (ii) of the Rights in Technical  Data
     and Computer Software clause at DFARS 52.227-7013.

                                  Apollo Computer Inc.
                                   330 Billerica Road
                                  Chelmsford, MA 01824
                                     (508) 256-6600

     Notice: Notwithstanding  any  other  lease  or  license  agreement  that   may
     pertain  to, or accompany the delivery of, this computer software,  the rights
     of the Government regarding its use, reproduction and disclosure  are  as  set
     forth  in Section 52.227-19 of the FARS Computer Software  - Restricted Rights
     clause.

     Confidential  and  Proprietary.   Copyright   1989   Apollo   Computer   Inc.,
     Chelmsford,  Massachusetts.  Unpublished  --  all   rights  reserved under the
     Copyright Laws of the United States.

     This notice shall be marked on any reproduction of these data,  in   whole  or
     in part.


























     Confidential and Proprietary. Copyright 1989
     Apollo Computer, Inc., Chelmsford, Massachusetts.
     Unpublished -- rights reserved under the Copyright
     Laws of the United States. All Rights Reserved.

     Latest Printing: August, 1989

     This  document  was  formatted  using the FMT tool distributed with the Domain
     computer system.

     Apollo and Domain are registered trademarks of Apollo Computer Inc.

     UNIX is a registered trademark of AT&T in the USA and other  countries.    Ada
     is  a registered trademark of U.S. Government (Ada Joint Program  Office).

     3DGMR,  Aegis,  D3M, DGR, Domain/Access, Domain/Ada, Domain/Bridge,  Domain/C,
     Domain/ComController,    Domain/CommonLISP,     Domain/CORE,     Domain/Debug,
     Domain/DFL,    Domain/Dialogue,    Domain/DQC,   Domain/IX,   Domain/Laser-26,
     Domain/LISP, Domain/PAK, Domain/PCC,  Domain/PCI,  Domain/SNA,  Domain   X.25,
     DPSS,  DPSS/Mail,  DSEE,  FPX,  GMR, GPR, GSR, NLS, Network Computing  Kernel,
     Network  Computing  System,  Network  License  Server,  Open  Dialogue,   Open
     Network  Toolkit, Open System Toolkit, Personal Supercomputer,  Personal Super
     Workstation, Personal Workstation, Series 3000, Series   4000,  Series  10000,
     and VCD-8 are trademarks of Apollo Computer Inc.



     Apollo  Computer  Inc.  reserves  the  right to make changes in specifications
     and other information contained in this  publication  without  prior   notice,
     and  the reader should in all cases consult Apollo Computer  Inc. to determine
     whether any such changes have been made.

     THE TERMS AND CONDITIONS GOVERNING THE SALE OF APOLLO COMPUTER  INC.  HARDWARE
     PRODUCTS  AND  THE LICENSING OF APOLLO COMPUTER INC. SOFTWARE PROGRAMS CONSIST
     SOLELY OF THOSE SET FORTH IN THE WRITTEN  CONTRACTS  BETWEEN  APOLLO  COMPUTER
     INC.  AND  ITS  CUSTOMERS.   NO  REPRESENTATION  OR  OTHER AFFIRMATION OF FACT
     CONTAINED IN  THIS  PUBLICATION,  INCLUDING  BUT  NOT  LIMITED  TO  STATEMENTS
     REGARDING   CAPACITY,   RESPONSE-TIME  PERFORMANCE,  SUITABILITY  FOR  USE  OR
     PERFORMANCE OF PRODUCTS DESCRIBED HEREIN SHALL BE DEEMED TO BE A  WARRANTY  BY
     APOLLO  COMPUTER INC. FOR ANY PURPOSE, OR GIVE RISE TO ANY LIABILITY BY APOLLO
     COMPUTER INC. WHATSOEVER.

     IN NO  EVENT  SHALL  APOLLO  COMPUTER  INC.  BE  LIABLE  FOR  ANY  INCIDENTAL,
     INDIRECT,  SPECIAL  OR  CONSEQUENTIAL  DAMAGES  WHATSOEVER  (INCLUDING BUT NOT
     LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATING  TO  THIS  PUBLICATION  OR
     THE  INFORMATION  CONTAINED  IN  IT,  EVEN  IF  APOLLO  COMPUTER INC. HAS BEEN
     ADVISED, KNEW OR SHOULD HAVE KNOWN OF THE POSSIBILITY OF SUCH DAMAGES.

     THE SOFTWARE PROGRAMS DESCRIBED IN THIS DOCUMENT ARE CONFIDENTIAL  INFORMATION
     AND PROPRIETARY PRODUCTS OF APOLLO COMPUTER INC. OR ITS LICENSORS.
















     Reader_Notice

     This  document  resides  online in the /install/doc/apollo directory.  You may
     print the online  copy  of  this  document  by  using  one  of  the  following
     commands:

     If  your  installation  uses  the  System V lp print daemon, use an lp command
     similar to the following:

          lp -dprinter_name pathname

     where pathname is the pathname of the release notes:

          /install/doc/apollo/ftn.v.10.7__notes

     If your installation uses the Domain print system,  use  the  following  Aegis
     /com/prf command:

          prf pathname -pr printer_name -npag

     If  your  installation  uses  the  BSD  lpd  print  daemon, use an lpr command
     similar to the following:

          lpr -P printer_name pathname
































                                          iii









                                        Contents




     CHAPTER 1 OVERVIEW OF DOMAIN FORTRAN VERSION 10.7 . . . . . . . . . . . 1-1

              1.1  The %begininline and %endinline Compiler Directives . . 1-3
                   1.1.1  How to Use %begininline and %endinline . . . . . 1-3
                   1.1.2  Example  . . . . . . . . . . . . . . . . . . . . . 1-4
                   1.1.3  Related Compiler Options: -opt 3 and -opt 4  . . . 1-4
              1.2  The %beginnoinline and %endnoinline Directives  . . . . 1-4
                   1.2.1  How to Use %beginnoinline and %endnoinline . . . 1-5
              1.3  The Byte Data Type  . . . . . . . . . . . . . . . . . . . 1-5
                   1.3.1  Syntax . . . . . . . . . . . . . . . . . . . . . . 1-5
                   1.3.2  Example  . . . . . . . . . . . . . . . . . . . . . 1-6
              1.4  The Discard Statement . . . . . . . . . . . . . . . . . . 1-6
                   1.4.1  Syntax . . . . . . . . . . . . . . . . . . . . . . 1-6
                   1.4.2  Example  . . . . . . . . . . . . . . . . . . . . . 1-6
              1.5  The Implicit None Statement . . . . . . . . . . . . . . . 1-7
              1.6  Compiler Option -nuc  . . . . . . . . . . . . . . . . . . 1-8
              1.7  O Edit Descriptor . . . . . . . . . . . . . . . . . . . . 1-8
                   1.7.1  Syntax . . . . . . . . . . . . . . . . . . . . . . 1-8
                   1.7.2  Input  . . . . . . . . . . . . . . . . . . . . . . 1-9
                   1.7.3  Output . . . . . . . . . . . . . . . . . . . . . . 1-9
              1.8  The Options Statement . . . . . . . . . . . . . . . . . . 1-10
                   1.8.1  Syntax . . . . . . . . . . . . . . . . . . . . . . 1-10
                   1.8.2  Example  . . . . . . . . . . . . . . . . . . . . . 1-10
              1.9  New Pointer Syntax  . . . . . . . . . . . . . . . . . . . 1-11
              1.10 Compiler Options -prasm and -nprasm . . . . . . . . . . . 1-11
              1.11 Compiler Option -nclines  . . . . . . . . . . . . . . . . 1-12
              1.12 Static Storage Optimization . . . . . . . . . . . . . . . 1-12
                   1.12.1 Static and Dynamic Storage . . . . . . . . . . . . 1-13
                   1.12.2 Obtaining the Diagnostic Message . . . . . . . . . 1-14
              1.13 The %line Compiler Directive  . . . . . . . . . . . . . . 1-15
              1.14 New Names for Lshft and Rshft Intrinsic Functions . . . . 1-17
              1.15 NFS Compatibility for the FORTRAN Compiler  . . . . . . . 1-17
              1.16 Mixing Data Statements and Specification Statements . . . 1-18
              1.17 Compiler Option -bx . . . . . . . . . . . . . . . . . . . 1-18
              1.18 Managing Stack Size for Subprograms . . . . . . . . . . . 1-18

     CHAPTER 2 INSTALLATION INFORMATION  . . . . . . . . . . . . . . . . . . 2-1

              2.1  Compiler Packaging and Disk Space Requirements  . . . . . 2-1
              2.2  Installation of Libraries . . . . . . . . . . . . . . . . 2-2
                   2.2.1  Syslib . . . . . . . . . . . . . . . . . . . . . . 2-2
                   2.2.2  Ftnlib . . . . . . . . . . . . . . . . . . . . . . 2-3
                   2.2.3  Other Information About Libraries  . . . . . . . . 2-3








     Contents                              iv









     CHAPTER 3 DOCUMENTATION . . . . . . . . . . . . . . . . . . . . . . . . 3-1

              3.1  New Features and Related Parts of the Manual  . . . . . . 3-1
              3.2  Manual Corrections  . . . . . . . . . . . . . . . . . . . 3-2
                   3.2.1  The Unit= and Fmt= I/O Attributes  . . . . . . . . 3-2
                   3.2.2  The Strid= I/O Attribute . . . . . . . . . . . . . 3-2
                   3.2.3  The -uc Compiler Option  . . . . . . . . . . . . . 3-2
                   3.2.4  The -l and -L Compiler Options . . . . . . . . . . 3-3
                   3.2.5  The Obsolete -M Compiler Option  . . . . . . . . . 3-3

     CHAPTER 4 KNOWN BUGS AND FIXED BUGS . . . . . . . . . . . . . . . . . . 4-1

              4.1  Known Bugs  . . . . . . . . . . . . . . . . . . . . . . . 4-1
              4.2  Fixed Bugs  . . . . . . . . . . . . . . . . . . . . . . . 4-2
              4.3  Fixed APRs  . . . . . . . . . . . . . . . . . . . . . . . 4-3
                   4.3.1 Stop Statement Output and the SAX Utility . . . . . 4-5








































                                           v                               Contents
















                                       CHAPTER 1

                        OVERVIEW OF DOMAIN FORTRAN VERSION 10.7






               NOTE:     Before you install the FORTRAN compiler,  read  Chapter  2
                         of this document.

     This  document  describes  the  features  of  Domain  FORTRAN  that are new in
     Version  10.7.   It  supplements  the  Domain___FORTRAN___Language___Reference
     (000530-A00) and all other release documents issued since SR10.

     This  document  describes  four versions of the FORTRAN compiler.    Table 1-1
     lists these versions.  The major differences among these versions are

          o  The workstations from which you can compile

          o  The workstations on which your compiled program can execute

     For an explanation of the packaging for these versions, refer to Chapter 2.

     For a summary of the new features in Domain FORTRAN  Version  10.7,  refer  to
     Table 1-2.


                             Table_1-1.__Compiler_Versions


         Compiler              Version       Compiles_on       Object_File_Runs_on

         680x0 native          10.7.m        680x0-based       680x0-based
         compiler                            workstation       workstation

         Series 10000 (TM)     10.7.p        Series 10000      Series 10000
         native compiler                     workstation       workstation

         Cross compiler        10.7.mpx      680x0-based       Series 10000
                                             workstation       workstation

         Cross compiler        10.7.pmx      Series 10000      680x0-based
                                             workstation       workstation




     Version 10.7                         1-1                        Domain FORTRAN









           Table_1-2.__Summary_of_New_Features_in_Domain_FORTRAN_Version_10.7


     Feature             Description                                    See_Section

     %begininline       Delimits subprograms for inline expansion          1.1
     %endinline

     %beginnoinline     Delimits subprograms that are never expanded       1.2
     %endnoinline       inline

     byte                Declares a 1-byte variable                         1.3

     discard             Discards the returned value of a function          1.4

     implicit none       Overrides the implicit default data type           1.5
                         rules for variable names

     -nuc                Turns off UNIX* compatibility features             1.6

     O edit              Specifies octal values in I/O statements           1.7
     descriptor

     options             Specifies compiler options in a program            1.8
     statement           source statement

     new pointer         Associates an integer*4 variable with a            1.9
     syntax              single variable

     -prasm              Uses Series 10000 assembly language format for     1.10
                         expanded listings

     -nprasm             Uses a format similar to 680x0-based assembly      1.10
                         language format for expanded listings

     -nclines            Suppresses generation of COFF line number          1.11
                         tables for 680x0 target compilers

     static storage      Permits more efficient use of static storage       1.12
     optimization

     %line               Sets compiler's knowledge of current source        1.13
                         line

     lshift              Alternate names for lshft and rshft                1.14
     rshift              intrinsic functions



     -------------------------------------------------------------------------------
     *UNIX is a registered trademark of AT&T in the USA and other countries.





     Domain FORTRAN                       1-2                          Version 10.7









     Table_1-2.__Summary_of_New_Features_in_Domain_FORTRAN_Version_10.7 (Continued)


     Feature             Description                                    See_Section

     NFS compatibility   Allows redirection of compiler output to a         1.15
                         remote node connected through NFS*

     mixing data         Allows users to intersperse data statements        1.16
     and                 and specification statements
     specification
     statements

     -bx                 Generates an object file without the .bin          1.17
                         suffix

     subprogram          Allows you to increase stack size for              1.18
     stack size          subprograms with large arrays
     management


     1.1  The %begininline and %endinline Compiler Directives


     The  %begininline  and  %endinline  compiler  directives  are delimiters for
     defining subprograms for inline expansion.  Inline expansion  means  that  the
     compiler  generates  code  for  a  given  subprogram  wherever  a call to that
     subprogram appears.

     Inline expansion of a  given  subprogram  allows  you  to  avoid  transferring
     control  to  the  subprogram.    When  used  with  small  subprograms,  inline
     expansion can increase execution speed.


     1.1.1 How to Use %begininline and %endinline

     Follow these rules when using %begininline and %endinline:

          o  Place %begininline on a line in the source file before you begin  any
             appropriate subprogram definitions.

          o  Place  %endinline  on the line following the last subprogram that you
             define for inline expansion.

          o  Begin both directives in column 1.





     -------------------------------------------------------------------------------
     *NFS is a trademark of Sun Microsystems, Inc.




     Version 10.7                         1-3                        Domain FORTRAN









     1.1.2 Example

     Suppose that a program contains this function declaration:

          *
          %begin_inline
          *
          *     Function to test if a real number is positive
          *     Input argument: number
          *     Output: true or false

                logical function test_pos (number)
          *
                test_pos = number .ge. 0.0
                return
                end
          *
          %end_inline

     Whenever you call the function testpos in your  main  program,  the  compiler
     generates  code  for  the  function  at  that  point,  instead of transferring
     control to the function.


     1.1.3 Related Compiler Options: -opt 3 and -opt 4

     The compiler options -opt 3 and -opt 4 affect inline subprogram expansion:

          o  With -opt 3, the compiler expands

                  -  All statement functions

                  -  All   subprograms   enclosed   between    %begininline    and
                     %endinline


          o  With -opt 4, the compiler expands

                  -  All subprograms expanded with -opt 3

                  -  Some additional subprograms




     1.2  The %beginnoinline and %endnoinline Directives


     The  compiler  directives %beginnoinline and %endnoinline are delimiters for
     subprograms that the compiler never expands inline.  These delimiters are  the
     converse of %begininline and  %endinline.





     Domain FORTRAN                       1-4                          Version 10.7









     1.2.1 How to Use %beginnoinline and %endnoinline

     Follow these rules when using %beginnoinline and %endnoinline:

          o  Place  %beginnoinline  on  a line in the source file before you begin
             any appropriate subprogram definitions.

          o  Place %endnoinline on the line following  the  last  subprogram  that
             you define for no inline expansion.

          o  Begin both directives in column 1.



     1.3  The Byte Data Type


     The  byte  data type allows you to associate one byte (8 bits) of storage with
     a specified name.  A byte can store values that range from -128 to 127.

     You can use the byte data type in any arithmetic operation  or  function  that
     supports  integers.   Intrinsic  functions  that  support  the  byte data type
     include

     o  amax0             o  dcmplx              o  int4               o  not

     o  amin0             o  iaddr               o  isign              o  or

     o  and               o  iabs                o  lshft, lshift      o  real

     o  char              o  idim                o  max0               o  rshft, rshift

     o  cmplx             o  int                 o  min0               o  xor

     o  dble              o  int2                o  mod



     1.3.1 Syntax

     To associate a name with the byte data type, use the syntax

          byte name1 [,name2 ...]

     where name_1 and name_2 can be

          o  A symbolic name of a constant

          o  A variable

          o  An array specification





     Version 10.7                         1-5                        Domain FORTRAN










          o  A statement function

          o  A function subprogram

          o  A function alternate entry



     1.3.2 Example

     Suppose that a graphics application  program  requires  a  data  structure  to
     store  color  values for a 1024-pixel color screen.  This data structure needs
     to store values for  three  basic  colors  for  each  pixel.   There  are  256
     possible color values.

     In  this  situation, you could declare a 3-dimensional byte array to store the
     data:

                 byte color_plane (1024, 1024, 3)

     Since the color values in each array element are all within  the  range  of  a
     single byte, you save space by using byte instead of integer.


     1.4  The Discard Statement


     The  discard  statement  allows  you  to call a function as a subroutine.  The
     effect is that the system ignores or discards the function's return value.

     The discard statement is useful when you need to call a function for its  side
     effects  rather  than  for  the value it returns.  In this situation,  you can
     discard a value that you do not use and avoid a compiler warning.


     1.4.1 Syntax

     The discard statement has the following syntax:

          discard (function_call)

     where function_call is any valid function call statement.


     1.4.2 Example

     The following code shows an example of using discard:

                include '/sys/ins/base.ins.ftn'
                include '/sys/ins/ec2.ins.ftn'
                include '/sys/ins/time.ins.ftn'




     Domain FORTRAN                       1-6                          Version 10.7









                integer*2 ec_ptr(3), ec_count
                integer*4 event_ptr, status, ec_value
                pointer /event_ptr/ ec_ptr

          * Ask the system to give us the address of the quarter-second timer
                call time_$get_ec (time_$clockh_key, event_ptr, status)
          *
                if (status.ne.0) then
                    call error_$print (status)
                else
                    print *, 'I shall wait now!'
          * Get the current value of the timer, and add 15 seconds to it
                    ec_value = ec2_$read (ec_ptr)
                    ec_value = ec_value + 15*4    { Wait ~ 15 seconds }
          * Wait for the timer to expire; we don't care about the return value
          * of ec2_$wait, so ignore the return value
                    ec_count = 1
                    DISCARD (ec2_$wait (event_ptr, ec_value, ec_count, status))
          *
                    if (status.ne.0) then
                        call error_$print (status)
                    else
                        print *, 'It is now 15 seconds later'
                    endif
                endif
                stop
                end



     1.5  The Implicit None Statement


     The implicit none statement causes the  compiler  to  issue  warning  messages
     when  it  finds  variables within a program unit that you have  not explicitly
     declared.  Nevertheless, the default FORTRAN data type rules still apply.

     When this statement appears in a program unit, no  other  implicit  statements
     can  appear  within  the  same unit.  The implicit none statement has the same
     effect on a program unit as compiling that unit with the -type switch.

     For example, suppose that you compile the following small program:

                 implicit none

                 integer*4 sum
                 do i = 1, 10
                   sum = sum + 1
                 end do
                 end

     In this program, the  loop  control  variable  i  is  undeclared.    When  you
     compile the program, the compiler issues this message:



     Version 10.7                         1-7                        Domain FORTRAN









            (00006)         end
            **** Warning  80 on Line 6: identifier not explicitly type I
            no errors, 1 warning in $MAIN, Fortran version n.nn ..



     1.6  Compiler Option -nuc


     The  -nuc  option  turns  off UNIX compatibility features, even if you use the
     UNIX f77 command with the -W0,-nuc option. The -nuc option has these effects:

          o  The system does not append an underscore to the name of common  blocks
             or subprograms.

          o  If  an  open  statement contains the status values 'new' or 'unknown',
             the system uses Aegis default filename conventions.  The  system  also
             uses  these   conventions if an open statement omits the status value.
             Aegis supplies the name in the format FOR0nn.dat.  In this format,  nn
             is the logical unit ID number.

          o  The  compiler  passes hidden string length values by value rather than
             reference.

          o  The system does  not  interpret  escape  sequences  in  strings.   For
             example, with -nuc, the compiler does not interpret "\n" as newline.



     1.7  O Edit Descriptor


     The  O  edit  descriptor  formats octal values.  The result of using this edit
     descriptor depends on whether you use it in  an  input  or  output   statement
     (see sections 1.7.2 and 1.7.3).


     1.7.1 Syntax

     The O edit descriptor has the following syntax:

          [r]Ow[.m]

     where

          r  is the repeat count.

          w  is the external field width in characters.

          m  is  the  minimum  number  of characters that must appear in the field,
             including zeros.





     Domain FORTRAN                       1-8                          Version 10.7









     1.7.2 Input

     In input statements, the O edit descriptor  reads characters as  octal  values
     from  an  external field into  an input list item.   The only legal characters
     for the external field are   0 through 7.  A sign, a  decimal  point,  and  an
     exponent  are all illegal characters.  An all-blank field has the value 0.  If
     a value in the external field is out of range, an error occurs.

     Table 1-3 shows the results of reading input with the O descriptor.

                      Table_1-3._Input_with_the_O_Edit_Descriptor

              Format          External_Field        Octal_Value_Read

              O5              12345                 12345

              04              12345                 1234

              O3              87                    Error


     1.7.3 Output

     In output statements, the O edit descriptor  writes  an  octal  value  from  a
     given  output list item, right-justified, to an external field w characters in
     length.  This descriptor causes the system to transmit negative values to  the
     external  field  in  internal  form, since the external field cannot contain a
     sign.

     If a value does not fill a field, the system inserts leading spaces.   If  the
     format  statement  contains  m,  the field contains m digits.   If needed, the
     field begins with leading zeros.  If a value is  too large to  fill  a  field,
     the system fills the field with asterisks (*).

     Table 1-4 shows the results of writing values with the O edit descriptor.


                     Table_1-4.__Output_with_the_O_Edit_Descriptor

              Format          Input_List_Item        Octal_Value_Written

              O6              32767                  b77777

              O6              32769                  100001

              O2              14261                  **

              O4.2            7                      bb07








     Version 10.7                         1-9                        Domain FORTRAN









     1.8  The Options Statement


     The  options  statement  allows  you  to insert  certain compiler options in a
     source file.  These options apply to a given program  unit  and  override  any
     options  specified  on  the  command  line.   Following the compilation of the
     program unit, the options revert to those entered on the command line.

     The options statement must appear before a program,  function,  or  subroutine
     statement. If it appears elsewhere, an error occurs.


     1.8.1 Syntax

     The options statement has the following syntax:

          options list_of_options

     where list_of_options can be a series of these options:

          -cond or -ncond       -i*2  or -i*4              -l*1 or -l*2 or -l*4

          -config               -indexl or -nindexl        -subchk or -nsubchk

          -dynm or -save        -idir                      -type or -ntype

          -ff                   -info or -ninfo            -warn or -nwarn

          -frnd or -nfrnd       -inline

     If  list_of_options  contains an option that is not listed above, the compiler
     issues a warning and ignores the option.


     1.8.2 Example

     Suppose that you insert the  following  statement  as  the  first  line  in  a
     program source file:

          options -cond -i*2 -type

     The statement causes the system to

          o  Compile lines marked with the %debug directive

          o  Use integer*2 as the default integer type

          o  Issue warning messages for variables not explicitly declared








     Domain FORTRAN                       1-10                         Version 10.7









     1.9  New Pointer Syntax


     Domain  FORTRAN  Version 10.7 provides some additional syntax for the  pointer
     statement.  This statement allows FORTRAN  programs  to  have  access  to  the
     pointer returned by programs written in other languages.

     The pointer statement now allows this format:

          pointer (int_4_var, single_variable)

     where

          int4_var is an integer*4 pointer variable that references single_variable.

          single_variable is the name of a variable of any data type.

     Note that this new syntax supplements, but does not replace the syntax

          pointer /pointer_var/based_var_list ...

     For details, refer to the Domain_FORTRAN_Language_Reference.

     For  example,  suppose that a FORTRAN program needs to call a Pascal procedure
     passpoint that returns a pointer.  The  FORTRAN  program  would  contain  the
     following declarations:

                 integer*4 ptr
                 character*10 line
                 pointer (ptr, line)

     These  statements  define  a character variable line and a pointer  ptr, which
     references line.

     When you call the Pascal procedure passpoint from  the  FORTRAN  program,  it
     stores the return value in ptr:

                 call pass_point (ptr)



     1.10  Compiler Options -prasm and -nprasm


     Domain  FORTRAN  provides  two  compiler options for controlling the format of
     expanded assembler listings when generating Series 10000 code:

          o  -prasm  (the  default)  produces  Series   10000   assembly   language
             listings.

          o  -nprasm produces 680x0-based assembly language listings.

     The  -prasm  and  -nprasm  options  only  apply  when you use -exp with Domain



     Version 10.7                         1-11                       Domain FORTRAN









     FORTRAN Versions 10.7.p (the Series 10000 native compiler) and  10.7.mpx  (the
     cross  compiler  that generates Series 10000 code).  These two options have no
     effect when you use Versions 10.7.m or 10.7.mpx.

     The way that you use -prasm and -nprasm depends on the environment:

          o  In the BSD or SysV environments, prefix the options with  -W0  on  the
             f77 command line.

          o  In the Aegis environment, enter the options on the ftn command line.



     1.11  Compiler Option -nclines


     By  default  the  compilers  that  generate  code  for  the 680x0 workstations
     generate COFF line number tables whenever you compile using the -dba  or  -dbs
     options.   However,  the  Domain  debugger  does not require these tables, nor
     does the Domain traceback (tb) tool.  You can  use  the  -nclines   option  to
     tell the compiler to suppress the generation of these tables.

     Since  these  tables  might  require  a lot of disk space,  you should use the
     -nclines option if you do not need the COFF line number tables  and  you  wish
     to save space.

               NOTE:     This  option has no effect on the compilers  that generate
                         code for the Series 10000 workstations.



     1.12  Static Storage Optimization


     A new tool, in the form of an informational message, is  available  for  users
     who

          o  Have  access  to the Series 10000 target compilers, but are generating
             code for 680x0 machines

          o  Want to use static storage as efficiently  as  possible  in  order  to
             improve program performance

     This  tool  is  likely to be most useful if you are porting a program that was
     originally written for a compiler  like IBM, CDC, Cray, or VAX FORTRAN.   Such
     compilers  put  all  data  objects  (variables  and dummy arguments) in static
     storage.  Up to now, the only safe way to run such  a  program  on  an  Apollo
     680x0-based system has been either

          o  To  use  the  -save  option or blank save statements (save  statements
             with   no   arguments),   which    degrades    run-time    performance
             considerably.




     Domain FORTRAN                       1-12                         Version 10.7










          or

          o  To  analyze  the program to find out which objects you have to save if
             the program is to behave as expected, and  then  to  name  only  those
             objects   in   a   save  statement.   This  process  results  in  good
             performance, but is very time-consuming.

     The Series 10000 target compilers perform this analysis on all scalar  objects
     in  a  compilation  unit,  and can provide the results of their analysis in an
     informational message.  You can use this message to  improve  the  performance
     of your 680x0 code.



     1.12.1 Static and Dynamic Storage

     When  a  compiler  uses  static  storage, it allocates data objects in memory;
     this means that the values of the data objects persist between  calls  to  the
     subprograms  that  contain  them.   When it uses dynamic storage (also  called
     automatic storage), it allocates data objects in the program's stack frame  or
     in  registers.   On  most computers, access to stack and register data is much
     faster than  access  to  data  in  static  memory.   Therefore,  programs  run
     faster  when compilers use as much dynamic storage as possible.

     Some  FORTRAN  programs,  however, depend on data objects to  reside in static
     memory:  a  program  may  expect  the  values  of  some  local  variables  and
     arguments  to stay the same between subprogram calls.  These objects cannot be
     placed on the stack, because a stack frame exists only   during  a  particular
     invocation of the subprogram.

     If  you  use a blank save statement or specify the -save compiler  option, the
     680x0 target compilers use static storage for all data objects  in  a  program
     unit  (with  the  save  statement)  or in the compilation unit (with the -save
     option).   The Series 10000 target  compilers,  however,  use  static  storage
     only  for  data objects that require it, even if you use the save statement or
     the -save option.  Because they use more dynamic storage, programs run  faster
     on the Series 10000.

     However,  if  you  have  access  to  a  Series  10000  target compiler but are
     generating code that will run on a 680x0 machine, you can use a  Series  10000
     diagnostic  message  to  find  out exactly which data objects actually require
     static storage.  The diagnostic message tells you which of  the  data  objects
     that  might  have  been  allocated  to  registers must instead be allocated to
     static storage in order for the program to behave as if all such data  objects
     were  in  static  storage.   Then  you  can  use  the save statement for those
     particular objects,  instead of using a blank save  statement.   The  compiler
     will allocate all other objects dynamically, so your code will run faster.

     This  message  does not apply to arrays, because arrays can never be placed in
     registers.  If your routine contains arrays, you must  determine  whether  the
     program  expects  any  values  in  the  array  to  remain  the  same  from one
     invocation to the next.  If it does, name the array in a save statement.



     Version 10.7                         1-13                       Domain FORTRAN









     1.12.2 Obtaining the Diagnostic Message

     To obtain the diagnostic message,

          o  If you compile with the  f77  command,  use  the  option  -W0,-info,n,
             where  n  is  any  number  from  1  to 4.  If you compile with the ftn
             command, use the  option -info n.  (The default level of  messages  is
             -info  2,  so  you  need not specify this option explicitly unless you
             want a higher level.)

          and

          o  Compile with the f77 option (-W0,-save (-save in  ftn),   or  use  the
             save statement (with no arguments) in your program units.

     The  Series 10000 target compiler partitions all local data objects into those
     that might be allocated to registers (scalars) and those that could  never  be
     allocated  to  registers  (arrays).   If you specify the -save option or use a
     blank save statement, the compiler immediately places in  static  storage  all
     data  objects  that  are  ineligible for allocation to  registers, rather than
     placing them in automatic storage in the stack frame.

     The Series 10000 target compiler then analyzes  the   usage  pattern  of  each
     data  object  that  is  a  candidate  for  register  placement.   The compiler
     decides whether the program would  behave  differently  if  that  object  were
     allocated  to  a  register rather than to static memory.  If the program would
     behave the same, the object  remains eligible for allocation  to  a  register.
     If  the  program  would behave differently, the object is "forced" into static
     memory and,  if you specified  the  -info  option,  the  compiler  issues  the
     following message:

          Giving variable static data semantics: varname in routine rtname

     where  varname  is  the  name  of  the variable, and rtname is the name of the
     routine where the variable is declared.

     For example, suppose your source file consists of the  following   subroutine,
     with a blank save statement:

                subroutine sub( i, j )
                save
                i = i + k
                goto 10
                entry ent
                k = k + 1
          10    j = j + 1
                end

     In  this  routine,  variable  k  is  used  before  it  is defined.   If k were
     allocated to a register, the value on each   invocation  would  be  undefined.
     However,  if k is allocated in  static memory, the value on entry is the value
     on exit from the preceding invocation.




     Domain FORTRAN                       1-14                         Version 10.7









     Likewise,  entry  ent  is  not  passed  an  argument  for  j.    The  compiler
     interprets  this  to  mean  that the desired  value of j is the value that was
     passed on the most recent call to sub.

     Therefore, the Series 10000 target compiler determines that the  values  of  j
     and k must be preserved between invocations of sub.

     If  you  compile  your  source  file  (named  sample.f) with the command  line
     shown, these messages are displayed:

     % f77 -A cpu,a88k -W0,-info,1 sample.f
     **** Informational #948 Giving variable static data semantics: k in routine s
     **** Informational #948 Giving variable static data semantics: j in routine s
     no errors, no warnings, 2 informational messages, Fortran 77 compiler 68K=>PRISM ...

     If you use ftn (and name the file sample.ftn), the equivalent command line is

          $ ftn sample -cpu a88k -info 1

     You now have the information you need to modify the  save  statement  in  your
     subroutine as follows:

                subroutine sub( i, j )
                save j, k
                .
                .
                .

     You  can  then  recompile  your  code  to run on your 680x0 machine, using the
     command line

          % f77 sample.f

     or

          $ ftn sample

     The compiled object code should run faster than it did  with  the  blank  save
     statement.


     1.13  The %line Compiler Directive


     The  %line  compiler  directive  allows you to set the compiler's knowledge of
     the  current source line number and,  optionally,  the  current  source  file.
     The syntax of  the %line directive is

          %line = linenumber [pathname]

     where  line_number  is an integer constant that specifies the new line number,
     and  pathname, in single or double quotes, is  the  new  name  of  the  source
     file.    The  pathname may be any valid pathname.  The directive must start in



     Version 10.7                         1-15                       Domain FORTRAN









     column 1.

     The compiler  reports errors  in  terms  of  the  line  numbers  set  by  this
     option.   In addition, the debugger line number table is built with these line
     numbers.  The debugger source file option is given the last 'filename' in  the
     source,  as  long  as  that  file  truly  exists.   (The compiler verifies the
     existence of the source file before it creates the debug entry.)

     Most programmers are unlikely to need the %line directive.  It may  be  useful
     in a few unusual situations:

          o  If  your  source  file  is extremely large and you want to break it up
             into smaller units for  separate  compilation,  you  could  use  %line
             directives  at  the  start  of each smaller file to renumber the lines
             of the smaller file in accordance  with  the  line  numbering  of  the
             original  file,  and  to make the filename that of your original file.
             If you use the debugger, the debugger will  point  to  the   lines  of
             your  original  file,  so  that  you can then revise and maintain your
             original  source file.   For example, the  following  %line  directive
             makes the subroutine start at line 105 and gives it another filename:

                  %line = 105 'anotherfile.ftn'
                         subroutine line_example

                         integer*4 i, j
                         i = 5
                         j = i * 5
                         print *, i, j
                         return
                         end


             The listing file for the subroutine shows the changed line numbering:

                  (00001) %line = 105 'anotherfile.ftn'
                  (00105)        subroutine line_example
                  (00106)
                  (00107)        integer*4 i, j
                  (00108)        i = 5
                  (00109)        j = i * 5
                  (00110)        print *, i, j
                  (00111)        return
                  (00112)        end


          o  If  you  use a software engineering tool that changes your source code
             -- for instance, a tool that restructures loops -- you can  use  %line
             directives  so that the line numbers of unchanged parts of the revised
             code are the same as the line numbers of the  original code.







     Domain FORTRAN                       1-16                         Version 10.7









     1.14  New Names for lshft and rshft Intrinsic Functions


     You can now call the lshft and rshft intrinsic functions by the names   lshift
     and  rshift  as  well  as  lshft  and  rshft.  This addition  makes the Domain
     FORTRAN function names similar to those of other  implementations of  FORTRAN,
     and should make programs more portable.


     1.15  NFS Compatibility for the FORTRAN Compiler


     Domain  FORTRAN  Version 10.7 is fully compatible with the Network File System
     (NFS).  You can redirect the binary output of the FORTRAN compiler to  a  file
     on  a  remote  node that you have accessed using NFS, and you can then run the
     program on the remote node.

     In order to use this feature of Domain FORTRAN, you must  have  NFS  installed
     on your system.

     For  example, suppose you issue the following NFS mount command to gain access
     to a remote node:

          $ /etc/mount -o soft faraway:/ /othernode

     This command, which you can issue in  any  shell,  gives  you  access  to  the
     entire  directory  structure of the remote node faraway.  You can access  this
     directory structure as if it were a local directory named /othernode.

     To compile the program test.f or test.ftn and place it in the  directory  /tmp
     on the remote node, issue the f77 command

          $ /bin/f77 test.f -o /othernode/tmp/test.bin

     or the ftn command

          $ /com/ftn test -b /othernode/tmp/test

     You  can  also  place  the source listing in a directory on the remote node by
     using the  -l pathname option.

     Then you can run the program as follows:

          $ /othernode/tmp/test.bin

     You can also use the remote node directory as your working directory.  If  you
     do  so,  compiler  options  that use the name of the current working directory
     work as usual.

     For instance, you can use the Aegis -l option to generate a listing  file,  as
     shown  in  the  following sequence of commands (the example assumes you are in
     a UNIX shell):




     Version 10.7                         1-17                       Domain FORTRAN









          % /etc/mount -o soft faraway:/ /othernode
          % cp ~/test.f  /othernode/test.f
          % cd /othernode
          % f77 -W0,-l test.f
           ...
          % ls
           ...
          test.lst

     For more information about NFS, see Using_NFS_on__the__Domain__Network  (Order
     No. 10414).


     1.16  Mixing Data Statements and Specification Statements


     Domain  FORTRAN  Version  10.7  allows you to intersperse data statements with
     other specification statements.  This  is  an  extension  to  the  FORTRAN  77
     standard,  which  requires that data statements follow all other specification
     statements.


     1.17  Compiler Option -bx


     When you use /com/ftn to invoke  the  compiler,  by  default,  Domain  FORTRAN
     appends  the  .bin  extension to object files it generates.  This is true even
     if you use the -b option to name the file.

     You can use the -bx compiler option  to tell the compiler to name  the  object
     file it generates without using  the .bin extension.

     For  instance,  if you use the following  command line, the compiler will name
     the object file 'test'.

          $ /com/ftn myftnprogram.ftn -bx test



     1.18  Managing Stack Size for Subprograms


     Before Domain FORTRAN Version 10.7, you received a compiler error  message  if
     you  had  a subprogram whose data  required more storage than the system stack
     size allowed.

     At Domain  FORTRAN  Version  10.7,  this  error  message  no  longer  appears.
     Instead, you receive a warning message that looks  like this:

          **** Warning  309 on Line ...
          The maximum stack size has been exceeded.  Use the stack size enhancement
          option in /com/bind or /bin/ld.




     Domain FORTRAN                       1-18                         Version 10.7









     If  you  get  this message, invoke either the ld or bind linker with an option
     that produces a larger stack size.  The ld option that does this is

          -A stacksize,hexnum

     where hexnum is a hexadecimal number that specifies the requested   number  of
     bytes in the stack.  The corresponding bind option is

          -stacksize decimalnumber

     where  decimal_number is a decimal number that specifies the requested  number
     of bytes in the stack.

     You can calculate the number of bytes to specify  by  adding  up  the  storage
     space  required  by  all  the variables in the procedure that drew the warning
     message.

     If you use one of these linker options with  an  appropriate  argument,   your
     program  will  run  correctly.  If you try to run the program without invoking
     the linker, the program will allocate storage  past  the  end  of  the  stack,
     run-time  errors  may  occur,  and  the  program  will  produce  unpredictable
     results.

     You can also avoid getting the warning  message  if  you  declare  very  large
     arrays  to  be  static  by  using  the  save  statement.   Static  data is not
     allocated on the stack, so you will not run  out  of  stack  space.   However,
     declaring  data  objects  static turns off some optimizations.  If you want to
     be able to optimize your code fully, use the method described above.




























     Version 10.7                         1-19                       Domain FORTRAN









                                       CHAPTER 2

                                INSTALLATION INFORMATION





     You can install Domain FORTRAN Version 10.7 on a user node (one equipped  with
     a   monitor  and  keyboard) or a Domain Server Processor (DSP) that is running
     SR10.0 or a more recent version of the Domain/OS operating system.

     For directions about how to install this product, see  the  manual  Installing
     Software___with___Apollo's___Release___and___Installation__Tools   (Order  No.
     008860-A00), as well as the hardcopy installation document   that  accompanied
     your  media.   The hardcopy document is called Media_Installation_Instructions
     for_Optional_Software_Products  (Order No. 010854-A04).

     This chapter supplements the manuals cited above.  It describes

          o  Compiler packaging and disk space requirements

          o  Installation of libraries



     2.1  Compiler Packaging and Disk Space Requirements


     Two compiler packages are available:

          o  The  680x0-based  workstation  package  contains  Version  10.7.m  and
             Version 10.7.mpx.

          o  The  Series  10000  workstation  package  contains  Version 10.7.p and
             Version 10.7.pmx.

     You can install the whole package or a single  compiler  version.   Table  2-1
     lists the amount of disk space required for the various versions.

















     Version 10.7                         2-1                        Domain FORTRAN









                         Table_2-1.__Disk_Storage_Requirements

                    Version(s)                Blocks_Required

                    .m                            1000

                    .mpx                          3800

                    both .m and .mpx              4800

                    .p                            5400

                    .pmx                          3000

                    both .p and .pmx              8400

     Compilers  that  run  on different machine types but produce code for the same
     machine type can have their release indexes merged using the mrgri tool.   For
     instance,  the  ftn.p  and  the  ftn.mpx  compilers  can be merged, yielding a
     cmpexe compiler that runs on any Apollo workstation and produces code for  the
     Series 10000.

     For  more  information on mrgri, see the SR10.1.p release notes, Domain_System
     Software_Release_Notes (Order No. 005809-A04).


     2.2  Installation of Libraries



               NOTE:     Read this before you install the FORTRAN compiler.

     FORTRAN programs require the correct version of the syslib  and ftnlib  system
     libraries  (both  stored in directory /lib)  in order to run properly.  If you
     have already installed the  Domain/OS operating  system  on  your  node,  then
     your  node  already  has  versions of syslib and ftnlib; however, they may not
     be the appropriate  versions.  In  addition,  the  release  media  for  Domain
     FORTRAN  Version   10.7  comes  with  versions  of  syslib  and  ftnlib.  This
     document explains  whether the versions of syslib and ftnlib already  on  your
     node  are   appropriate  or  whether you should install the versions that come
     with  the Domain FORTRAN release media.


     2.2.1 Syslib

     If you are using Domain FORTRAN Version 10.7 to compile  programs  that   will
     run  on  a  Series  10000  workstation  (the target node),  here is what to do
     regarding syslib:

          o  If the target node  is  running  SR10.0.p,  you  should   install  the
             syslib  (Version  1.0.p)  that  comes  on  the Domain FORTRAN  release
             media.   If  you  do  not,  then  the  run-time  system   will   issue
             "References  to  undefined  global" errors if your program calls  base



     Domain FORTRAN                       2-2                          Version 10.7









             10 logarithm extrinsic functions.

          o  If the target node is running SR10.1.p (or  later),  do   not  install
             the  syslib  that  comes  with  the Domain FORTRAN release  media.  In
             other words, take no action because the syslib  that  came   with  the
             operating  system  is  correct.  If you mistakenly install the  syslib
             that comes with the Domain FORTRAN release media, your node  will  not
             boot.

     If  you  are  using Domain FORTRAN Version 10.7 to compile programs that  will
     run on a node other than a Series  10000  workstation,  do   not  install  the
     syslib that comes with the Domain FORTRAN release  media.


     2.2.2 Ftnlib

     If  you  are  using  Domain FORTRAN Version 10.7 to compile programs,  here is
     what to do regarding ftnlib:

          o  If the target node is running SR10.0, SR10.0.p, SR10.1,   or  SR10.1.p
             and  your  source  code  defines  BYTE variables or uses the  O format
             specifier, then you must install  the  ftnlib  that  comes  with   the
             Domain  FORTRAN  release  media.  If your source code does not contain
             BYTE type or O format, then the ftnlib that came  with  the  operating
             system is appropriate.

          o  If the  target  node  is  running SR10.2 or later, do  not install the
             ftnlib that comes with the Domain FORTRAN release   media.   In  other
             words,  take  no  action  because  the  ftnlib  that  came   with  the
             operating system is the appropriate one.



     2.2.3 Other Information About Libraries

     During installation, the system prompts you for  the  libraries  you  wish  to
     install.   Besides  the  ftnlib  and  syslib libraries, you can install the 3F
     libraries  described  in  the  BSD__Programmer's__Reference   and   the   SysV
     Programmer's__Reference.   The  3F  libraries  provide  an  interface from f77
     programs to  the system in the  same  way  that  the  C  library  does  for  C
     programs.  Table 2-2  lists these libraries, which you may install on any node
     running SR10.0 or later:

                 Table_2-2._3F_Libraries_Available_at_SR10.0_and_Later

          Description                 Library_Name       Target_Code_Type

          FORTRAN run-time library    bsd_3f v.1.0             m68k
                                      bsd_3f v.1.0.p           a88k

          FORTRAN run-time library    sys5_3f v.1.0            m68k
                                      sys5_3f v.1.0.p          a88k




     Version 10.7                         2-3                        Domain FORTRAN









     You should choose the 3F library or libraries  to  install  according  to  the
     target  code  that  you  intend  to generate on the node.  For example, if you
     compile with Version 10.7.pmx, you  are  generating  code  for  a  680x0-based
     workstation, so you need  to install the m68k run-time libraries.

     There  are  no  release notes for the libraries. During the 'install' you will
     see the following warning messages.  Ignore them.

                   WARNING: No Release Notes were found for: bsd_3f 1.0
                   WARNING: No Release Notes were found for: bsd_3f 1.0.p
                   WARNING: No Release Notes were found for: ftnlib 2.18
                   WARNING: No Release Notes were found for: ftnlib 2.19.p
                   WARNING: No Release Notes were found for: sys5_3f 1.0
                   WARNING: No Release Notes were found for: sys5_3f 1.0.p
                   WARNING: No Release Notes were found for: syslib 1.0
                   WARNING: No Release Notes were found for: syslib 1.0.p

     NOTE:     If you install any of these libraries, you must shut your  node  and
               reboot  after completing the install procedure.





































     Domain FORTRAN                       2-4                          Version 10.7
















                                       CHAPTER 3

                                     DOCUMENTATION





     This   release  document  supplements  the  current  Domain__FORTRAN__Language
     Reference manual (Order No. 000530-A00) and all other Domain  FORTRAN  release
     documents  issued since SR10.   This chapter describes how new features affect
     the manual.  It also lists corrections to the manual.


     3.1  New Features and Related Parts of the Manual


     Table 3-1 lists the Version 10.7 features described in this document  and  the
     pages that they affect in the Domain_FORTRAN_Language_Reference.


       Table_3-1._Version_10.7_Features_and_the_Domain_FORTRAN_Language_Reference

     Feature                  Where_Described_in      Related_Parts_of_the
     Description              This_Document           Manual

     -opt 3 and -opt 4        Section 1.1.3           pp. 6-25 through 6-32

     Byte Data Type           Section 1.3             Chapter 3

     Implicit None            Section 1.5             pp. 3-2 through 3-4

     -nuc                     Section 1.6             pp. 6-34 through 6-35

     O Descriptor             Section 1.7             pp. 4-87 through 4-107

     New Pointer Syntax       Section 1.9             pp. 3-16, 4-157 through 4-158

     Static Storage           Section 1.12            pp. 4-175 through 4-176, 6-19
     Optimization                                     through 6-20, 6-32 through 6-33

     lshift, rshift           Section 1.14            p. C-6

     Mixing Data and          Section 1.16            p. 2-11
     Specification
     Statements



     Version 10.7                         3-1                        Domain FORTRAN









     3.2  Manual Corrections


     The  Domain_FORTRAN_Language_Reference contains errors in Chapters 4 and 6, in
     its discussions of

          o  The unit= and fmt= I/O attributes

          o  The strid= I/O attribute

          o  The ftn compiler option -uc

          o  The f77 compiler options -l and -L

          o  The obsolete compiler option -M

     We discuss these in the following subsections.


     3.2.1 The Unit= and Fmt= I/O Attributes

     On page 4-135, the manual incorrectly states  that  fmt=  is  optional  if  it
     appears as the second attribute in a format specification.

     The  manual  should  state  that  if unit= appears as the first attribute in a
     format specification, then fmt= must be the second attribute.   You  can  only
     omit  fmt=  if you omit unit= when these attributes appear as the first two in
     a statement.


     3.2.2 The Strid= I/O Attribute

     On page 4-141  and  4-142,  the  manual  incorrectly  states  that  the  value
     returned  by  the  ios$open system call, which you can subsequently assign to
     the strid= attribute in an open or inquire statement, is an  integer*4  value.
     It is an integer*2 value.


     3.2.3 The -uc Compiler Option

     The  last  sentence on page 6-34 is incorrect.  It should say, "If you do  not
     use the -uc option, it is possible that  the  names  of  your  subprogram  and
     common  blocks will be the same as some external names.  This is not usually a
     problem, because the linker looks for names in the files  you  specify  before
     it looks in the global libraries."











     Domain FORTRAN                       3-2                          Version 10.7









     3.2.4 The -l and -L Compiler Options

     In  the  description of the f77 compiler option -l on page 6-41, the following
     sentence is incorrect:

         The link editor searches for libraries in  the  directories  specified  by
         the  environment  variables LIBDIR and LLIBDIR (these generally resolve to
         /lib and /usr/lib).

     The sentence should read instead,

         By  default,  the  link  editor  searches  for  libraries  first  in   the
         directory  /lib, then in /usr/lib.

     On  page  6-42, the description of the -L option is incorrect.  It should read
     as follows:

        -Ldir      Change  the  search  path  for  libraries.   By   default,   the
                   compiler   looks  for  libx.a  libraries  first in the directory
                   /lib, then in  /usr/lib.  This option allows you  to  specify  a
                   different  directory,  dir,   before  searching  these  standard
                   directories.  This is useful if you have  different versions  of
                   a  library  and  you  want to specify which one the link  editor
                   should use.  Note that this  option  is  only  effective  if  it
                   precedes an -l option.

     There must be no space between -L and the argument dir.


     3.2.5 The Obsolete -M Compiler Option

     On  page  6-42,  the  manual  states  incorrectly  that you can use the linker
     option -M id with the f77  command  to  specify  the  target  processor  type.
     Since  Domain  FORTRAN  Version 10.6, this option has been obsolete.  Instead,
     use the f77 option -A cpu,id to specify the target  processor  type.   The  -A
     cpu,id  option  is  described in the f77 man pages for Domain  FORTRAN Version
     10.7.



















     Version 10.7                         3-3                        Domain FORTRAN
















                                       CHAPTER 4

                               KNOWN BUGS AND FIXED BUGS





     This chapter describes known bugs and fixed bugs in  Domain  FORTRAN   Version
     10.7.   It  also  lists  all  the Apollo Product Reports (APRs) that have been
     fixed since Version 10.6.


     4.1  Known Bugs


     Domain FORTRAN Version 10.7 has the following known bugs:

          o  The compiler does not generate COFF (Common Object File  Format)  line
             number   information.   This  is a bug only in the Series 10000 target
             compilers, that  is, Versions 10.7.mpx and 10.7.p.

          o  If you use the /bin/f77 command with Domain FORTRAN  Version  10.7.pmx
             (the    cross   compiler   that   generates   code   for   680x0-based
             workstations),  the command fails unless you use either the  -noallres
             linker  option or the  -c compiler option.  The reason for the failure
             is that the /bin/ld command, which the  /bin/f77  command  invokes  by
             default,  encounters  unresolved  global  references  because  certain
             global libraries do not yet exist on  the  Series  10000  workstation.
             For example, the command

                  % /bin/f77 -A cpu,m68k prog.f

             fails  to  produce  an  a.out  file  when  invoked from a Series 10000
             workstation.

             There are two different solutions to this problem.  The  first,  which
             is  the  simpler  solution,  is  to  invoke /bin/ld with the -noallres
             option,  which  tells  the  linker   to   ignore   unresolved   global
             references.  To do this, you can invoke /bin/f77 as follows:

                  % /bin/f77 -A cpu,m68k -Wl,-A,noallres prog.f

             This command line passes the -noallres option on to /bin/ld.





     Version 10.7                         4-1                        Domain FORTRAN










             The second, more complicated, solution has two steps:

                  1.  Invoke  the  compiler  with  the  -c  option, which tells the
                      compiler not to invoke the loader.  The -c option produces  a
                      .o  file  only,  rather  than producing both a .o file and an
                      a.out  file.    For  example,  to  compile  prog.f,  use  the
                      command line

                           % /bin/f77 -A cpu,m68k -c prog.f


                  2.  Then,  invoke  /bin/ld from a 680x0-based workstation, either
                      by logging  into a 680x0-based machine or by  using  /com/crp
                      to  create  a  process   on  a  remote  680x0-based  machine.
                      Invoke  /bin/ld  with  a  command  line  that  contains   the
                      following  arguments  and  options  (you  may  use  any other
                      valid /bin/ld options in addition to these):

                           % /bin/ld -A cpu,m68k /usr/lib/crt0.o prog.o -lU77 -lF77 \
                           -lI77 -o a.out



          o  Calls from f77 to certain I/O routines in the BSD 3F library   produce
             unpredictable  results.   Use  only  those  I/O routines in the BSD 3F
             library that are also documented in Chapter 4 of  the  Domain__FORTRAN
             Language__Reference.   This bug was reported as APR 000DCF7E.  The BSD
             3F library is documented in the BSD_Programmer's_Reference (Order  No.
             005801-A00).

          o  If  you  compile with -cpu 160, -cpu 460, or -cpu 660, operations that
             use the MOD intrinsic function  on  32-bit  integer  operands  do  not
             work.   You  can  avoid  this  problem by compiling with -cpu any, the
             default.

          o  If you use a 680x0 target compiler and your program contains  a  large
             number  of  assigned  goto  statements,  the  program may compile very
             slowly at optimization levels of 3 or higher.   If  compilation  speed
             is important to you, compile the program at -opt 2 or below.

          o  When   you   use   the   Domain   Distributed   Debugging  Environment
             (Domain/DDE)  to single-step through a FORTRAN program,  the  debugger
             shows   incorrect  routine   name  and  line  number  information  for
             included files.











     Domain FORTRAN                       4-2                          Version 10.7









     4.2  Fixed Bugs


     The following bugs in Domain FORTRAN Version 10.7 have been fixed:

          o  When you compiled using the f77 command, versions  of  Domain  FORTRAN
             earlier  than 10.7 used the optimizations provided at -opt 3  with the
             ftn command, whether or not  you  used  the  -O  option.    At  Domain
             FORTRAN  Version  10.7,  the default level of optimization  for f77 is
             that provided at -opt 0 with ftn.   If you specify the -O option,  the
             optimization level is the  equivalent of -opt 3 with ftn.

          o  In  versions  of  Domain  FORTRAN  earlier  than  10.7,  the  compiler
             incorrectly generated an error message if you

                  -  Compiled using the -dba or -dbs option, and

                  -  Specified an indefinite length for a character argument  in  a
                     subprogram

             Domain  FORTRAN  Version  10.7 no longer generates an error message in
             this situation.

          o  In  versions  of  Domain  FORTRAN  earlier  than  10.7,  the  compiler
             generated  incorrect  code  if  your  program  contained any call with
             hidden length arguments in the condition  of  an  ELSE  IF  statement.
             Domain FORTRAN Version 10.7 generates correct code for such  calls.



     4.3  Fixed APRs


     The  following  f77  and ftn APRs have been fixed since the release  of Domain
     FORTRAN Version 10.6.  These lists provide the APR number, the   date  it  was
     submitted, and a description of the problem.

     f77_APRs

          APR       Date     Description_of_Problem

          000DC890  881215   LIBF77/MAIN.C compiled with debug
          000DCA59  890127   f77 -p option
          000DCA46  890127   index fails
          000DCA43  890127   getarg fails
          000DCA42  890127   fdate fails
          000DCA98  890202   f77, sr10.1, variable length string
          000DCB55  890216   f77 INDEX built-in function causes bus error
          000DCB7C  890223   GETCWD on Series 10000 workstation causes
                             segmentation fault
          000DCB9D  890224   f77 programs cannot read data containing tabs
          000DCD01  890315   f77 string initialization error
          000DCD06  890315   ftn character variable bug



     Version 10.7                         4-3                        Domain FORTRAN









          000DCD09  890315   FORTRAN bug with READ and COMMON blocks
          000DCD16  890316   f77 ioinit uses unrecognized open options
          000DCD23  890317   Error 161 with variable length character strings
          000DCD2E  890320   rand function failing
          000DCDAE  890328   f77 produces bad code for monolithic compilation
          000DCE36  890407   Compile error 928 with/ '-p' compile switch
          000DCEE2  890421   f77 '-C' failure


     ftn_APRs

          APR       Date     Description_of_Problem

          000DC54A  880919   FORTRAN PAUSE prompts disappear
          000DC5B3  880930   f77 calls to etime.3f and dtime.3f fail
          000DC5CE  881004   doc error with -type
          000DC6F4  881103   Problem with namelist in FORTRAN Version 10.00
          000DC749  881111   FORTRAN errors with quotes in namelist
          000DC7D1  881123   Error 319 system fault trapped status 7f000000
          000DC7CA  881123   f77 'ioinit' routine not found
          000DC7E2  881128   Error on standard statement ordering:
                             statement functions
          000DC852  881208   FORTRAN Version 10.00 : internal error - emit - no in
          000DC8D0  881221   Error in dimension statement causes compiler crash
          000DC8F7  881227   Run-time 'odd address' error message generated
          000DC98C  890111   Doesn't accept standard r* null list directed read
          000DCA07  890120   ftn statement functions incorrect compile
          000DCAFF  890208   Series 10000 workstation f77 -C causes segmentation
                             fault/reference to illegal address
          000DCAF1  890208   FORTRAN error 'Nested data implied DO loops'
          000DCAFE  890208   Convert *8 to complex *8 gives bad image
          000DCAF7  890208   FPA compile causes runtime process hang
          000DCB05  890209   Entry PT and array names getting confused
          000DCB3A  890215   Compile fails with system fault trapped
          000DCB57  890216   f77 unformatted I/O gives garbage
          000DCB75  890223   f77 on Series 10000 workstation gives false
                             alignment warnings
          000DCB8A  890223   FORTRAN problem double precision
          000DCBA4  890224   Files created by f77 get X rights
          000DCBD3  890227   FORTRAN internal error with FPA1 option
          000DCC21  890301   Error in FORTRAN compiler all versions
          000DCC9E  890308   Problem mixing single/double precision complex values
          000DCCA7  890308   Initializing commons with multiple elements
          000DCCB4  890309   Stack size problem with FORTRAN Version 10.5.p
                             (Series 10000)
          000DCCAC  890309   Overflow buffer unless recl included
          000DCCC9  890310   Compiling on Series 10000 workstation
          000DCCFE  890315   Stop output to standard output rather than error
                             output
          000DCD08  890315   Domain FORTRAN is not ANSI conformant
          000DCD07  890315   ftn compiler crash on Series 10000 workstation
          000DCD67  890322   ftn compiler internal error on Series 10000
                             workstation



     Domain FORTRAN                       4-4                          Version 10.7









          000DCDCA  890330   Passing arithmetic calculations as parameters
          000DCDEE  890403   Problem with ftn complex number
          000DCE2F  890407   f77 -c option causes backend failure
          000DCECF  890420   ftn unsuccessful compile on Series 10000 workstation

     The  following  APRs involving the Domain FORTRAN optimizer and code generator
     have been fixed since Version 10.6:

     DCCAF,_DD0D6,_DD0D7,_DD0D8,_DD118,_DD119

       Optimizer   handled   programs   containing   assigned    goto    statements
       incorrectly.

     DCFEE

       Optimizer handled statement functions incorrectly.

     DCF87

       Using -save resulted in slow code.

     DC226

       Arithmetic IF error occurred with -cpu 660.

     DC8D5

       Error 904 (registers locked) occurred with -cpu fpa1.

     DD192

       Compiling  arrays  with  three or more dimensions at -opt 3 sometimes failed
       with a reference to an illegal address.

     DD193

       Inline expansion of arithmetic statement functions was done incorrectly.

     DD1B6

       Optimization of some simple loops had inadvertently been disabled.

     DD1C1

       Objects mentioned in DATA statements were not always saved.


     4.3.1 Stop Statement Output and the SAX Utility

     The fix to APR 000DCCFE has caused the System Acceptance Exerciser (SAX),   an
     Apollo diagnostic utility, to malfunction.

     The  APR  reporter  pointed out that the compiler did not direct the output of



     Version 10.7                         4-5                        Domain FORTRAN









     the STOP  command to error output, as the Domain__FORTRAN__Language__Reference
     stated.   Instead,  the compiler incorrectly sent it to standard output.  This
     behavior has been corrected.  However, SAX depended on the  fact  that  output
     from  the  STOP  statement  went to standard output instead of standard error.
     Because the compiler now behaves correctly, SAX no  longer  works  at  SR10.0,
     SR10.0.p,  SR10.1,  and  SR10.1.p  if  you  install  the  new FORTRAN library,
     ftnlib.

     If using SAX is more important to you than having the latest FORTRAN  library,
     do not install the new ftnlib.

     For  information about SAX, refer to Using_Domain_Diagnostics,_Volume_1 (Order
     No. 009329-A00).











































     Domain FORTRAN                       4-6                          Version 10.7




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026