home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / g77_2 / !gcc / docs / fortran / g77 < prev   
Encoding:
GNU Info File  |  1996-11-11  |  382.2 KB  |  8,663 lines

  1. This is Info file ^.!gcc.docs.fortran.g77, produced by Makeinfo-1.63
  2. from the input file texi.g77.
  3.  
  4.    This file explains how to use the GNU Fortran system.
  5.  
  6.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  7. Boston, MA 02111-1307 USA
  8.  
  9.    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
  10.  
  11.    Permission is granted to make and distribute verbatim copies of this
  12. manual provided the copyright notice and this permission notice are
  13. preserved on all copies.
  14.  
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the sections entitled "GNU General Public License," "Funding for
  18. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  19. included exactly as in the original, and provided that the entire
  20. resulting derived work is distributed under the terms of a permission
  21. notice identical to this one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that the sections entitled "GNU General Public
  26. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  27. `Look And Feel'", and this permission notice, may be included in
  28. translations approved by the Free Software Foundation instead of in the
  29. original English.
  30.  
  31.    Contributed by James Craig Burley (`burley@gnu.ai.mit.edu').
  32. Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was
  33. contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca').
  34.  
  35. 
  36. File: ^.!gcc.docs.fortran.g77,  Node: Top,  Next: Copying,  Up: (DIR)
  37.  
  38. Introduction
  39. ************
  40.  
  41.    This manual documents how to run and install the GNU Fortran
  42. compiler, as well as its new features and incompatibilities, and how to
  43. report bugs.  It corresponds to GNU Fortran version 0.5.18.
  44.  
  45. * Menu:
  46.  
  47. * Copying::         GNU General Public License says
  48.                     how you can copy and share GNU Fortran.
  49. * Contributors::    People who have contributed to GNU Fortran.
  50. * Funding::         How to help assure continued work for free software.
  51. * Funding GNU Fortran::  How to help assure continued work on GNU Fortran.
  52. * Look and Feel::   Protect your freedom--fight "look and feel".
  53.  
  54. * Getting Started:: Finding your way around this manual.
  55. * What is GNU Fortran?::  How `g77' fits into the universe.
  56. * G77 and GCC::     You can compile Fortran, C, or other programs.
  57. * Invoking G77::    Command options supported by `g77'.
  58. * News::            News about recent releases of `g77'.
  59. * Changes::         User-visible changes to recent releases of `g77'.
  60. * Language::        The GNU Fortran language.
  61. * Installation::    How to configure, compile and install GNU Fortran.
  62. * Debugging and Interfacing::  How `g77' generates code.
  63. * Collected Fortran Wisdom::  How to avoid Trouble.
  64. * Trouble::         If you have trouble with GNU Fortran.
  65. * Open Questions::  Things we'd like to know.
  66. * Bugs::            How, why, and where to report bugs.
  67. * Service::         How to find suppliers of support for GNU Fortran.
  68.  
  69. * Index::        Index of concepts and symbol names.
  70.  
  71. 
  72. File: ^.!gcc.docs.fortran.g77,  Node: Copying,  Next: Contributors,  Prev: Top,  Up: Top
  73.  
  74. GNU GENERAL PUBLIC LICENSE
  75. **************************
  76.  
  77.                          Version 2, June 1991
  78.  
  79.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  80.      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  81.      
  82.      Everyone is permitted to copy and distribute verbatim copies
  83.      of this license document, but changing it is not allowed.
  84.  
  85. Preamble
  86. ========
  87.  
  88.    The licenses for most software are designed to take away your
  89. freedom to share and change it.  By contrast, the GNU General Public
  90. License is intended to guarantee your freedom to share and change free
  91. software--to make sure the software is free for all its users.  This
  92. General Public License applies to most of the Free Software
  93. Foundation's software and to any other program whose authors commit to
  94. using it.  (Some other Free Software Foundation software is covered by
  95. the GNU Library General Public License instead.)  You can apply it to
  96. your programs, too.
  97.  
  98.    When we speak of free software, we are referring to freedom, not
  99. price.  Our General Public Licenses are designed to make sure that you
  100. have the freedom to distribute copies of free software (and charge for
  101. this service if you wish), that you receive source code or can get it
  102. if you want it, that you can change the software or use pieces of it in
  103. new free programs; and that you know you can do these things.
  104.  
  105.    To protect your rights, we need to make restrictions that forbid
  106. anyone to deny you these rights or to ask you to surrender the rights.
  107. These restrictions translate to certain responsibilities for you if you
  108. distribute copies of the software, or if you modify it.
  109.  
  110.    For example, if you distribute copies of such a program, whether
  111. gratis or for a fee, you must give the recipients all the rights that
  112. you have.  You must make sure that they, too, receive or can get the
  113. source code.  And you must show them these terms so they know their
  114. rights.
  115.  
  116.    We protect your rights with two steps: (1) copyright the software,
  117. and (2) offer you this license which gives you legal permission to copy,
  118. distribute and/or modify the software.
  119.  
  120.    Also, for each author's protection and ours, we want to make certain
  121. that everyone understands that there is no warranty for this free
  122. software.  If the software is modified by someone else and passed on, we
  123. want its recipients to know that what they have is not the original, so
  124. that any problems introduced by others will not reflect on the original
  125. authors' reputations.
  126.  
  127.    Finally, any free program is threatened constantly by software
  128. patents.  We wish to avoid the danger that redistributors of a free
  129. program will individually obtain patent licenses, in effect making the
  130. program proprietary.  To prevent this, we have made it clear that any
  131. patent must be licensed for everyone's free use or not licensed at all.
  132.  
  133.    The precise terms and conditions for copying, distribution and
  134. modification follow.
  135.  
  136.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  137.  
  138.   0. This License applies to any program or other work which contains a
  139.      notice placed by the copyright holder saying it may be distributed
  140.      under the terms of this General Public License.  The "Program",
  141.      below, refers to any such program or work, and a "work based on
  142.      the Program" means either the Program or any derivative work under
  143.      copyright law: that is to say, a work containing the Program or a
  144.      portion of it, either verbatim or with modifications and/or
  145.      translated into another language.  (Hereinafter, translation is
  146.      included without limitation in the term "modification".)  Each
  147.      licensee is addressed as "you".
  148.  
  149.      Activities other than copying, distribution and modification are
  150.      not covered by this License; they are outside its scope.  The act
  151.      of running the Program is not restricted, and the output from the
  152.      Program is covered only if its contents constitute a work based on
  153.      the Program (independent of having been made by running the
  154.      Program).  Whether that is true depends on what the Program does.
  155.  
  156.   1. You may copy and distribute verbatim copies of the Program's
  157.      source code as you receive it, in any medium, provided that you
  158.      conspicuously and appropriately publish on each copy an appropriate
  159.      copyright notice and disclaimer of warranty; keep intact all the
  160.      notices that refer to this License and to the absence of any
  161.      warranty; and give any other recipients of the Program a copy of
  162.      this License along with the Program.
  163.  
  164.      You may charge a fee for the physical act of transferring a copy,
  165.      and you may at your option offer warranty protection in exchange
  166.      for a fee.
  167.  
  168.   2. You may modify your copy or copies of the Program or any portion
  169.      of it, thus forming a work based on the Program, and copy and
  170.      distribute such modifications or work under the terms of Section 1
  171.      above, provided that you also meet all of these conditions:
  172.  
  173.        a. You must cause the modified files to carry prominent notices
  174.           stating that you changed the files and the date of any change.
  175.  
  176.        b. You must cause any work that you distribute or publish, that
  177.           in whole or in part contains or is derived from the Program
  178.           or any part thereof, to be licensed as a whole at no charge
  179.           to all third parties under the terms of this License.
  180.  
  181.        c. If the modified program normally reads commands interactively
  182.           when run, you must cause it, when started running for such
  183.           interactive use in the most ordinary way, to print or display
  184.           an announcement including an appropriate copyright notice and
  185.           a notice that there is no warranty (or else, saying that you
  186.           provide a warranty) and that users may redistribute the
  187.           program under these conditions, and telling the user how to
  188.           view a copy of this License.  (Exception: if the Program
  189.           itself is interactive but does not normally print such an
  190.           announcement, your work based on the Program is not required
  191.           to print an announcement.)
  192.  
  193.      These requirements apply to the modified work as a whole.  If
  194.      identifiable sections of that work are not derived from the
  195.      Program, and can be reasonably considered independent and separate
  196.      works in themselves, then this License, and its terms, do not
  197.      apply to those sections when you distribute them as separate
  198.      works.  But when you distribute the same sections as part of a
  199.      whole which is a work based on the Program, the distribution of
  200.      the whole must be on the terms of this License, whose permissions
  201.      for other licensees extend to the entire whole, and thus to each
  202.      and every part regardless of who wrote it.
  203.  
  204.      Thus, it is not the intent of this section to claim rights or
  205.      contest your rights to work written entirely by you; rather, the
  206.      intent is to exercise the right to control the distribution of
  207.      derivative or collective works based on the Program.
  208.  
  209.      In addition, mere aggregation of another work not based on the
  210.      Program with the Program (or with a work based on the Program) on
  211.      a volume of a storage or distribution medium does not bring the
  212.      other work under the scope of this License.
  213.  
  214.   3. You may copy and distribute the Program (or a work based on it,
  215.      under Section 2) in object code or executable form under the terms
  216.      of Sections 1 and 2 above provided that you also do one of the
  217.      following:
  218.  
  219.        a. Accompany it with the complete corresponding machine-readable
  220.           source code, which must be distributed under the terms of
  221.           Sections 1 and 2 above on a medium customarily used for
  222.           software interchange; or,
  223.  
  224.        b. Accompany it with a written offer, valid for at least three
  225.           years, to give any third party, for a charge no more than your
  226.           cost of physically performing source distribution, a complete
  227.           machine-readable copy of the corresponding source code, to be
  228.           distributed under the terms of Sections 1 and 2 above on a
  229.           medium customarily used for software interchange; or,
  230.  
  231.        c. Accompany it with the information you received as to the offer
  232.           to distribute corresponding source code.  (This alternative is
  233.           allowed only for noncommercial distribution and only if you
  234.           received the program in object code or executable form with
  235.           such an offer, in accord with Subsection b above.)
  236.  
  237.      The source code for a work means the preferred form of the work for
  238.      making modifications to it.  For an executable work, complete
  239.      source code means all the source code for all modules it contains,
  240.      plus any associated interface definition files, plus the scripts
  241.      used to control compilation and installation of the executable.
  242.      However, as a special exception, the source code distributed need
  243.      not include anything that is normally distributed (in either
  244.      source or binary form) with the major components (compiler,
  245.      kernel, and so on) of the operating system on which the executable
  246.      runs, unless that component itself accompanies the executable.
  247.  
  248.      If distribution of executable or object code is made by offering
  249.      access to copy from a designated place, then offering equivalent
  250.      access to copy the source code from the same place counts as
  251.      distribution of the source code, even though third parties are not
  252.      compelled to copy the source along with the object code.
  253.  
  254.   4. You may not copy, modify, sublicense, or distribute the Program
  255.      except as expressly provided under this License.  Any attempt
  256.      otherwise to copy, modify, sublicense or distribute the Program is
  257.      void, and will automatically terminate your rights under this
  258.      License.  However, parties who have received copies, or rights,
  259.      from you under this License will not have their licenses
  260.      terminated so long as such parties remain in full compliance.
  261.  
  262.   5. You are not required to accept this License, since you have not
  263.      signed it.  However, nothing else grants you permission to modify
  264.      or distribute the Program or its derivative works.  These actions
  265.      are prohibited by law if you do not accept this License.
  266.      Therefore, by modifying or distributing the Program (or any work
  267.      based on the Program), you indicate your acceptance of this
  268.      License to do so, and all its terms and conditions for copying,
  269.      distributing or modifying the Program or works based on it.
  270.  
  271.   6. Each time you redistribute the Program (or any work based on the
  272.      Program), the recipient automatically receives a license from the
  273.      original licensor to copy, distribute or modify the Program
  274.      subject to these terms and conditions.  You may not impose any
  275.      further restrictions on the recipients' exercise of the rights
  276.      granted herein.  You are not responsible for enforcing compliance
  277.      by third parties to this License.
  278.  
  279.   7. If, as a consequence of a court judgment or allegation of patent
  280.      infringement or for any other reason (not limited to patent
  281.      issues), conditions are imposed on you (whether by court order,
  282.      agreement or otherwise) that contradict the conditions of this
  283.      License, they do not excuse you from the conditions of this
  284.      License.  If you cannot distribute so as to satisfy simultaneously
  285.      your obligations under this License and any other pertinent
  286.      obligations, then as a consequence you may not distribute the
  287.      Program at all.  For example, if a patent license would not permit
  288.      royalty-free redistribution of the Program by all those who
  289.      receive copies directly or indirectly through you, then the only
  290.      way you could satisfy both it and this License would be to refrain
  291.      entirely from distribution of the Program.
  292.  
  293.      If any portion of this section is held invalid or unenforceable
  294.      under any particular circumstance, the balance of the section is
  295.      intended to apply and the section as a whole is intended to apply
  296.      in other circumstances.
  297.  
  298.      It is not the purpose of this section to induce you to infringe any
  299.      patents or other property right claims or to contest validity of
  300.      any such claims; this section has the sole purpose of protecting
  301.      the integrity of the free software distribution system, which is
  302.      implemented by public license practices.  Many people have made
  303.      generous contributions to the wide range of software distributed
  304.      through that system in reliance on consistent application of that
  305.      system; it is up to the author/donor to decide if he or she is
  306.      willing to distribute software through any other system and a
  307.      licensee cannot impose that choice.
  308.  
  309.      This section is intended to make thoroughly clear what is believed
  310.      to be a consequence of the rest of this License.
  311.  
  312.   8. If the distribution and/or use of the Program is restricted in
  313.      certain countries either by patents or by copyrighted interfaces,
  314.      the original copyright holder who places the Program under this
  315.      License may add an explicit geographical distribution limitation
  316.      excluding those countries, so that distribution is permitted only
  317.      in or among countries not thus excluded.  In such case, this
  318.      License incorporates the limitation as if written in the body of
  319.      this License.
  320.  
  321.   9. The Free Software Foundation may publish revised and/or new
  322.      versions of the General Public License from time to time.  Such
  323.      new versions will be similar in spirit to the present version, but
  324.      may differ in detail to address new problems or concerns.
  325.  
  326.      Each version is given a distinguishing version number.  If the
  327.      Program specifies a version number of this License which applies
  328.      to it and "any later version", you have the option of following
  329.      the terms and conditions either of that version or of any later
  330.      version published by the Free Software Foundation.  If the Program
  331.      does not specify a version number of this License, you may choose
  332.      any version ever published by the Free Software Foundation.
  333.  
  334.  10. If you wish to incorporate parts of the Program into other free
  335.      programs whose distribution conditions are different, write to the
  336.      author to ask for permission.  For software which is copyrighted
  337.      by the Free Software Foundation, write to the Free Software
  338.      Foundation; we sometimes make exceptions for this.  Our decision
  339.      will be guided by the two goals of preserving the free status of
  340.      all derivatives of our free software and of promoting the sharing
  341.      and reuse of software generally.
  342.  
  343.                                 NO WARRANTY
  344.  
  345.  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  346.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  347.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  348.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  349.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  350.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  351.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  352.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  353.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  354.      SERVICING, REPAIR OR CORRECTION.
  355.  
  356.  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  357.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  358.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  359.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  360.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  361.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  362.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  363.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  364.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  365.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  366.  
  367.                       END OF TERMS AND CONDITIONS
  368.  
  369. How to Apply These Terms to Your New Programs
  370. =============================================
  371.  
  372.    If you develop a new program, and you want it to be of the greatest
  373. possible use to the public, the best way to achieve this is to make it
  374. free software which everyone can redistribute and change under these
  375. terms.
  376.  
  377.    To do so, attach the following notices to the program.  It is safest
  378. to attach them to the start of each source file to most effectively
  379. convey the exclusion of warranty; and each file should have at least
  380. the "copyright" line and a pointer to where the full notice is found.
  381.  
  382.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  383.      Copyright (C) 19YY  NAME OF AUTHOR
  384.      
  385.      This program is free software; you can redistribute it and/or modify
  386.      it under the terms of the GNU General Public License as published by
  387.      the Free Software Foundation; either version 2 of the License, or
  388.      (at your option) any later version.
  389.      
  390.      This program is distributed in the hope that it will be useful,
  391.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  392.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  393.      GNU General Public License for more details.
  394.      
  395.      You should have received a copy of the GNU General Public License
  396.      along with this program; if not, write to the Free Software
  397.      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  398.  
  399.    Also add information on how to contact you by electronic and paper
  400. mail.
  401.  
  402.    If the program is interactive, make it output a short notice like
  403. this when it starts in an interactive mode:
  404.  
  405.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  406.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  407.      type `show w'.
  408.      This is free software, and you are welcome to redistribute it
  409.      under certain conditions; type `show c' for details.
  410.  
  411.    The hypothetical commands `show w' and `show c' should show the
  412. appropriate parts of the General Public License.  Of course, the
  413. commands you use may be called something other than `show w' and `show
  414. c'; they could even be mouse-clicks or menu items--whatever suits your
  415. program.
  416.  
  417.    You should also get your employer (if you work as a programmer) or
  418. your school, if any, to sign a "copyright disclaimer" for the program,
  419. if necessary.  Here is a sample; alter the names:
  420.  
  421.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  422.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  423.      
  424.      SIGNATURE OF TY COON, 1 April 1989
  425.      Ty Coon, President of Vice
  426.  
  427.    This General Public License does not permit incorporating your
  428. program into proprietary programs.  If your program is a subroutine
  429. library, you may consider it more useful to permit linking proprietary
  430. applications with the library.  If this is what you want to do, use the
  431. GNU Library General Public License instead of this License.
  432.  
  433. 
  434. File: ^.!gcc.docs.fortran.g77,  Node: Contributors,  Next: Funding,  Prev: Copying,  Up: Top
  435.  
  436. Contributors to GNU Fortran
  437. ***************************
  438.  
  439.    In addition to James Craig Burley, who wrote the front end, many
  440. people have helped create and improve GNU Fortran.
  441.  
  442.    * The packaging and compiler portions of GNU Fortran are based
  443.      largely on the GNU CC compiler.  *Note Contributors to GNU CC:
  444.      (gcc)Contributors, for more information.
  445.  
  446.    * The run-time library used by GNU Fortran is a minor repackaging of
  447.      the `libf2c' library (combined from the `libF77' and `libI77'
  448.      libraries) provided as part of `f2c', available for free from
  449.      `netlib' sites on the Internet.
  450.  
  451.    * Cygnus Support and The Free Software Foundation contributed
  452.      significant money and/or equipment to Craig's efforts.
  453.  
  454.    * The following individuals served as alpha testers prior to `g77''s
  455.      public release.  This work consisted of testing, researching,
  456.      sometimes debugging, and occasionally providing small amounts of
  457.      code and fixes for `g77', plus offering plenty of helpful advice
  458.      to Craig:
  459.  
  460.           Jonathan Corbet
  461.  
  462.           Dr. Mark Fernyhough
  463.  
  464.           Takafumi Hayashi (The University of
  465.           AIzu)--`takafumi@u-aizu.ac.jp'
  466.  
  467.           Kate Hedstrom
  468.  
  469.           Michel Kern (INRIA and Rice
  470.           University)--`Michel.Kern@inria.fr'
  471.  
  472.           Dr. A. O. V. Le Blanc
  473.  
  474.           Dave Love
  475.  
  476.           Rick Lutowski
  477.  
  478.           Toon Moene
  479.  
  480.           Rick Niles
  481.  
  482.           Derk Reefman
  483.  
  484.           Wayne K. Schroll
  485.  
  486.           Bill Thorson
  487.  
  488.           Pedro A. M. Vazquez
  489.  
  490.           Ian Watson
  491.  
  492.    * Scott Snyder (`snyder@d0sgif.fnal.gov') provided the patch to add
  493.      rudimentary support for `INTEGER*1', `INTEGER*2', and `LOGICAL*1'.
  494.      This inspired Craig to add further support, even though the
  495.      resulting support would still be incomplete, because version 0.6
  496.      is still a ways off.
  497.  
  498.    * David Ronis (`ronis@onsager.chem.mcgill.ca') inspired and
  499.      encouraged Craig to rewrite the documentation in texinfo format by
  500.      contributing a first pass at a translation of the old
  501.      `g77-0.5.16/f/DOC' file.
  502.  
  503.    * Toon Moene (`toon@moene.indiv.nluug.nl') performed some analysis
  504.      of generated code as part of an overall project to improve `g77'
  505.      code generation to at least be as good as `f2c' used in
  506.      conjunction with `gcc'.  So far, this has resulted in the three,
  507.      somewhat experimental, options added by `g77' to the `gcc'
  508.      compiler and its back end.
  509.  
  510.    * Many other individuals have helped debug, test, and improve `g77'
  511.      over the past several years, and undoubtedly more people will be
  512.      doing so in the future.  If you have done so, and would like to
  513.      see your name listed in the above list, please ask!  The default
  514.      is that people wish to remain anonymous.
  515.  
  516. 
  517. File: ^.!gcc.docs.fortran.g77,  Node: Funding,  Next: Funding GNU Fortran,  Prev: Contributors,  Up: Top
  518.  
  519. Funding Free Software
  520. *********************
  521.  
  522.    If you want to have more free software a few years from now, it makes
  523. sense for you to help encourage people to contribute funds for its
  524. development.  The most effective approach known is to encourage
  525. commercial redistributors to donate.
  526.  
  527.    Users of free software systems can boost the pace of development by
  528. encouraging for-a-fee distributors to donate part of their selling price
  529. to free software developers--the Free Software Foundation, and others.
  530.  
  531.    The way to convince distributors to do this is to demand it and
  532. expect it from them.  So when you compare distributors, judge them
  533. partly by how much they give to free software development.  Show
  534. distributors they must compete to be the one who gives the most.
  535.  
  536.    To make this approach work, you must insist on numbers that you can
  537. compare, such as, "We will donate ten dollars to the Frobnitz project
  538. for each disk sold."  Don't be satisfied with a vague promise, such as
  539. "A portion of the profits are donated," since it doesn't give a basis
  540. for comparison.
  541.  
  542.    Even a precise fraction "of the profits from this disk" is not very
  543. meaningful, since creative accounting and unrelated business decisions
  544. can greatly alter what fraction of the sales price counts as profit.
  545. If the price you pay is $50, ten percent of the profit is probably less
  546. than a dollar; it might be a few cents, or nothing at all.
  547.  
  548.    Some redistributors do development work themselves.  This is useful
  549. too; but to keep everyone honest, you need to inquire how much they do,
  550. and what kind.  Some kinds of development make much more long-term
  551. difference than others.  For example, maintaining a separate version of
  552. a program contributes very little; maintaining the standard version of a
  553. program for the whole community contributes much.  Easy new ports
  554. contribute little, since someone else would surely do them; difficult
  555. ports such as adding a new CPU to the GNU C compiler contribute more;
  556. major new features or packages contribute the most.
  557.  
  558.    By establishing the idea that supporting further development is "the
  559. proper thing to do" when distributing free software for a fee, we can
  560. assure a steady flow of resources into making more free software.
  561.  
  562.      Copyright (C) 1994 Free Software Foundation, Inc.
  563.      Verbatim copying and redistribution of this section is permitted
  564.      without royalty; alteration is not permitted.
  565.  
  566. 
  567. File: ^.!gcc.docs.fortran.g77,  Node: Funding GNU Fortran,  Next: Look and Feel,  Prev: Funding,  Up: Top
  568.  
  569. Funding GNU Fortran
  570. *******************
  571.  
  572.    Work on GNU Fortran is still being done mostly by its author, James
  573. Craig Burley (`burley@gnu.ai.mit.edu'), who is a volunteer for, not an
  574. employee of, the Free Software Foundation (FSF).  As with other GNU
  575. software, funding is important because it can pay for needed equipment,
  576. personnel, and so on.
  577.  
  578.    The FSF provides information on the best way to fund ongoing
  579. development of GNU software (such as GNU Fortran) in documents such as
  580. the "GNUS Bulletin".  Email `gnu@prep.ai.mit.edu' for information on
  581. funding the FSF.
  582.  
  583.    To fund specific GNU Fortran work in particular, the FSF might
  584. provide a means for that, but the FSF does not provide direct funding
  585. to the author of GNU Fortran to continue his work.  The FSF has
  586. employee salary restrictions that can be incompatible with the
  587. financial needs of some volunteers, who therefore choose to remain
  588. volunteers and thus be able to be free to do contract work and
  589. otherwise make their own schedules for doing GNU work.
  590.  
  591.    Still, funding the FSF at least indirectly benefits work on specific
  592. projects like GNU Fortran because it ensures the continuing operation
  593. of the FSF offices, their workstations, their network connections, and
  594. so on, which are invaluable to volunteers.  (Similarly, hiring Cygnus
  595. Support can help a project like GNU Fortran--Cygnus has been a
  596. long-time donor of equipment usage to the author of GNU Fortran, and
  597. this too has been invaluable--*Note Contributors::.)
  598.  
  599.    Currently, the only way to directly fund the author of GNU Fortran
  600. in his work on that project is to hire him for the work you want him to
  601. do, or donate money to him.  Several people have done this already,
  602. with the result that he has not needed to immediately find contract
  603. work on a few occasions.  If more people did this, he would be able to
  604. plan on not doing contract work for many months and could thus devote
  605. that time to work on projects (such as the planned changes for
  606. `g77-0.6') that require longer timeframes to complete.  For the latest
  607. information on the status of the author, do `finger -l
  608. burley@gnu.ai.mit.edu', i.e. access `burley''s `.plan' file just as you
  609. would `fortran''s to get `g77' status (except there's no public `ftp'
  610. access to `burley''s `.plan' file--you can email him asking for it).
  611.  
  612.    Another important way to support work on GNU Fortran is to volunteer
  613. to help out.  Work is needed on documentation, testing, porting to
  614. various machines, and in some cases, coding (although major changes
  615. planned for version 0.6 make it difficult to add manpower to this area).
  616. Email `fortran@gnu.ai.mit.edu' to volunteer for this work.
  617.  
  618.    *Note Funding Free Software: Funding, for more information.
  619.  
  620. 
  621. File: ^.!gcc.docs.fortran.g77,  Node: Look and Feel,  Next: Getting Started,  Prev: Funding GNU Fortran,  Up: Top
  622.  
  623. Protect Your Freedom--Fight "Look And Feel"
  624. *******************************************
  625.  
  626.    To preserve the ability to write free software, including
  627. replacements for proprietary software, authors must be free to
  628. replicate the user interface to which users of existing software have
  629. become accustomed.
  630.  
  631.    *Note Protect Your Freedom--Fight "Look And Feel": (gcc)Look and
  632. Feel, for more information.
  633.  
  634. 
  635. File: ^.!gcc.docs.fortran.g77,  Node: Getting Started,  Next: What is GNU Fortran?,  Prev: Look and Feel,  Up: Top
  636.  
  637. Getting Started
  638. ***************
  639.  
  640.    If you don't need help getting started reading the portions of this
  641. manual that are most important to you, you should skip this portion of
  642. the manual.
  643.  
  644.    If you are new to compilers, especially Fortran compilers, or new to
  645. how compilers are structured under UNIX and UNIX-like systems, you'll
  646. want to see *Note What is GNU Fortran?::.
  647.  
  648.    If you are new to GNU compilers, or have used only one GNU compiler
  649. in the past and not had to delve into how it lets you manage various
  650. versions and configurations of `gcc', you should see *Note G77 and
  651. GCC::.
  652.  
  653.    Everyone except experienced `g77' users should see *Note Invoking
  654. G77::.
  655.  
  656.    If you're acquainted with previous versions of `g77', you should see
  657. *Note News::.  Further, if you've actually used previous versions of
  658. `g77', especially if you've written or modified Fortran code to be
  659. compiled by previous versions of `g77', you should see *Note Changes::.
  660.  
  661.    If you intend to write or otherwise compile code that is not already
  662. strictly conforming ANSI FORTRAN 77--and this is probably everyone--you
  663. should see *Note Language::.
  664.  
  665.    If you don't already have `g77' installed on your system, you must
  666. see *Note Installation::.
  667.  
  668.    If you run into trouble getting Fortran code to compile, link, run,
  669. or work properly, you might find answers if you see *Note Debugging and
  670. Interfacing::, see *Note Collected Fortran Wisdom::, and see *Note
  671. Trouble::.  You might also find that the problems you are encountering
  672. are bugs in `g77'--see *Note Bugs::, for information on reporting them,
  673. after reading the other material.
  674.  
  675.    If you need further help with `g77', or with freely redistributable
  676. software in general, see *Note Service::.
  677.  
  678.    If you would like to help the `g77' project, see *Note Funding GNU
  679. Fortran::, for information on helping financially, and see *Note
  680. Projects::, for information on helping in other ways.
  681.  
  682.    If you're generally curious about the future of `g77', see *Note
  683. Projects::.  If you're curious about its past, see *Note Contributors::,
  684. and see *Note Funding GNU Fortran::.
  685.  
  686.    To see a few of the questions maintainers of `g77' have, and that
  687. you might be able to answer, see *Note Open Questions::.
  688.  
  689. 
  690. File: ^.!gcc.docs.fortran.g77,  Node: What is GNU Fortran?,  Next: G77 and GCC,  Prev: Getting Started,  Up: Top
  691.  
  692. What is GNU Fortran?
  693. ********************
  694.  
  695.    GNU Fortran, or `g77', is designed initially as a free replacement
  696. for, or alternative to, the UNIX `f77' command.  (Similarly, `gcc' is
  697. designed as a replacement for the UNIX `cc' command.)
  698.  
  699.    `g77' also is designed to fit in well with the other fine GNU
  700. compilers and tools.
  701.  
  702.    Sometimes these design goals conflict--in such cases, resolution
  703. often is made in favor of fitting in well with Project GNU.  These
  704. cases are usually identified in the appropriate sections of this manual.
  705.  
  706.    As compilers, `g77', `gcc', and `f77' share the following
  707. characteristics:
  708.  
  709.    * They read a user's program, stored in a file and containing
  710.      instructions written in the appropriate language (Fortran, C, and
  711.      so on).  This file contains "source code".
  712.  
  713.    * They translate the user's program into instructions a computer can
  714.      carry out more quickly than it takes to translate the instructions
  715.      in the first place.  These instructions are called "machine
  716.      code"--code designed to be efficiently translated and processed by
  717.      a machine such as a computer.  Humans usually aren't as good
  718.      writing machine code as they are at writing Fortran or C, because
  719.      it is easy to make tiny mistakes writing machine code.  When
  720.      writing Fortran or C, it is easy to make big mistakes.
  721.  
  722.    * They provide information in the generated machine code that can
  723.      make it easier to find bugs in the program (using a debugging
  724.      tool, called a "debugger", such as `gdb').
  725.  
  726.    * They locate and gather machine code already generated to perform
  727.      actions requested by statements in the user's program.  This
  728.      machine code is organized into "libraries" and is located and
  729.      gathered during the "link" phase of the compilation process.
  730.      (Linking often is thought of as a separate step, because it can be
  731.      directly invoked via the `ld' command.  However, the `g77' and
  732.      `gcc' commands, as with most compiler commands, automatically
  733.      perform the linking step by calling on `ld' directly, unless asked
  734.      to not do so by the user.)
  735.  
  736.    * They attempt to diagnose cases where the user's program contains
  737.      incorrect usages of the language.  The "diagnostics" produced by
  738.      the compiler indicate the problem and the location in the user's
  739.      source file where the problem was first noticed.  The user can use
  740.      this information to locate and fix the problem.  (Sometimes an
  741.      incorrect usage of the language leads to a situation where the
  742.      compiler can no longer make any sense of what follows--while a
  743.      human might be able to--and thus ends up complaining about many
  744.      "problems" it encounters that, in fact, stem from just one
  745.      problem, usually the first one reported.)
  746.  
  747.    * They attempt to diagnose cases where the user's program contains a
  748.      correct usage of the language, but instructs the computer to do
  749.      something questionable.  These diagnostics often are in the form
  750.      of "warnings", instead of the "errors" that indicate incorrect
  751.      usage of the language.
  752.  
  753.    How these actions are performed is generally under the control of
  754. the user.  Using command-line options, the user can specify how
  755. persnickety the compiler is to be regarding the program (whether to
  756. diagnose questionable usage of the language), how much time to spend
  757. making the generated machine code run faster, and so on.
  758.  
  759.    `g77' consists of several components:
  760.  
  761.    * A modified version of the `gcc' command, which also might be
  762.      installed as the system's `cc' command.  (In many cases, `cc'
  763.      refers to the system's "native" C compiler, which might be a
  764.      non-GNU compiler, or an older version of `gcc' considered more
  765.      stable or that is used to build the operating system kernel.)
  766.  
  767.    * The `g77' command itself, which also might be installed as the
  768.      system's `f77' command.
  769.  
  770.    * The `libf2c' run-time library.  This library contains the machine
  771.      code needed to support capabilities of the Fortran language that
  772.      are not directly provided by the machine code generated by the
  773.      `g77' compilation phase.
  774.  
  775.    * The compiler itself, internally named `f771'.
  776.  
  777.      Note that `f771' does not generate machine code directly--it
  778.      generates "assembly code" that is a more readable form of machine
  779.      code, leaving the conversion to actual machine code to an
  780.      "assembler", usually named `as'.
  781.  
  782.    `gcc' is often thought of as "the C compiler" only, but it does more
  783. than that.  Based on command-line options and the names given for files
  784. on the command line, `gcc' determines which actions to perform,
  785. including preprocessing, compiling (in a variety of possible
  786. languages), assembling, and linking.
  787.  
  788.    For example, the command `gcc foo.c' "drives" the file `foo.c'
  789. through the preprocessor `cpp', then the C compiler (internally named
  790. `cc1'), then the assembler (usually `as'), then the linker (`ld'),
  791. producing an executable program named `a.out' (on UNIX systems).
  792.  
  793.    As another example, the command `gcc foo.cc' would do much the same
  794. as `gcc foo.c', but instead of using the C compiler named `cc1', `gcc'
  795. would use the C++ compiler (named `cc1plus').
  796.  
  797.    In a GNU Fortran installation, `gcc' recognizes Fortran source files
  798. by name just like it does C and C++ source files.  It knows to use the
  799. Fortran compiler named `f771', instead of `cc1' or `cc1plus', to
  800. compile Fortran files.
  801.  
  802.    Non-Fortran-related operation of `gcc' is generally unaffected by
  803. installing the GNU Fortran version of `gcc'.  However, without the
  804. installed version of `gcc' being the GNU Fortran version, `gcc' will
  805. not be able to compile and link Fortran programs--and since `g77' uses
  806. `gcc' to do most of the actual work, neither will `g77'!
  807.  
  808.    The `g77' command is essentially just a front-end for the `gcc'
  809. command.  Fortran users will normally use `g77' instead of `gcc',
  810. because `g77' knows how to specify the libraries needed to link with
  811. Fortran programs (`libf2c' and `lm').  `g77' can still compile and link
  812. programs and source files written in other languages, just like `gcc'.
  813.  
  814.    The command `g77 -v' is a quick way to display lots of version
  815. information for the various programs used to compile a typical
  816. preprocessed Fortran source file--this produces much more output than
  817. `gcc -v' currently does.  (It also produces an error message near the
  818. end of the output, a diagnostic from the linker, usually `ld'--you can
  819. safely ignore this error, but do include the entire output with any bug
  820. report you submit.) In the output of this command, the line beginning
  821. `GNU Fortran Front End' identifies the version number of GNU Fortran;
  822. immediately preceding that line is a line identifying the version of
  823. `gcc' with which that version of `g77' was built.
  824.  
  825.    The `libf2c' library is distributed with GNU Fortran for the
  826. convenience of its users, but is not part of GNU Fortran.  It contains
  827. the procedures needed by Fortran programs while they are running.
  828.  
  829.    For example, while code generated by `g77' is likely to do
  830. additions, subtractions, and multiplications "in line"--in the actual
  831. compiled code--it is not likely to do trigonometric functions this way.
  832.  
  833.    Instead, operations like trigonometric functions are compiled by the
  834. `f771' compiler (invoked by `g77' when compiling Fortran code) into
  835. machine code that, when run, calls on functions in `libf2c', so
  836. `libf2c' must be linked with almost every useful program having any
  837. component compiled by GNU Fortran.  (As mentioned above, the `g77'
  838. command takes care of all this for you.)
  839.  
  840.    The `f771' program represents most of what is unique to GNU Fortran.
  841. While the `libf2c' component is really part of `f2c', a free
  842. Fortran-to-C converter distributed by Bellcore (AT&T), and the `g77'
  843. command is just a small front-end to `gcc', `f771' is a combination of
  844. two rather large chunks of code.
  845.  
  846.    One chunk is the so-called "GNU Back End", or GBE, which knows how
  847. to generate fast code for a wide variety of processors.  The same GBE
  848. is used by the C, C++, and Fortran compiler programs `cc1', `cc1plus',
  849. and `f771', plus others.  Often the GBE is referred to as the "gcc back
  850. end" or even just "gcc"--in this manual, the term GBE is used whenever
  851. the distinction is important.
  852.  
  853.    The other chunk of `f771' is the majority of what is unique about
  854. GNU Fortran--the code that knows how to interpret Fortran programs to
  855. determine what they are intending to do, and then communicate that
  856. knowledge to the GBE for actual compilation of those programs.  This
  857. chunk is called the "Fortran Front End" (FFE).  The `cc1' and `cc1plus'
  858. programs have their own front ends, for the C and C++ languages,
  859. respectively.  These fronts ends are responsible for diagnosing
  860. incorrect usage of their respective languages by the programs the
  861. process, and are responsible for most of the warnings about
  862. questionable constructs as well.  (The GBE handles producing some
  863. warnings, like those concerning possible references to undefined
  864. variables.)
  865.  
  866.    Because so much is shared among the compilers for various languages,
  867. much of the behavior and many of the user-selectable options for these
  868. compilers are similar.  For example, diagnostics (error messages and
  869. warnings) are similar in appearance; command-line options like `-Wall'
  870. have generally similar effects; and the quality of generated code (in
  871. terms of speed and size) is roughly similar (since that work is done by
  872. the shared GBE).
  873.  
  874. 
  875. File: ^.!gcc.docs.fortran.g77,  Node: G77 and GCC,  Next: Invoking G77,  Prev: What is GNU Fortran?,  Up: Top
  876.  
  877. Compile Fortran, C, or Other Programs
  878. *************************************
  879.  
  880.    A GNU Fortran installation includes a modified version of the `gcc'
  881. command.
  882.  
  883.    In a non-Fortran installation, `gcc' recognizes C, C++, and
  884. Objective-C source files.
  885.  
  886.    In a GNU Fortran installation, `gcc' also recognizes Fortran source
  887. files and accepts Fortran-specific command-line options, plus some
  888. command-line options that are designed to cater to Fortran users but
  889. apply to other languages as well.
  890.  
  891.    *Note Compile C; C++; or Objective-C: (gcc)G++ and GCC, for
  892. information on the way different languages are handled by the GNU CC
  893. compiler (`gcc').
  894.  
  895.    Also provided as part of GNU Fortran is the `g77' command.  The
  896. `g77' command is designed to make compiling and linking Fortran
  897. programs somewhat easier than when using the `gcc' command for these
  898. tasks.  It does this by analyzing the command line somewhat and
  899. changing it appropriately before submitting it to the `gcc' command.
  900.  
  901.    Use the `-v' option with `g77' to see what is going on--the first
  902. line of output is the invocation of the `gcc' command.  Use
  903. `--driver=true' to disable actual invocation of `gcc' (this works
  904. because `true' is the name of a UNIX command that simply returns
  905. success status).
  906.  
  907. 
  908. File: ^.!gcc.docs.fortran.g77,  Node: Invoking G77,  Next: News,  Prev: G77 and GCC,  Up: Top
  909.  
  910. GNU Fortran Command Options
  911. ***************************
  912.  
  913.    The `g77' command supports all the options supported by the `gcc'
  914. command.  *Note GNU CC Command Options: (gcc)Invoking GCC, for
  915. information on the non-Fortran-specific aspects of the `gcc' command
  916. (and, therefore, the `g77' command).
  917.  
  918.    The `g77' command supports one option not supported by the `gcc'
  919. command:
  920.  
  921. `--driver=COMMAND'
  922.      Specifies that COMMAND, rather than `gcc', is to be invoked by
  923.      `g77' to do its job.  For example, within the gcc build directory
  924.      after building GNU Fortran (but without having to install it),
  925.      `./g77 --driver=./xgcc foo.f -B./'.
  926.  
  927.    All other options are supported both by `g77' and by `gcc' as
  928. modified (and reinstalled) by the `g77' distribution.  In some cases,
  929. options have positive and negative forms; the negative form of `-ffoo'
  930. would be `-fno-foo'.  This manual documents only one of these two
  931. forms, whichever one is not the default.
  932.  
  933. * Menu:
  934.  
  935. * Option Summary::    Brief list of all `g77' options,
  936.                         without explanations.
  937. * Overall Options::     Controlling the kind of output:
  938.                         an executable, object files, assembler files,
  939.                         or preprocessed source.
  940. * Fortran Dialect Options::  Controlling the variant of Fortran language
  941.                              compiled.
  942. * Warning Options::     How picky should the compiler be?
  943. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  944. * Optimize Options::    How much optimization?
  945. * Preprocessor Options:: Controlling header files and macro definitions.
  946.                          Also, getting dependency information for Make.
  947. * Directory Options::   Where to find header files and libraries.
  948.                         Where to find the compiler executable files.
  949. * Code Gen Options::    Specifying conventions for function calls, data layout
  950.                         and register usage.
  951. * Environment Variables:: Env vars that affect GNU Fortran.
  952.  
  953. 
  954. File: ^.!gcc.docs.fortran.g77,  Node: Option Summary,  Next: Overall Options,  Up: Invoking G77
  955.  
  956. Option Summary
  957. ==============
  958.  
  959.    Here is a summary of all the options specific to GNU Fortran, grouped
  960. by type.  Explanations are in the following sections.
  961.  
  962. *Overall Options*
  963.      *Note Options Controlling the Kind of Output: Overall Options.
  964.           --driver  -fversion  -fset-g77-defaults
  965.  
  966. *Fortran Language Options*
  967.      *Note Options Controlling Fortran Dialect: Fortran Dialect Options.
  968.           -ffree-form  -fno-fixed-form  -ff90  -fvxt-not-f90
  969.           -ff90-not-vxt  -fdollar-ok  -fno-backslash
  970.           -fintrin-case-initcap  -fintrin-case-upper
  971.           -fintrin-case-lower  -fintrin-case-any
  972.           -fmatch-case-initcap  -fmatch-case-upper
  973.           -fmatch-case-lower  -fmatch-case-any
  974.           -fsource-case-upper -fsource-case-lower  -fsource-case-preserve
  975.           -fsymbol-case-initcap  -fsymbol-case-upper
  976.           -fsymbol-case-lower  -fsymbol-case-any
  977.           -fcase-strict-upper  -fcase-strict-lower
  978.           -fcase-initcap  -fcase-upper  -fcase-lower  -fcase-preserve
  979.           -fdcp-intrinsics-delete  -fdcp-intrinsics-hide
  980.           -fdcp-intrinsics-disable  -fdcp-intrinsics-enable
  981.           -ff2c-intrinsics-delete  -ff2c-intrinsics-hide
  982.           -ff2c-intrinsics-disable  -ff2c-intrinsics-enable
  983.           -ff90-intrinsics-delete  -ff90-intrinsics-hide
  984.           -ff90-intrinsics-disable  -ff90-intrinsics-enable
  985.           -fmil-intrinsics-delete  -fmil-intrinsics-hide
  986.           -fmil-intrinsics-disable  -fmil-intrinsics-enable
  987.           -funix-intrinsics-delete  -funix-intrinsics-hide
  988.           -funix-intrinsics-disable  -funix-intrinsics-enable
  989.           -fvxt-intrinsics-delete  -fvxt-intrinsics-hide
  990.           -fvxt-intrinsics-disable  -fvxt-intrinsics-enable
  991.           -ffixed-line-length-N  -ffixed-line-length-none
  992.  
  993. *Warning Options*
  994.      *Note Options to Request or Suppress Warnings: Warning Options.
  995.           -fsyntax-only  -pedantic  -pedantic-errors  -fpedantic
  996.           -fugly  -fno-ugly-args  -fno-ugly-init  -w  -Wimplicit
  997.           -Wunused  -Wuninitialized  -Wall  -Wsurprising  -Werror
  998.           -W
  999.  
  1000. *Debugging Options*
  1001.      *Note Options for Debugging Your Program or GCC: Debugging Options.
  1002.           -g
  1003.  
  1004. *Optimization Options*
  1005.      *Note Options that Control Optimization: Optimize Options.
  1006.           -ffloat-store  -fforce-mem  -fforce-addr  -fno-inline
  1007.           -ffast-math  -fstrength-reduce  -frerun-cse-after-loop
  1008.           -fexpensive-optimizations  -fdelayed-branch
  1009.           -fschedule-insns  -fschedule-insn2  -fcaller-saves
  1010.           -funroll-loops  -funroll-all-loops
  1011.           -fno-move-all-movables  -fno-reduce-all-givs
  1012.           -fno-rerun-loop-opt
  1013.  
  1014. *Directory Options*
  1015.      *Note Options for Directory Search: Directory Options.
  1016.           -IDIR  -I-
  1017.  
  1018. *Code Generation Options*
  1019.      *Note Options for Code Generation Conventions: Code Gen Options.
  1020.           -fno-automatic  -finit-local-zero  -fno-f2c
  1021.           -ff2c-library  -fno-underscoring  -fno-ident
  1022.           -fpcc-struct-return  -freg-struct-return
  1023.           -fshort-double  -fno-common  -fpack-struct
  1024.           -fzeros
  1025.  
  1026. * Menu:
  1027.  
  1028. * Overall Options::     Controlling the kind of output:
  1029.                         an executable, object files, assembler files,
  1030.                         or preprocessed source.
  1031. * Fortran Dialect Options::  Controlling the variant of Fortran language
  1032.                              compiled.
  1033. * Warning Options::     How picky should the compiler be?
  1034. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  1035. * Optimize Options::    How much optimization?
  1036. * Preprocessor Options:: Controlling header files and macro definitions.
  1037.                          Also, getting dependency information for Make.
  1038. * Directory Options::   Where to find header files and libraries.
  1039.                         Where to find the compiler executable files.
  1040. * Code Gen Options::    Specifying conventions for function calls, data layout
  1041.                         and register usage.
  1042.  
  1043. 
  1044. File: ^.!gcc.docs.fortran.g77,  Node: Overall Options,  Next: Fortran Dialect Options,  Prev: Option Summary,  Up: Invoking G77
  1045.  
  1046. Options Controlling the Kind of Output
  1047. ======================================
  1048.  
  1049.    Compilation can involve as many as four stages: preprocessing,
  1050. compilation proper, assembly, and linking, always in that order.  The
  1051. first three stages apply to an individual source file, and end by
  1052. producing an object file; linking combines all the object files (those
  1053. newly compiled, and those specified as input) into an executable file.
  1054.  
  1055.    For any given input file, the file name suffix determines what kind
  1056. of compilation is done.  Suffixes specific to GNU Fortran are listed
  1057. below.  *Note gcc: (Using and Porting GNU CC)Overall Options, for
  1058. information on suffixes recognized by GNU CC.
  1059.  
  1060. `FILE.f'
  1061. `FILE.for'
  1062.      Fortran source code that should not be preprocessed.
  1063.  
  1064. `FILE.F'
  1065. `FILE.fpp'
  1066.      Fortran source code that must be preprocessed (by the C
  1067.      preprocessor `cpp', which is part of GNU CC).
  1068.  
  1069.    UNIX users typically use the `FILE.f' and `FILE.F' nomenclature.
  1070. Users of other operating systems, especially those that cannot
  1071. distinguish upper-case letters from lower-case letters in their file
  1072. names, typically use the `FILE.for' and `FILE.fpp' nomenclature.
  1073.  
  1074.    Use of the preprocessor `cpp' allows use of C-like constructs such
  1075. as `#define' and `#include', but can lead to unexpected, even mistaken,
  1076. results due to Fortran's source file format.  It is recommended that
  1077. use of the C preprocessor be limited to `#include' and, in conjunction
  1078. with `#define', only `#if' and related directives, thus avoiding
  1079. in-line macro expansion entirely.  This recommendation applies
  1080. especially when using the traditional fixed source form.  With free
  1081. source form, fewer unexpected transformations are likely to happen, but
  1082. use of Hollerith and things like continued character constants can
  1083. nevertheless present problems.
  1084.  
  1085.    The following options that affect overall processing are recognized
  1086. by the `g77' and `gcc' commands in a GNU Fortran installation:
  1087.  
  1088. `--driver=COMMAND'
  1089.      This works only when invoking the `g77' command, not when invoking
  1090.      the `gcc' command.  *Note GNU Fortran Command Options: Invoking
  1091.      G77, for information on this option.
  1092.  
  1093. `-fversion'
  1094.      Ensure that the `g77'-specific version of the compiler phase is
  1095.      reported, if run.  (This is supplied automatically when `-v' or
  1096.      `--version' is specified as a command-line option for `g77' or
  1097.      `gcc' and when the resulting commands compile Fortran source
  1098.      files.)
  1099.  
  1100. `-fset-g77-defaults'
  1101.      Set up whatever `gcc' options are to apply to Fortran compilations.
  1102.      For version 0.5.18, this is equivalent to `-fmove-all-movables
  1103.      -freduce-all-givs -frerun-loop-opt'.  (This is supplied
  1104.      automatically when compiling Fortran code.  The description of
  1105.      this option is here so that users seeing it in the output of, say,
  1106.      `g77 -v' understand why it is there.  Also, developers who run
  1107.      `f771' directly might want to specify it by hand to get the same
  1108.      defaults as they would running `f771' via `g77' or `gcc'.)
  1109.  
  1110.    *Note Options Controlling the Kind of Output: (gcc)Overall Options,
  1111. for information on more options that control the overall operation of
  1112. the `gcc' command (and, by extension, the `g77' command).
  1113.  
  1114. 
  1115. File: ^.!gcc.docs.fortran.g77,  Node: Fortran Dialect Options,  Next: Warning Options,  Prev: Overall Options,  Up: Invoking G77
  1116.  
  1117. Options Controlling Fortran Dialect
  1118. ===================================
  1119.  
  1120.    The following options control the dialect of Fortran that the
  1121. compiler accepts:
  1122.  
  1123. `-ffree-form'
  1124. `-fno-fixed-form'
  1125.      Specify that the source file is written in free form (introduced
  1126.      in Fortran 90) instead of the more-traditional fixed form.
  1127.  
  1128. `-ff90'
  1129.      Allow certain Fortran-90 constructs.
  1130.  
  1131.      This option controls whether certain Fortran 90 constructs are
  1132.      recognized.  (Other Fortran 90 constructs might or might not be
  1133.      recognized depending on other options such as `-fvxt-not-f90',
  1134.      `-ff90-intrinsics-enable', and the current level of support for
  1135.      Fortran 90.)
  1136.  
  1137.      *Note GNU Fortran Extensions: Extensions, for more information.
  1138.  
  1139. `-fvxt-not-f90'
  1140. `-ff90-not-vxt'
  1141.      Specify whether Fortran 90 or other popular extensions are to be
  1142.      assumed for ambiguous constructs.  The default is -fvxt-not-f90.
  1143.  
  1144.      For example, with `-ff90-not-vxt', `PRINT *,"double-quoted
  1145.      string"' is valid, while with `-fvxt-not-f90', `PRINT *,"2000' is
  1146.      valid.
  1147.  
  1148.      (There is no way to allow both constructs in the general case,
  1149.      since statements like `PRINT *,"2000 !comment?"' would be
  1150.      ambiguous.)
  1151.  
  1152.      *Note GNU Fortran Dialects: Dialects, for more information.
  1153.  
  1154. `-fdollar-ok'
  1155.      Allow `$' as a valid character in a symbol name.
  1156.  
  1157. `-fno-backslash'
  1158.      Specify that `\' is not to be specially interpreted in character
  1159.      and Hollerith constants a la C and many UNIX Fortran compilers.
  1160.  
  1161.      For example, with `-fbackslash' in effect, `A\nB' specifies three
  1162.      characters, with the second one being newline.  With
  1163.      `-fno-backslash', it specifies four characters, `A', `\', `n', and
  1164.      `B'.
  1165.  
  1166.      Note that `g77' implements a fairly general form of backslash
  1167.      processing that is incompatible with the narrower forms supported
  1168.      by some other compilers.  For example, `'A\003B'' is a
  1169.      three-character string in `g77', whereas other compilers that
  1170.      support backslash might not support the three-octal-digit form,
  1171.      and thus treat that string as longer than three characters.
  1172.  
  1173.      *Note Certain Changes We Don't Want to Make: Non-bugs, for
  1174.      information on why `-fbackslash' is the default instead of
  1175.      `-fno-backslash'.
  1176.  
  1177. `-fintrin-case-initcap'
  1178. `-fintrin-case-upper'
  1179. `-fintrin-case-lower'
  1180. `-fintrin-case-any'
  1181.      Specify expected case for intrinsic names.  `-fintrin-case-lower'
  1182.      is the default.
  1183.  
  1184. `-fmatch-case-initcap'
  1185. `-fmatch-case-upper'
  1186. `-fmatch-case-lower'
  1187. `-fmatch-case-any'
  1188.      Specify expected case for keywords.  `-fmatch-case-lower' is the
  1189.      default.
  1190.  
  1191. `-fsource-case-upper'
  1192. `-fsource-case-lower'
  1193. `-fsource-case-preserve'
  1194.      Specify whether source text other than character and Hollerith
  1195.      constants is to be translated to uppercase, to lowercase, or
  1196.      preserved as is.  `-fsource-case-lower' is the default.
  1197.  
  1198. `-fsymbol-case-initcap'
  1199. `-fsymbol-case-upper'
  1200. `-fsymbol-case-lower'
  1201. `-fsymbol-case-any'
  1202.      Specify valid cases for user-defined symbol names.
  1203.      `-fsymbol-case-any' is the default.
  1204.  
  1205. `-fcase-strict-upper'
  1206.      Same as `-fintrin-case-upper -fmatch-case-upper
  1207.      -fsource-case-preserve -fsymbol-case-upper'.  (Requires all
  1208.      pertinent source to be in uppercase.)
  1209.  
  1210. `-fcase-strict-lower'
  1211.      Same as `-fintrin-case-lower -fmatch-case-lower
  1212.      -fsource-case-preserve -fsymbol-case-lower'.  (Requires all
  1213.      pertinent source to be in lowercase.)
  1214.  
  1215. `-fcase-initcap'
  1216.      Same as `-fintrin-case-initcap -fmatch-case-initcap
  1217.      -fsource-case-preserve -fsymbol-case-initcap'.  (Requires all
  1218.      pertinent source to be in initial capitals, as in `Print
  1219.      *,SqRt(Value)'.)
  1220.  
  1221. `-fcase-upper'
  1222.      Same as `-fintrin-case-any -fmatch-case-any -fsource-case-upper
  1223.      -fsymbol-case-any'.  (Maps all pertinent source to uppercase.)
  1224.  
  1225. `-fcase-lower'
  1226.      Same as `-fintrin-case-any -fmatch-case-any -fsource-case-lower
  1227.      -fsymbol-case-any'.  (Maps all pertinent source to lowercase.)
  1228.  
  1229. `-fcase-preserve'
  1230.      Same as `-fintrin-case-any -fmatch-case-any -fsource-case-preserve
  1231.      -fsymbol-case-any'.  (Preserves all case in user-defined symbols,
  1232.      while allowing any-case matching of intrinsics and keywords.  For
  1233.      example, `call Foo(i,I)' would pass two *different* variables
  1234.      named `i' and `I' to a procedure named `Foo'.)
  1235.  
  1236. `-fdcp-intrinsics-delete'
  1237. `-fdcp-intrinsics-hide'
  1238. `-fdcp-intrinsics-disable'
  1239. `-fdcp-intrinsics-enable'
  1240.      Specify status of Digital's COMPLEX-related intrinsics.
  1241.      `-fdcp-intrinsics-enable' is the default.
  1242.  
  1243. `-ff2c-intrinsics-delete'
  1244. `-ff2c-intrinsics-hide'
  1245. `-ff2c-intrinsics-disable'
  1246. `-ff2c-intrinsics-enable'
  1247.      Specify status of f2c-specific intrinsics.
  1248.      `-ff2c-intrinsics-enable' is the default.
  1249.  
  1250. `-ff90-intrinsics-delete'
  1251. `-ff90-intrinsics-hide'
  1252. `-ff90-intrinsics-disable'
  1253. `-ff90-intrinsics-enable'
  1254.      Specify status of F90-specific intrinsics.
  1255.      `-ff90-intrinsics-delete' is the default.
  1256.  
  1257. `-fmil-intrinsics-delete'
  1258. `-fmil-intrinsics-hide'
  1259. `-fmil-intrinsics-disable'
  1260. `-fmil-intrinsics-enable'
  1261.      Specify status of MIL-STD-1753-specific intrinsics.
  1262.      `-fmil-intrinsics-enable' is the default.
  1263.  
  1264. `-funix-intrinsics-delete'
  1265. `-funix-intrinsics-hide'
  1266. `-funix-intrinsics-disable'
  1267. `-funix-intrinsics-enable'
  1268.      Specify status of UNIX intrinsics.  `-funix-intrinsics-enable' is
  1269.      the default.
  1270.  
  1271.      For example, if your code invokes `FLUSH' as a library function
  1272.      and thus works with other UNIX Fortran compilers or earlier
  1273.      version of `g77', either add the `EXTERNAL FLUSH' statement or,
  1274.      perhaps more convenient for you, compile with the
  1275.      -funix-intrinsics-hide or -funix-intrinsics-delete option.
  1276.  
  1277.      Note that `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are
  1278.      intrinsic subroutines, not functions (since they have side
  1279.      effects), so to get the return values from `SIGNAL' and `SYSTEM',
  1280.      append a final argument specifying an `INTEGER' variable or array
  1281.      element to receive the returned status.  (For example, `CALL
  1282.      SYSTEM('rm foo',ISTAT)'.)
  1283.  
  1284.      `FLUSH()' accepts an optional single `INTEGER' argument, since
  1285.      many Fortran implementations allow or require a unit number.
  1286.      Currently, since `libf2c' does not flush a given unit number, this
  1287.      argument is not used--all units are flushed by `libf2c''s
  1288.      implementation of `FLUSH()'.  Do not depend on this behavior--if
  1289.      you want to flush all units, use `CALL FLUSH' (that is, specify no
  1290.      arguments to `FLUSH').
  1291.  
  1292.      `EXIT()' accepts an optional single `INTEGER' argument.  If
  1293.      omitted, zero is the default (as in `CALL EXIT(0)').  The default
  1294.      might change on configurations where the "normal return status" is
  1295.      not zero, however.  If you want to return a "success" status, it
  1296.      is best to call `EXIT' with no arguments in your code, and let
  1297.      `g77' choose the appropriate default.
  1298.  
  1299. `-fvxt-intrinsics-delete'
  1300. `-fvxt-intrinsics-hide'
  1301. `-fvxt-intrinsics-disable'
  1302. `-fvxt-intrinsics-enable'
  1303.      Specify status of VXT intrinsics.  `-fvxt-intrinsics-delete' is
  1304.      the default.
  1305.  
  1306. `-ffixed-line-length-N'
  1307.      Set column after which characters are ignored in typical fixed-form
  1308.      lines in the source file.
  1309.  
  1310.      Popular values for N include 72 (the standard and the default), 80
  1311.      (card image), and 132 (corresponds to "extended-source" options in
  1312.      some popular compilers).  N may be `none', meaning that the entire
  1313.      line is meaningful and that continued character constants never
  1314.      have implicit spaces appended to them to fill out the line.
  1315.      `-ffixed-line-length-0' means the same thing as
  1316.      `-ffixed-line-length-none'.
  1317.  
  1318. 
  1319. File: ^.!gcc.docs.fortran.g77,  Node: Warning Options,  Next: Debugging Options,  Prev: Fortran Dialect Options,  Up: Invoking G77
  1320.  
  1321. Options to Request or Suppress Warnings
  1322. =======================================
  1323.  
  1324.    Warnings are diagnostic messages that report constructions which are
  1325. not inherently erroneous but which are risky or suggest there might
  1326. have been an error.
  1327.  
  1328.    You can request many specific warnings with options beginning `-W',
  1329. for example `-Wimplicit' to request warnings on implicit declarations.
  1330. Each of these specific warning options also has a negative form
  1331. beginning `-Wno-' to turn off warnings; for example, `-Wno-implicit'.
  1332. This manual lists only one of the two forms, whichever is not the
  1333. default.
  1334.  
  1335.    These options control the amount and kinds of warnings produced by
  1336. GNU Fortran:
  1337.  
  1338. `-fsyntax-only'
  1339.      Check the code for syntax errors, but don't do anything beyond
  1340.      that.
  1341.  
  1342. `-pedantic'
  1343.      Issue warnings for uses of extensions to ANSI FORTRAN 77.
  1344.      `-pedantic' also applies to C-language constructs where they occur
  1345.      in GNU Fortran source files, such as use of `\e' in a character
  1346.      constant within a directive like `#include'.
  1347.  
  1348.      Valid ANSI FORTRAN 77 programs should compile properly with or
  1349.      without this option.  However, without this option, certain GNU
  1350.      extensions and traditional Fortran features are supported as well.
  1351.      With this option, many of them are rejected.
  1352.  
  1353.      Some users try to use `-pedantic' to check programs for strict ANSI
  1354.      conformance.  They soon find that it does not do quite what they
  1355.      want: it finds some non-ANSI practices, but not all--however,
  1356.      improvements to `g77' in this area are welcome.
  1357.  
  1358. `-pedantic-errors'
  1359.      Like `-pedantic', except that errors are produced rather than
  1360.      warnings.
  1361.  
  1362. `-fpedantic'
  1363.      Like `-pedantic', but applies only to Fortran constructs.
  1364.  
  1365. `-fugly'
  1366.      Specify that certain "ugly" constructs are to be quietly accepted.
  1367.      Implies `-fugly-args' and `-fugly-init' as well.
  1368.  
  1369.      For example, with `-fno-ugly', `CALL FOO(,)' means to pass one
  1370.      null argument, whereas with `-fugly', it means to pass two null
  1371.      arguments.
  1372.  
  1373. `-fno-ugly-args'
  1374.      Disallow passing Hollerith and typeless constants as actual
  1375.      arguments (for example, `CALL FOO(4HABCD)').
  1376.  
  1377. `-fno-ugly-init'
  1378.      Disallow use of Hollerith and typeless constants as initial values
  1379.      (in `PARAMETER' and `DATA' statements), and use of character
  1380.      constants to initialize numeric types and vice versa.
  1381.  
  1382.      For example, `DATA I/'F'/, CHRVAR/65/, J/4HABCD/' is disallowed by
  1383.      `-fno-ugly-init'.
  1384.  
  1385. `-w'
  1386.      Inhibit all warning messages.
  1387.  
  1388. `-Wimplicit'
  1389.      Warn whenever a variable, array, or function is implicitly
  1390.      declared.  Has an effect similar to using the `IMPLICIT NONE'
  1391.      statement in every program unit.  (Some Fortran compilers provide
  1392.      this feature by an option named `-u' or `/WARNINGS=DECLARATIONS'.)
  1393.  
  1394. `-Wunused'
  1395.      Warn whenever a variable is unused aside from its declaration.
  1396.  
  1397. `-Wuninitialized'
  1398.      Warn whenever an automatic variable is used without first being
  1399.      initialized.
  1400.  
  1401.      These warnings are possible only in optimizing compilation,
  1402.      because they require data flow information that is computed only
  1403.      when optimizing.  If you don't specify `-O', you simply won't get
  1404.      these warnings.
  1405.  
  1406.      These warnings occur only for variables that are candidates for
  1407.      register allocation.  Therefore, they do not occur for a variable
  1408.      that is declared `volatile', or whose address is taken, or whose
  1409.      size is other than 1, 2, 4 or 8 bytes.  Also, they do not occur for
  1410.      arrays, even when they are in registers.
  1411.  
  1412.      Note that there may be no warning about a variable that is used
  1413.      only to compute a value that itself is never used, because such
  1414.      computations may be deleted by data flow analysis before the
  1415.      warnings are printed.
  1416.  
  1417.      These warnings are made optional because GNU Fortran is not smart
  1418.      enough to see all the reasons why the code might be correct
  1419.      despite appearing to have an error.  Here is one example of how
  1420.      this can happen:
  1421.  
  1422.           SUBROUTINE DISPAT(J)
  1423.           IF (J.EQ.1) I=1
  1424.           IF (J.EQ.2) I=4
  1425.           IF (J.EQ.3) I=5
  1426.           CALL FOO(I)
  1427.           END
  1428.  
  1429.      If the value of `J' is always 1, 2 or 3, then `I' is always
  1430.      initialized, but GNU Fortran doesn't know this.  Here is another
  1431.      common case:
  1432.  
  1433.           SUBROUTINE MAYBE(FLAG)
  1434.           LOGICAL FLAG
  1435.           IF (FLAG) VALUE = 3.14
  1436.           ...
  1437.           IF (FLAG) PRINT *, VALUE
  1438.           END
  1439.  
  1440.      This has no bug because `VALUE' is used only if it is set.
  1441.  
  1442. `-Wall'
  1443.      The `-Wunused' and `-Wuninitialized' options combined.  These are
  1444.      all the options which pertain to usage that we recommend avoiding
  1445.      and that we believe is easy to avoid.  (As more warnings are added
  1446.      to `g77', some might be added to the list enabled by `-Wall'.)
  1447.  
  1448.    The remaining `-W...' options are not implied by `-Wall' because
  1449. they warn about constructions that we consider reasonable to use, on
  1450. occasion, in clean programs.
  1451.  
  1452. `-Wsurprising'
  1453.      Warn about "suspicious" constructs that are interpreted by the
  1454.      compiler in a way that might well be surprising to someone reading
  1455.      the code.  These differences can result in subtle,
  1456.      compiler-dependent (even machine-dependent) behavioral differences.
  1457.      The constructs warned about include:
  1458.  
  1459.         * Expressions having two arithmetic operators in a row, such as
  1460.           `X*-Y'.  Such a construct is nonstandard, and can produce
  1461.           unexpected results in more complicated situations such as
  1462.           `X**-Y*Z'.  `g77', along with many other compilers, interprets
  1463.           this example differently than many programmers, and a few
  1464.           other compilers.  Specifically, `g77' interprets `X**-Y*Z' as
  1465.           `(X**(-Y))*Z', while others might think it should be
  1466.           interpreted as `X**(-(Y*Z))'.
  1467.  
  1468.           A revealing example is the constant expression `2**-2*1.',
  1469.           which `g77' evaluates to .25, while others might evaluate it
  1470.           to 0., the difference being the way precedence affects type
  1471.           promotion.
  1472.  
  1473.           (The `-fpedantic' option also warns about expressions having
  1474.           two arithmetic operators in a row.)
  1475.  
  1476.         * Expressions with a unary minus followed by an operand and then
  1477.           a binary operator other than plus or minus.  For example,
  1478.           `-2**2' produces a warning, because the precedence is
  1479.           `-(2**2)', yielding -4, not `(-2)**2', which yields 4, and
  1480.           which might represent what a programmer expects.  Even cases
  1481.           such as `-I*J' produce warnings, even though, in most
  1482.           configurations and situations, there is no computational
  1483.           difference between the results of the two
  1484.           interpretations--the purpose of this warning is to warn about
  1485.           differing interpretations and encourage a better style of
  1486.           coding, not to identify only those places where bugs might
  1487.           exist in the user's code.
  1488.  
  1489.         * `DO' loops with `DO' variables that are not of integral
  1490.           type--that is, using `REAL' or `DOUBLE PRECISION' variables
  1491.           as loop control variables.  Although such loops can be
  1492.           written to work in the "obvious" way, the way `g77' is
  1493.           required by the Fortran standard to interpret such code is
  1494.           likely to be quite different from the way many programmers
  1495.           expect.  (This is true of all `DO' loops, but the differences
  1496.           are pronounced for non-integral loop control variables.)
  1497.  
  1498.           *Note Loops::, for more information.
  1499.  
  1500. `-Werror'
  1501.      Make all warnings into errors.
  1502.  
  1503. `-W'
  1504.      Turns on "extra warnings" and the `uninitialized' option.  (This
  1505.      might change in future versions of `g77'.)
  1506.  
  1507.      "Extra warnings" are issued for:
  1508.  
  1509.         * Unused parameters to a procedure (when `-Wunused' also is
  1510.           specified).
  1511.  
  1512.         * Overflows involving floating-point constants (not available
  1513.           for certain configurations?).
  1514.  
  1515.    *Note Options to Request or Suppress Warnings: (gcc)Warning Options,
  1516. for information on more options offered by the GBE shared by `g77',
  1517. `gcc', and other GNU compilers.
  1518.  
  1519.    Some of these have no effect when compiling programs written in
  1520. Fortran:
  1521.  
  1522. `-Wcomment'
  1523. `-Wformat'
  1524. `-Wparentheses'
  1525. `-Wswitch'
  1526. `-Wtraditional'
  1527. `-Wshadow'
  1528. `-Wid-clash-LEN'
  1529. `-Wlarger-than-LEN'
  1530. `-Wconversion'
  1531. `-Waggregate-return'
  1532. `-Wredundant-decls'
  1533.      These options all could have some relevant meaning for GNU Fortran
  1534.      programs, but are not yet supported.
  1535.  
  1536. 
  1537. File: ^.!gcc.docs.fortran.g77,  Node: Debugging Options,  Next: Optimize Options,  Prev: Warning Options,  Up: Invoking G77
  1538.  
  1539. Options for Debugging Your Program or GNU Fortran
  1540. =================================================
  1541.  
  1542.    GNU Fortran has various special options that are used for debugging
  1543. either your program or `g77'.
  1544.  
  1545. `-g'
  1546.      Produce debugging information in the operating system's native
  1547.      format (stabs, COFF, XCOFF, or DWARF).  GDB can work with this
  1548.      debugging information.
  1549.  
  1550.      Support for this option in Fortran programs is incomplete.  In
  1551.      particular, names of variables and arrays in common blocks or that
  1552.      are storage-associated via `EQUIVALENCE' are unavailable to the
  1553.      debugger.
  1554.  
  1555.    *Note Options for Debugging Your Program or GNU CC: (gcc)Debugging
  1556. Options, for more information on debugging options.
  1557.  
  1558. 
  1559. File: ^.!gcc.docs.fortran.g77,  Node: Optimize Options,  Next: Preprocessor Options,  Prev: Debugging Options,  Up: Invoking G77
  1560.  
  1561. Options That Control Optimization
  1562. =================================
  1563.  
  1564.    Most Fortran users will want to use no optimization when developing
  1565. and testing programs, and use `-O' or `-O2' when compiling programs for
  1566. late-cycle testing and for production use.
  1567.  
  1568.    The following flags have particular applicability when compiling
  1569. Fortran programs:
  1570.  
  1571. `-ffloat-store'
  1572.      Might help a Fortran program that depends on exact IEEE conformance
  1573.      on some machines, but might slow down a program that doesn't.
  1574.  
  1575. `-fforce-mem'
  1576. `-fforce-addr'
  1577.      Might improve optimization of loops.
  1578.  
  1579. `-fno-inline'
  1580.      Don't compile statement functions inline.  Might reduce the size
  1581.      of a program unit--which might be at expense of some speed (though
  1582.      it should compile faster).  Note that if you are not optimizing,
  1583.      no functions can be expanded inline.
  1584.  
  1585. `-ffast-math'
  1586.      Might allow some programs designed to not be too dependent on IEEE
  1587.      behavior for floating-point to run faster, or die trying.
  1588.  
  1589. `-fstrength-reduce'
  1590.      Might make some loops run faster.
  1591.  
  1592. `-frerun-cse-after-loop'
  1593. `-fexpensive-optimizations'
  1594. `-fdelayed-branch'
  1595. `-fschedule-insns'
  1596. `-fschedule-insns2'
  1597. `-fcaller-saves'
  1598.      Might improve performance on some code.
  1599.  
  1600. `-funroll-loops'
  1601.      Definitely improves performance on some code.
  1602.  
  1603. `-funroll-all-loops'
  1604.      Definitely improves performance on some code.
  1605.  
  1606. `-fno-move-all-movables'
  1607. `-fno-reduce-all-givs'
  1608. `-fno-rerun-loop-opt'
  1609.      Each of these might improve performance on some code.
  1610.  
  1611.      Analysis of Fortran code optimization and the resulting
  1612.      optimizations triggered by the above options were contributed by
  1613.      Toon Moene (`toon@moene.indiv.nluug.nl').
  1614.  
  1615.      Please let us know how use of these options affects the
  1616.      performance of your production code.  We're particularly
  1617.      interested in code that runs faster when these options are
  1618.      *disabled*, and in non-Fortran code that benefits when they are
  1619.      *enabled* via the above `gcc' command-line options.
  1620.  
  1621.    *Note Options That Control Optimization: (gcc)Optimize Options, for
  1622. more information on options to optimize the generated machine code.
  1623.  
  1624. 
  1625. File: ^.!gcc.docs.fortran.g77,  Node: Preprocessor Options,  Next: Directory Options,  Prev: Optimize Options,  Up: Invoking G77
  1626.  
  1627. Options Controlling the Preprocessor
  1628. ====================================
  1629.  
  1630.    These options control the C preprocessor, which is run on each C
  1631. source file before actual compilation.
  1632.  
  1633.    *Note Options Controlling the Preprocessor: (gcc)Preprocessor
  1634. Options, for information on C preprocessor options.
  1635.  
  1636.    Some of these options also affect how `g77' processes the `INCLUDE'
  1637. statement.  Since this statement is processed even when preprocessing
  1638. is not requested, it is not described in this section.  *Note Options
  1639. for Directory Search: Directory Options, for information on how `g77'
  1640. processes the `INCLUDE' statement.
  1641.  
  1642. 
  1643. File: ^.!gcc.docs.fortran.g77,  Node: Directory Options,  Next: Code Gen Options,  Prev: Preprocessor Options,  Up: Invoking G77
  1644.  
  1645. Options for Directory Search
  1646. ============================
  1647.  
  1648.    These options affect how the `cpp' preprocessor searches for files
  1649. specified via the `#include' directive.  Therefore, when compiling
  1650. Fortran programs, they are meaningful when the preproecssor is used.
  1651.  
  1652.    Some of these options also affect how `g77' searches for files
  1653. specified via the `INCLUDE' statement.  These options are:
  1654.  
  1655. `-I-'
  1656. `-IDIR'
  1657.      These affect interpretation of the `INCLUDE' statement (as well as
  1658.      of the `#include' directive of the `cpp' preprocessor).
  1659.  
  1660.      Note that `-IDIR' must be specified *without* any spaces between
  1661.      `-I' and the directory name--that is, `-Ifoo/bar' is valid, but
  1662.      `-I foo/bar' is rejected by the `g77' compiler (though the
  1663.      preprocessor supports the latter form).  Also note that the
  1664.      general behavior of `-I' and `INCLUDE' is pretty much the same as
  1665.      of `-I' with `#include' in the `cpp' preprocessor, with regard to
  1666.      looking for `header.gcc' files and other such things.
  1667.  
  1668.      *Note Options for Directory Search: (gcc)Directory Optoins, for
  1669.      information on the `-I' option.
  1670.  
  1671. 
  1672. File: ^.!gcc.docs.fortran.g77,  Node: Code Gen Options,  Next: Environment Variables,  Prev: Directory Options,  Up: Invoking G77
  1673.  
  1674. Options for Code Generation Conventions
  1675. =======================================
  1676.  
  1677.    These machine-independent options control the interface conventions
  1678. used in code generation.
  1679.  
  1680.    Most of them have both positive and negative forms; the negative form
  1681. of `-ffoo' would be `-fno-foo'.  In the table below, only one of the
  1682. forms is listed--the one which is not the default.  You can figure out
  1683. the other form by either removing `no-' or adding it.
  1684.  
  1685. `-fno-automatic'
  1686.      Treat each program unit as if the `SAVE' statement was specified
  1687.      for every local variable and array referenced in it.  Does not
  1688.      affect common blocks.  (Some Fortran compilers provide this option
  1689.      under the name `-static'.)
  1690.  
  1691. `-finit-local-zero'
  1692.      Specify that variables and arrays that are local to a program unit
  1693.      (not in a common block and not passed as an argument) are to be
  1694.      initialized to binary zeros.
  1695.  
  1696.      Since there is a run-time penalty for initialization of variables
  1697.      that are not given the `SAVE' attribute, it might be a good idea
  1698.      to also use `-fno-automatic' with `-finit-local-zero'.
  1699.  
  1700. `-fno-f2c'
  1701.      Do not generate code designed to be compatible with code generated
  1702.      by `f2c'.
  1703.  
  1704.      This does not affect the generation of code that interfaces with
  1705.      the `libf2c' library.
  1706.  
  1707.      *Caution:* If `-fno-f2c' is used when compiling any source file
  1708.      used in a program, it must be used when compiling *all* Fortran
  1709.      source files used in that program.
  1710.  
  1711. `-ff2c-library'
  1712.      Specify that use of `libf2c' is required.  This is the default for
  1713.      the current version of `g77'.
  1714.  
  1715.      Currently it is not valid to specify `-fno-f2c-library'.  This
  1716.      option is provided so users can specify it in shell scripts that
  1717.      build programs and libraries that require the `libf2c' library,
  1718.      even when being compiled by future versions of `g77' that might
  1719.      otherwise default to generating code for an incompatible library.
  1720.  
  1721. `-fno-underscoring'
  1722.      Do not transform names of entities specified in the Fortran source
  1723.      file by appending underscores to them.
  1724.  
  1725.      With `-funderscoring' in effect, `g77' appends two underscores to
  1726.      names with underscores and one underscore to external names with
  1727.      no underscores.  (`g77' also appends two underscores to internal
  1728.      names with underscores to avoid naming collisions with external
  1729.      names.)
  1730.  
  1731.      This is done to ensure compatibility with code produced by many
  1732.      UNIX Fortran compilers, including `f2c', which perform the same
  1733.      transformations.
  1734.  
  1735.      Use of `-fno-underscoring' is not recommended unless you are
  1736.      experimenting with issues such as integration of (GNU) Fortran into
  1737.      existing system environments (vis-a-vis existing libraries, tools,
  1738.      and so on).
  1739.  
  1740.      For example, with `-funderscoring', and assuming other defaults
  1741.      like `-fcase-lower' and that `j()' and `max_count()' are external
  1742.      functions while `my_var' and `lvar' are local variables, a
  1743.      statement like
  1744.  
  1745.           I = J() + MAX_COUNT (MY_VAR, LVAR)
  1746.  
  1747.      is implemented as something akin to:
  1748.  
  1749.           i = j_() + max_count__(&my_var__, &lvar);
  1750.  
  1751.      With `-fno-underscoring', the same statement is implemented as:
  1752.  
  1753.           i = j() + max_count(&my_var, &lvar);
  1754.  
  1755.      Use of `-fno-underscoring' allows direct specification of
  1756.      user-defined names while debugging and when interfacing
  1757.      `g77'-compiled code with other languages.
  1758.  
  1759.      Note that just because the names match does *not* mean that the
  1760.      interface implemented by `g77' for an external name matches the
  1761.      interface implemented by some other language for that same name.
  1762.      That is, getting code produced by `g77' to link to code produced
  1763.      by some other compiler using this or any other method can be only a
  1764.      small part of the overall solution--getting the code generated by
  1765.      both compilers to agree on issues other than naming can require
  1766.      significant effort, and, unlike naming disagreements, linkers
  1767.      normally cannot detect disagreements in these other areas.
  1768.  
  1769.      Also, note that with `-fno-underscoring', the lack of appended
  1770.      underscores introduces the very real possibility that a
  1771.      user-defined external name will conflict with a name in a system
  1772.      library, which could make finding unresolved-reference bugs quite
  1773.      difficult in some cases--they might occur at program run time, and
  1774.      show up only as buggy behavior at run time.
  1775.  
  1776.      In future versions of `g77', we hope to improve naming and linking
  1777.      issues so that debugging always involves using the names as they
  1778.      appear in the source, even if the names as seen by the linker are
  1779.      mangled to prevent accidental linking between procedures with
  1780.      incompatible interfaces.
  1781.  
  1782. `-fno-second-underscore'
  1783.      Do not append a second underscore to names of entities specified
  1784.      in the Fortran source file.
  1785.  
  1786.      This option has no effect if `-fno-underscoring' is not in effect.
  1787.  
  1788.      Otherwise, with this option, an external name such as `MAX_COUNT'
  1789.      is implemented as a reference to the link-time external symbol
  1790.      `max_count_', instead of `max_count__'.
  1791.  
  1792. `-fno-ident'
  1793.      Ignore the `#ident' directive.
  1794.  
  1795. `-fzeros'
  1796.      Treat initial values of zero as if they were any other value.
  1797.  
  1798.      As of version 0.5.18, `g77' normally treats `DATA' and other
  1799.      statements that are used specify initial values of zero for
  1800.      variables and arrays as if no values were actually specified, in
  1801.      the sense that no diagnostics regarding multiple initializations
  1802.      are produced.
  1803.  
  1804.      This is done to speed up compiling of programs that initialize
  1805.      large arrays to zeros.
  1806.  
  1807.      Use `-fzeros' to revert to the simpler, slower behavior that can
  1808.      catch multiple initializations by keeping track of all
  1809.      initializations, zero or otherwise.
  1810.  
  1811.      *Caution:* Future versions of `g77' might disregard this option
  1812.      (and its negative form, the default) or interpret it somewhat
  1813.      differently.  The interpretation changes will affect only
  1814.      non-standard programs; standard-conforming programs should not be
  1815.      affected.
  1816.  
  1817.    *Note Options for Code Generation Conventions: (gcc)Code Gen
  1818. Options, for information on more options offered by the GBE shared by
  1819. `g77', `gcc', and other GNU compilers.
  1820.  
  1821.    Some of these do *not* work when compiling programs written in
  1822. Fortran:
  1823.  
  1824. `-fpcc-struct-return'
  1825. `-freg-struct-return'
  1826.      You should not use these except strictly the same way as you used
  1827.      them to build the version of `libf2c' with which you will be
  1828.      linking all code compiled by `g77' with the same option.
  1829.  
  1830. `-fshort-double'
  1831.      This probably either has no effect on Fortran programs, or makes
  1832.      them act loopy.
  1833.  
  1834. `-fno-common'
  1835.      Do not use this when compiling Fortran programs, or there will be
  1836.      Trouble.
  1837.  
  1838. `-fpack-struct'
  1839.      This probably will break any calls to the `libf2c' library, at the
  1840.      very least, even if it is built with the same option.
  1841.  
  1842. 
  1843. File: ^.!gcc.docs.fortran.g77,  Node: Environment Variables,  Prev: Code Gen Options,  Up: Invoking G77
  1844.  
  1845. Environment Variables Affecting GNU Fortran
  1846. ===========================================
  1847.  
  1848.    GNU Fortran currently does not make use of any environment variables
  1849. to control its operation above and beyond those that affect the
  1850. operation of `gcc'.
  1851.  
  1852.    *Note Environment Variables Affecting GNU CC: (gcc)Environment
  1853. Variables, for information on environment variables.
  1854.  
  1855. 
  1856. File: ^.!gcc.docs.fortran.g77,  Node: News,  Next: Changes,  Prev: Invoking G77,  Up: Top
  1857.  
  1858. News About GNU Fortran
  1859. **********************
  1860.  
  1861. In 0.5.18:
  1862. ==========
  1863.  
  1864.    * Add some rudimentary support for `INTEGER*1', `INTEGER*2',
  1865.      `INTEGER*8', and their `LOGICAL' equivalents.  (This support works
  1866.      on most, maybe all, `gcc' targets.)
  1867.  
  1868.      Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing
  1869.      the patch for this!
  1870.  
  1871.      Among the missing elements from the support for these features are
  1872.      full intrinsic support and constants.
  1873.  
  1874.    * Add some rudimentary support for the `BYTE' and `WORD'
  1875.      type-declaration statements.  `BYTE' corresponds to `INTEGER*1',
  1876.      while `WORD' corresponds to `INTEGER*2'.
  1877.  
  1878.      Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing
  1879.      the patch for this!
  1880.  
  1881.    * The compiler code handling intrinsics has been largely rewritten
  1882.      to accommodate the new types.  No new intrinsics or arguments for
  1883.      existing intrinsics have been added, so there is, at this point,
  1884.      no intrinsic to convert to `INTEGER*8', for example.
  1885.  
  1886.    * Support automatic arrays in procedures.
  1887.  
  1888.    * Reduce space/time requirements for handling large *sparsely*
  1889.      initialized aggregate arrays.  This improvement applies to only a
  1890.      subset of the general problem to be addressed in 0.6.
  1891.  
  1892.    * Treat initial values of zero as if they weren't specified (in DATA
  1893.      and type-declaration statements).  The initial values will be set
  1894.      to zero anyway, but the amount of compile time processing them
  1895.      will be reduced, in some cases significantly (though, again, this
  1896.      is only a subset of the general problem to be addressed in 0.6).
  1897.  
  1898.      A new option, `-fzeros', is introduced to enable the traditional
  1899.      treatment of zeros as any other value.
  1900.  
  1901.    * With `-ff90' in force, `g77' incorrectly interpreted `REAL(Z)' as
  1902.      returning a `REAL' result, instead of as a `DOUBLE PRECISION'
  1903.      result.  (Here, `Z' is `DOUBLE COMPLEX'.)
  1904.  
  1905.      With `-fno-f90' in force, the interpretation remains unchanged,
  1906.      since this appears to be how at least some F77 code using the
  1907.      `DOUBLE COMPLEX' extension expected it to work.
  1908.  
  1909.      Essentially, `REAL(Z)' in F90 is the same as `DBLE(Z)', while in
  1910.      extended F77, it appears to be the same as `REAL(REAL(Z))'.
  1911.  
  1912.    * An expression involving exponentiation, where both operands were
  1913.      type `INTEGER' and the right-hand operand was negative, was
  1914.      erroneously evaluated.
  1915.  
  1916.    * Fix bugs involving `DATA' implied-`DO' constructs (these involved
  1917.      an errant diagnostic and a crash, both on good code, one involving
  1918.      subsequent statement-function definition).
  1919.  
  1920.    * Close `INCLUDE' files after processing them, so compiling source
  1921.      files with lots of `INCLUDE' statements does not result in being
  1922.      unable to open `INCLUDE' files after all the available file
  1923.      descriptors are used up.
  1924.  
  1925.    * Speed up compiling, especially of larger programs, and perhaps
  1926.      slightly reduce memory utilization while compiling (this is *not*
  1927.      the improvement planned for 0.6 involving large aggregate
  1928.      areas)--these improvements result from simply turning off some
  1929.      low-level code to do self-checking that hasn't been triggered in a
  1930.      long time.
  1931.  
  1932.    * Introduce three new options that implement optimizations in the
  1933.      `gcc' back end (GBE).  These options are `-fmove-all-movables',
  1934.      `-freduce-all-givs', and `-frerun-loop-opt', which are enabled, by
  1935.      default, for Fortran compilations.  These optimizations are
  1936.      intended to help toon Fortran programs.
  1937.  
  1938.    * Patch the GBE to do a better job optimizing certain kinds of
  1939.      references to array elements.
  1940.  
  1941.    * Due to patches to the GBE, the version number of `gcc' also is
  1942.      patched to make it easier to manage installations, especially
  1943.      useful if it turns out a `g77' change to the GBE has a bug.
  1944.  
  1945.      The `g77'-modified version number is the `gcc' version number with
  1946.      the string `.f.N' appended, where `f' identifies the version as
  1947.      enhanced for Fortran, and N is `1' for the first Fortran patch for
  1948.      that version of `gcc', `2' for the second, and so on.
  1949.  
  1950.      So, this introduces version `2.7.2.f.1' of `gcc'.
  1951.  
  1952.    * Make several improvements and fixes to diagnostics, including the
  1953.      removal of two that were inappropriate or inadequate.
  1954.  
  1955.    * Warning about two successive arithmetic operators, produced by
  1956.      `-Wsurprising', now produced *only* when both operators are,
  1957.      indeed, arithmetic (not relational/boolean).
  1958.  
  1959.    * `-Wsurprising' now warns about the remaining cases of using
  1960.      non-integral variables for implied-`DO' loops, instead of these
  1961.      being rejected unless `-fpedantic' or `-fugly' specified.
  1962.  
  1963.    * Allow `SAVE' of a local variable or array, even after it has been
  1964.      given an initial value via `DATA', for example.
  1965.  
  1966.    * Introduce an Info version of `g77' documentation, which supercedes
  1967.      `gcc/f/CREDITS', `gcc/f/DOC', and `gcc/f/PROJECTS'.  These files
  1968.      will be removed in a future release.  The files `gcc/f/BUGS',
  1969.      `gcc/f/INSTALL', and `gcc/f/NEWS' now are automatically built from
  1970.      the texinfo source when distributions are made.
  1971.  
  1972.      This effort was inspired by a first pass at translating
  1973.      `g77-0.5.16/f/DOC' that was contributed to Craig by David Ronis
  1974.      (`ronis@onsager.chem.mcgill.ca').
  1975.  
  1976.    * New `-fno-second-underscore' option to specify that, when
  1977.      `-funderscoring' is in effect, a second underscore is not to be
  1978.      appended to Fortran names already containing an underscore.
  1979.  
  1980.    * Change the way iterative `DO' loops work to follow the F90
  1981.      standard.  In particular, calculation of the iteration count is
  1982.      still done by converting the start, end, and increment parameters
  1983.      to the type of the `DO' variable, but the result of the
  1984.      calculation is always converted to the default `INTEGER' type.
  1985.  
  1986.      (This should have no effect on existing code compiled by `g77',
  1987.      but code written to assume that use of a *wider* type for the `DO'
  1988.      variable will result in an iteration count being fully calculated
  1989.      using that wider type (wider than default `INTEGER') must be
  1990.      rewritten.)
  1991.  
  1992.    * Upgrade to `libf2c' as of 1996-03-23, and fix up some of the build
  1993.      procedures.
  1994.  
  1995.      Note that the email addresses related to `f2c' have changed--the
  1996.      distribution site now is named `netlib.bell-labs.com', and the
  1997.      maintainer's new address is `dmg@bell-labs.com'.
  1998.  
  1999. In 0.5.17:
  2000. ==========
  2001.  
  2002.    * *Fix serious bug* in `g77 -v' command that can cause removal of a
  2003.      system's `/dev/null' special file if run by user `root'.
  2004.  
  2005.      *All users* of version 0.5.16 should ensure that they have not
  2006.      removed `/dev/null' or replaced it with an ordinary file (e.g. by
  2007.      comparing the output of `ls -l /dev/null' with `ls -l /dev/zero'.
  2008.      If the output isn't basically the same, contact your system
  2009.      administrator about restoring `/dev/null' to its proper status).
  2010.  
  2011.      This bug is particularly insidious because removing `/dev/null' as
  2012.      a special file can go undetected for quite a while, aside from
  2013.      various applications and programs exhibiting sudden, strange
  2014.      behaviors.
  2015.  
  2016.      I sincerely apologize for not realizing the implications of the
  2017.      fact that when `g77 -v' runs the `ld' command with `-o /dev/null'
  2018.      that `ld' tries to *remove* the executable it is supposed to build
  2019.      (especially if it reports unresolved references, which it should
  2020.      in this case)!
  2021.  
  2022.    * Fix crash on `CHARACTER*(*) FOO' in a main or block data program
  2023.      unit.
  2024.  
  2025.    * Fix crash that can occur when diagnostics given outside of any
  2026.      program unit (such as when input file contains `@foo').
  2027.  
  2028.    * Fix crashes, infinite loops (hangs), and such involving diagnosed
  2029.      code.
  2030.  
  2031.    * Fix `ASSIGN''ed variables so they can be `SAVE''d or dummy
  2032.      arguments, and issue clearer error message in cases where target
  2033.      of `ASSIGN' or `ASSIGN'ed `GOTO'/`FORMAT' is too small (which
  2034.      should never happen).
  2035.  
  2036.    * Make `libf2c' build procedures work on more systems again by
  2037.      eliminating unnecessary invocations of `ld -r -x' and `mv'.
  2038.  
  2039.    * Fix omission of `-funix-intrinsics-...' options in list of
  2040.      permitted options to compiler.
  2041.  
  2042.    * Fix failure to always diagnose missing type declaration for
  2043.      `IMPLICIT NONE'.
  2044.  
  2045.    * Fix compile-time performance problem (which could sometimes crash
  2046.      the compiler, cause a hang, or whatever, due to a bug in the back
  2047.      end) involving exponentiation with a large `INTEGER' constant for
  2048.      the right-hand operator (e.g. `I**32767').
  2049.  
  2050.    * Fix build procedures so cross-compiling `g77' (the `fini' utility
  2051.      in particular) is properly built using the host compiler.
  2052.  
  2053.    * Add new `-Wsurprising' option to warn about constructs that are
  2054.      interpreted by the Fortran standard (and `g77') in ways that are
  2055.      surprising to many programmers.
  2056.  
  2057.    * Add `ERF()' and `ERFC()' as generic intrinsics mapping to existing
  2058.      `ERF'/`DERF' and `ERFC'/`DERFC' specific intrinsics.
  2059.  
  2060.      *Note:* You should specify `INTRINSIC ERF,ERFC' in any code where
  2061.      you might use these as generic intrinsics, to improve likelihood
  2062.      of diagnostics (instead of subtle run-time bugs) when using a
  2063.      compiler that doesn't support these as intrinsics (e.g. `f2c').
  2064.  
  2065.    * Remove from `-fno-pedantic' the diagnostic about `DO' with
  2066.      non-`INTEGER' index variable; issue that under `-Wsurprising'
  2067.      instead.
  2068.  
  2069.    * Clarify some diagnostics that say things like "ignored" when that's
  2070.      misleading.
  2071.  
  2072.    * Clarify diagnostic on use of `.EQ.'/`.NE.' on `LOGICAL' operands.
  2073.  
  2074.    * Minor improvements to code generation for various operations on
  2075.      `LOGICAL' operands.
  2076.  
  2077.    * Minor improvement to code generation for some `DO' loops on some
  2078.      machines.
  2079.  
  2080.    * Support `gcc' version 2.7.1.
  2081.  
  2082.    * Upgrade to `libf2c' as of 1995-11-15.
  2083.  
  2084. In 0.5.16:
  2085. ==========
  2086.  
  2087.    * Fix a code-generation bug involving complicated `EQUIVALENCE'
  2088.      statements not involving `COMMON'
  2089.  
  2090.    * Fix code-generation bugs involving invoking "gratis" library
  2091.      procedures in `libf2c' from code compiled with `-fno-f2c' by
  2092.      making these procedures known to `g77' as intrinsics (not affected
  2093.      by -fno-f2c).  This is known to fix code invoking `ERF()',
  2094.      `ERFC()', `DERF()', and `DERFC()'.
  2095.  
  2096.    * Update `libf2c' to include netlib patches through 1995-08-16, and
  2097.      `#define' `WANT_LEAD_0' to 1 to make `g77'-compiled code more
  2098.      consistent with other Fortran implementations by outputting
  2099.      leading zeros in formatted and list-directed output.
  2100.  
  2101.    * Fix a code-generation bug involving adjustable dummy arrays with
  2102.      high bounds whose primaries are changed during procedure
  2103.      execution, and which might well improve code-generation
  2104.      performance for such arrays compared to `f2c' plus `gcc' (but
  2105.      apparently only when using `gcc-2.7.0' or later).
  2106.  
  2107.    * Fix a code-generation bug involving invocation of `COMPLEX' and
  2108.      `DOUBLE COMPLEX' `FUNCTION's and doing `COMPLEX' and `DOUBLE
  2109.      COMPLEX' divides, when the result of the invocation or divide is
  2110.      assigned directly to a variable that overlaps one or more of the
  2111.      arguments to the invocation or divide.
  2112.  
  2113.    * Fix crash by not generating new optimal code for `X**I' if `I' is
  2114.      nonconstant and the expression is used to dimension a dummy array,
  2115.      since the `gcc' back end does not support the necessary mechanics
  2116.      (and the `gcc' front end rejects the equivalent construct, as it
  2117.      turns out).
  2118.  
  2119.    * Fix crash on expressions like `COMPLEX**INTEGER'.
  2120.  
  2121.    * Fix crash on expressions like `(1D0,2D0)**2', i.e. raising a
  2122.      `DOUBLE COMPLEX' constant to an `INTEGER' constant power.
  2123.  
  2124.    * Fix crashes and such involving diagnosed code.
  2125.  
  2126.    * Diagnose, instead of crashing on, statement function definitions
  2127.      having duplicate dummy argument names.
  2128.  
  2129.    * Fix bug causing rejection of good code involving statement function
  2130.      definitions.
  2131.  
  2132.    * Fix bug resulting in debugger not knowing size of local equivalence
  2133.      area when any member of area has initial value (via `DATA', for
  2134.      example).
  2135.  
  2136.    * Fix installation bug that prevented installation of `g77' driver.
  2137.      Provide for easy selection of whether to install copy of `g77' as
  2138.      `f77' to replace the broken code.
  2139.  
  2140.    * Fix `gcc' driver (affects `g77' thereby) to not gratuitously
  2141.      invoke the `f771' program (e.g. when `-E' is specified).
  2142.  
  2143.    * Fix diagnostic to point to correct source line when it immediately
  2144.      follows an `INCLUDE' statement.
  2145.  
  2146.    * Support more compiler options in `gcc'/`g77' when compiling
  2147.      Fortran files.  These options include `-p', `-pg', `-aux-info',
  2148.      `-P', correct setting of version-number macros for preprocessing,
  2149.      full recognition of `-O0', and automatic insertion of
  2150.      configuration-specific linker specs.
  2151.  
  2152.    * Add new intrinsics that interface to existing routines in `libf2c':
  2153.      `ABORT', `DERF', `DERFC', `ERF', `ERFC', `EXIT', `FLUSH',
  2154.      `GETARG', `GETENV', `IARGC', `SIGNAL', and `SYSTEM'.  Note that
  2155.      `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are intrinsic
  2156.      subroutines, not functions (since they have side effects), so to
  2157.      get the return values from `SIGNAL' and `SYSTEM', append a final
  2158.      argument specifying an `INTEGER' variable or array element (e.g.
  2159.      `CALL SYSTEM('rm foo',ISTAT)').
  2160.  
  2161.    * Add new intrinsic group named `unix' to contain the new intrinsics,
  2162.      and by default enable this new group.
  2163.  
  2164.    * Move `LOC()' intrinsic out of the `vxt' group to the new `unix'
  2165.      group.
  2166.  
  2167.    * Improve `g77' so that `g77 -v' by itself (or with certain other
  2168.      options, including `-B', `-b', `-i', `-nostdlib', and `-V')
  2169.      reports lots more useful version info, and so that long-form
  2170.      options `gcc' accepts are understood by `g77' as well (even in
  2171.      truncated, unambiguous forms).
  2172.  
  2173.    * Add new `g77' option `--driver=name' to specify driver when
  2174.      default, `gcc', isn't appropriate.
  2175.  
  2176.    * Add support for `#' directives (as output by the preprocessor) in
  2177.      the compiler, and enable generation of those directives by the
  2178.      preprocessor (when compiling `.F' files) so diagnostics and
  2179.      debugging info are more useful to users of the preprocessor.
  2180.  
  2181.    * Produce better diagnostics, more like `gcc', with info such as `In
  2182.      function `foo':' and `In file included from...:'.
  2183.  
  2184.    * Support `gcc''s `-fident' and `-fno-ident' options.
  2185.  
  2186.    * When `-Wunused' in effect, don't warn about local variables used as
  2187.      statement-function dummy arguments or `DATA' implied-`DO' iteration
  2188.      variables, even though, strictly speaking, these are not uses of
  2189.      the variables themselves.
  2190.  
  2191.    * When `-W -Wunused' in effect, don't warn about unused dummy
  2192.      arguments at all, since there's no way to turn this off for
  2193.      individual cases (`g77' might someday start warning about
  2194.      these)--applies to `gcc' versions 2.7.0 and later, since earlier
  2195.      versions didn't warn about unused dummy arguments.
  2196.  
  2197.    * New option `-fno-underscoring' that inhibits transformation of
  2198.      names (by appending one or two underscores) so users may experiment
  2199.      with implications of such an environment.
  2200.  
  2201.    * Minor improvement to `gcc/f/info' module to make it easier to build
  2202.      `g77' using the native (non-`gcc') compiler on certain machines
  2203.      (but definitely not all machines nor all non-`gcc' compilers).
  2204.      Please do not report bugs showing problems compilers have with
  2205.      macros defined in `gcc/f/target.h' and used in places like
  2206.      `gcc/f/expr.c'.
  2207.  
  2208.    * Add warning to be printed for each invocation of the compiler if
  2209.      the target machine `INTEGER', REAL, or `LOGICAL' size is not 32
  2210.      bits, since `g77' is known to not work well for such cases (to be
  2211.      fixed in Version 0.6--*note Actual Bugs We Haven't Fixed Yet:
  2212.      Actual Bugs.).
  2213.  
  2214.    * Lots of new documentation (though work is still needed to put it
  2215.      into canonical GNU format).
  2216.  
  2217.    * Build `libf2c' with `-g0', not `-g2', in effect (by default), to
  2218.      produce smaller library without lots of debugging clutter.
  2219.  
  2220. In 0.5.15:
  2221. ==========
  2222.  
  2223.    * Fix bad code generation involving `X**I' and temporary, internal
  2224.      variables generated by `g77' and the back end (such as for `DO'
  2225.      loops).
  2226.  
  2227.    * Fix crash given `CHARACTER A;DATA A/.TRUE./'.
  2228.  
  2229.    * Replace crash with diagnostic given `CHARACTER A;DATA A/1.0/'.
  2230.  
  2231.    * Fix crash or other erratic behavior when null character constant
  2232.      (`''') is encountered.
  2233.  
  2234.    * Fix crash or other erratic behavior involving diagnosed code.
  2235.  
  2236.    * Fix code generation for external functions returning type `REAL'
  2237.      when the `-ff2c' option is in force (which it is by default) so
  2238.      that `f2c' compatibility is indeed provided.
  2239.  
  2240.    * Disallow `COMMON I(10)' if `I' has previously been specified with
  2241.      an array declarator.
  2242.  
  2243.    * New `-ffixed-line-length-N' option, where N is the maximum length
  2244.      of a typical fixed-form line, defaulting to 72 columns, such that
  2245.      characters beyond column N are ignored, or N is `none', meaning no
  2246.      characters are ignored.  does not affect lines with `&' in column
  2247.      1, which are always processed as if `-ffixed-line-length-none' was
  2248.      in effect.
  2249.  
  2250.    * No longer generate better code for some kinds of array references,
  2251.      as `gcc' back end is to be fixed to do this even better, and it
  2252.      turned out to slow down some code in some cases after all.
  2253.  
  2254.    * In `COMMON' and `EQUIVALENCE' areas with any members given initial
  2255.      values (e.g. via `DATA'), uninitialized members now always
  2256.      initialized to binary zeros (though this is not required by the
  2257.      standard, and might not be done in future versions of `g77').
  2258.      Previously, in some `COMMON'/`EQUIVALENCE' areas (essentially
  2259.      those with members of more than one type), the uninitialized
  2260.      members were initialized to spaces, to cater to `CHARACTER' types,
  2261.      but it seems no existing code expects that, while much existing
  2262.      code expects binary zeros.
  2263.  
  2264. In 0.5.14:
  2265. ==========
  2266.  
  2267.    * Don't emit bad code when low bound of adjustable array is
  2268.      nonconstant and thus might vary as an expression at run time.
  2269.  
  2270.    * Emit correct code for calculation of number of trips in `DO' loops
  2271.      for cases where the loop should not execute at all.  (This bug
  2272.      affected cases where the difference between the begin and end
  2273.      values was less than the step count, though probably not for
  2274.      floating-point cases.)
  2275.  
  2276.    * Fix crash when extra parentheses surround item in `DATA'
  2277.      implied-`DO' list.
  2278.  
  2279.    * Fix crash over minor internal inconsistencies in handling
  2280.      diagnostics, just substitute dummy strings where necessary.
  2281.  
  2282.    * Fix crash on some systems when compiling call to `MVBITS()'
  2283.      intrinsic.
  2284.  
  2285.    * Fix crash on array assignment `TYPEDDD(...)=...', where DDD is a
  2286.      string of one or more digits.
  2287.  
  2288.    * Fix crash on `DCMPLX()' with a single `INTEGER' argument.
  2289.  
  2290.    * Fix various crashes involving code with diagnosed errors.
  2291.  
  2292.    * Support `-I' option for `INCLUDE' statement, plus `gcc''s
  2293.      `header.gcc' facility for handling systems like MS-DOS.
  2294.  
  2295.    * Allow `INCLUDE' statement to be continued across multiple lines,
  2296.      even allow it to coexist with other statements on the same line.
  2297.  
  2298.    * Incorporate Bellcore fixes to `libf2c' through 1995-03-15--this
  2299.      fixes a bug involving infinite loops reading EOF with empty
  2300.      list-directed I/O list.
  2301.  
  2302.    * Remove all the `g77'-specific auto-configuration scripts, code,
  2303.      and so on, except for temporary substitutes for bsearch() and
  2304.      strtoul(), as too many configure/build problems were reported in
  2305.      these areas.  People will have to fix their systems' problems
  2306.      themselves, or at least somewhere other than `g77', which expects
  2307.      a working ANSI C environment (and, for now, a GNU C compiler to
  2308.      compile `g77' itself).
  2309.  
  2310.    * Complain if initialized common redeclared as larger in subsequent
  2311.      program unit.
  2312.  
  2313.    * Warn if blank common initialized, since its size can vary and hence
  2314.      related warnings that might be helpful won't be seen.
  2315.  
  2316.    * New `-fbackslash' option, on by default, that causes `\' within
  2317.      `CHARACTER' and Hollerith constants to be interpreted a la GNU C.
  2318.      Note that this behavior is somewhat different from `f2c''s, which
  2319.      supports only a limited subset of backslash (escape) sequences.
  2320.  
  2321.    * Make `-fugly-args' the default.
  2322.  
  2323.    * New `-fugly-init' option, on by default, that allows
  2324.      typeless/Hollerith to be specified as initial values for variables
  2325.      or named constants (`PARAMETER'), and also allows
  2326.      character<->numeric conversion in those contexts--turn off via
  2327.      `-fno-ugly-init'.
  2328.  
  2329.    * New `-finit-local-zero' option to initialize local variables to
  2330.      binary zeros.  This does not affect whether they are `SAVE'd, i.e.
  2331.      made automatic or static.
  2332.  
  2333.    * New `-Wimplicit' option to warn about implicitly typed variables,
  2334.      arrays, and functions.  (Basically causes all program units to
  2335.      default to `IMPLICIT NONE'.)
  2336.  
  2337.    * `-Wall' now implies `-Wuninitialized' as with `gcc' (i.e. unless
  2338.      `-O' not specified, since `-Wuninitialized' requires `-O'), and
  2339.      implies `-Wunused' as well.
  2340.  
  2341.    * `-Wunused' no longer gives spurious messages for unused `EXTERNAL'
  2342.      names (since they are assumed to refer to block data program
  2343.      units, to make use of libraries more reliable).
  2344.  
  2345.    * Support `%LOC()' and `LOC()' of character arguments.
  2346.  
  2347.    * Support null (zero-length) character constants and expressions.
  2348.  
  2349.    * Support `f2c''s `IMAG()' generic intrinsic.
  2350.  
  2351.    * Support `ICHAR()', `IACHAR()', and `LEN()' of character
  2352.      expressions that are valid in assignments but not normally as
  2353.      actual arguments.
  2354.  
  2355.    * Support `f2c'-style `&' in column 1 to mean continuation line.
  2356.  
  2357.    * Allow `NAMELIST', `EXTERNAL', `INTRINSIC', and `VOLATILE' in
  2358.      `BLOCK DATA', even though these are not allowed by the standard.
  2359.  
  2360.    * Allow `RETURN' in main program unit.
  2361.  
  2362.    * Changes to Hollerith-constant support to obey Appendix C of the
  2363.      standard:
  2364.  
  2365.         - Now padded on the right with zeros, not spaces.
  2366.  
  2367.         - Hollerith "format specifications" in the form of arrays of
  2368.           non-character allowed.
  2369.  
  2370.         - Warnings issued when non-blank truncation occurs when
  2371.           converting to another type.
  2372.  
  2373.         - When specified as actual argument, now passed by reference to
  2374.           `INTEGER' (padded on right with spaces if constant too small,
  2375.           otherwise fully intact if constant wider the `INTEGER' type)
  2376.           instead of by value.
  2377.  
  2378.      *Warning:* `f2c' differs on the interpretation of `CALL FOO(1HX)',
  2379.      which it treats exactly the same as `CALL FOO('X')', but which the
  2380.      standard and `g77' treat as `CALL FOO(%REF('X   '))' (padded with
  2381.      as many blanks as necessary to widen to `INTEGER'), essentially.
  2382.  
  2383.    * Changes and fixes to typeless-constant support:
  2384.  
  2385.         - Now treated as a typeless double-length `INTEGER' value.
  2386.  
  2387.         - Warnings issued when overflow occurs.
  2388.  
  2389.         - Padded on the left with zeros when converting to a larger
  2390.           type.
  2391.  
  2392.         - Should be properly aligned and ordered on the target machine
  2393.           for whatever type it is turned into.
  2394.  
  2395.         - When specified as actual argument, now passed as reference to
  2396.           a default `INTEGER' constant.
  2397.  
  2398.    * `%DESCR()' of a non-`CHARACTER' expression now passes a pointer to
  2399.      the expression plus a length for the expression just as if it were
  2400.      a `CHARACTER' expression.  For example, `CALL FOO(%DESCR(D))',
  2401.      where `D' is `REAL*8', is the same as `CALL FOO(D,%VAL(8)))'.
  2402.  
  2403.    * Name of multi-entrypoint master function changed to incorporate
  2404.      the name of the primary entry point instead of a decimal value, so
  2405.      the name of the master function for `SUBROUTINE X' with alternate
  2406.      entry points is now `__g77_masterfun_x'.
  2407.  
  2408.    * Remove redundant message about zero-step-count `DO' loops.
  2409.  
  2410.    * Clean up diagnostic messages, shortening many of them.
  2411.  
  2412.    * Fix typo in `g77' man page.
  2413.  
  2414.    * Clarify implications of constant-handling bugs in `f/BUGS'.
  2415.  
  2416.    * Generate better code for `**' operator with a right-hand operand of
  2417.      type `INTEGER'.
  2418.  
  2419.    * Generate better code for `SQRT()' and `DSQRT()', also when
  2420.      `-ffast-math' specified, enable better code generation for `SIN()'
  2421.      and `COS()'.
  2422.  
  2423.    * Generate better code for some kinds of array references.
  2424.  
  2425.    * Speed up lexing somewhat (this makes the compilation phase
  2426.      noticably faster).
  2427.  
  2428. 
  2429. File: ^.!gcc.docs.fortran.g77,  Node: Changes,  Next: Language,  Prev: News,  Up: Top
  2430.  
  2431. User-visible Changes
  2432. ********************
  2433.  
  2434.    To find out about existing bugs and ongoing plans for GNU Fortran,
  2435. on Internet do `finger -l fortran@gnu.ai.mit.edu' or whatever is the
  2436. equivalent on your system.  (You might need to use the address
  2437. `fortran@gate-1.gnu.ai.mit.edu' instead, or use `gate-2', `gate-3',
  2438. `gate-4', and so on, instead of `gate-1'.)
  2439.  
  2440.    Alternatively, retrieve `gnu.ai.mit.edu:/g77.plan' via anonymous
  2441. ftp, or if you cannot do that, email `fortran@gnu.ai.mit.edu' asking
  2442. for a recent copy of the GNU Fortran `.plan' file.  (The `finger'
  2443. command shown above obtains the most recent copy of all these methods.)
  2444.  
  2445. In 0.5.18:
  2446. ==========
  2447.  
  2448.    * The `BYTE' and `WORD' statements now are supported, to a limited
  2449.      extent.
  2450.  
  2451.    * `INTEGER*1', `INTEGER*2', `INTEGER*8', and their `LOGICAL'
  2452.      equivalents, now are supported to a limited extent.  Among the
  2453.      missing elements are complete intrinsic and constant support.
  2454.  
  2455.    * Support automatic arrays in procedures.  For example, `REAL A(N)',
  2456.      where `A' is not a dummy argument, specifies that `A' is an
  2457.      automatic array.  The size of `A' is calculated from the value of
  2458.      `N' each time the procedure is called, that amount of space is
  2459.      allocated, and that space is freed when the procedure returns to
  2460.      its caller.
  2461.  
  2462.    * Add `-fno-zeros' option, enabled by default, to reduce
  2463.      compile-time CPU and memory usage for code that provides initial
  2464.      zero values for variables and arrays.
  2465.  
  2466.    * Introduce three new options that apply to all compilations by
  2467.      `g77'-aware GNU compilers--`-fmove-all-movables',
  2468.      `-freduce-all-givs', and `-frerun-loop-opt'--which can improve the
  2469.      run-time performance of some programs.
  2470.  
  2471.    * Replace much of the existing documentation with a single Info
  2472.      document.
  2473.  
  2474.    * New option `-fno-second-underscore'.
  2475.  
  2476. In 0.5.17:
  2477. ==========
  2478.  
  2479.    * The `ERF()' and `ERFC()' intrinsics now are generic intrinsics,
  2480.      mapping to `ERF'/`DERF' and `ERFC'/`DERFC', respectively.  *Note:*
  2481.      Use `INTRINSIC ERF,ERFC' in any code that might reference these as
  2482.      generic intrinsics, to improve the likelihood of diagnostics
  2483.      (instead of subtle run-time bugs) when using compilers that don't
  2484.      support these as intrinsics.
  2485.  
  2486.    * New option `-Wsurprising'.
  2487.  
  2488.    * DO loops with non-`INTEGER' variables now diagnosed only when
  2489.      `-Wsurprising' specified.  Previously, this was diagnosed *unless*
  2490.      `-fpedantic' or `-fugly' was specified.
  2491.  
  2492. In 0.5.16:
  2493. ==========
  2494.  
  2495.    * `libf2c' changed to output a leading zero (0) digit for
  2496.      floating-point values output via list-directed and formatted
  2497.      output (to bring `g77' more in line with many existing Fortran
  2498.      implementations--the ANSI FORTRAN 77 standard leaves this choice
  2499.      to the implementation).
  2500.  
  2501.    * `libf2c' no longer built with debugging information intact, making
  2502.      it much smaller.
  2503.  
  2504.    * Automatic installation of the `g77' command now works.
  2505.  
  2506.    * Diagnostic messages now more informative, a la `gcc', including
  2507.      messages like `In function `foo':' and `In file included from...:'.
  2508.  
  2509.    * New group of intrinsics called `unix', including `ABORT', `DERF',
  2510.      `DERFC', `ERF', `ERFC', `EXIT', `FLUSH', `GETARG', `GETENV',
  2511.      `SIGNAL', and `SYSTEM'.
  2512.  
  2513.    * `-funix-intrinsics-{delete,hide,disable,enable}' options added.
  2514.  
  2515.    * `-fno-underscoring' option added.
  2516.  
  2517.    * `--driver' option added to the `g77' command.
  2518.  
  2519.    * Support for the `gcc' options `-fident' and `-fno-ident' added.
  2520.  
  2521.    * `g77 -v' returns much more version info, making the submission of
  2522.      better bug reports easily.
  2523.  
  2524.    * Many improvements to the `g77' command to better fulfill its role
  2525.      as a front-end to the `gcc' driver.  For example, `g77' now
  2526.      recognizes `--version' as a verbose way of specifying `-v'.
  2527.  
  2528.    * Compiling preprocessed (`*.F' and `*.fpp') files now results in
  2529.      better diagnostics and debugging information, as the
  2530.      source-location info now is passed all the way through the
  2531.      compilation process instead of being lost.
  2532.  
  2533. In 0.5.15:
  2534. ==========
  2535.  
  2536.    * `-ffixed-line-length-N' option introduced.
  2537.  
  2538. In 0.5.14:
  2539. ==========
  2540.  
  2541.    * Support for gcc's `-I' option added.
  2542.  
  2543.    * `-fbackslash' option added.
  2544.  
  2545.    * `-fugly-args' option enabled by default (allows `CALL
  2546.      FOO(4HABCD)').
  2547.  
  2548.    * `-fugly-init' option added.
  2549.  
  2550.    * `-finit-local-zero' option added.
  2551.  
  2552.    * Support for the `gcc' option `-Wimplicit' added.
  2553.  
  2554.    * `-Wall' now implies `-Wunused' and, when `-O' is specified,
  2555.      `-Wuninitialized'.
  2556.  
  2557.    * Hollerith constants as actual arguments now are passed by reference
  2558.      instead of by value--so `CALL FOO(4HABCD)' now is compiled exactly
  2559.      the same as `CALL FOO(%REF('ABCD'))', instead of as `CALL
  2560.      FOO(%VAL('ABCD'))'.
  2561.  
  2562.    * Hollerith constants converted to larger types now are padded on the
  2563.      right with spaces.  When converted to smaller types, warnings are
  2564.      issued if non-spaces are truncated on the right.
  2565.  
  2566.    * Format specifications of arrays of types other than `CHARACTER' are
  2567.      allowed in I/O statements, such as when they contain Hollerith
  2568.      data.
  2569.  
  2570.    * Typeless constants as actual arguments now are passed by reference
  2571.      to an `INTEGER' version of the constant instead of by value.
  2572.  
  2573.    * Typeless constants converted to larger types are padded on the left
  2574.      with zeros.  When converted to smaller types, warnings are issued
  2575.      if non-zero bits are truncated on the left.
  2576.  
  2577.    * `%DESCR()' of a non-`CHARACTER' expression treats the expression
  2578.      as if it were `CHARACTER', passing both a pointer to the expression
  2579.      and the length of the type of the expression in bytes, by value,
  2580.      in the "hidden" list of lengths used for `CHARACTER' arguments.
  2581.  
  2582.    * The `ICHAR()', `IACHAR()', and `LEN()' intrinsics now accept
  2583.      character expressions involving concatenation of assumed-length
  2584.      dummy arguments.
  2585.  
  2586.    * Block data program units now may contain `NAMELIST', `EXTERNAL',
  2587.      `INTRINSIC', and `VOLATILE' statements.
  2588.  
  2589.    * Zero-length character expressions now supported.
  2590.  
  2591.    * Support for the `f2c' intrinsic `IMAG()' added.
  2592.  
  2593.    * `INCLUDE' statement restrictions, such as no continuation lines
  2594.      allowed, now lifted.
  2595.  
  2596. 
  2597. File: ^.!gcc.docs.fortran.g77,  Node: Language,  Next: Installation,  Prev: Changes,  Up: Top
  2598.  
  2599. The GNU Fortran Language
  2600. ************************
  2601.  
  2602.    GNU Fortran supports a variety of extensions to, and dialects of,
  2603. the Fortran language.  Its primary base is the ANSI FORTRAN 77 standard.
  2604. It offers some extensions that are popular among users of UNIX `f77'
  2605. and `f2c' compilers, some that are popular among users of other
  2606. compilers (such as Digital products), some that are popular among users
  2607. of the newer Fortran 90 standard, and some that are introduced by GNU
  2608. Fortran.
  2609.  
  2610.    Part of what defines a particular implementation of a Fortran
  2611. system, such as `g77', is the particular characteristics of how it
  2612. supports types, constants, and so on.  Much of this is left up to the
  2613. implementation by the various Fortran standards and accepted practice
  2614. in the industry.
  2615.  
  2616. * Menu:
  2617.  
  2618. * Standard Support:: Degree of support for the ANSI FORTRAN 77 standard.
  2619. * Extensions::       Extensions to GNU Fortran.
  2620. * Types::            Data types.
  2621. * Constants::        Constants and their types.
  2622. * Source Form::      Form of source files (fixed, free, and so on).
  2623. * Pedantic Compilation::  Warnings about non-standard constructs.
  2624. * Case Sensitivity:: Uppercase and lowercase in source files.
  2625. * Intrinsics::       How intrinsics are grouped for easy management.
  2626. * Dialects::         Dialects supported by GNU Fortran.
  2627. * Object Compatibility::  Compatibility issues for code generated by `g77'.
  2628. * Distensions::      Misfeatures supported by GNU Fortran.
  2629.  
  2630. 
  2631. File: ^.!gcc.docs.fortran.g77,  Node: Standard Support,  Next: Extensions,  Up: Language
  2632.  
  2633. ANSI FORTRAN 77 Standard Support
  2634. ================================
  2635.  
  2636.    GNU Fortran supports ANSI FORTRAN 77 with the following caveats:
  2637.  
  2638.    * No passing of an external procedure as an actual argument if the
  2639.      procedure's type is declared `CHARACTER*(*)'.  For example:
  2640.  
  2641.           CHARACTER*(*) CFUNC
  2642.           EXTERNAL CFUNC
  2643.           CALL FOO(CFUNC)
  2644.           END
  2645.  
  2646.      It isn't clear whether the standard considers this conforming.
  2647.  
  2648.      Note that it is unlikely that any production Fortran code tries to
  2649.      use this unsupported construct.
  2650.  
  2651.    * No passing of a dummy procedure as an actual argument if the
  2652.      procedure's type is declared `CHARACTER*(*)'.
  2653.  
  2654.           SUBROUTINE BAR(CFUNC)
  2655.           CHARACTER*(*) CFUNC
  2656.           EXTERNAL CFUNC
  2657.           CALL FOO(CFUNC)
  2658.           END
  2659.  
  2660.      It isn't clear whether the standard considers this conforming.
  2661.  
  2662.      Note that it is unlikely that any production Fortran code tries to
  2663.      use this unsupported construct.
  2664.  
  2665.    * The `DO' variable for an implied-`DO' construct in a `DATA'
  2666.      statement may not be used as the `DO' variable for an outer
  2667.      implied-`DO' construct.  For example, this fragment is disallowed
  2668.      by `g77':
  2669.  
  2670.           DATA ((A(I, I), I= 1, 10), I= 1, 10)/.../
  2671.  
  2672.      This also is disallowed by Fortran 90, as it offers no additional
  2673.      capabilities and would have a variety of possible meanings.
  2674.  
  2675.      Note that it is *very* unlikely that any production Fortran code
  2676.      tries to use this unsupported construct.
  2677.  
  2678.    * An array element initializer in an implied-`DO' construct in a
  2679.      `DATA' statement must contain at least one reference to the `DO'
  2680.      variables of each outer implied-`DO' construct.  For example, this
  2681.      fragment is disallowed by `g77':
  2682.  
  2683.           DATA (A, I= 1, 1)/1./
  2684.  
  2685.      This also is disallowed by Fortran 90, as FORTRAN 77's more
  2686.      permissive requirements offer no additional capabilities.
  2687.      However, `g77' doesn't necessarily diagnose all cases where this
  2688.      requirement is not met.
  2689.  
  2690.      Note that it is *very* unlikely that any production Fortran code
  2691.      tries to use this unsupported construct.
  2692.  
  2693.    In summary, the only ANSI FORTRAN 77 features `g77' doesn't support
  2694. are those that are probably rarely used in actual code, some of which
  2695. are explicitly disallowed by the Fortran 90 standard.
  2696.  
  2697. 
  2698. File: ^.!gcc.docs.fortran.g77,  Node: Extensions,  Next: Types,  Prev: Standard Support,  Up: Language
  2699.  
  2700. GNU Fortran Extensions
  2701. ======================
  2702.  
  2703.    GNU Fortran supports ANSI FORTRAN 77 plus:
  2704.  
  2705.    * `LOC()', if `-funix-intrinsics-enable' is in force.
  2706.  
  2707.    * `%LOC', `%VAL', `%REF', and `%DESCR'--where `%DESCR' currently
  2708.      means the same thing as passing the argument as if it were a
  2709.      `CHARACTER' variable (with the phantom length argument appended to
  2710.      the argument list).
  2711.  
  2712.    * MIL-STD 1753 features (`IAND', `IOR', `MVBITS', `DO WHILE', `END
  2713.      DO', and so on).
  2714.  
  2715.    * `NAMELIST'.
  2716.  
  2717.    * Most `f2c' intrinsics (`AND', `OR', `LSHIFT', `RSHIFT', and so on).
  2718.  
  2719.    * `DOUBLE COMPLEX' and related intrinsics (standard and `f2c'
  2720.      varieties).
  2721.  
  2722.    * Various Fortran 90 features, such as `CYCLE', `EXIT', `SELECT
  2723.      CASE' (except for `CHARACTER' types).
  2724.  
  2725.    * Various DEC VAX/VMS FORTRAN v4.0 features (loosely called VXT
  2726.      extensions).
  2727.  
  2728.    * Various `f2c' features.
  2729.  
  2730.    * Source files that are uppercase-only (enforced), lowercase-only
  2731.      (enforced), caseless, and various other combinations as chosen via
  2732.      command-line options.
  2733.  
  2734.    * Arbitrary (limited only by available memory) number of
  2735.      continuation lines.
  2736.  
  2737.    * Use of `&' in column 1 to indicate a continuation line (as
  2738.      supported by `f2c').
  2739.  
  2740.    * Dollar signs (`$') in identifiers (other than as the first
  2741.      character) when the `-fdollar-ok' option is specified.
  2742.  
  2743.    When `-ff90' is specified, the language dialect changes as follows:
  2744.  
  2745.    * The type of `REAL(Z)', where `Z' is type `DOUBLE COMPLEX', is
  2746.      `DOUBLE PRECISION' instead of `REAL'.
  2747.  
  2748.    * Zero-length `CHARACTER' entities are accepted, even when
  2749.      `-fpedantic' is specified.
  2750.  
  2751.    * Zero-size array dimensions (as in `INTEGER I(10,20,4:2)') are
  2752.      accepted, although these are not supported by `libf2c', so
  2753.      diagnostics are nevertheless produced for `g77'.
  2754.  
  2755.    * `DOUBLE COMPLEX' (explicit or implicit) is accepted, even when
  2756.      `-fpedantic' is specified.
  2757.  
  2758.    * Substrings of constants (as in `'hello'(3:5)') are accepted, even
  2759.      when `-fpedantic' is specified.
  2760.  
  2761.    * `DATA' statements are allowed to precede executable statements,
  2762.      even when `-fpedantic' specified.
  2763.  
  2764.      Note that this does not allow all possible means of specifying
  2765.      further attributes via specification statements for a variable
  2766.      after it has been given an initial value via `DATA' or a
  2767.      type-declaration statement.  For example, after `DATA I/1/',
  2768.      `INTEGER I' is not permitted, but `INTEGER J' is permitted.
  2769.  
  2770.    * Use of a semicolon (`;') as a statement separator is accepted,
  2771.      even when `-fpedantic' specified (so `CALL FOO; CALL BAR' works).
  2772.  
  2773.    * Underscores (`_') are accepted in symbol names (except as the
  2774.      first character, since Fortran 90 provides a different
  2775.      interpretation for certain cases where that would occur--though
  2776.      `g77' does not yet support that interpretation).
  2777.  
  2778. 
  2779. File: ^.!gcc.docs.fortran.g77,  Node: Types,  Next: Constants,  Prev: Extensions,  Up: Language
  2780.  
  2781. Types
  2782. =====
  2783.  
  2784.    Fortran implementations have a fair amount of freedom given them by
  2785. the standard as far as how much storage space is used and how much
  2786. precision is offered by the various types such as `LOGICAL', `INTEGER',
  2787. `REAL', `DOUBLE PRECISION', `COMPLEX', and `CHARACTER'.  Further, many
  2788. compilers offer so-called `*N' notation, but the interpretation of N
  2789. varies across compilers and target architectures.
  2790.  
  2791.    The standard requires that `LOGICAL', `INTEGER', and `REAL' occupy
  2792. the same amount of storage space, and that `COMPLEX' and `DOUBLE
  2793. PRECISION' take twice as much storage space as `REAL'.  Further, it
  2794. requires that `COMPLEX' entities be ordered such that when a `COMPLEX'
  2795. variable is storage-associated (such as via `EQUIVALENCE') with a
  2796. two-element `REAL' array named `R', `R(1)' corresponds to the real
  2797. element and `R(2)' to the imaginary element of the `COMPLEX' variable.
  2798. No particular requirements as to precision of any of these are placed on
  2799. the implementation, nor is the relationship of storage sizes of these
  2800. types to the `CHARACTER' type specified by the standard.
  2801.  
  2802.    `g77' follows the above requirements, warning when compiling a
  2803. program requires placement of items in memory that contradict the
  2804. requirements of the target architecture.  (For example, a program can
  2805. require placement of a `DOUBLE PRECISION' on a boundary that is not an
  2806. even multiple of its size, but still an even multiple of the size of a
  2807. `REAL' variable.  On some target architectures, using the canonical
  2808. mapping of Fortran types to underlying architectural types, such
  2809. placement is prohibited by the machine definition or the Application
  2810. Binary Interface (ABI) in force for the configuration defined for
  2811. building `gcc' and `g77'.  `g77' warns about such situations when it
  2812. encounters them.)
  2813.  
  2814.    `g77' follows consistent rules for configuring the mapping between
  2815. Fortran types, including the `*N' notation, and the underlying
  2816. architectural types as accessed by a similarly-configured applicable
  2817. version of the `gcc' compiler.  These rules offer a widely portable,
  2818. consistent Fortran/C environment, although they might well conflict
  2819. with the expectations of users of Fortran compilers designed and
  2820. written for particular architectures.
  2821.  
  2822.    These rules are based on the configuration that is in force for the
  2823. version of `gcc' built in the same release as `g77' (and which was
  2824. therefore used to build both the `g77' compiler components and the
  2825. `libf2c' run-time library):
  2826.  
  2827. `REAL'
  2828.      Same as `float' type.
  2829.  
  2830. `DOUBLE PRECISION'
  2831.      Same as whatever floating-point type that is twice the size of a
  2832.      `float'--usually, this is a `double'.
  2833.  
  2834. `INTEGER'
  2835.      Same as an integral type that is occupies the same amount of
  2836.      memory storage `float'--usually, this is either an `int' or a
  2837.      `long int'.
  2838.  
  2839. `LOGICAL'
  2840.      Same `gcc' type as `INTEGER'.
  2841.  
  2842. `COMPLEX'
  2843.      Two `REAL' scalars (one for the real part followed by one for the
  2844.      imaginary part).
  2845.  
  2846. `DOUBLE COMPLEX'
  2847.      Two `DOUBLE PRECISION' scalars.
  2848.  
  2849. `NUMERIC-TYPE*N'
  2850.      (Where NUMERIC-TYPE is any type other than `CHARACTER'.) Same as
  2851.      whatever `gcc' type occupies N times the storage space of a `gcc'
  2852.      `char' item.
  2853.  
  2854. `NUMERIC-TYPE(KIND=N)'
  2855.      N=1 corresponds to `REAL', `INTEGER', `LOGICAL', `COMPLEX'.  N=2
  2856.      corresponds to `DOUBLE PRECISION', `DOUBLE COMPLEX', and, for
  2857.      integral types, `char' (usually `INTEGER*1' and `LOGICAL*1').  N=3
  2858.      corresponds to `short' for integral types (usually `INTEGER*2' and
  2859.      `LOGICAL*2').  N=4 corresponds to `long long' for integral types
  2860.      (this usually means `INTEGER*8' and `LOGICAL*8').
  2861.  
  2862.      Note that these are proposed correspondences and might change in
  2863.      future versions of `g77'--avoid writing code depending on them.
  2864.  
  2865.    For now, `g77' does not support numeric types other than the ones
  2866. listed above.  So, on a typical 32-bit machine, only `INTEGER*4',
  2867. `REAL*4', `LOGICAL*4', `COMPLEX*8', and so on, will work.  Other types
  2868. supported by `g77' are derived from gcc types such as `char', `short',
  2869. `int', `long int', `long long int', `long double', and so on.  That is,
  2870. whatever types `gcc' already supports, `g77' probably will support in a
  2871. future version.  The rules for the `NUMERIC-TYPE*N' notation will apply
  2872. to the new types, and new values for `NUMERIC-TYPE(KIND=N)' will be
  2873. assigned in a way that encourages clarity, consistency, and portability.
  2874.  
  2875. 
  2876. File: ^.!gcc.docs.fortran.g77,  Node: Constants,  Next: Source Form,  Prev: Types,  Up: Language
  2877.  
  2878. Constants
  2879. =========
  2880.  
  2881.    `g77' strictly assigns types to all constants not documented as
  2882. "typeless" (the typeless constants include things like `Z'1'').
  2883. Context is never a determining factor for the type, and hence the
  2884. interpretation, of a typed constant.  Examples: `1' is always type
  2885. `INTEGER', `3.141592653545256234' is always type `REAL' (even if the
  2886. additional precision specified is lost, and even when used in a `DOUBLE
  2887. PRECISION' context), `1E0' is always type `REAL', and `1D0' is always
  2888. type `DOUBLE PRECISION'.
  2889.  
  2890.    Many other Fortran compilers attempt to assign types to typed
  2891. constants based on their context.  This results in hard-to-find bugs,
  2892. nonportable code, and is not in the spirit (though it strictly follows
  2893. the letter) of the 77 and 90 standards.  `g77' will not support these
  2894. dangerous semantics, but might offer, in a future release, explicit
  2895. constructs by which a wider variety of typeless constants may be
  2896. specified, and/or user-requested warnings indicating places where `g77'
  2897. might differ from how other compilers assign types to constants.
  2898.  
  2899. 
  2900. File: ^.!gcc.docs.fortran.g77,  Node: Source Form,  Next: Pedantic Compilation,  Prev: Constants,  Up: Language
  2901.  
  2902. Source Form
  2903. ===========
  2904.  
  2905.    The `-ffree-form' (aka `-fno-fixed-form') and `-ffixed-form' (aka
  2906. `-fno-free-form') command-line options govern how the source file is
  2907. interpreted.  Fixed form corresponds to classic ANSI FORTRAN 77 (plus
  2908. popular extensions, such as allowing tabs) and Fortran 90's fixed form.
  2909. Free form corresponds to Fortran 90's free form (though possibly not
  2910. entirely up-to-date, and without complaining about some things that for
  2911. which Fortran 90 requires diagnostics, such as `R = 3 . 1').
  2912.  
  2913.    The way a Fortran compiler views source files depends entirely on the
  2914. implementation choices made for the compiler.  GNU Fortran currently
  2915. tries to be somewhat like a few popular compilers (`f2c', DEC Fortran,
  2916. and so on), though a cleaner default definition along with more
  2917. flexibility offered by command-line options is likely to be offered in
  2918. version 0.6.
  2919.  
  2920.    Here are some facts regarding the way `g77' interprets source lines:
  2921.  
  2922.    * Carriage returns (`\r') in source lines are ignored.  This is
  2923.      somewhat different from `f2c', which seems to treat them as spaces
  2924.      outside character/Hollerith constants, and encodes them as `\r'
  2925.      inside such constants.
  2926.  
  2927.    * A source line with a TAB character anywhere in it is treated as
  2928.      entirely significant--however long it is--instead of ending in
  2929.      column 72 (for fixed-form source) or 132 (for free-form source).
  2930.      This also is different from `f2c', which encodes tabs as `\t' (the
  2931.      ASCII TAB character) inside character and Hollerith constants, but
  2932.      nevertheless seems to treat the column position as if it had been
  2933.      affected by the canonical tab positioning.
  2934.  
  2935.      `g77' effectively translates tabs to the appropriate number of
  2936.      spaces (a la the default for the UNIX `expand' command) before
  2937.      doing any other processing, other than (currently) noting whether
  2938.      a tab was found on a line and using this info to decide how to
  2939.      interpret the length of the line and continued constants.
  2940.  
  2941.      Note that this default behavior probably will change for version
  2942.      0.6, when it will presumably be available via a command-line
  2943.      option.  The default as of version 0.6 is planned to be a "pure
  2944.      visual" model, where tabs are immediately converted to spaces and
  2945.      otherwise have no effect, so the way a typical user sees source
  2946.      lines produces a consistent result no matter how the spacing in
  2947.      those source lines is actually implemented via tabs, spaces, and
  2948.      trailing tabs/spaces before newline.  Command-line options are
  2949.      likely to be added to specify whether all or just-tabbed lines are
  2950.      to be extended to 132 or full input-line length, and perhaps even
  2951.      an option will be added to specify the truncated-line behavior to
  2952.      which some Digital compilers default (and which affects the way
  2953.      continued character/Hollerith constants are interpreted).
  2954.  
  2955.    * Source lines shorter than the applicable fixed length are treated
  2956.      as if they were padded with spaces to that length.
  2957.  
  2958.      This affects only continued character and Hollerith constants, and
  2959.      is a different interpretation than provided by some other popular
  2960.      compilers (although a bit more consistent with the traditional
  2961.      punched-card basis of Fortran and the way the Fortran standard
  2962.      expressed fixed source form).
  2963.  
  2964.      `g77' might someday offer an option to warn about cases where
  2965.      differences might be seen as a result of this treatment, and
  2966.      perhaps an option to specify the alternate behavior as well.
  2967.  
  2968.      Note that this padding cannot apply to lines that are effectively
  2969.      of infinite length--such lines are specified using command-line
  2970.      options like `-ffixed-line-length-none', for example.
  2971.  
  2972. 
  2973. File: ^.!gcc.docs.fortran.g77,  Node: Pedantic Compilation,  Next: Case Sensitivity,  Prev: Source Form,  Up: Language
  2974.  
  2975. Pedantic Compilation
  2976. ====================
  2977.  
  2978.    The `-fpedantic' command-line option specifies that `g77' is to warn
  2979. about certain non-standard constructs.  This is useful for finding some
  2980. extensions `g77' accepts that other compilers might not accept.  (Note
  2981. that the `-pedantic' and `-pedantic-errors' options always imply
  2982. `-fpedantic'.)
  2983.  
  2984.    With `-ff90' in force along with `-fpedantic', some constructs are
  2985. accepted that result in diagnostics when `-fno-f90' and `-fpedantic'
  2986. are both in force.  *Note GNU Fortran Extensions: Extensions, for
  2987. information on those constructs.
  2988.  
  2989.    The constructs for which `g77' issues diagnostics when `-fpedantic'
  2990. and `-fno-f90' are in force are:
  2991.  
  2992.    * Automatic arrays, as in `REAL A(N)', where `A' is not a dummy
  2993.      argument.
  2994.  
  2995.    * `READ (5), I' and `WRITE (10), J'--the standard disallows the
  2996.      comma in each case, while allowing it in `READ 10, I', but many
  2997.      compilers (including `f2c') allow the superfluous comma.
  2998.  
  2999.    * `DOUBLE COMPLEX', either explicitly (via explicit or `IMPLICIT'
  3000.      statement) or implicitly (as in `C*D', where `C' is `COMPLEX' and
  3001.      `D' is `DOUBLE PRECISION', which is prohibited by the standard
  3002.      because it should produce a non-standard `DOUBLE COMPLEX' result).
  3003.  
  3004.    * Automatic conversion of numeric expressions to `INTEGER' in
  3005.      contexts such as:
  3006.         - Array-reference indexes.
  3007.  
  3008.         - Alternate-return values.
  3009.  
  3010.         - Computed `GOTO'.
  3011.  
  3012.         - `FORMAT' run-time expressions (not yet supported).
  3013.  
  3014.         - Dimension lists in specification statements.
  3015.  
  3016.         - Numbers for I/O statements (such as `READ (UNIT=3.2), I')
  3017.  
  3018.         - Sizes of `CHARACTER' entities in specification statements.
  3019.  
  3020.         - Kind types in specification entities (a Fortran 90 feature).
  3021.  
  3022.         - Initial, terminal, and incrementation parameters for
  3023.           implied-`DO' constructs in `DATA' statements.
  3024.  
  3025.    * Automatic conversion of `LOGICAL' expressions to `INTEGER' in
  3026.      contexts such as arithmetic `IF' (where `COMPLEX' expressions are
  3027.      disallowed anyway).
  3028.  
  3029.    * Substring operators applied to character constants and named
  3030.      constants (such as `PRINT *,'hello'(3:5)', which would print
  3031.      `llo').
  3032.  
  3033.    * Null argument passed to statement function (as in `PRINT
  3034.      *,FOO(,3)').
  3035.  
  3036.    * Differences between program units regarding whether a given
  3037.      `COMMON' area is `SAVE'd (for targets where program units in a
  3038.      single source file are "glued" together as they typically are for
  3039.      UNIX development environments).
  3040.  
  3041.    * Differences between named-`COMMON'-block sizes between program
  3042.      units.
  3043.  
  3044.    * Specification statements following first `DATA' statement (normally
  3045.      `DATA I/1/' may be followed by `INTEGER J', though not `INTEGER
  3046.      I', but `-fpedantic' disables use of both cases.
  3047.  
  3048.    * Semicolon as statement separator (as in `CALL FOO; CALL BAR').
  3049.  
  3050.    * Use of `&' in column 1 of fixed-form source (indicates
  3051.      continuation).
  3052.  
  3053.    * Use of `CHARACTER' constants to initialize numeric entities, and
  3054.      vice versa.
  3055.  
  3056.    * Expressions having two arithmetic operators in a row, such as
  3057.      `X*-Y'.
  3058.  
  3059.    If `-fpedantic' is specified along with `-ff90', the following
  3060. constructs result in diagnostics:
  3061.  
  3062.    * Use of semicolons on line with INCLUDE statement.
  3063.  
  3064. 
  3065. File: ^.!gcc.docs.fortran.g77,  Node: Case Sensitivity,  Next: Intrinsics,  Prev: Pedantic Compilation,  Up: Language
  3066.  
  3067. Case Sensitivity
  3068. ================
  3069.  
  3070.    GNU Fortran offers the programmer way too much flexibility in
  3071. deciding how source files are to be treated vis-a-vis uppercase and
  3072. lowercase characters.  There are 66 useful settings that affect case
  3073. sensitivity, plus 10 settings that are nearly useless, with the
  3074. remaining 116 settings being either redundant or useless.
  3075.  
  3076.    None of these settings have any effect on the contents of comments
  3077. (the text after a `c' or `C' in Column 1, for example) or of character
  3078. or Hollerith constants.  Note that things like the `E' in the statement
  3079. `CALL FOO(3.2E10)' and the `TO' in `ASSIGN 10 TO LAB' are considered
  3080. built-in keywords.
  3081.  
  3082.    Low-level switches are identified in this discussion thusly:
  3083.  
  3084.      A Source Case Conversion
  3085.           0 Preserve (see Note 1)
  3086.  
  3087.           1 Convert to Upper Case
  3088.  
  3089.           2 Convert to Lower Case
  3090.  
  3091.      B Built-in Keyword Matching:
  3092.           0 Match Any Case (per-character basis)
  3093.  
  3094.           1 Match Upper Case Only
  3095.  
  3096.           2 Match Lower Case Only
  3097.  
  3098.           3 Match InitialCaps Only (see tables for spellings)
  3099.  
  3100.      C Built-in Intrinsic Matching:
  3101.           0 Match Any Case (per-character basis)
  3102.  
  3103.           1 Match Upper Case Only
  3104.  
  3105.           2 Match Lower Case Only
  3106.  
  3107.           3 Match InitialCaps Only (see tables for spellings)
  3108.  
  3109.      D User-defined Symbol Possibilities (warnings only)
  3110.           0 Allow Any Case (per-character basis)
  3111.  
  3112.           1 Allow Upper Case Only
  3113.  
  3114.           2 Allow Lower Case Only
  3115.  
  3116.           3 Allow InitialCaps Only (see Note 2)
  3117.  
  3118.    Note 1: `g77' eventually will support `NAMELIST' in a manner that is
  3119. consistent with these source switches--in the sense that input will be
  3120. expected to meet the same requirements as source code in terms of
  3121. matching symbol names and keywords (for the exponent letters).
  3122.  
  3123.    Currently, however, `NAMELIST' is supported `libf2c', which
  3124. uppercases `NAMELIST' input and symbol names for matching.  This means
  3125. not only that `NAMELIST' output currently shows symbol (and keyword)
  3126. names in uppercase even if lower-case source conversion (option A2) is
  3127. selected, but that `NAMELIST' cannot be adequately supported when
  3128. source case preservation (option A0) is selected.
  3129.  
  3130.    If A0 is selected, a warning message will be output for each
  3131. `NAMELIST' statement to this effect.  The behavior of the program is
  3132. undefined at run time if two or more symbol names appear in a given
  3133. `NAMELIST' such that the names are identical when converted to upper
  3134. case (e.g. `NAMELIST /X/ VAR, Var, var').  For complete and total
  3135. elegance, perhaps there should be a warning when option A2 is selected,
  3136. since the output of NAMELIST is currently in uppercase but will someday
  3137. be lowercase (when a `libg77' is written), but that seems to be
  3138. overkill for a product in beta test.
  3139.  
  3140.    Note 2: Rules for InitialCaps names are:
  3141.    - Must be a single uppercase letter, *or*
  3142.  
  3143.    - Must start with an uppercase letter and contain at least one
  3144.      lowercase letter.
  3145.  
  3146.    So `A', `Ab', `ABc', `AbC', and `Abc' are valid InitialCaps names,
  3147. but `AB', `A2', and `ABC' are not.  Note that most, but not all,
  3148. built-in names meet these requirements--the exceptions are some of the
  3149. two-letter format specifiers, such as `BN' and `BZ'.
  3150.  
  3151.    Here are the names of the corresponding command-line options:
  3152.  
  3153.      A0: -fsource-case-preserve
  3154.      A1: -fsource-case-upper
  3155.      A2: -fsource-case-lower
  3156.      
  3157.      B0: -fmatch-case-any
  3158.      B1: -fmatch-case-upper
  3159.      B2: -fmatch-case-lower
  3160.      B3: -fmatch-case-initcap
  3161.      
  3162.      C0: -fintrin-case-any
  3163.      C1: -fintrin-case-upper
  3164.      C2: -fintrin-case-lower
  3165.      C3: -fintrin-case-initcap
  3166.      
  3167.      D0: -fsymbol-case-any
  3168.      D1: -fsymbol-case-upper
  3169.      D2: -fsymbol-case-lower
  3170.      D3: -fsymbol-case-initcap
  3171.  
  3172.    Useful combinations of the above settings, along with abbreviated
  3173. option names that set some of these combinations all at once:
  3174.  
  3175.       1: A0--  B0---  C0---  D0---    -fcase-preserve
  3176.       2: A0--  B0---  C0---  D-1--
  3177.       3: A0--  B0---  C0---  D--2-
  3178.       4: A0--  B0---  C0---  D---3
  3179.       5: A0--  B0---  C-1--  D0---
  3180.       6: A0--  B0---  C-1--  D-1--
  3181.       7: A0--  B0---  C-1--  D--2-
  3182.       8: A0--  B0---  C-1--  D---3
  3183.       9: A0--  B0---  C--2-  D0---
  3184.      10: A0--  B0---  C--2-  D-1--
  3185.      11: A0--  B0---  C--2-  D--2-
  3186.      12: A0--  B0---  C--2-  D---3
  3187.      13: A0--  B0---  C---3  D0---
  3188.      14: A0--  B0---  C---3  D-1--
  3189.      15: A0--  B0---  C---3  D--2-
  3190.      16: A0--  B0---  C---3  D---3
  3191.      17: A0--  B-1--  C0---  D0---
  3192.      18: A0--  B-1--  C0---  D-1--
  3193.      19: A0--  B-1--  C0---  D--2-
  3194.      20: A0--  B-1--  C0---  D---3
  3195.      21: A0--  B-1--  C-1--  D0---
  3196.      22: A0--  B-1--  C-1--  D-1--    -fcase-strict-upper
  3197.      23: A0--  B-1--  C-1--  D--2-
  3198.      24: A0--  B-1--  C-1--  D---3
  3199.      25: A0--  B-1--  C--2-  D0---
  3200.      26: A0--  B-1--  C--2-  D-1--
  3201.      27: A0--  B-1--  C--2-  D--2-
  3202.      28: A0--  B-1--  C--2-  D---3
  3203.      29: A0--  B-1--  C---3  D0---
  3204.      30: A0--  B-1--  C---3  D-1--
  3205.      31: A0--  B-1--  C---3  D--2-
  3206.      32: A0--  B-1--  C---3  D---3
  3207.      33: A0--  B--2-  C0---  D0---
  3208.      34: A0--  B--2-  C0---  D-1--
  3209.      35: A0--  B--2-  C0---  D--2-
  3210.      36: A0--  B--2-  C0---  D---3
  3211.      37: A0--  B--2-  C-1--  D0---
  3212.      38: A0--  B--2-  C-1--  D-1--
  3213.      39: A0--  B--2-  C-1--  D--2-
  3214.      40: A0--  B--2-  C-1--  D---3
  3215.      41: A0--  B--2-  C--2-  D0---
  3216.      42: A0--  B--2-  C--2-  D-1--
  3217.      43: A0--  B--2-  C--2-  D--2-    -fcase-strict-lower
  3218.      44: A0--  B--2-  C--2-  D---3
  3219.      45: A0--  B--2-  C---3  D0---
  3220.      46: A0--  B--2-  C---3  D-1--
  3221.      47: A0--  B--2-  C---3  D--2-
  3222.      48: A0--  B--2-  C---3  D---3
  3223.      49: A0--  B---3  C0---  D0---
  3224.      50: A0--  B---3  C0---  D-1--
  3225.      51: A0--  B---3  C0---  D--2-
  3226.      52: A0--  B---3  C0---  D---3
  3227.      53: A0--  B---3  C-1--  D0---
  3228.      54: A0--  B---3  C-1--  D-1--
  3229.      55: A0--  B---3  C-1--  D--2-
  3230.      56: A0--  B---3  C-1--  D---3
  3231.      57: A0--  B---3  C--2-  D0---
  3232.      58: A0--  B---3  C--2-  D-1--
  3233.      59: A0--  B---3  C--2-  D--2-
  3234.      60: A0--  B---3  C--2-  D---3
  3235.      61: A0--  B---3  C---3  D0---
  3236.      62: A0--  B---3  C---3  D-1--
  3237.      63: A0--  B---3  C---3  D--2-
  3238.      64: A0--  B---3  C---3  D---3    -fcase-initcap
  3239.      65: A-1-  B01--  C01--  D01--    -fcase-upper
  3240.      66: A--2  B0-2-  C0-2-  D0-2-    -fcase-lower
  3241.  
  3242.    Number 22 is the "strict" ANSI FORTRAN 77 model wherein all input
  3243. (except comments, character constants, and Hollerith strings) must be
  3244. entered in uppercase.  Use `-fcase-strict-upper' to specify this
  3245. combination.
  3246.  
  3247.    Number 43 is like Number 22 except all input must be lowercase.  Use
  3248. `-fcase-strict-lower' to specify this combination.
  3249.  
  3250.    Number 65 is the "classic" ANSI FORTRAN 77 model as implemented on
  3251. many non-UNIX machines whereby all the source is translated to
  3252. uppercase.  Use `-fcase-upper' to specify this combination.
  3253.  
  3254.    Number 66 is the "canonical" UNIX model whereby all the source is
  3255. translated to lowercase.  Use `-fcase-lower' to specify this
  3256. combination.
  3257.  
  3258.    There are a few nearly useless combinations:
  3259.  
  3260.      67: A-1-  B01--  C01--  D--2-
  3261.      68: A-1-  B01--  C01--  D---3
  3262.      69: A-1-  B01--  C--23  D01--
  3263.      70: A-1-  B01--  C--23  D--2-
  3264.      71: A-1-  B01--  C--23  D---3
  3265.      72: A--2  B01--  C0-2-  D-1--
  3266.      73: A--2  B01--  C0-2-  D---3
  3267.      74: A--2  B01--  C-1-3  D0-2-
  3268.      75: A--2  B01--  C-1-3  D-1--
  3269.      76: A--2  B01--  C-1-3  D---3
  3270.  
  3271.    The above allow some programs to be compiled but with restrictions
  3272. that make most useful programs impossible: Numbers 67 and 72 warn about
  3273. *any* user-defined symbol names (such as `SUBROUTINE FOO'); Numbers 68
  3274. and 73 warn about any user-defined symbol names longer than one
  3275. character that don't have at least one non-alphabetic character after
  3276. the first; Numbers 69 and 74 disallow any references to intrinsics; and
  3277. Numbers 70, 71, 75, and 76 are combinations of the restrictions in
  3278. 67+69, 68+69, 72+74, and 73+74, respectively.
  3279.  
  3280.    All redundant combinations are shown in the above tables anyplace
  3281. where more than one setting is shown for a low-level switch.  For
  3282. example, `B0-2-' means either setting 0 or 2 is valid for switch B.
  3283. The "proper" setting in such a case is the one that copies the setting
  3284. of switch A--any other setting might slightly reduce the speed of the
  3285. compiler, though possibly to an unmeasurable extent.
  3286.  
  3287.    All remaining combinations are useless in that they prevent
  3288. successful compilation of non-null source files (source files with
  3289. something other than comments).
  3290.  
  3291. 
  3292. File: ^.!gcc.docs.fortran.g77,  Node: Intrinsics,  Next: Dialects,  Prev: Case Sensitivity,  Up: Language
  3293.  
  3294. Intrinsics
  3295. ==========
  3296.  
  3297.    A given specific intrinsic belongs in one or more groups.  Each group
  3298. is deleted, disabled, hidden, or enabled by default or a command-line
  3299. option.  The meaning of each term follows.
  3300.  
  3301. Deleted
  3302.      No intrinsics are recognized as belonging to that group.
  3303.  
  3304. Disabled
  3305.      Intrinsics are recognized as belonging to the group, but
  3306.      references to them (other than via the `INTRINSIC' statement) are
  3307.      disallowed through that group.
  3308.  
  3309. Hidden
  3310.      Intrinsics in that group are recognized and enabled (if
  3311.      implemented) *only* if the first mention of the actual name of an
  3312.      intrinsic in a program unit is in an `INTRINSIC' statement.
  3313.  
  3314. Enabled
  3315.      Intrinsics in that group are recognized and enabled (if
  3316.      implemented).
  3317.  
  3318.    The distinction between deleting and disabling a group is illustrated
  3319. by the following example.  Assume intrinsic `FOO' belongs only to group
  3320. `FGR'.  If group `FGR' is deleted, the following program unit will
  3321. successfully compile, because `FOO()' will be seen as a reference to an
  3322. external function named `FOO':
  3323.  
  3324.      PRINT *, FOO()
  3325.      END
  3326.  
  3327. If group `FGR' is disabled, compiling the above program will produce
  3328. diagnostics, either because the `FOO' intrinsic is improperly invoked
  3329. or, if properly invoked, it is not enabled.  To change the above
  3330. program so it references an external function `FOO' instead of the
  3331. disabled `FOO' intrinsic, add the following line to the top:
  3332.  
  3333.      EXTERNAL FOO
  3334.  
  3335. So, deleting a group tells `g77' to pretend as though the intrinsics in
  3336. that group do not exist at all, whereas disabling it tells `g77' to
  3337. recognize them as (disabled) intrinsics in intrinsic-like contexts.
  3338.  
  3339.    Hiding a group is like enabling it, but the intrinsic must be first
  3340. named in an `INTRINSIC' statement to be considered a reference to the
  3341. intrinsic rather than to an external procedure.  This might be the
  3342. "safest" way to treat a new group of intrinsics when compiling old
  3343. code, because it allows the old code to be generally written as if
  3344. those new intrinsics never existed, but to be changed to use them by
  3345. inserting `INTRINSIC' statements in the appropriate places.  However,
  3346. it should be the goal of development to use `EXTERNAL' for all names of
  3347. external procedures that might be intrinsic names.
  3348.  
  3349.    If an intrinsic is in more than one group, it is enabled if any of
  3350. its containing groups are enabled; if not so enabled, it is hidden if
  3351. any of its containing groups are hidden; if not so hidden, it is
  3352. disabled if any of its containing groups are disabled; if not so
  3353. disabled, it is deleted.  This extra complication is necessary because
  3354. some intrinsics, such as `IBITS', belong to more than one group, and
  3355. hence should be enabled if any of the groups to which they belong are
  3356. enabled, and so on.
  3357.  
  3358.    The groups are:
  3359.  
  3360. `dcp'
  3361.      `DOUBLE COMPLEX' intrinsics from the standards (F77, F90).
  3362.  
  3363. `f2c'
  3364.      Intrinsics supported by AT&T's `f2c' converter and/or `libf2c'.
  3365.  
  3366. `f90'
  3367.      Fortran 90 intrinsics.
  3368.  
  3369. `mil'
  3370.      MIL-STD 1753 intrinsics (`MVBITS', `IAND', `BTEST', and so on).
  3371.  
  3372. `unix'
  3373.      UNIX intrinsics (`IARGC', `EXIT', `ERF', and so on).
  3374.  
  3375. `vxt'
  3376.      VAX/VMS FORTRAN (current as of v4) intrinsics.
  3377.  
  3378. 
  3379. File: ^.!gcc.docs.fortran.g77,  Node: Dialects,  Next: Object Compatibility,  Prev: Intrinsics,  Up: Language
  3380.  
  3381. GNU Fortran Dialects
  3382. ====================
  3383.  
  3384.    The `-fvxt-not-f90' and `-ff90-not-vxt' command-line options control
  3385. how `g77' interprets certain tokens and constructs that have different
  3386. meanings in VAX FORTRAN (circa v4) and Fortran 90.  (Generally, this
  3387. manual uses the invented acronym VXT to refer to many popular VAX
  3388. FORTRAN extensions, though not necessarily those that are specific to
  3389. the VAX processor architecture or the VMS operating system.  An
  3390. extension offered by a Digital Fortran product that also is offered by
  3391. several other Fortran products for different kinds of systems is
  3392. probably going to be considered for inclusion in `g77' someday, and is
  3393. considered a VXT extension.)
  3394.  
  3395.    When `-ff90-not-vxt' is specified, the following interpretations are
  3396. made (and, when `-fvxt-not-f90' is in effect, the opposite
  3397. interpretations are made):
  3398.  
  3399.    * Double-quote character (`"') delimits character constant just as
  3400.      does apostrophe (`''), rather than beginning an octal constant of
  3401.      `INTEGER' type.
  3402.  
  3403.    * An exclamation point (`!') in column 5 of fixed-form source file
  3404.      treated as a continuation character rather than the beginning of a
  3405.      comment (as it does in any other column).
  3406.  
  3407.    * `TYPE FOO' and `TYPE (FOO), BAR' statements are recognized as the
  3408.      Fortran 90 variety, not I/O statements.  (However, the F90 variety
  3409.      is *not* supported, so this really just ensures that `g77' will
  3410.      produce a diagnostic instead of trying to implement the VXT `TYPE'
  3411.      statement--which currently is not supported either.)
  3412.  
  3413. 
  3414. File: ^.!gcc.docs.fortran.g77,  Node: Object Compatibility,  Next: Distensions,  Prev: Dialects,  Up: Language
  3415.  
  3416. Object Compatibility
  3417. ====================
  3418.  
  3419.    An individual Fortran source file can be compiled to an object
  3420. (`*.o') file instead of to the final program executable.  This allows
  3421. several portions of a program to be compiled at different times and
  3422. linked together whenever a new version of the program is needed.
  3423. However, it introduces the issue of "object compatibility" across the
  3424. various object files (and libraries, or `*.a' files) that are linked
  3425. together to produce any particular exectable file.
  3426.  
  3427.    Object compatibility is an issue when combining, in one program,
  3428. Fortran code compiled by more than one compiler (or more than one
  3429. configuration of a compiler).  If the compilers disagree on how to
  3430. transform the names of procedures, there will normally be errors when
  3431. linking such programs.  Worse, if the compilers agree on naming, but
  3432. disagree on issues like how to pass parameters, return arguments, and
  3433. lay out `COMMON' areas, the earliest detected errors might be the
  3434. incorrect results produced by the program (and that assumes these
  3435. errors are detected, which is not always the case).
  3436.  
  3437.    Normally, `g77' generates code that is object-compatible with code
  3438. generated by a version of `f2c' configured (with, for example, `f2c.h'
  3439. definitions) to be generally compatible with `g77' as built by `gcc'.
  3440. (Normally, `f2c' will, by default, conform to the appropriate
  3441. configuration, but it is possible that older or perhaps even newer
  3442. versions of `f2c', or versions having certain configuration changes to
  3443. `f2c' internals, will produce object files that are incompatible with
  3444. `g77'.)
  3445.  
  3446.    For example, a Fortran string subroutine argument will become two
  3447. arguments on the C side: a `char *' and an `int' length.
  3448.  
  3449.    Much of this compatibility results from the fact that `g77' uses the
  3450. same run-time library, `libf2c', used by `f2c'.
  3451.  
  3452.    Other compilers might or might not generate code that is
  3453. object-compatible with `libf2c' and current `g77', and some might offer
  3454. such compatibility only when explicitly selected via a command-line
  3455. option to the compiler.
  3456.  
  3457. * Menu:
  3458.  
  3459. * Dropping f2c Compatibility::  When speed is more important.
  3460. * Other Compilers::             Interoperation with code from other compilers.
  3461.  
  3462. 
  3463. File: ^.!gcc.docs.fortran.g77,  Node: Dropping f2c Compatibility,  Next: Other Compilers,  Up: Object Compatibility
  3464.  
  3465. Dropping f2c Compatibility
  3466. --------------------------
  3467.  
  3468.    Specifying `-fno-f2c' allows `g77' to generate, in some cases,
  3469. faster code, by not needing to allow to the possibility of linking with
  3470. code compiled by `f2c'.
  3471.  
  3472.    For example, this affects how `REAL', `COMPLEX', and `DOUBLE
  3473. COMPLEX' functions are called.  With `-fno-f2c', they are compiled as
  3474. returning the appropriate `gcc' type (`float', `__complex__ float',
  3475. `__complex__ double', in many configurations).
  3476.  
  3477.    With `-ff2c' in force, they are compiled differently (with perhaps
  3478. slower run-time performance) to accommodate the restrictions inherent
  3479. in `f2c''s use of K&R C as an intermediate language--`REAL' functions
  3480. return double, while `COMPLEX' functions return `void' and use an extra
  3481. argument pointing to a place for the functions to return their values.
  3482.  
  3483.    It is possible that, in some cases, leaving `-ff2c' in force might
  3484. produce faster code than using `-fno-f2c'.  Feel free to experiment,
  3485. but remember to experiment with changing the way *entire programs and
  3486. their Fortran libraries are compiled* at a time, since this sort of
  3487. experimentation affects the interface of code generated for a Fortran
  3488. source file--that is, it affects object compatibility.
  3489.  
  3490.    Note that `f2c' compatibility is a fairly static target to achieve,
  3491. though not necessarily perfectly so, since, like `g77', it is still
  3492. being improved.  However, specifying `-fno-f2c' causes `g77' to
  3493. generate code that will probably be incompatible with code generated by
  3494. future versions of `g77' when the same option is in force.  You should
  3495. make sure you are always able to recompile complete programs from
  3496. source code when upgrading to new versions of `g77' or `f2c',
  3497. especially when using options such as `-fno-f2c'.
  3498.  
  3499.    Therefore, if you are using `g77' to compile libraries and other
  3500. object files for possible future use and you don't want to require
  3501. recompilation for future use with subsequent versions of `g77', you
  3502. might want to stick with `f2c' compatibility for now, and carefully
  3503. watch for any announcements about changes to the `f2c'/`libf2c'
  3504. interface that might affect existing programs (thus requiring
  3505. recompilation).
  3506.  
  3507.    It is probable that a future version of `g77' will not, by default,
  3508. generate object files compatible with `f2c' and not use `libf2c'.  If
  3509. you expect to depend on this compatibility in the long term, use the
  3510. options `-ff2c -ff2c-library' when compiling all of the applicable code.
  3511. This should either cause `g77' to produce compatible code (at the
  3512. expense of the availability of some features and performance), or at
  3513. the very least trigger compiler warning messages, in future versions of
  3514. `g77'.
  3515.  
  3516. 
  3517. File: ^.!gcc.docs.fortran.g77,  Node: Other Compilers,  Prev: Dropping f2c Compatibility,  Up: Object Compatibility
  3518.  
  3519. Other Compilers
  3520. ---------------
  3521.  
  3522.    On systems with Fortran compilers other than `f2c' and `g77', code
  3523. compiled by `g77' is not expected to work well with code compiled by
  3524. the native compiler.  (This is true for `f2c'-compiled objects as well.)
  3525. Libraries compiled with the native compiler probably will have to be
  3526. recompiled with `g77' to be used with `g77'-compiled code.
  3527.  
  3528.    Reasons for such incompatibilities include:
  3529.  
  3530.    * There might be differences in the way names of Fortran procedures
  3531.      are translated for use in the system's object-file format.  For
  3532.      example, the statement `CALL FOO' might be compiled by `g77' to
  3533.      call a procedure the linker `ld' sees given the name `_foo_',
  3534.      while the apparently corresponding statement `SUBROUTINE FOO'
  3535.      might be compiled by the native compiler to define the
  3536.      linker-visible name `_foo', or `_FOO_', and so on.
  3537.  
  3538.    * There might be subtle type mismatches which cause subroutine
  3539.      arguments and function return values to get corrupted.
  3540.  
  3541.      This is why simply getting `g77' to transform procedure names the
  3542.      same way a native compiler does is not usually a good idea--unless
  3543.      some effort has been made to ensure that, aside from the way the
  3544.      two compilers transform procedure names, everything else about the
  3545.      way they generate code for procedure interfaces is identical.
  3546.  
  3547.    * Native compilers use libraries of private I/O routines which will
  3548.      not be available at link time unless you have the native
  3549.      compiler--and you would have to explicitly ask for them.
  3550.  
  3551.      For example, on the Sun you would have to add `-L/usr/lang/SCx.x
  3552.      -lF77 -lV77' to the link command.
  3553.  
  3554. 
  3555. File: ^.!gcc.docs.fortran.g77,  Node: Distensions,  Prev: Object Compatibility,  Up: Language
  3556.  
  3557. Distensions
  3558. ===========
  3559.  
  3560.    The `-fugly' command-line options determine whether certain features
  3561. supported by VAX FORTRAN and other such compilers, but considered too
  3562. ugly to be in code that can be changed to use safer and/or more
  3563. portable constructs, are accepted.  These are humorously referred to as
  3564. "distensions", extensions that just plain look ugly in the harsh light
  3565. of day.
  3566.  
  3567.    The constructs enabled via `-fugly' include:
  3568.  
  3569.    * Automatic conversion between `INTEGER' and `LOGICAL' as dictated by
  3570.      context (typically implies nonportable dependencies on how a
  3571.      particular implementation encodes `.TRUE.' and `.FALSE.').
  3572.  
  3573.    * Use of typeless and Hollerith constants in non-standard places
  3574.      (the "standard" here being the appendix in ANSI FORTRAN 77 and the
  3575.      descriptions in MIL-STD 1753), plus in places controlled by
  3576.      `-fugly-args' and `-fugly-init'.
  3577.  
  3578.    * Use of a `LOGICAL' variable in `ASSIGN' and assigned-`GOTO'
  3579.      statements.
  3580.  
  3581.    * Use of a single trailing comma to mean "pass an extra trailing null
  3582.      argument" in a list of actual arguments to a procedure other than a
  3583.      statement function.
  3584.  
  3585.      For example, `CALL FOO(,)' means "pass two null arguments" when
  3586.      `-fugly' is used, rather than "pass one null argument".
  3587.  
  3588.    The construct disabled via `-fno-ugly-args' is:
  3589.  
  3590.    * Passing of typeless and Hollerith constants as actual arguments in
  3591.      procedure invocations.
  3592.  
  3593.      For example, `CALL FOO(4HABCD)'.
  3594.  
  3595.    The constructs disabled by `-fno-ugly-init' are:
  3596.  
  3597.    * Use of Hollerith and typeless constants in contexts where they set
  3598.      initial (compile-time) values for variables, arrays, and named
  3599.      constants--that is, `DATA' and `PARAMETER' statements, plus
  3600.      type-declaration statements specifying initial values.
  3601.  
  3602.    * In the same contexts as above, use of character constants to
  3603.      initialize numeric items and vice versa (one constant per item).
  3604.  
  3605.    * Use of Hollerith and typeless constants on the right-hand side of
  3606.      assignment statements to numeric types, and in other contexts
  3607.      (such as passing arguments to in invocations of intrinsic
  3608.      procedures and statement functions) that are treated as
  3609.      assignments to known types (the dummy arguments, in these cases).
  3610.  
  3611. 
  3612. File: ^.!gcc.docs.fortran.g77,  Node: Installation,  Next: Debugging and Interfacing,  Prev: Language,  Up: Top
  3613.  
  3614. Installing GNU Fortran
  3615. **********************
  3616.  
  3617. * Menu:
  3618.  
  3619. * Prerequisites::          Make sure your system is ready for `g77'.
  3620. * Problems Installing::    Known trouble areas.
  3621. * Quick Start::            The easier procedure for non-experts.
  3622. * Complete Installation::  For experts, or those who want to be: the details.
  3623. * Distributing Binaries::  If you plan on distributing your `g77'.
  3624. * Settings::               Some notes on `g77' internals.
  3625.  
  3626.    The following information describes how to install `g77'.
  3627.  
  3628.    The information in this file generally pertains to dealing with
  3629. *source* distributions of `g77' and `gcc'.  It is possible that some of
  3630. this information will be applicable to some *binary* distributions of
  3631. these products--however, since these distributions are not made by the
  3632. maintainers of `g77', responsibility for binary distributions rests with
  3633. whoever built and first distributed them.
  3634.  
  3635.    Nevertheless, efforts to make `g77' easier to both build and install
  3636. from source and package up as a binary distribution are ongoing.
  3637.  
  3638. 
  3639. File: ^.!gcc.docs.fortran.g77,  Node: Prerequisites,  Next: Problems Installing,  Up: Installation
  3640.  
  3641. Prerequisites
  3642. =============
  3643.  
  3644.    The procedures described to unpack, configure, build, and install
  3645. `g77' assume your system has certain programs already installed.
  3646.  
  3647.    The following prerequisites should be met by your system before you
  3648. follow the `g77' installation instructions:
  3649.  
  3650. `gzip'
  3651.      To unpack the `gcc' and `g77' distributions, you'll need the
  3652.      `gunzip' utility in the `gzip' distribution.  Most UNIX systems
  3653.      already have `gzip' installed.  If yours doesn't, you can get it
  3654.      from the FSF.
  3655.  
  3656.      Note that you'll need `tar' and other utilities as well, but all
  3657.      UNIX systems have these.  There are GNU versions of all these
  3658.      available--in fact, a complete GNU UNIX system can be put together
  3659.      on most systems, if desired.
  3660.  
  3661. `gcc-2.7.2.tar.gz'
  3662.      You need to have this, or some other applicable, version of `gcc'
  3663.      on your system.  The version should be an exact copy of a
  3664.      distribution from the FSF.  It is approximately 7MB large.
  3665.  
  3666.      If you've already unpacked `gcc-2.7.2.tar.gz' into a directory
  3667.      (named `gcc-2.7.2') called the "source tree" for `gcc', you can
  3668.      delete the distribution itself, but you'll need to remember to
  3669.      skip any instructions to unpack this distribution.
  3670.  
  3671.      Without an applicable `gcc' source tree, you cannot build `g77'.
  3672.      You can obtain an FSF distribution of `gcc' from the FSF.
  3673.  
  3674. `g77-0.5.18.tar.gz'
  3675.      You probably have already unpacked this distribution, or you are
  3676.      reading an advanced copy of this manual, which is contained in
  3677.      this distribution.  This distribution approximately 1MB large.
  3678.  
  3679.      You can obtain an FSF distribution of `g77' from the FSF, the same
  3680.      way you obtained `gcc'.
  3681.  
  3682. 100MB disk space
  3683.      For a complete "bootstrap" build, about 100MB of disk space is
  3684.      required for `g77' by the author's current Linux system.
  3685.  
  3686.      Some juggling can reduce the amount of space needed; during the
  3687.      bootstrap process, once Stage 3 starts, during which the version
  3688.      of `gcc' that has been copied into the `stage2/' directory is used
  3689.      to rebuild the system, you can delete the `stage1/' directory to
  3690.      free up some space.
  3691.  
  3692.      It is likely that many systems don't require the complete
  3693.      bootstrap build, as they already have a recent version of `gcc'
  3694.      installed.  Such systems might be able to build `g77' with only
  3695.      about 75MB of free space.
  3696.  
  3697. `patch'
  3698.      Although you can do everything `patch' does yourself, by hand,
  3699.      without much trouble, having `patch' installed makes installation
  3700.      of new versions of GNU utilities such as `g77' so much easier that
  3701.      it is worth getting.  You can obtain `patch' the same way you
  3702.      obtained `gcc' and `g77'.
  3703.  
  3704.      In any case, you can apply patches by hand--patch files are
  3705.      designed for humans to read them.
  3706.  
  3707. `make'
  3708.      Your system must have `make', and you will probably save yourself
  3709.      a lot of trouble if it is GNU `make' (sometimes referred to as
  3710.      `gmake').
  3711.  
  3712. `cc'
  3713.      Your system must have a working C compiler.
  3714.  
  3715.      *Note Installing GNU CC: (gcc)Installation, for more information
  3716.      on prerequisites for installing `gcc'.
  3717.  
  3718. `bison'
  3719.      If you do not have `bison' installed, you can usually work around
  3720.      any need for it, since `g77' itself does not use it, and `gcc'
  3721.      normally includes all files generated by running it in its
  3722.      distribution.  You can obtain `bison' the same way you obtained
  3723.      `gcc' and `g77'.
  3724.  
  3725.      *Note Missing bison?::, for information on how to work around not
  3726.      having `bison'.
  3727.  
  3728. `makeinfo'
  3729.      If you are missing `makeinfo', you can usually work around any
  3730.      need for it.  You can obtain `makeinfo' the same way you obtained
  3731.      `gcc' and `g77'.
  3732.  
  3733.      *Note Missing makeinfo?::, for information on getting around the
  3734.      lack of `makeinfo'.
  3735.  
  3736. `root' access
  3737.      To perform the complete installation procedures on a system, you
  3738.      need to have `root' access to that system, or equivalent access.
  3739.  
  3740.      Portions of the procedure (such as configuring and building `g77')
  3741.      can be performed by any user with enough disk space and virtual
  3742.      memory.
  3743.  
  3744.      However, these instructions are oriented towards less-experienced
  3745.      users who want to install `g77' on their own personal systems.
  3746.  
  3747.      System administrators with more experience will want to determine
  3748.      for themselves how they want to modify the procedures described
  3749.      below to suit the needs of their installation.
  3750.  
  3751. 
  3752. File: ^.!gcc.docs.fortran.g77,  Node: Problems Installing,  Next: Quick Start,  Prev: Prerequisites,  Up: Installation
  3753.  
  3754. Problems Installing
  3755. ===================
  3756.  
  3757.    This is a list of problems (and some apparent problems which don't
  3758. really mean anything is wrong) that show up when configuring, building,
  3759. installing, or porting GNU Fortran.
  3760.  
  3761.    *Note Installation Problems: (gcc)Installation Problems, for more
  3762. information on installation problems that can afflict either `gcc' or
  3763. `g77'.
  3764.  
  3765. * Menu:
  3766.  
  3767. * General Problems::         Problems afflicting most or all systems.
  3768. * Cross-compiler Problems::  Problems afflicting cross-compilation setups.
  3769.  
  3770. 
  3771. File: ^.!gcc.docs.fortran.g77,  Node: General Problems,  Next: Cross-compiler Problems,  Up: Problems Installing
  3772.  
  3773. General Problems
  3774. ----------------
  3775.  
  3776.    * On SunOS systems, linking the `f771' program produces an error
  3777.      message concerning an undefined symbol named `_strtoul'.
  3778.  
  3779.      This is not a `g77' bug.  *Note Patching GNU Fortran::, for
  3780.      information on a workaround provided by `g77'.
  3781.  
  3782.      The proper fix is either to upgrade your system to one that
  3783.      provides a complete ANSI C environment, or improve `gcc' so that
  3784.      it provides one for all the languages and configurations it
  3785.      supports.
  3786.  
  3787.      *Note:* In earlier versions of `g77', an automated workaround for
  3788.      this problem was attempted.  It worked for systems without
  3789.      `_strtoul', substituting the incomplete-yet-sufficient version
  3790.      supplied with `g77' for those systems.  However, the automated
  3791.      workaround failed mysteriously for systems that appeared to have
  3792.      conforming ANSI C environments, and it was decided that, lacking
  3793.      resources to more fully investigate the problem, it was better to
  3794.      not punish users of those systems either by requiring them to work
  3795.      around the problem by hand or by always substituting an incomplete
  3796.      `strtoul()' implementation when their systems had a complete,
  3797.      working one.  Unfortunately, this meant inconveniencing users of
  3798.      systems not having `strtoul()', but they're using obsolete (and
  3799.      generally unsupported) systems anyway.
  3800.  
  3801.    * It'd be helpful if `g77''s `Makefile.in' or `Make-lang.in' would
  3802.      create the various `stageN' directories and their subdirectories,
  3803.      so expert installers wouldn't have to reconfigure after cleaning
  3804.      up.
  3805.  
  3806.    * Improvements to the way `libf2c' is built could make building
  3807.      `g77' as a cross-compiler easier--for example, passing and using
  3808.      `LD' and `AR' in the appropriate ways.
  3809.  
  3810.    * `g77' currently requires application of a patch file to the gcc
  3811.      compiler tree (at least up through gcc version 2.7.0).  The
  3812.      necessary patches should be folded in to the mainline gcc
  3813.      distribution.
  3814.  
  3815.      (Some combinations of versions of `g77' and `gcc' might actually
  3816.      *require* no patches, but the patch files will be provided anyway
  3817.      as long as there are more changes expected in subsequent releases.
  3818.      These patch files might contain unnecessary, but possibly helpful,
  3819.      patches.  As a result, it is possible this issue might never be
  3820.      resolved, except by eliminating the need for the person
  3821.      configuring `g77' to apply a patch by hand, by going to a more
  3822.      automated approach (such as configure-time patching).
  3823.  
  3824.    * It should be possible to build the runtime without building `cc1'
  3825.      and other non-Fortran items, but, for now, an easy way to do that
  3826.      is not yet established.
  3827.  
  3828.    * Compiling `g77' requires GNU C, not just ANSI C.  Fixing this
  3829.      wouldn't be very hard (just tedious), but the code using GNU
  3830.      extensions to the C language is expected to be rewritten for 0.6
  3831.      anyway, so there are no plans for an interim fix.
  3832.  
  3833. 
  3834. File: ^.!gcc.docs.fortran.g77,  Node: Cross-compiler Problems,  Prev: General Problems,  Up: Problems Installing
  3835.  
  3836. Cross-compiler Problems
  3837. -----------------------
  3838.  
  3839.    `g77' has been in alpha testing since September of 1992, and in
  3840. public beta testing since February of 1995.  Alpha testing was done by
  3841. a small number of people worldwide on a fairly wide variety of
  3842. machines, involving self-compilation in most or all cases.  Beta
  3843. testing has been done primarily via self-compilation, but in more and
  3844. more cases, cross-compilation (and "criss-cross compilation", where a
  3845. version of a compiler is built on one machine to run on a second and
  3846. generate code that runs on a third) has been tried and has succeeded,
  3847. to varying extents.
  3848.  
  3849.    Generally, `g77' can be ported to any configuration to which `gcc',
  3850. `f2c', and `libf2c' can be ported and made to work together, aside from
  3851. the known problems described in this manual.  If you want to port `g77'
  3852. to a particular configuration, you should first make sure `gcc' and
  3853. `libf2c' can be ported to that configuration before focusing on `g77',
  3854. because `g77' is so dependent on them.
  3855.  
  3856.    Even for cases where `gcc' and `libf2c' work, you might run into
  3857. problems with cross-compilation on certain machines, for several
  3858. reasons.
  3859.  
  3860.    * There is one known bug (a design bug to be fixed in 0.6) that
  3861.      prevents configuration of `g77' as a cross-compiler in some cases,
  3862.      though there are assumptions made during configuration that
  3863.      probably make doing non-self-hosting builds a hassle, requiring
  3864.      manual intervention.
  3865.  
  3866.    * `gcc' might still have some trouble being configured for certain
  3867.      combinations of machines.  For example, it might not know how to
  3868.      handle floating-point constants.
  3869.  
  3870.    * There are still some challenges putting together the right
  3871.      run-time libraries (needed by `libf2c') for a target system,
  3872.      depending on the systems involved in the configuration.  (This is
  3873.      a general problem with cross-compilation, and with `gcc' in
  3874.      particular.)
  3875.  
  3876. 
  3877. File: ^.!gcc.docs.fortran.g77,  Node: Quick Start,  Next: Complete Installation,  Prev: Problems Installing,  Up: Installation
  3878.  
  3879. Quick Start
  3880. ===========
  3881.  
  3882.    This procedure configures, builds, and installs `g77' "out of the
  3883. box" and works on most UNIX systems.  Each command is identified by a
  3884. unique number, used in the explanatory text that follows.  For the most
  3885. part, the output of each command is not shown, though indications of
  3886. the types of responses are given in a few cases.
  3887.  
  3888.    To perform this procedure, the installer must be logged in as user
  3889. `root'.  Much of it can be done while not logged in as `root', and
  3890. users experienced with UNIX administration should be able to modify the
  3891. procedure properly to do so.
  3892.  
  3893.    Following traditional UNIX conventions, it is assumed that the
  3894. source trees for `g77' and `gcc' will be placed in `/usr/src'.  It also
  3895. is assumed that the source distributions themselves already reside in
  3896. `/usr/FSF', a naming convention used by the author of `g77' on his own
  3897. system:
  3898.  
  3899.      /usr/FSF/gcc-2.7.2.tar.gz
  3900.      /usr/FSF/g77-0.5.18.tar.gz
  3901.  
  3902.    Users of the following systems should not blindly follow these
  3903. quick-start instructions, because of problems their systems have coping
  3904. with straightforward installation of `g77':
  3905.  
  3906.    * SunOS
  3907.  
  3908.    * Alpha
  3909.  
  3910.    Instead, see *Note Complete Installation::, for detailed information
  3911. on how to configure, build, and install `g77' for your particular
  3912. system.  Also, see *Note Known Causes of Trouble with GNU Fortran:
  3913. Trouble, for information on bugs and other problems known to afflict the
  3914. installation process, and how to report newly discovered ones.
  3915.  
  3916.    If your system is *not* on the above list, and *is* a UNIX system or
  3917. one of its variants, you should be able to follow the instructions
  3918. below.  If you vary *any* of the steps below, you might run into
  3919. trouble, including possibly breaking existing programs for other users
  3920. of your system.  Before doing so, it is wise to review the explanations
  3921. of some of the steps.  These explanations follow this list of steps.
  3922.  
  3923.      sh[ 1]# `cd /usr/src'
  3924.      
  3925.      sh[ 2]# `gunzip -c < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -'
  3926.      
  3927.      [Might say "Broken pipe"...that is normal on some systems.]
  3928.      sh[ 3]# `gunzip -c < /usr/FSF/g77-0.5.18.tar.gz | tar xf -'
  3929.      
  3930.      ["Broken pipe" again possible.]
  3931.      sh[ 4]# `ln -s gcc-2.7.2 gcc'
  3932.      
  3933.      sh[ 5]# `ln -s g77-0.5.18 g77'
  3934.      
  3935.      sh[ 6]# `mv -i g77/* gcc'
  3936.      
  3937.      [No questions should be asked by mv here; or, you made a mistake.]
  3938.      sh[ 7]# `patch -p1 -V t -d gcc-2.7.2 < gcc-2.7.2/f/gbe/2.7.2.diff'
  3939.      
  3940.      [Unless patch complains about rejected patches, this step worked.]
  3941.      sh[ 8]# `cd gcc'
  3942.      sh[ 9]# `touch f77-install-ok'
  3943.      
  3944.      [Do not do the above if your system already has an f77
  3945.      command, unless you've checked that overwriting it
  3946.      is okay.]
  3947.      sh[10]# `touch f2c-install-ok'
  3948.      
  3949.      [Do not do the above if your system already has an f2c
  3950.      command, unless you've checked that overwriting it
  3951.      is okay.  Else, `touch f2c-exists-ok'.]
  3952.      sh[11]# `./configure --prefix=/usr'
  3953.      
  3954.      [Do not do the above if gcc is not installed in /usr/bin.
  3955.      You might need a different `--prefix=...', as
  3956.      described below.]
  3957.      sh[12]# `make bootstrap'
  3958.      
  3959.      [This takes a long time, and is where most problems occur.]
  3960.      sh[13]# `rm -fr stage1'
  3961.      
  3962.      sh[14]# `make -k install'
  3963.      
  3964.      [The actual installation.]
  3965.      sh[15]# `g77 -v'
  3966.      
  3967.      [Verify that g77 is installed, obtain version info.]
  3968.      sh[16]#
  3969.  
  3970.    *Note Updating Your Info Directory: Updating Documentation, for
  3971. information on how to update your system's top-level `info' directory
  3972. to contain a reference to this manual, so that users of `g77' can
  3973. easily find documentation instead of having to ask you for it.
  3974.  
  3975.    Elaborations of many of the above steps follows:
  3976.  
  3977. Step 1: `cd /usr/src'
  3978.      You can build `g77' pretty much anyplace.  By convention, this
  3979.      manual assumes `/usr/src'.  It might be helpful if other users on
  3980.      your system knew where to look for the source code for the
  3981.      installed version of `g77' and `gcc' in any case.
  3982.  
  3983. Step 4: `ln -s gcc-2.7.2 gcc'
  3984. Step 5: `ln -s g77-0.5.18 g77'
  3985.      These commands mainly help reduce typing, and help reduce visual
  3986.      clutter in examples in this manual showing what to type to install
  3987.      `g77'.
  3988.  
  3989.      *Note Unpacking::, for information on using distributions of `g77'
  3990.      made by organizations other than the FSF.
  3991.  
  3992. Step 6: `mv -i g77/* gcc'
  3993.      After doing this, you can, if you like, type `rm g77' and `rmdir
  3994.      g77-0.5.18' to remove the empty directory and the symbol link to
  3995.      it.  But, it might be helpful to leave them around as quick
  3996.      reminders of which version(s) of `g77' are installed on your
  3997.      system.
  3998.  
  3999.      *Note Unpacking::, for information on the contents of the `g77'
  4000.      directory (as merged into the `gcc' directory).
  4001.  
  4002. Step 7: `patch -p1 ...'
  4003.      This can produce a wide variety of printed output, from `Hmm, I
  4004.      can't seem to find a patch in there anywhere...' to long lists of
  4005.      messages indicated that patches are being found, applied
  4006.      successfully, and so on.
  4007.  
  4008.      If messages about "fuzz", "offset", or especially "reject files"
  4009.      are printed, it might mean you applied the wrong patch file.  If
  4010.      you believe this is the case, it is best to restart the sequence
  4011.      after deleting (or at least renaming to unused names) the
  4012.      top-level directories for `g77' and `gcc' and their symbolic links.
  4013.  
  4014.      After this command finishes, the `gcc' directory might have old
  4015.      versions of several files as saved by `patch'.  To remove these,
  4016.      after `cd gcc', type `rm -i *.~*~'.
  4017.  
  4018.      *Note Merging Distributions::, for more information.
  4019.  
  4020. Step 9: `touch f77-install-ok'
  4021.      Don't do this if you don't want to overwrite an existing version
  4022.      of `f77' (such as a native compiler, or a script that invokes
  4023.      `f2c').  Otherwise, installation will overwrite the `f77' command
  4024.      and the `f77' man pages with copies of the corresponding `g77'
  4025.      material.
  4026.  
  4027.      *Note Installing `f77': Installing f77, for more information.
  4028.  
  4029. Step 10: `touch f2c-install-ok'
  4030.      Don't do this if you don't want to overwrite an existing
  4031.      installation of `libf2c' (though, chances are, you do).  Instead,
  4032.      `touch f2c-exists-ok' to allow the installation to continue
  4033.      without any error messages about `/usr/lib/libf2c.a' already
  4034.      existing.
  4035.  
  4036.      *Note Installing `f2c': Installing f2c, for more information.
  4037.  
  4038. Step 11: `./configure --prefix=/usr'
  4039.      This is where you specify that the `g77' executable is to be
  4040.      installed in `/usr/bin/', the `libf2c.a' library is to be
  4041.      installed in `/usr/lib/', and so on.
  4042.  
  4043.      You should ensure that any existing installation of the `gcc'
  4044.      executable is in `/usr/bin/'.  Otherwise, installing `g77' so that
  4045.      it does not fully replace the existing installation of `gcc' is
  4046.      likely to result in the inability to compile Fortran programs.
  4047.  
  4048.      *Note Where in the World Does Fortran (and GNU C) Go?: Where to
  4049.      Install, for more information on determining where to install
  4050.      `g77'.  *Note Configuring gcc::, for more information on the
  4051.      configuration process triggered by invoking the `./configure'
  4052.      script.
  4053.  
  4054. Step 12: `make bootstrap'
  4055.      *Note Installing GNU CC: (gcc)Installation, for information on the
  4056.      kinds of diagnostics you should expect during this procedure.
  4057.  
  4058.      *Note Building gcc::, for complete `g77'-specific information on
  4059.      this step.
  4060.  
  4061. Step 13: `rm -fr stage1'
  4062.      You don't need to do this, but it frees up disk space.
  4063.  
  4064. Step 14: `make -k install'
  4065.      If this doesn't seem to work, try:
  4066.  
  4067.           make -k install install-libf77 install-f2c-all
  4068.  
  4069.      *Note Installation of Binaries::, for more information.
  4070.  
  4071.      *Note Updating Your Info Directory: Updating Documentation, for
  4072.      information on entering this manual into your system's list of
  4073.      texinfo manuals.
  4074.  
  4075. 
  4076. File: ^.!gcc.docs.fortran.g77,  Node: Complete Installation,  Next: Distributing Binaries,  Prev: Quick Start,  Up: Installation
  4077.  
  4078. Complete Installation
  4079. =====================
  4080.  
  4081.    Here is the complete `g77'-specific information on how to configure,
  4082. build, and install `g77'.
  4083.  
  4084. * Menu:
  4085.  
  4086. * Unpacking::
  4087. * Merging Distributions::
  4088. * f77: Installing f77.
  4089. * f2c: Installing f2c.
  4090. * Patching GNU Fortran::
  4091. * Where to Install::
  4092. * Configuring gcc::
  4093. * Building gcc::
  4094. * Pre-installation Checks::
  4095. * Installation of Binaries::
  4096. * Updating Documentation::
  4097. * bison: Missing bison?.
  4098. * makeinfo: Missing makeinfo?.
  4099.  
  4100. 
  4101. File: ^.!gcc.docs.fortran.g77,  Node: Unpacking,  Next: Merging Distributions,  Up: Complete Installation
  4102.  
  4103. Unpacking
  4104. ---------
  4105.  
  4106.    The `gcc' source distribution is a stand-alone distribution.  It is
  4107. designed to be unpacked (producing the `gcc' source tree) and built as
  4108. is, assuming certain prerequisites are met (including the availability
  4109. of compatible UNIX programs such as `make', `cc', and so on).
  4110.  
  4111.    However, before building `gcc', you will want to unpack and merge
  4112. the `g77' distribution in with it, so that you build a Fortran-capable
  4113. version of `gcc', which includes the `g77' command, the necessary
  4114. run-time libraries, and this manual.
  4115.  
  4116.    Unlike `gcc', the `g77' source distribution is *not* a stand-alone
  4117. distribution.  It is designed to be unpacked and, afterwards,
  4118. immediately merged into an applicable `gcc' source tree.  That is, the
  4119. `g77' distribution *augments* a `gcc' distribution--without `gcc',
  4120. generally only the documentation is immediately usable.
  4121.  
  4122.    A sequence of commands typically used to unpack `gcc' and `g77' is:
  4123.  
  4124.      sh# `cd /usr/src'
  4125.      sh# `gunzip -d < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -'
  4126.      sh# `gunzip -d < /usr/FSF/g77-0.5.18.tar.gz | tar xf -'
  4127.      sh# `ln -s gcc-2.7.2 gcc'
  4128.      sh# `ln -s g77-0.5.18 g77'
  4129.      sh# `mv -i g77/* gcc'
  4130.  
  4131.    *Notes:* The commands beginning with `gunzip...' might print `Broken
  4132. pipe...' as they complete.  That is nothing to worry about, unless you
  4133. actually *hear* a pipe breaking.  The `ln' commands are helpful in
  4134. reducing typing and clutter in installation examples in this manual.
  4135. Hereafter, the top level of `gcc' source tree is referred to as `gcc',
  4136. and the top level of just the `g77' source tree (prior to issuing the
  4137. `mv' command, above) is referred to as `g77'.
  4138.  
  4139.    There are three top-level names in a `g77' distribution:
  4140.  
  4141.      g77/COPYING.g77
  4142.      g77/README.g77
  4143.      g77/f
  4144.  
  4145.    All three entries should be moved (or copied) into a `gcc' source
  4146. tree (typically named after its version number and as it appears in the
  4147. FSF distributions--e.g. `gcc-2.7.2').
  4148.  
  4149.    `g77/f' is the subdirectory containing all of the code,
  4150. documentation, and other information that is specific to `g77'.  The
  4151. other two files exist to provide information on `g77' to someone
  4152. encountering a `gcc' source tree with `g77' already present, who has
  4153. not yet read these installation instructions and thus needs help
  4154. understanding that the source tree they are looking at does not come
  4155. from a single FSF distribution.  They also help people encountering an
  4156. unmerged `g77' source tree for the first time.
  4157.  
  4158.    *Note:* Please use *only* `gcc' and `g77' source trees as
  4159. distributed by the FSF.  Use of modified versions, such as the
  4160. Pentium-specific-optimization port of `gcc', is likely to result in
  4161. problems that appear to be in the `g77' code but, in fact, are not.  Do
  4162. not use such modified versions unless you understand all the
  4163. differences between them and the versions the FSF distributes--in which
  4164. case you should be able to modify the `g77' (or `gcc') source trees
  4165. appropriately so `g77' and `gcc' can coexist as they do in the stock
  4166. FSF distributions.
  4167.  
  4168. 
  4169. File: ^.!gcc.docs.fortran.g77,  Node: Merging Distributions,  Next: Installing f77,  Prev: Unpacking,  Up: Complete Installation
  4170.  
  4171. Merging Distributions
  4172. ---------------------
  4173.  
  4174.    After merging the `g77' source tree into the `gcc' source tree, the
  4175. final merge step is done by applying the pertinent patches the `g77'
  4176. distribution provides for the `gcc' source tree.
  4177.  
  4178.    Read the file `gcc/f/gbe/README', and apply the appropriate patch
  4179. file for the version of the GNU CC compiler you have, if that exists.
  4180. If the directory exists but the appropriate file does not exist, you
  4181. are using either an old, unsupported version, or a release one that is
  4182. newer than the newest `gcc' version supported by the version of `g77'
  4183. you have.
  4184.  
  4185.    GNU version numbers make it easy to figure out whether a particular
  4186. version of a distribution is newer or older than some other version of
  4187. that distribution.  The format is, generally, MAJOR.MINOR.PATCH, with
  4188. each field being a decimal number.  (You can safely ignore leading
  4189. zeros; for example, 1.5.3 is the same as 1.5.03.) The MAJOR field only
  4190. increases with time.  The other two fields are reset to 0 when the
  4191. field to their left is incremented; otherwise, they, too, only increase
  4192. with time.  So, version 2.6.2 is newer than version 2.5.8, and version
  4193. 3.0 is newer than both.  (Trailing `.0' fields often are omitted in
  4194. announcements and in names for distributions and the directories they
  4195. create.)
  4196.  
  4197.    If your version of `gcc' is older than the oldest version supported
  4198. by `g77' (as casually determined by listing the contents of
  4199. `gcc/f/gbe/'), you should obtain a newer, supported version of `gcc'.
  4200. (You could instead obtain an older version of `g77', or try and get
  4201. your `g77' to work with the old `gcc', but neither approach is
  4202. recommended, and you shouldn't bother reporting any bugs you find if you
  4203. take either approach, because they're probably already fixed in the
  4204. newer versions you're not using.)
  4205.  
  4206.    If your version of `gcc' is newer than the newest version supported
  4207. by `g77', it is possible that your `g77' will work with it anyway.  If
  4208. the version number for `gcc' differs only in the PATCH field, you might
  4209. as well try applying the `g77' patch that is for the newest version of
  4210. `gcc' having the same MAJOR and MINOR fields, as this is likely to work.
  4211.  
  4212.    So, for example, if `g77' has support for versions 2.7.0 and 2.7.1,
  4213. it is likely that `gcc-2.7.2' would work well with `g77' by using the
  4214. `2.7.1.diff' patch file provided with `g77' (aside from some offsets
  4215. reported by `patch', which usually are harmless).
  4216.  
  4217.    However, `gcc-2.8.0' would almost certainly not work with that
  4218. version of `g77' no matter which patch file was used, so a new version
  4219. of `g77' would be needed (and you should wait for it rather than
  4220. bothering the maintainers--*note User-Visible Changes: Changes.).
  4221.  
  4222.    This complexity is the result of `gcc' and `g77' being separate
  4223. distributions.  By keeping them separate, each product is able to be
  4224. independently improved and distributed to its user base more frequently.
  4225.  
  4226.    However, `g77' often requires changes to contemporary versions of
  4227. `gcc'.  Also, the GBE interface defined by `gcc' typically undergoes
  4228. some incompatible changes at least every time the MINOR field of the
  4229. version number is incremented, and such changes require corresponding
  4230. changes to the `g77' front end (FFE).
  4231.  
  4232.    It is hoped that the GBE interface, and the `gcc' and `g77' products
  4233. in general, will stabilize sufficiently for the need for hand-patching
  4234. to disappear.
  4235.  
  4236.    Invoking `patch' as described in `gcc/f/gbe/README' can produce a
  4237. wide variety of printed output, from `Hmm, I can't seem to find a patch
  4238. in there anywhere...' to long lists of messages indicated that patches
  4239. are being found, applied successfully, and so on.
  4240.  
  4241.    If messages about "fuzz", "offset", or especially "reject files" are
  4242. printed, it might mean you applied the wrong patch file.  If you
  4243. believe this is the case, it is best to restart the sequence after
  4244. deleting (or at least renaming to unused names) the top-level
  4245. directories for `g77' and `gcc' and their symbolic links.  That is
  4246. because `patch' might have partially patched some `gcc' source files,
  4247. so reapplying the correct patch file might result in the correct
  4248. patches being applied incorrectly (due to the way `patch' necessarily
  4249. works).
  4250.  
  4251.    After `patch' finishes, the `gcc' directory might have old versions
  4252. of several files as saved by `patch'.  To remove these, after `cd gcc',
  4253. type `rm -i *.~*~'.
  4254.  
  4255.    *Note:* `g77''s configuration file `gcc/f/config-lang.in' ensures
  4256. that the source code for the version of `gcc' being configured has at
  4257. least one GBE function required specifically by `g77'.  This function
  4258. was added to `gcc-2.7.1', making the patch file
  4259. `g77-0.5.17/f/gbe/2.7.1.diff' empty of actual patches.
  4260.  
  4261.    For `gcc-2.7.0' and earlier, this configuration-time checking should
  4262. catch failure to apply the correct patch and, if so caught, it should
  4263. abort the configuration with an explanation.  *Please* do not try to
  4264. disable the check, otherwise `g77' might well appear to build and
  4265. install correctly, and even appear to compile correctly, but could
  4266. easily produce broken code.
  4267.  
  4268.    `diff -rcp2N' is used to create the patch files in `gcc/f/gbe/'.
  4269.  
  4270. 
  4271. File: ^.!gcc.docs.fortran.g77,  Node: Installing f77,  Next: Installing f2c,  Prev: Merging Distributions,  Up: Complete Installation
  4272.  
  4273. Installing `f77'
  4274. ----------------
  4275.  
  4276.    You should decide whether you want installation of `g77' to also
  4277. install an `f77' command.  On systems with a native `f77', this is not
  4278. normally desired, so `g77' does not do this by default.
  4279.  
  4280.    If you want `f77' installed, create the file `f77-install-ok' (e.g.
  4281. via the UNIX command `touch f77-install-ok') in the source or build
  4282. top-level directory (the same directory in which the `g77' `f'
  4283. directory resides, not the `f' directory itself), or edit
  4284. `gcc/f/Make-lang.in' and change the definition of the
  4285. `F77_INSTALL_FLAG' macro appropriately.
  4286.  
  4287.    Usually, this means that, after typing `cd gcc', you would type
  4288. `touch f77-install-ok'.
  4289.  
  4290.    When you enable installation of `f77', either a link to or a direct
  4291. copy of the `g77' command is made.  Similarly, `f77.1' is installed as
  4292. a man page.
  4293.  
  4294.    (The `uninstall' target in the `gcc/Makefile' also tests this macro
  4295. and file, when invoked, to determine whether to delete the installed
  4296. copies of `f77' and `f77.1'.)
  4297.  
  4298.    *Note:* No attempt is yet made to install a program (like a shell
  4299. script) that provides compatibility with any other `f77' programs.
  4300. Only the most rudimentary invocations of `f77' will work the same way
  4301. with `g77'.
  4302.  
  4303. 
  4304. File: ^.!gcc.docs.fortran.g77,  Node: Installing f2c,  Next: Patching GNU Fortran,  Prev: Installing f77,  Up: Complete Installation
  4305.  
  4306. Installing `f2c'
  4307. ----------------
  4308.  
  4309.    Currently, `g77' does not include `f2c' itself in its distribution.
  4310. However, it does include a modified version of the `libf2c'.  This
  4311. version is normally compatible with `f2c', but has been modified to
  4312. meet the needs of `g77' in ways that might possibly be incompatible
  4313. with some versions or configurations of `f2c'.
  4314.  
  4315.    Decide how installation of `g77' should affect any existing
  4316. installation of `f2c' on your system.
  4317.  
  4318.    If you do not have `f2c' on your system (e.g. no `/usr/bin/f2c', no
  4319. `/usr/include/f2c.h', and no `/usr/lib/libf2c.a', `/usr/lib/libF77.a',
  4320. or `/usr/lib/libI77.a'), you don't need to be concerned with this item.
  4321.  
  4322.    If you do have `f2c' on your system, you need to decide how users of
  4323. `f2c' will be affected by your installing `g77'.  Since `g77' is
  4324. currently designed to be object-code-compatible with `f2c' (with very
  4325. few, clear exceptions), users of `f2c' might want to combine
  4326. `f2c'-compiled object files with `g77'-compiled object files in a
  4327. single executable.
  4328.  
  4329.    To do this, users of `f2c' should use the same copies of `f2c.h' and
  4330. `libf2c.a' that `g77' uses (and that get built as part of `g77').
  4331.  
  4332.    If you do nothing here, the `g77' installation process will not
  4333. overwrite the `include/f2c.h' and `lib/libf2c.a' files with its own
  4334. versions, and in fact will not even install `libf2c.a' for use with the
  4335. newly installed versions of `gcc' and `g77' if it sees that
  4336. `lib/libf2c.a' exists--instead, it will print an explanatory message
  4337. and skip this part of the installation.
  4338.  
  4339.    To install `g77''s versions of `f2c.h' and `libf2c.a' in the
  4340. appropriate places, create the file `f2c-install-ok' (e.g. via the UNIX
  4341. command `touch f2c-install-ok') in the source or build top-level
  4342. directory (the same directory in which the `g77' `f' directory resides,
  4343. not the `f' directory itself), or edit `gcc/f/Make-lang.in' and change
  4344. the definition of the `F2C_INSTALL_FLAG' macro appropriately.
  4345.  
  4346.    Usually, this means that, after typing `cd gcc', you would type
  4347. `touch f2c-install-ok'.
  4348.  
  4349.    Make sure that when you enable the overwriting of `f2c.h' and
  4350. `libf2c.a' as used by `f2c', you have a recent and properly configured
  4351. version of `bin/f2c' so that it generates code that is compatible with
  4352. `g77'.
  4353.  
  4354.    If you don't want installation of `g77' to overwrite `f2c''s existing
  4355. installation, but you do want `g77' installation to proceed with
  4356. installation of its own versions of `f2c.h' and `libf2c.a' in places
  4357. where `g77' will pick them up (even when linking `f2c'-compiled object
  4358. files--which might lead to incompatibilities), create the file
  4359. `f2c-exists-ok' (e.g. via the UNIX command `touch f2c-exists-ok') in
  4360. the source or build top-level directory, or edit `gcc/f/Make-lang.in'
  4361. and change the definition of the `F2CLIBOK' macro appropriately.
  4362.  
  4363. 
  4364. File: ^.!gcc.docs.fortran.g77,  Node: Patching GNU Fortran,  Next: Where to Install,  Prev: Installing f2c,  Up: Complete Installation
  4365.  
  4366. Patching GNU Fortran
  4367. --------------------
  4368.  
  4369.    If you're using a SunOS system, you'll need to make the following
  4370. change to `gcc/f/proj.h': edit the line reading
  4371.  
  4372.      #define FFEPROJ_STRTOUL 1  ...
  4373.  
  4374. by replacing the `1' with `0'.
  4375.  
  4376.    This causes a minimal version of `strtoul()' provided as part of the
  4377. `g77' distribution to be compiled and linked into whatever `g77'
  4378. programs need it, since some systems (like SunOS) do not provide this
  4379. function in their system libraries.
  4380.  
  4381.    Similarly, a minimal version of `bsearch()' is available and can be
  4382. enabled by editing a line similar to the one for `strtoul()' above in
  4383. `gcc/f/proj.h', if your system libraries lack `bsearch()'.
  4384.  
  4385.    These are not problems with `g77', which requires an ANSI C
  4386. environment.  You should upgrade your system to one that provides a
  4387. full ANSI C environment, or encourage the maintainers of `gcc' to
  4388. provide one to all `gcc'-based compilers in future `gcc' distributions.
  4389.  
  4390.    *Note Problems Installing::, for more information on why `strtoul()'
  4391. comes up missing and on approaches to dealing with this problem that
  4392. have already been tried.
  4393.  
  4394. 
  4395. File: ^.!gcc.docs.fortran.g77,  Node: Where to Install,  Next: Configuring gcc,  Prev: Patching GNU Fortran,  Up: Complete Installation
  4396.  
  4397. Where in the World Does Fortran (and GNU C) Go?
  4398. -----------------------------------------------
  4399.  
  4400.    Before configuring, you should make sure you know where you want the
  4401. `g77' and `gcc' binaries to be installed after they're built, because
  4402. this information is given to the configuration tool and used during the
  4403. build itself.
  4404.  
  4405.    A `g77' installation necessarily requires installation of a
  4406. `g77'-aware version of `gcc', so that the `gcc' command recognizes
  4407. Fortran source files and knows how to compile them.
  4408.  
  4409.    For this to work, the version of `gcc' that you will be building as
  4410. part of `g77' *must* be installed as the "active" version of `gcc' on
  4411. the system.
  4412.  
  4413.    Sometimes people make the mistake of installing `gcc' as
  4414. `/usr/local/bin/gcc', leaving an older, non-Fortran-aware version in
  4415. `/usr/bin/gcc'.  (Or, the opposite happens.) This can result in `g77'
  4416. being unable to compile Fortran source files, because when it calls on
  4417. `gcc' to do the actual compilation, `gcc' complains that it does not
  4418. recognize the language, or the file name suffix.
  4419.  
  4420.    So, determine whether `gcc' already is installed on your system,
  4421. and, if so, *where* it is installed, and prepare to configure the new
  4422. version of `gcc' you'll be building so that it installs over the
  4423. existing version of `gcc'.
  4424.  
  4425.    You might want to back up your existing copy of `bin/gcc', and the
  4426. entire `lib/' directory, before you perform the actual installation (as
  4427. described in this manual).
  4428.  
  4429.    Existing `gcc' installations typically are found in `/usr' or
  4430. `/usr/local'.  If you aren't certain where the currently installed
  4431. version of `gcc' and its related programs reside, look at the output of
  4432. this command:
  4433.  
  4434.      gcc -v -o /tmp/delete-me -xc /dev/null -xnone
  4435.  
  4436.    All sorts of interesting information on the locations of various
  4437. `gcc'-related programs and data files should be visible in the output
  4438. of the above command.  However, you do have to sift through it
  4439. yourself; `gcc' currently provides no easy way to ask it where it is
  4440. installed and where it looks for the various programs and data files it
  4441. calls on to do its work.
  4442.  
  4443.    Just *building* `g77' should not overwrite any installed
  4444. programs--but, usually, after you build `g77', you will want to install
  4445. it, so backing up anything it might overwrite is a good idea.  (This is
  4446. true for any package, not just `g77', though in this case it is
  4447. intentional that `g77' overwrites `gcc' if it is already installed--it
  4448. is unusual that the installation process for one distribution
  4449. intentionally overwrites a program or file installed by another
  4450. distribution.)
  4451.  
  4452.    Another reason to back up the existing version first, or make sure
  4453. you can restore it easily, is that it might be an older version on
  4454. which other users have come to depend for certain behaviors.  However,
  4455. even the new version of `gcc' you install will offer users the ability
  4456. to specify an older version of the actual compilation programs if
  4457. desired, and these older versions need not include any `g77' components.
  4458. *Note Specifying Target Machine and Compiler Version: (gcc)Target
  4459. Options, for information on the `-V' option of `gcc'.
  4460.  
  4461. 
  4462. File: ^.!gcc.docs.fortran.g77,  Node: Configuring gcc,  Next: Building gcc,  Prev: Where to Install,  Up: Complete Installation
  4463.  
  4464. Configuring GNU CC
  4465. ------------------
  4466.  
  4467.    `g77' is configured automatically when you configure `gcc'.  There
  4468. are two parts of `g77' that are configured in two different
  4469. ways--`g77', which "camps on" to the `gcc' configuration mechanism, and
  4470. `libf2c', which uses a variation of the GNU `autoconf' configuration
  4471. system.
  4472.  
  4473.    Generally, you shouldn't have to be concerned with either `g77' or
  4474. `libf2c' configuration, unless you're configuring `g77' as a
  4475. cross-compiler.  In this case, the `libf2c' configuration, and possibly
  4476. the `g77' and `gcc' configurations as well, might need special
  4477. attention.  (This also might be the case if you're porting `gcc' to a
  4478. whole new system--even if it is just a new operating system on an
  4479. existing, supported CPU.)
  4480.  
  4481.    To configure the system, see *Note Installing GNU CC:
  4482. (gcc)Installation, following the instructions for running `./configure'.
  4483. Pay special attention to the `--prefix=' option, which you almost
  4484. certainly will need to specify.
  4485.  
  4486.    (Note that `gcc' installation information is provided as a straight
  4487. text file in `gcc/INSTALL'.)
  4488.  
  4489.    The information printed by the invocation of `./configure' should
  4490. show that the `f' directory (the Fortran language) has been configured.
  4491. If it does not, there is a problem.
  4492.  
  4493.    *Note:* Configuring with the `--srcdir' argument is known to work
  4494. with GNU `make', but it is not known to work with other variants of
  4495. `make'.  Irix5.2 and SunOS4.1 versions of `make' definitely won't work
  4496. outside the source directory at present.  `g77''s portion of the
  4497. `configure' script issues a warning message about this when you
  4498. configure for building binaries outside the source directory.
  4499.  
  4500. 
  4501. File: ^.!gcc.docs.fortran.g77,  Node: Building gcc,  Next: Pre-installation Checks,  Prev: Configuring gcc,  Up: Complete Installation
  4502.  
  4503. Building GNU CC
  4504. ---------------
  4505.  
  4506.    Building `g77' requires building enough of `gcc' that these
  4507. instructions assume you're going to build all of `gcc', including
  4508. `g++', `protoize', and so on.  You can save a little time and disk
  4509. space by changes the `LANGUAGES' macro definition in `gcc/Makefile.in'
  4510. or `gcc/Makefile', but if you do that, you're on your own.  One change
  4511. is almost *certainly* going to cause failures: removing `c' or `f77'
  4512. from the definition of the `LANGUAGES' macro.
  4513.  
  4514.    After configuring `gcc', which configures `g77' and `libf2c'
  4515. automatically, you're ready to start the actual build by invoking
  4516. `make'.
  4517.  
  4518.    *Note:* You *must* have run `./configure' before you run `make',
  4519. even if you're using an already existing `gcc' development directory,
  4520. because `./configure' does the work to recognize that you've added
  4521. `g77' to the configuration.
  4522.  
  4523.    There are two general approaches to building GNU CC from scratch:
  4524.  
  4525. "bootstrap"
  4526.      This method uses minimal native system facilities to build a
  4527.      barebones, unoptimized `gcc', that is then used to compile
  4528.      ("bootstrap") the entire system.
  4529.  
  4530. "straight"
  4531.      This method assumes a more complete native system exists, and uses
  4532.      that just once to build the entire system.
  4533.  
  4534.    On all systems without a recent version of `gcc' already installed,
  4535. the bootstrap method must be used.  In particular, `g77' uses
  4536. extensions to the C language offered, apparently, only by `gcc'.
  4537.  
  4538.    On most systems with a recent version of `gcc' already installed,
  4539. the straight method can be used.  This is an advantage, because it
  4540. takes less CPU time and disk space for the build.  However, it does
  4541. require that the system have fairly recent versions of many GNU
  4542. programs and other programs, which are not enumerated here.
  4543.  
  4544. * Menu:
  4545.  
  4546. * Bootstrap Build::  For all systems.
  4547. * Straight Build::   For systems with a recent version of `gcc'.
  4548.  
  4549. 
  4550. File: ^.!gcc.docs.fortran.g77,  Node: Bootstrap Build,  Next: Straight Build,  Up: Building gcc
  4551.  
  4552. Bootstrap Build
  4553. ...............
  4554.  
  4555.    A complete bootstrap build is done by issuing a command beginning
  4556. with `make bootstrap ...', as described in *Note Installing GNU CC:
  4557. (gcc)Installation.  This is the most reliable form of build, but it
  4558. does require the most disk space and CPU time, since the complete system
  4559. is built twice (in Stages 2 and 3), after an initial build (during
  4560. Stage 1) of a minimal `gcc' compiler using the native compiler and
  4561. libraries.
  4562.  
  4563.    You might have to, or want to, control the way a bootstrap build is
  4564. done by entering the `make' commands to build each stage one at a time,
  4565. as described in the `gcc' manual.  For example, to save time or disk
  4566. space, you might want to not bother doing the Stage 3 build, in which
  4567. case you are assuming that the `gcc' compiler you have built is
  4568. basically sound (because you are giving up the opportunity to compare a
  4569. large number of object files to ensure they're identical).
  4570.  
  4571.    To save some disk space during installation, after Stage 2 is built,
  4572. you can type `rm -fr stage1' to remove the binaries built during Stage
  4573. 1.
  4574.  
  4575.    *Note:* If you do build Stage 3 and you compare the object files
  4576. produced by various stages, the file `gcc/f/zzz.o' *will* be different.
  4577. That is because it contains a string with an expansion of the
  4578. `__TIME__' macro, which expands to the current time of day.  It is
  4579. nothing to worry about, since `gcc/f/zzz.c' doesn't contain any actual
  4580. code.  It does allow you to override its use of `__DATE__' and
  4581. `__TIME__' by defining macros for the compilation--see the source code
  4582. for details.
  4583.  
  4584.    *Note Installing GNU CC: (gcc)Installation, for important
  4585. information on building `gcc' that is not described in this `g77'
  4586. manual.  For example, explanations of diagnostic messages and whether
  4587. they're expected, or indicate trouble, are found there.
  4588.  
  4589. 
  4590. File: ^.!gcc.docs.fortran.g77,  Node: Straight Build,  Prev: Bootstrap Build,  Up: Building gcc
  4591.  
  4592. Straight Build
  4593. ..............
  4594.  
  4595.    If you have a recent version of `gcc' already installed on your
  4596. system, and if you're reasonably certain it produces code that is
  4597. object-compatible with the version of `gcc' you want to build as part
  4598. of building `g77', you can save time and disk space by doing a straight
  4599. build.
  4600.  
  4601.    To build just the C and Fortran compilers and the necessary run-time
  4602. libraries, issue the following command:
  4603.  
  4604.      make -k CC=gcc LANGUAGES=f77 all g77
  4605.  
  4606.    (The `g77' target is necessary because the `gcc' build procedures
  4607. apparently do not automatically build command drivers for languages in
  4608. subdirectories.  It's the `all' target that triggers building
  4609. everything except, apparently, the `g77' command itself.)
  4610.  
  4611.    If you run into problems using this method, you have two options:
  4612.  
  4613.    * Abandon this approach and do a bootstrap build.
  4614.  
  4615.    * Try to make this approach work by diagnosing the problems you're
  4616.      running into and retrying.
  4617.  
  4618.    Especially if you do the latter, you might consider submitting any
  4619. solutions as bug/fix reports.  *Note Known Causes of Trouble with GNU
  4620. Fortran: Trouble.
  4621.  
  4622.    However, understand that many problems preventing a straight build
  4623. from working are not `g77' problems, and, in such cases, are not likely
  4624. to be addressed in future versions of `g77'.
  4625.  
  4626. 
  4627. File: ^.!gcc.docs.fortran.g77,  Node: Pre-installation Checks,  Next: Installation of Binaries,  Prev: Building gcc,  Up: Complete Installation
  4628.  
  4629. Pre-installation Checks
  4630. -----------------------
  4631.  
  4632.    Before installing the system, which includes installing `gcc', you
  4633. might want to do some minimum checking to ensure that some basic things
  4634. work.
  4635.  
  4636.    Here are some commands you can try, and output typically printed by
  4637. them when they work:
  4638.  
  4639.      sh# `cd /usr/src/gcc'
  4640.      sh# `./g77 --driver=./xgcc -B./ -v'
  4641.       ./xgcc -B./ -v -fnull-version -o /tmp/gfa03648 ...
  4642.      Reading specs from ./specs
  4643.      gcc version 2.7.1
  4644.       ./cpp -lang-c -v -isystem ./include -undef ...
  4645.      GNU CPP version 2.7.1 (80386, BSD syntax)
  4646.      #include "..." search starts here:
  4647.      #include <...> search starts here:
  4648.       ./include
  4649.       /usr/include
  4650.       /usr/i486-unknown-linuxaout/include
  4651.       /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include
  4652.       /usr/include
  4653.      End of search list.
  4654.       ./f771 /tmp/cca03648.i -quiet -dumpbase null.F -version ...
  4655.      GNU F77 version 2.7.1 (80386, BSD syntax) compiled ...
  4656.      GNU Fortran Front End version 0.5.18 compiled: ...
  4657.       as -o /tmp/cca036481.o /tmp/cca03648.s
  4658.       ld -m i386linux -o /tmp/gfa03648 /usr/lib/crt0.o -L. ...
  4659.      /usr/lib/crt0.o(.text+0x35): undefined reference to `main'
  4660.      sh# `./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone'
  4661.      Reading specs from ./specs
  4662.      gcc version 2.7.1
  4663.       ./cpp -lang-c -v -isystem ./include -undef ...
  4664.      GNU CPP version 2.7.1 (80386, BSD syntax)
  4665.      #include "..." search starts here:
  4666.      #include <...> search starts here:
  4667.       ./include
  4668.       /usr/include
  4669.       /usr/i486-unknown-linuxaout/include
  4670.       /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include
  4671.       /usr/include
  4672.      End of search list.
  4673.       ./cc1 /tmp/cca03659.i -quiet -dumpbase null.c -version ...
  4674.      GNU C version 2.7.1 (80386, BSD syntax) compiled ...
  4675.       as -o /tmp/cca036591.o /tmp/cca03659.s
  4676.       ld -m i386linux -o /tmp/delete-me /usr/lib/crt0.o -L. ...
  4677.      /usr/lib/crt0.o(.text+0x35): undefined reference to `main'
  4678.      sh#
  4679.  
  4680.    (Note that long lines have been truncated, and `...' used to
  4681. indicate such truncations.)
  4682.  
  4683.    The above two commands test whether `g77' and `gcc', respectively,
  4684. are able to compile empty (null) source files, whether invocation of
  4685. the C preprocessor works, whether libraries can be linked (even though
  4686. there is an undefined reference due to there being no main program
  4687. unit), and so on.
  4688.  
  4689.    If the output you get from either of the above two commands is
  4690. noticably different, especially if it is shorter or longer in ways that
  4691. do not look consistent with the above sample output, you probably
  4692. should not install `gcc' and `g77' until you have investigated further.
  4693.  
  4694.    For example, you could try compiling actual applications and seeing
  4695. how that works.  (You might want to do that anyway, even if the above
  4696. tests work.)
  4697.  
  4698.    To compile using the not-yet-installed versions of `gcc' and `g77',
  4699. use the following commands to invoke them.
  4700.  
  4701.    To invoke `g77', type:
  4702.  
  4703.      /usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ ...
  4704.  
  4705.    To invoke `gcc', type:
  4706.  
  4707.      /usr/src/gcc/xgcc -B/usr/src/gcc/ ...
  4708.  
  4709. 
  4710. File: ^.!gcc.docs.fortran.g77,  Node: Installation of Binaries,  Next: Updating Documentation,  Prev: Pre-installation Checks,  Up: Complete Installation
  4711.  
  4712. Installation of Binaries
  4713. ------------------------
  4714.  
  4715.    After configuring, building, and testing `g77' and `gcc', when you
  4716. are ready to install them on your system, type:
  4717.  
  4718.      make -k CC=gcc LANGUAGES=f77 install
  4719.  
  4720.    As described in *Note Installing GNU CC: (gcc)Installation, the
  4721. values for the `CC' and `LANGUAGES' macros should be the same as those
  4722. you supplied for the build itself.
  4723.  
  4724.    So, the details of the above command might vary if you used a
  4725. bootstrap build (where you might be able to omit both definitions, or
  4726. might have to supply the same definitions you used when building the
  4727. final stage) or if you deviated from the instructions for a straight
  4728. build.
  4729.  
  4730.    If the above command does not install `libf2c.a' as expected, try
  4731. this:
  4732.  
  4733.      make -k ... install install-libf77 install-f2c-all
  4734.  
  4735.    We don't know why some non-GNU versions of `make' sometimes require
  4736. this alternate command, but they do.  (Remember to supply the
  4737. appropriate definitions for `CC' and `LANGUAGES' where you see `...' in
  4738. the above command.)
  4739.  
  4740.    Note that using the `-k' option tells `make' to continue after some
  4741. installation problems, like not having `makeinfo' installed on your
  4742. system.  It might not be necessary.
  4743.  
  4744. 
  4745. File: ^.!gcc.docs.fortran.g77,  Node: Updating Documentation,  Next: Missing bison?,  Prev: Installation of Binaries,  Up: Complete Installation
  4746.  
  4747. Updating Your Info Directory
  4748. ----------------------------
  4749.  
  4750.    As part of installing `g77', you should make sure users of `info'
  4751. can easily access this manual on-line.  Do this by making sure a line
  4752. such as the following exists in `/usr/info/dir', or in whatever file is
  4753. the top-level file in the `info' directory on your system (perhaps
  4754. `/usr/local/info/dir':
  4755.  
  4756.      * g77: (g77).           The GNU Fortran programming language.
  4757.  
  4758.    If the menu in `dir' is organized into sections, `g77' probably
  4759. belongs in a section with a name such as the following:
  4760.  
  4761.    * Writing Programs
  4762.  
  4763.    * Programming Languages
  4764.  
  4765.    * Languages Other Than C
  4766.  
  4767.    * Scientific/Engineering Tools
  4768.  
  4769.    * GNU Compilers
  4770.  
  4771. 
  4772. File: ^.!gcc.docs.fortran.g77,  Node: Missing bison?,  Next: Missing makeinfo?,  Prev: Updating Documentation,  Up: Complete Installation
  4773.  
  4774. Missing `bison'?
  4775. ----------------
  4776.  
  4777.    If you cannot install `bison', make sure you have started with a
  4778. *fresh* distribution of `gcc', do *not* do `make maintainer-clean' (in
  4779. other versions of `gcc', this was called `make realclean'), and, to
  4780. ensure that `bison' is not invoked by `make' during the build, type
  4781. these commands:
  4782.  
  4783.      sh# `cd gcc'
  4784.      sh# `touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c'
  4785.      sh# `touch cp/parse.c cp/parse.h objc-parse.c'
  4786.      sh#
  4787.  
  4788.    These commands update the date-time-modified information for all the
  4789. files produced by the various invocations of `bison' in the current
  4790. versions of `gcc', so that `make' no longer believes it needs to update
  4791. them.  All of these files should already exist in a `gcc' distribution,
  4792. but the application of patches to upgrade to a newer version can leave
  4793. the modification information set such that the `bison' input files look
  4794. more "recent" than the corresponding output files.
  4795.  
  4796.    *Note:* New versions of `gcc' might change the set of files it
  4797. generates by invoking `bison'--if you cannot figure out for yourself
  4798. how to handle such a situation, try an older version of `gcc' until you
  4799. find someone who can (or until you obtain and install `bison').
  4800.  
  4801. 
  4802. File: ^.!gcc.docs.fortran.g77,  Node: Missing makeinfo?,  Prev: Missing bison?,  Up: Complete Installation
  4803.  
  4804. Missing `makeinfo'?
  4805. -------------------
  4806.  
  4807.    If you cannot install `makeinfo', either use the `-k' option when
  4808. invoking make to specify any of the `install' or related targets, or
  4809. specify `MAKEINFO=echo' on the `make' command line.
  4810.  
  4811.    If you fail to do one of these things, some files, like `libf2c.a',
  4812. might not be installed, because the failed attempt by `make' to invoke
  4813. `makeinfo' causes it to cancel any further processing.
  4814.  
  4815. 
  4816. File: ^.!gcc.docs.fortran.g77,  Node: Distributing Binaries,  Next: Settings,  Prev: Complete Installation,  Up: Installation
  4817.  
  4818. Distributing Binaries
  4819. =====================
  4820.  
  4821.    If you are building `g77' for distribution to others in binary form,
  4822. first make sure you are aware of your legal responsibilities (read the
  4823. file `gcc/COPYING' thoroughly).
  4824.  
  4825.    Then, consider your target audience and decide where `g77' should be
  4826. installed.
  4827.  
  4828.    For systems like Linux that have no native Fortran compiler (or
  4829. where `g77' could be considered the native compiler for Fortran and
  4830. `gcc' for C, etc.), you should definitely configure `g77' for
  4831. installation in `/usr/bin' instead of `/usr/local/bin'.  Specify the
  4832. `--prefix=/usr' option when running `./configure'.  You might also want
  4833. to set up the distribution so the `f77' command is a link to
  4834. `g77'--just make an empty file named `f77-install-ok' in the source or
  4835. build directory (the one in which the `f' directory resides, not the
  4836. `f' directory itself) when you specify one of the `install' or
  4837. `uninstall' targets in a `make' command.
  4838.  
  4839.    For a system that might already have `f2c' installed, you definitely
  4840. will want to make another empty file (in the same directory) named
  4841. either `f2c-exists-ok' or `f2c-install-ok'.  Use the former if you
  4842. don't want your distribution to overwrite `f2c'-related files in
  4843. existing systems; use the latter if you want to improve the likelihood
  4844. that users will be able to use both `f2c' and `g77' to compile code for
  4845. a single program without encountering link-time or run-time
  4846. incompatibilities.
  4847.  
  4848.    (Make sure you clearly document, in the "advertising" for your
  4849. distribution, how installation of your distribution will affect
  4850. existing installations of `gcc', `f2c', `f77', `libf2c.a', and so on.
  4851. Similarly, you should clearly document any requirements you assume are
  4852. met by users of your distribution.)
  4853.  
  4854.    For other systems with native `f77' (and `cc') compilers, configure
  4855. `g77' as you (or most of your audience) would configure `gcc' for their
  4856. installations.  Typically this is for installation in `/usr/local', and
  4857. would not include a copy of `g77' named `f77', so users could still use
  4858. the native `f77'.
  4859.  
  4860.    In any case, for `g77' to work properly, you *must* ensure that the
  4861. binaries you distribute include:
  4862.  
  4863. `bin/g77'
  4864.      This is the command most users use to compile Fortran.
  4865.  
  4866. `bin/gcc'
  4867.      This is the command all users use to compile Fortran, either
  4868.      directly or indirectly via the `g77' command.  The `bin/gcc'
  4869.      executable file must have been built from a `gcc' source tree into
  4870.      which a `g77' source tree was merged and configured, or it will
  4871.      not know how to compile Fortran programs.
  4872.  
  4873. `bin/f77'
  4874.      In installations with no non-GNU native Fortran compiler, this is
  4875.      the same as `bin/g77'.  Otherwise, it should be omitted from the
  4876.      distribution, so the one on already on a particular system does
  4877.      not get overwritten.
  4878.  
  4879. `info/g77.info*'
  4880.      This is the documentation for `g77'.
  4881.  
  4882.      Please edit this documentation (by editing `gcc/f/*.texi' and
  4883.      doing `make doc' from the `/usr/src/gcc' directory) to reflect any
  4884.      changes you've made to `g77', or at least to encourage users of
  4885.      your binary distribution to report bugs to you first.
  4886.  
  4887.      Also, whether you distribute binaries or install `g77' on your own
  4888.      system, it might be helpful for everyone to add a line listing
  4889.      this manual by name and topic to the top-level `info' node in
  4890.      `/usr/info/dir'.  That way, users can find `g77' documentation more
  4891.      easily.  *Note Updating Your Info Directory: Updating
  4892.      Documentation.
  4893.  
  4894. `man/man1/g77.1'
  4895.      This is the short man page for `g77'.
  4896.  
  4897. `man/man1/f77.1'
  4898.      In installations where `f77' is the same as `g77', this is the
  4899.      same as `man/man1/g77.1'.  Otherwise, it should be omitted from
  4900.      the distribution, so the one already on a particular system does
  4901.      not get overwritten.
  4902.  
  4903. `lib/gcc-lib/.../f771'
  4904.      This is the actual Fortran compiler.
  4905.  
  4906. `lib/gcc-lib/.../libf2c.a'
  4907.      This is the run-time library for `g77'-compiled programs.
  4908.  
  4909.    Whether you want to include the slightly updated (and possibly
  4910. improved) versions of `cc1', `cc1plus', and whatever other binaries get
  4911. rebuilt with the changes the GNU Fortran distribution makes to the GNU
  4912. back end, is up to you.  These changes are highly unlikely to break any
  4913. compilers, and it is possible they'll fix back-end bugs that can be
  4914. demonstrated using front ends other than GNU Fortran's.
  4915.  
  4916.    Please assure users that unless they have a specific need for their
  4917. existing, older versions of `gcc' command, they are unlikely to
  4918. experience any problems by overwriting it with your version--though
  4919. they could certainly protect themselves by making backup copies first!
  4920. Otherwise, users might try and install your binaries in a "safe" place,
  4921. find they cannot compile Fortran programs with your distribution
  4922. (because, perhaps, they're picking up their old version of the `gcc'
  4923. command, which does not recognize Fortran programs), and assume that
  4924. your binaries (or, more generally, GNU Fortran distributions in
  4925. general) are broken, at least for their system.
  4926.  
  4927.    Finally, *please* ask for bug reports to go to you first, at least
  4928. until you're sure your distribution is widely used and has been well
  4929. tested.  This especially goes for those of you making any changes to
  4930. the `g77' sources to port `g77', e.g. to OS/2.
  4931. `fortran@gnu.ai.mit.edu' has received a fair amount of bug reports that
  4932. turned out to be problems with other peoples' ports and distributions,
  4933. about which nothing could be done for the user.  Once you are quite
  4934. certain a bug report does not involve your efforts, you can forward it
  4935. to us.
  4936.  
  4937. 
  4938. File: ^.!gcc.docs.fortran.g77,  Node: Settings,  Prev: Distributing Binaries,  Up: Installation
  4939.  
  4940. Changing Settings Before Building
  4941. =================================
  4942.  
  4943.    Here are some internal `g77' settings that can be changed by editing
  4944. source files in `gcc/f/' before building.
  4945.  
  4946.    This information, and perhaps even these settings, represent
  4947. stop-gap solutions to problems people doing various ports of `g77' have
  4948. encountered.  As such, none of the following information is expected to
  4949. be pertinent in future versions of `g77'.
  4950.  
  4951. * Menu:
  4952.  
  4953. * Maximum Stackable Size::       Large arrays are forced off the stack frame.
  4954. * Floating-point Bit Patterns::  Possible programs building cross-compiler.
  4955. * Large Initialization::         Large arrays with `DATA' initialization.
  4956. * Alpha Problems::               Problems with 64-bit systems like Alphas.
  4957.  
  4958. 
  4959. File: ^.!gcc.docs.fortran.g77,  Node: Maximum Stackable Size,  Next: Floating-point Bit Patterns,  Up: Settings
  4960.  
  4961. Maximum Stackable Size
  4962. ----------------------
  4963.  
  4964.    `g77', on most machines, puts many variables and arrays on the stack
  4965. where possible, and can be configured (by changing
  4966. `FFECOM_sizeMAXSTACKITEM' in `gcc/f/com.c') to force smaller-sized
  4967. entities into static storage (saving on stack space) or permit
  4968. larger-sized entities to be put on the stack (which can improve
  4969. run-time performance, as it presents more opportunities for the GBE to
  4970. optimize the generated code).
  4971.  
  4972. 
  4973. File: ^.!gcc.docs.fortran.g77,  Node: Floating-point Bit Patterns,  Next: Large Initialization,  Prev: Maximum Stackable Size,  Up: Settings
  4974.  
  4975. Floating-point Bit Patterns
  4976. ---------------------------
  4977.  
  4978.    The `g77' build will crash if an attempt is made to build it as a
  4979. cross-compiler for a target when `g77' cannot reliably determine the
  4980. bit pattern of floating-point constants for the target.  Planned
  4981. improvements for g77-0.6 will give it the capabilities it needs to not
  4982. have to crash the build but rather generate correct code for the target.
  4983. (Currently, `g77' would generate bad code under such circumstances if
  4984. it didn't crash during the build, e.g. when compiling a source file
  4985. that does something like `EQUIVALENCE (I,R)' and `DATA
  4986. R/3.1415926535/'.)
  4987.  
  4988. 
  4989. File: ^.!gcc.docs.fortran.g77,  Node: Large Initialization,  Next: Alpha Problems,  Prev: Floating-point Bit Patterns,  Up: Settings
  4990.  
  4991. Initialization of Large Aggregate Areas
  4992. ---------------------------------------
  4993.  
  4994.    A warning message is issued when `g77' sees code that provides
  4995. initial values (e.g. via `DATA') to an aggregate area (`COMMON' or
  4996. `EQUIVALENCE', or even a large enough array or `CHARACTER' variable)
  4997. that is large enough to increase `g77''s compile time by roughly a
  4998. factor of 10.
  4999.  
  5000.    This size currently is quite small, since `g77' currently has a
  5001. known bug requiring too much memory and time to handle such cases.  In
  5002. `gcc/f/data.c', the macro `FFEDATA_sizeTOO_BIG_INIT_' is defined to the
  5003. minimum size for the warning to appear.  The size is specified in
  5004. storage units, which can be bytes, words, or whatever, on a
  5005. case-by-case basis.
  5006.  
  5007.    After changing this macro definition, you must (of course) rebuild
  5008. and reinstall `g77' for the change to take effect.
  5009.  
  5010.    Note that, as of version 0.5.18, improvements have reduced the scope
  5011. of the problem for *sparse* initialization of large arrays, especially
  5012. those with large, contiguous uninitialized areas.  However, the warning
  5013. is issued at a point prior to when `g77' knows whether the
  5014. initialization is sparse, and delaying the warning could mean it is
  5015. produced too late to be helpful.
  5016.  
  5017.    Therefore, the macro definition should not be adjusted to reflect
  5018. sparse cases.  Instead, adjust it to generate the warning when densely
  5019. initialized arrays begin to cause responses noticably slower than
  5020. linear performance would suggest.
  5021.  
  5022. 
  5023. File: ^.!gcc.docs.fortran.g77,  Node: Alpha Problems,  Prev: Large Initialization,  Up: Settings
  5024.  
  5025. Alpha Problems
  5026. --------------
  5027.  
  5028.    `g77' might warn when it is used to compile Fortran code for a
  5029. target configuration that is not basically a 32-bit machine (such as an
  5030. Alpha, which is a 64-bit machine, especially if it has a 64-bit
  5031. operating system running on it).  This is because `g77' is known to not
  5032. work properly on such configurations, although the reasons for this are
  5033. not fully explored.  This is expected to be fixed at 0.6, at which
  5034. point the warning would be dropped.  (The reason the unexplored
  5035. problems are expected to be fixed at 0.6 is because some known internal
  5036. design problems `g77' has, which reduce portability and the ability to
  5037. configure it as a cross-compiler, are presumed to be at least partly
  5038. responsible for the problems being encountered on the Alpha.  The
  5039. problems remain unexplored partly because the known problems exist and
  5040. are scheduled to be addressed anyway.  Plus, the `g77' maintainer does
  5041. not yet possess an Alpha workstation of his own.)
  5042.  
  5043. 
  5044. File: ^.!gcc.docs.fortran.g77,  Node: Debugging and Interfacing,  Next: Collected Fortran Wisdom,  Prev: Installation,  Up: Top
  5045.  
  5046. Debugging and Interfacing
  5047. *************************
  5048.  
  5049.    GNU Fortran currently generates code that is object-compatible with
  5050. the `f2c' converter.  Also, it avoids limitations in the current GBE,
  5051. such as the inability to generate a procedure with multiple entry
  5052. points, by generating code that is structured differently (in terms of
  5053. procedure names, scopes, arguments, and so on) than might be expected.
  5054.  
  5055.    As a result, writing code in other languages that calls on, is
  5056. called by, or shares in-memory data with `g77'-compiled code generally
  5057. requires some understanding of the way `g77' compiles code for various
  5058. constructs.
  5059.  
  5060.    Similarly, using a debugger to debug `g77'-compiled code, even if
  5061. that debugger supports native Fortran debugging, generally requires
  5062. this sort of information.
  5063.  
  5064.    This section describes some of the basic information on how `g77'
  5065. compiles code for constructs involving interfaces to other languages
  5066. and to debuggers.
  5067.  
  5068.    *Caution:* Much or all of this information pertains to only the
  5069. current release of `g77', sometimes even to using certain compiler
  5070. options with `g77' (such as `-fno-f2c').  Do not write code that
  5071. depends on this information without clearly marking said code as
  5072. nonportable and subject to review for every new release of `g77'.  This
  5073. information is provided primarily to make debugging of code generated
  5074. by this particular release of `g77' easier for the user, and partly to
  5075. make writing (generally nonportable) interface code easier.  Both of
  5076. these activities require tracking changes in new version of `g77' as
  5077. they are installed, because new versions can change the behaviors
  5078. described in this section.
  5079.  
  5080. * Menu:
  5081.  
  5082. * Names::              Naming of user-defined variables, procedures, etc.
  5083. * Main Program Unit::  How `g77' compiles a main program unit.
  5084. * Arrays::             Dealing with (possibly multi-dimensional) arrays.
  5085. * Procedures::         How `g77' constructs parameter lists
  5086.                        for procedures.
  5087. * Adjustable Arrays::  Special consideration for adjustable arrays.
  5088. * Alternate Returns::  How `g77' handles alternate returns.
  5089. * Functions::          Functions returning floating-point or character data.
  5090. * Common Blocks::      Accessing common variables while debugging.
  5091. * Local Equivalence Areas::  Accessing `EQUIVALENCE' while debugging.
  5092. * Alternate Entry Points::  How `g77' implements alternate `ENTRY'.
  5093. * Assigned Statement Labels::  How `g77' handles `ASSIGN'.
  5094.  
  5095. 
  5096. File: ^.!gcc.docs.fortran.g77,  Node: Names,  Next: Main Program Unit,  Up: Debugging and Interfacing
  5097.  
  5098. Names
  5099. =====
  5100.  
  5101.    Fortran permits each implementation to decide how to represent names
  5102. as far as how they're seen in other contexts, such as debuggers and
  5103. when interfacing to other languages, and especially as far as how
  5104. casing is handled.
  5105.  
  5106.    External names--names of entities that are public, or "accessible",
  5107. to all modules in a program--normally have an underscore (`_') appended
  5108. by `g77', to generate code that is compatible with f2c.  External names
  5109. include names of Fortran things like common blocks, external procedures
  5110. (subroutines and functions, but not including statement functions,
  5111. which are internal procedures), and entry point names.
  5112.  
  5113.    However, use of the `-fno-underscoring' option disables this kind of
  5114. transformation of external names (though inhibiting the transformation
  5115. certainly improves the chances of colliding with incompatible externals
  5116. written in other languages--but that might be intentional.
  5117.  
  5118.    When `-funderscoring' is in force, any name (external or local) that
  5119. already has at least one underscore in it is implemented by `g77' by
  5120. appending two underscores.  External names are changed this way for
  5121. `f2c' compatibility.  Local names are changed this way to avoid
  5122. collisions with external names that are different in the source
  5123. code--`f2c' does the same thing, but there's no compatibility issue
  5124. there except for user expectations while debugging.
  5125.  
  5126.    For example:
  5127.  
  5128.      Max_Cost = 0
  5129.  
  5130. Here, a user would, in the debugger, refer to this variable using the
  5131. name `max_cost__' (or `MAX_COST__' or `Max_Cost__', as described below).
  5132. (We hope to improve `g77' in this regard in the future--don't write
  5133. scripts depending on this behavior!  Also, consider experimenting with
  5134. the `-fno-underscoring' option to try out debugging without having to
  5135. massage names by hand like this.)
  5136.  
  5137.    `g77' provides a number of command-line options that allow the user
  5138. to control how case mapping is handled for source files.  The default
  5139. is the traditional UNIX model for Fortran compilers--names are mapped
  5140. to lower case.  Other command-line options can be specified to map
  5141. names to upper case, or to leave them exactly as written in the source
  5142. file.
  5143.  
  5144.    For example:
  5145.  
  5146.      Foo = 3.14159
  5147.  
  5148. Here, it is normally the case that the variable assigned will be named
  5149. `foo'.  This would be the name to enter when using a debugger to access
  5150. the variable.
  5151.  
  5152.    However, depending on the command-line options specified, the name
  5153. implemented by `g77' might instead be `FOO' or even `Foo', thus
  5154. affecting how debugging is done.
  5155.  
  5156.    Also:
  5157.  
  5158.      Call Foo
  5159.  
  5160. This would normally call a procedure that, if it were in a separate C
  5161. program, be defined starting with the line:
  5162.  
  5163.      void foo_()
  5164.  
  5165. However, `g77' command-line options could be used to change the casing
  5166. of names, resulting in the name `FOO_' or `Foo_' being given to the
  5167. procedure instead of `foo_', and the `-fno-underscoring' option could
  5168. be used to inhibit the appending of the underscore to the name.
  5169.  
  5170. 
  5171. File: ^.!gcc.docs.fortran.g77,  Node: Main Program Unit,  Next: Arrays,  Prev: Names,  Up: Debugging and Interfacing
  5172.  
  5173. Main Program Unit (PROGRAM)
  5174. ===========================
  5175.  
  5176.    When `g77' compiles a main program unit, it gives it the public
  5177. procedure name `MAIN__'.  The `libf2c' library has the actual `main()'
  5178. procedure as is typical of C-based environments, and it is this
  5179. procedure that performs some initial start-up activity and then calls
  5180. `MAIN__'.
  5181.  
  5182.    Generally, `g77' and `libf2c' are designed so that you need not
  5183. include a main program unit written in Fortran in your program--it can
  5184. be written in C or some other language.  Especially for I/O handling,
  5185. this is the case, although `g77-0.5.16' includes a bug fix for `libf2c'
  5186. that solved a problem with using the `OPEN' statement as the first
  5187. Fortran I/O activity in a program without a Fortran main program unit.
  5188.  
  5189.    However, if you don't intend to use `g77' (or `f2c') to compile your
  5190. main program unit--that is, if you intend to compile a `main()'
  5191. procedure using some other language--you should carefully examine the
  5192. code for `main()' in `libf2c', found in the source file
  5193. `gcc/f/runtime/libF77/main.c', to see what kinds of things might need
  5194. to be done by your `main()' in order to provide the Fortran environment
  5195. your Fortran code is expecting.
  5196.  
  5197.    For example, `libf2c''s `main()' sets up the information used by the
  5198. `IARGC' and `GETARG' intrinsics.  Bypassing `libf2c''s `main()' without
  5199. providing a substitute for this activity would mean that invoking
  5200. `IARGC' and `GETARG' would produce undefined results.
  5201.  
  5202.    When debugging, one implication of the fact that `main()', which is
  5203. the place where the debugged program "starts" from the debugger's point
  5204. of view, is in `libf2c' is that you won't be starting your Fortran
  5205. program at a point you recognize as your Fortran code.
  5206.  
  5207.    The standard way to get around this problem is to set a break point
  5208. (a one-time, or temporary, break point will do) at the entrance to
  5209. `MAIN__', and then run the program.
  5210.  
  5211.    After doing this, the debugger will see the current execution point
  5212. of the program as at the beginning of the main program unit of your
  5213. program.
  5214.  
  5215.    Of course, if you really want to set a break point at some other
  5216. place in your program and just start the program running, without first
  5217. breaking at `MAIN__', that should work fine.
  5218.  
  5219. 
  5220. File: ^.!gcc.docs.fortran.g77,  Node: Arrays,  Next: Procedures,  Prev: Main Program Unit,  Up: Debugging and Interfacing
  5221.  
  5222. Arrays (DIMENSION)
  5223. ==================
  5224.  
  5225.    Fortran uses "column-major ordering" in its arrays.  This differs
  5226. from other languages, such as C, which use "row-major ordering".  The
  5227. difference is that, with Fortran, array elements adjacent to each other
  5228. in memory differ in the *first* subscript instead of the last;
  5229. `A(5,10,20)' immediately follows `A(4,10,20)', whereas with row-major
  5230. ordering it would follow `A(5,10,19)'.
  5231.  
  5232.    This consideration affects not only interfacing with and debugging
  5233. Fortran code, it can greatly affect how code is designed and written,
  5234. especially when code speed and size is a concern.
  5235.  
  5236.    Fortran also differs from C, a popular language for interfacing and
  5237. to support directly in debuggers, in the way arrays are treated.  In C,
  5238. arrays are single-dimensional and have interesting relationships to
  5239. pointers, neither of which is true for Fortran.  As a result, dealing
  5240. with Fortran arrays from within an environment limited to C concepts
  5241. can be challenging.
  5242.  
  5243.    For example, accessing the array element `A(5,10,20)' is easy enough
  5244. in Fortran (use `A(5,10,20)'), but in C some difficult machinations are
  5245. needed.  First, C would treat the A array as a single-dimension array.
  5246. Second, C does not understand low bounds for arrays as does Fortran.
  5247. Third, C assumes a low bound of zero (0), while Fortran defaults to a
  5248. low bound of one (1) and can supports an arbitrary low bound.
  5249. Therefore, calculations must be done to determine what the C equivalent
  5250. of `A(5,10,20)' would be, and these calculations require knowing the
  5251. dimensions of `A'.
  5252.  
  5253.    For `DIMENSION A(2:11,21,0:29)', the calculation of the offset of
  5254. `A(5,10,20)' would be:
  5255.  
  5256.        (5-2)
  5257.      + (10-1)*(11-2+1)
  5258.      + (20-0)*(11-2+1)*(21-1+1)
  5259.      = 4293
  5260.  
  5261. So the C equivalent in this case would be `a[4293]'.
  5262.  
  5263.    When using a debugger directly on Fortran code, the C equivalent
  5264. might not work, because some debuggers cannot understand the notion of
  5265. low bounds other than zero.  However, unlike `f2c', `g77' does inform
  5266. the GBE that a multi-dimensional array (like `A' in the above example)
  5267. is really multi-dimensional, rather than a single-dimensional array, so
  5268. at least the dimensionality of the array is preserved.
  5269.  
  5270.    Debuggers that understand Fortran should have no trouble with
  5271. non-zero low bounds, but for non-Fortran debuggers, especially C
  5272. debuggers, the above example might have a C equivalent of `a[4305]'.
  5273. This calculation is arrived at by eliminating the subtraction of the
  5274. lower bound in the first parenthesized expression on each line--that
  5275. is, for `(5-2)' substitute `(5)', for `(10-1)' substitute `(10)', and
  5276. for `(20-0)' substitute `(20)'.  Actually, the implication of this can
  5277. be that the expression `*(&a[2][1][0] + 4293)' works fine, but that
  5278. `a[20][10][5]' produces the equivalent of `*(&a[0][0][0] + 4305)'
  5279. because of the missing lower bounds.
  5280.  
  5281.    Come to think of it, perhaps the behavior is due to the debugger
  5282. internally compensating for the lower bounds by offsetting the base
  5283. address of `a', leaving `&a' set lower, in this case, than
  5284. `&a[2][1][0]' (the address of its first element as identified by
  5285. subscripts equal to the corresponding lower bounds).
  5286.  
  5287.    You know, maybe nobody really needs to use arrays.
  5288.  
  5289. 
  5290. File: ^.!gcc.docs.fortran.g77,  Node: Procedures,  Next: Adjustable Arrays,  Prev: Arrays,  Up: Debugging and Interfacing
  5291.  
  5292. Procedures (SUBROUTINE and FUNCTION)
  5293. ====================================
  5294.  
  5295.    Procedures that accept `CHARACTER' arguments are implemented by
  5296. `g77' so that each `CHARACTER' argument has two actual arguments.
  5297.  
  5298.    The first argument occupies the expected position in the argument
  5299. list and has the user-specified name.  This argument is a pointer to an
  5300. array of characters, passed by the caller.
  5301.  
  5302.    The second argument is appended to the end of the user-specified
  5303. calling sequence and is named `__g77_length_X', where X is the
  5304. user-specified name.  This argument is of the C type `ftnlen' (see
  5305. `gcc/f/runtime/f2c.h.in' for information on that type) and is the
  5306. number of characters the caller has allocated in the array pointed to
  5307. by the first argument.
  5308.  
  5309.    A procedure will ignore the length argument if `X' is not declared
  5310. `CHARACTER*(*)', because for other declarations, it knows the length.
  5311. Not all callers necessarily "know" this, however, which is why they all
  5312. pass the extra argument.
  5313.  
  5314.    The contents of the `CHARACTER' argument are specified by the
  5315. address passed in the first argument (named after it).  The procedure
  5316. can read or write these contents as appropriate.
  5317.  
  5318.    When more than one `CHARACTER' argument is present in the argument
  5319. list, the length arguments are appended in the order the orginal
  5320. arguments appear.  So `CALL FOO('HI','THERE')' is implemented in C as
  5321. `foo("hi","there",2,5);', ignoring the fact that `g77' does not provide
  5322. the trailing null bytes on the constant strings (`f2c' does provide
  5323. them, but they are unnecessary in a Fortran environment, and you should
  5324. not expect them to be there).
  5325.  
  5326.    Note that the above information applies to `CHARACTER' variables and
  5327. arrays *only*.  It does *not* apply to external `CHARACTER' functions
  5328. or to intrinsic `CHARACTER' functions.  That is, no second length
  5329. argument is passed to `FOO' in this case:
  5330.  
  5331.      CHARACTER X
  5332.      EXTERNAL X
  5333.      CALL FOO(X)
  5334.  
  5335. Nor does `FOO' expect such an argument in this case:
  5336.  
  5337.      SUBROUTINE FOO(X)
  5338.      CHARACTER X
  5339.      EXTERNAL X
  5340.  
  5341.    Because of this implementation detail, if a program has a bug such
  5342. that there is disagreement as to whether an argument is a procedure,
  5343. and the type of the argument is `CHARACTER', subtle symptoms might
  5344. appear.
  5345.  
  5346. 
  5347. File: ^.!gcc.docs.fortran.g77,  Node: Adjustable Arrays,  Next: Alternate Returns,  Prev: Procedures,  Up: Debugging and Interfacing
  5348.  
  5349. Adjustable Arrays (DIMENSION)
  5350. =============================
  5351.  
  5352.    Adjustable and automatic arrays in Fortran require the implementation
  5353. (in this case, the `g77' compiler) to "memorize" the expressions that
  5354. dimension the arrays each time the procedure is invoked.  This is so
  5355. that subsequent changes to variables used in those expressions, made
  5356. during execution of the procedure, do not have any effect on the
  5357. dimensions of those arrays.
  5358.  
  5359.    For example:
  5360.  
  5361.      REAL ARRAY(5)
  5362.      DATA ARRAY/5*2/
  5363.      CALL X(ARRAY, 5)
  5364.      END
  5365.      SUBROUTINE X(A, N)
  5366.      DIMENSION A(N)
  5367.      N = 20
  5368.      PRINT *, N, A
  5369.      END
  5370.  
  5371. Here, the implementation should, when running the program, print
  5372. something like:
  5373.  
  5374.      20   2.  2.  2.  2.  2.
  5375.  
  5376. Note that this shows that while the value of `N' was successfully
  5377. changed, the size of the `A' array remained at 5 elements.
  5378.  
  5379.    To support this, `g77' generates code that executes before any user
  5380. code (and before the internally generated computed `GOTO' to handle
  5381. alternate entry points, as described below) that evaluates each
  5382. (nonconstant) expression in the list of subscripts for an array, and
  5383. saves the result of each such evaluation to be used when determining
  5384. the size of the array (instead of re-evaluating the expressions).
  5385.  
  5386.    So, in the above example, when `X' is first invoked, code is
  5387. executed that copies the value of `N' to a temporary.  And that same
  5388. temporary serves as the actual high bound for the single dimension of
  5389. the `A' array (the low bound being the constant 1).  Since the user
  5390. program cannot (legitimately) change the value of the temporary during
  5391. execution of the procedure, the size of the array remains constant
  5392. during each invocation.
  5393.  
  5394.    For alternate entry points, the code `g77' generates takes into
  5395. account the possibility that a dummy adjustable array is not actually
  5396. passed to the actual entry point being invoked at that time.  In that
  5397. case, the public procedure implementing the entry point passes to the
  5398. master private procedure implementing all the code for the entry points
  5399. a `NULL' pointer where a pointer to that adjustable array would be
  5400. expected.  The `g77'-generated code doesn't attempt to evaluate any of
  5401. the expressions in the subscripts for an array if the pointer to that
  5402. array is `NULL' at run time in such cases.  (Don't depend on this
  5403. particular implementation by writing code that purposely passes `NULL'
  5404. pointers where the callee expects adjustable arrays, even if you know
  5405. the callee won't reference the arrays--nor should you pass `NULL'
  5406. pointers for any dummy arguments used in calculating the bounds of such
  5407. arrays or leave undefined any values used for that purpose in
  5408. COMMON--because the way `g77' implements these things might change in
  5409. the future!)
  5410.  
  5411. 
  5412. File: ^.!gcc.docs.fortran.g77,  Node: Alternate Returns,  Next: Functions,  Prev: Adjustable Arrays,  Up: Debugging and Interfacing
  5413.  
  5414. Alternate Returns (SUBROUTINE and RETURN)
  5415. =========================================
  5416.  
  5417.    Subroutines with alternate returns (e.g. `SUBROUTINE X(*)' and `CALL
  5418. X(*50)') are implemented by `g77' as functions returning the C `int'
  5419. type.  The actual alternate-return arguments are omitted from the
  5420. calling sequence.  Instead, the caller uses the return value to do a
  5421. rough equivalent of the Fortran computed-`GOTO' statement, as in `GOTO
  5422. (50), X()' in the example above (where `X' is quietly declared as an
  5423. `INTEGER' function), and the callee just returns whatever integer is
  5424. specified in the `RETURN' statement for the subroutine For example,
  5425. `RETURN 1' is implemented as `X = 1' followed by `RETURN' in C, and
  5426. `RETURN' by itself is `X = 0' and `RETURN').
  5427.  
  5428. 
  5429. File: ^.!gcc.docs.fortran.g77,  Node: Functions,  Next: Common Blocks,  Prev: Alternate Returns,  Up: Debugging and Interfacing
  5430.  
  5431. Functions (FUNCTION and RETURN)
  5432. ===============================
  5433.  
  5434.    `g77' handles in a special way functions that return the following
  5435. types:
  5436.  
  5437.    * `CHARACTER'
  5438.  
  5439.    * `COMPLEX' (and `DOUBLE COMPLEX')
  5440.  
  5441.    * `REAL'
  5442.  
  5443.    For `CHARACTER', `g77' implements a subroutine (a C function
  5444. returning `void') with two arguments prepended: `__g77_result', which
  5445. the caller passes as a pointer to a `char' array expected to hold the
  5446. return value, and `__g77_length', which the caller passes as an
  5447. `ftnlen' value specifying the length of the return value as declared in
  5448. the calling program.  For `CHARACTER'*(*), the called function uses
  5449. `__g77_length' to determine the size of the array that `__g77_result'
  5450. points to; otherwise, it ignores that argument.
  5451.  
  5452.    For `COMPLEX' and `DOUBLE COMPLEX', when `-ff2c' is in force, `g77'
  5453. implements a subroutine with one argument prepended: `__g77_result',
  5454. which the caller passes as a pointer to a variable of the type of the
  5455. function.  The called function writes the return value into this
  5456. variable instead of returning it as a function value.  When `-fno-f2c'
  5457. is in force, `g77' implements a `COMPLEX' function as `gcc''s
  5458. `__complex__ float' function, returning the result of the function in
  5459. the same way as `gcc' would, and implements a `DOUBLE COMPLEX' function
  5460. similarly.
  5461.  
  5462.    For `REAL', when `-ff2c' is in force, `g77' implements a function
  5463. that actually returns `DOUBLE PRECISION' (usually C's `double' type).
  5464. When `-fno-f2c' is in force, `REAL' functions return `float'.
  5465.  
  5466. 
  5467. File: ^.!gcc.docs.fortran.g77,  Node: Common Blocks,  Next: Local Equivalence Areas,  Prev: Functions,  Up: Debugging and Interfacing
  5468.  
  5469. Common Blocks (COMMON)
  5470. ======================
  5471.  
  5472.    `g77' names and lays out `COMMON' areas the same way f2c does, for
  5473. compatibility with f2c.
  5474.  
  5475.    Currently, `g77' does not emit any debugging information for items
  5476. in a `COMMON' area, due to an apparent bug in the GBE.
  5477.  
  5478.    Moreover, `g77' currently implements a `COMMON' area such that its
  5479. type is an array of the C `char' data type.
  5480.  
  5481.    So, when debugging, you must know the offset into a `COMMON' area
  5482. for a particular item in that area, and you have to take into account
  5483. the appropriate multiplier for the respective sizes of the types (as
  5484. declared in your code) for the items preceding the item in question as
  5485. compared to the size of the `char' type.
  5486.  
  5487.    For example, using default implicit typing, the statement
  5488.  
  5489.      COMMON I(15), R(20), T
  5490.  
  5491. results in a public 144-byte `char' array named `_BLNK__' with `I'
  5492. placed at `_BLNK__[0]', `R' at `_BLNK__[60]', and `T' at `_BLNK__[140]'.
  5493. (This is assuming that the target machine for the compilation has
  5494. 4-byte `INTEGER' and `REAL' types.)
  5495.  
  5496. 
  5497. File: ^.!gcc.docs.fortran.g77,  Node: Local Equivalence Areas,  Next: Alternate Entry Points,  Prev: Common Blocks,  Up: Debugging and Interfacing
  5498.  
  5499. Local Equivalence Areas (EQUIVALENCE)
  5500. =====================================
  5501.  
  5502.    `g77' treats storage-associated areas involving a `COMMON' block as
  5503. explained in the section on common blocks.
  5504.  
  5505.    A local `EQUIVALENCE' area is a collection of variables and arrays
  5506. connected to each other in any way via `EQUIVALENCE', none of which are
  5507. listed in a `COMMON' statement.
  5508.  
  5509.    Currently, `g77' does not emit any debugging information for items
  5510. in a local `EQUIVALENCE' area, due to an apparent bug in the GBE.
  5511.  
  5512.    Moreover, `g77' implements a local `EQUIVALENCE' area such that its
  5513. type is an array of the C `char' data type.
  5514.  
  5515.    The name `g77' gives this array of `char' type is `__g77_equiv_X',
  5516. where X is the name of the first item listed in the `EQUIVALENCE'
  5517. statements for that area that is placed at the beginning (offset 0) of
  5518. this array.
  5519.  
  5520.    When debugging, you must therefore access members of `EQUIVALENCE'
  5521. areas by specifying the appropriate `__g77_equiv_X' array section with
  5522. the appropriate offset.  See the explanation of debugging `COMMON'
  5523. blocks for info applicable to debugging local `EQUIVALENCE' areas.
  5524.  
  5525.    (Note: `g77' version 0.5.16 fixed a bug in how certain `EQUIVALENCE'
  5526. cases were handled.  The bug caused the debugger to not know the size
  5527. of the array if any variable or array in the `EQUIVALENCE' was given an
  5528. initial value via `DATA' or similar.)
  5529.  
  5530. 
  5531. File: ^.!gcc.docs.fortran.g77,  Node: Alternate Entry Points,  Next: Assigned Statement Labels,  Prev: Local Equivalence Areas,  Up: Debugging and Interfacing
  5532.  
  5533. Alternate Entry Points (ENTRY)
  5534. ==============================
  5535.  
  5536.    The GBE does not understand the general concept of alternate entry
  5537. points as Fortran provides via the ENTRY statement.  `g77' gets around
  5538. this by using an approach to compiling procedures having at least one
  5539. `ENTRY' statement that is almost identical to the approach used by
  5540. `f2c'.  (An alternate approach could be used that would probably
  5541. generate faster, but larger, code that would also be a bit easier to
  5542. debug.)
  5543.  
  5544.    Information on how `g77' implements `ENTRY' is provided for those
  5545. trying to debug such code.  The choice of implementation seems unlikely
  5546. to affect code (compiled in other languages) that interfaces to such
  5547. code.
  5548.  
  5549.    `g77' compiles exactly one public procedure for the primary entry
  5550. point of a procedure plus each `ENTRY' point it specifies, as usual.
  5551. That is, in terms of the public interface, there is no difference
  5552. between
  5553.  
  5554.      SUBROUTINE X
  5555.      END
  5556.      SUBROUTINE Y
  5557.      END
  5558.  
  5559. and:
  5560.  
  5561.      SUBROUTINE X
  5562.      ENTRY Y
  5563.      END
  5564.  
  5565.    The difference between the above two cases lies in the code compiled
  5566. for the `X' and `Y' procedures themselves, plus the fact that, for the
  5567. second case, an extra internal procedure is compiled.
  5568.  
  5569.    For every Fortran procedure with at least one `ENTRY' statement,
  5570. `g77' compiles an extra procedure named `__g77_masterfun_X', where X is
  5571. the name of the primary entry point (which, in the above case, using
  5572. the standard compiler options, would be `x_' in C).
  5573.  
  5574.    This extra procedure is compiled as a private procedure--that is, a
  5575. procedure not accessible by name to separately compiled modules.  It
  5576. contains all the code in the program unit, including the code for the
  5577. primary entry point plus for every entry point.  (The code for each
  5578. public procedure is quite short, and explained later.)
  5579.  
  5580.    The extra procedure has some other interesting characteristics.
  5581.  
  5582.    The argument list for this procedure is invented by `g77'.  It
  5583. contains a single integer argument named `__g77_which_entrypoint',
  5584. passed by value (as in Fortran's `%VAL()' intrinsic), specifying the
  5585. entry point index--0 for the primary entry point, 1 for the first entry
  5586. point (the first `ENTRY' statement encountered), 2 for the second entry
  5587. point, and so on.
  5588.  
  5589.    It also contains, for functions returning `CHARACTER' and (when
  5590. `-ff2c' is in effect) `COMPLEX' functions, and for functions returning
  5591. different types among the `ENTRY' statements (e.g. `REAL FUNCTION R()'
  5592. containing `ENTRY I()'), an argument named `__g77_result' that is
  5593. expected at run time to contain a pointer to where to store the result
  5594. of the entry point.  For `CHARACTER' functions, this storage area is an
  5595. array of the appropriate number of characters; for `COMPLEX' functions,
  5596. it is the appropriate area for the return type (currently either
  5597. `COMPLEX' or `DOUBLE COMPLEX'); for multiple- return-type functions, it
  5598. is a union of all the supported return types (which cannot include
  5599. `CHARACTER', since combining `CHARACTER' and non-`CHARACTER' return
  5600. types via `ENTRY' in a single function is not supported by `g77').
  5601.  
  5602.    For `CHARACTER' functions, the `__g77_result' argument is followed
  5603. by yet another argument named `__g77_length' that, at run time,
  5604. specifies the caller's expected length of the returned value.  Note
  5605. that only `CHARACTER*(*)' functions and entry points actually make use
  5606. of this argument, even though it is always passed by all callers of
  5607. public `CHARACTER' functions (since the caller does not generally know
  5608. whether such a function is `CHARACTER*(*)' or whether there are any
  5609. other callers that don't have that information).
  5610.  
  5611.    The rest of the argument list is the union of all the arguments
  5612. specified for all the entry points (in their usual forms, e.g.
  5613. `CHARACTER' arguments have extra length arguments, all appended at the
  5614. end of this list).  This is considered the "master list" of arguments.
  5615.  
  5616.    The code for this procedure has, before the code for the first
  5617. executable statement, code much like that for the following Fortran
  5618. statement:
  5619.  
  5620.             GOTO (100000,100001,100002), __g77_which_entrypoint
  5621.      100000 ...code for primary entry point...
  5622.      100001 ...code immediately following first ENTRY statement...
  5623.      100002 ...code immediately following second ENTRY statement...
  5624.  
  5625. (Note that invalid Fortran statement labels and variable names are used
  5626. in the above example to highlight the fact that it represents code
  5627. generated by the `g77' internals, not code to be written by the user.)
  5628.  
  5629.    It is this code that, when the procedure is called, picks which
  5630. entry point to start executing.
  5631.  
  5632.    Getting back to the public procedures (`x' and `Y' in the original
  5633. example), those procedures are fairly simple.  Their interfaces are
  5634. just like they would be if they were self-contained procedures (without
  5635. `ENTRY'), of course, since that is what the callers expect.  Their code
  5636. consists of simply calling the private procedure, described above, with
  5637. the appropriate extra arguments (the entry point index, and perhaps a
  5638. pointer to a multiple-type- return variable, local to the public
  5639. procedure, that contains all the supported returnable non-character
  5640. types).  For arguments that are not listed for a given entry point that
  5641. are listed for other entry points, and therefore that are in the
  5642. "master list" for the private procedure, null pointers (in C, the
  5643. `NULL' macro) are passed.  Also, for entry points that are part of a
  5644. multiple-type- returning function, code is compiled after the call of
  5645. the private procedure to extract from the multi-type union the
  5646. appropriate result, depending on the type of the entry point in
  5647. question, returning that result to the original caller.
  5648.  
  5649.    When debugging a procedure containing alternate entry points, you
  5650. can either set a break point on the public procedure itself (e.g.  a
  5651. break point on `X' or `Y') or on the private procedure that contains
  5652. most of the pertinent code (e.g. `__g77_masterfun_X').  If you do the
  5653. former, you should use the debugger's command to "step into" the called
  5654. procedure to get to the actual code; with the latter approach, the
  5655. break point leaves you right at the actual code, skipping over the
  5656. public entry point and its call to the private procedure (unless you
  5657. have set a break point there as well, of course).
  5658.  
  5659.    Further, the list of dummy arguments that is visible when the
  5660. private procedure is active is going to be the expanded version of the
  5661. list for whichever particular entry point is active, as explained
  5662. above, and the way in which return values are handled might well be
  5663. different from how they would be handled for an equivalent single-entry
  5664. function.
  5665.  
  5666. 
  5667. File: ^.!gcc.docs.fortran.g77,  Node: Assigned Statement Labels,  Prev: Alternate Entry Points,  Up: Debugging and Interfacing
  5668.  
  5669. Assigned Statement Labels (ASSIGN and GOTO)
  5670. ===========================================
  5671.  
  5672.    For portability to machines where a pointer (such as to a label,
  5673. which is how `g77' implements `ASSIGN' and its cousin, the assigned
  5674. `GOTO') is wider (bitwise) than an `INTEGER', `g77' does not
  5675. necessarily use the same memory location to hold the `ASSIGN'ed value
  5676. of a variable as it does the numerical value in that variable, unless
  5677. the variable is wide enough (can hold enough bits).
  5678.  
  5679.    In particular, while `g77' implements
  5680.  
  5681.      I = 10
  5682.  
  5683. as, in C notation, `i = 10;', it might implement
  5684.  
  5685.      ASSIGN 10 TO I
  5686.  
  5687. as, in GNU's extended C notation (for the label syntax),
  5688. `__g77_ASSIGN_I = &&L10;' (where `L10' is just a massaging of the
  5689. Fortran label `10' to make the syntax C-like; `g77' doesn't actually
  5690. generate the name `L10' or any other name like that, since debuggers
  5691. cannot access labels anyway).
  5692.  
  5693.    While this currently means that an `ASSIGN' statement might not
  5694. overwrite the numeric contents of its target variable, *do not* write
  5695. any code depending on this feature.  `g77' has already changed this
  5696. implementation across versions and might do so in the future.  This
  5697. information is provided only to make debugging Fortran programs
  5698. compiled with the current version of `g77' somewhat easier.  If there's
  5699. no debugger-visible variable named `__g77_ASSIGN_I' in a program unit
  5700. that does `ASSIGN 10 TO I', that probably means `g77' has decided it
  5701. can store the pointer to the label directly into `I' itself.
  5702.  
  5703.    (Currently, `g77' always chooses to make the separate variable, to
  5704. improve the likelihood that `-O -Wuninitialized' will diagnose failures
  5705. to do things like `GOTO I' without `ASSIGN 10 TO I' despite doing
  5706. `I=5'.)
  5707.  
  5708. 
  5709. File: ^.!gcc.docs.fortran.g77,  Node: Collected Fortran Wisdom,  Next: Trouble,  Prev: Debugging and Interfacing,  Up: Top
  5710.  
  5711. Collected Fortran Wisdom
  5712. ************************
  5713.  
  5714.    Most users of `g77' can be divided into two camps:
  5715.  
  5716.    * Those writing new Fortran code to be compiled by `g77'.
  5717.  
  5718.    * Those using `g77' to compile existing, "legacy" code.
  5719.  
  5720.    Users writing new code generally understand most of the necessary
  5721. aspects of Fortran to write "mainstream" code, but often need help
  5722. deciding how to handle problems, such as the construction of libraries
  5723. containing `BLOCK DATA'.
  5724.  
  5725.    Users dealing with "legacy" code sometimes don't have much
  5726. experience with Fortran, but believe that the code they're compiling
  5727. already works when compiled by other compilers (and might not
  5728. understand why, as is sometimes the case, it doesn't work when compiled
  5729. by `g77').
  5730.  
  5731.    The following information is designed to help users do a better job
  5732. coping with existing, "legacy" Fortran code, and with writing new code
  5733. as well.
  5734.  
  5735. * Menu:
  5736.  
  5737. * Overly Convenient Options::  Temptations to avoid, habits to not form.
  5738. * Block Data and Libraries::   How `g77' solves a common problem.
  5739. * Faster Programs::            Everybody wants these, but at what cost?
  5740. * Working Programs::           Getting programs to work should be done first.
  5741. * Loops::                      Fortran `DO' loops surprise many people.
  5742. * Advantages Over f2c::        If `f2c' is so great, why `g77'?
  5743.  
  5744. 
  5745. File: ^.!gcc.docs.fortran.g77,  Node: Overly Convenient Options,  Next: Block Data and Libraries,  Up: Collected Fortran Wisdom
  5746.  
  5747. Overly Convenient Command-line Options
  5748. ======================================
  5749.  
  5750.    These options should be used only as a quick-and-dirty way to
  5751. determine how well your program will run under different compilation
  5752. models without having to change the source.  Some are more problematic
  5753. than others, depending on how portable and maintainable you want the
  5754. program to be (and, of course, whether you are allowed to change it at
  5755. all is crucial).
  5756.  
  5757.    You should not continue to use these command-line options to compile
  5758. a given program, but rather should make changes to the source code:
  5759.  
  5760. `-finit-local-zero'
  5761.      (This option specifies that any uninitialized local variables and
  5762.      arrays have default initialization to binary zeros.)
  5763.  
  5764.      Many other compilers do this automatically, which means lots of
  5765.      Fortran code developed with those compilers depends on it.
  5766.  
  5767.      It is safer (and probably would produce a faster program) to find
  5768.      the variables and arrays that need such initialization and provide
  5769.      it explicitly via `DATA', so that `-finit-local-zero' is not
  5770.      needed.
  5771.  
  5772.      Consider using `-Wuninitialized' (which requires `-O') to find
  5773.      likely candidates, but do not specify `-finit-local-zero' or
  5774.      `-fno-automatic', or this technique won't work.
  5775.  
  5776. `-fno-automatic'
  5777.      (This option specifies that all local variables and arrays are to
  5778.      be treated as if they were named in `SAVE' statements.)
  5779.  
  5780.      Many other compilers do this automatically, which means lots of
  5781.      Fortran code developed with those compilers depends on it.
  5782.  
  5783.      The effect of this is that all variables and arrays are made
  5784.      static, that is, not placed on the stack or in heap storage.  This
  5785.      might cause a buggy program to appear to work better.  If so,
  5786.      rather than relying on this command-line option (and hoping all
  5787.      compilers provide the equivalent one), add `SAVE' statements to
  5788.      some or all program unit sources, as appropriate.  Consider using
  5789.      `-Wuninitialized' (which requires `-O') to find likely candidates,
  5790.      but do not specify `-finit-local-zero' or `-fno-automatic', or
  5791.      this technique won't work.
  5792.  
  5793.      The default is `-fautomatic', which tells `g77' to try and put
  5794.      variables and arrays on the stack (or in fast registers) where
  5795.      possible and reasonable.  This tends to make programs faster.
  5796.  
  5797. `-fugly'
  5798.      Fix the source code so that `-fno-ugly' will work.  Note that, for
  5799.      many programs, it is difficult to practically avoid using the
  5800.      features enabled via `-fugly-init', and these features pose the
  5801.      lowest risk of writing nonportable code, among the various "ugly"
  5802.      features.
  5803.  
  5804. `-fGROUP-intrinsics-hide'
  5805.      Change the source code to use `EXTERNAL' for any external procedure
  5806.      that might be the name of an intrinsic.  It is easy to find these
  5807.      using `-fGROUP-intrinsics-disable'.
  5808.  
  5809. 
  5810. File: ^.!gcc.docs.fortran.g77,  Node: Block Data and Libraries,  Next: Faster Programs,  Prev: Overly Convenient Options,  Up: Collected Fortran Wisdom
  5811.  
  5812. Block Data and Libraries
  5813. ========================
  5814.  
  5815.    To ensure that block data program units are linked, especially a
  5816. concern when they are put into libraries, give each one a name (as in
  5817. `BLOCK DATA FOO') and make sure there is an `EXTERNAL FOO' statement in
  5818. every program unit that uses any common block initialized by the
  5819. corresponding `BLOCK DATA'.  `g77' currently compiles a `BLOCK DATA' as
  5820. if it were a `SUBROUTINE', that is, it generates an actual procedure
  5821. having the appropriate name.  The procedure does nothing but return
  5822. immediately if it happens to be called.  For `EXTERNAL FOO', where
  5823. `FOO' is not otherwise referenced in the same program unit, `g77'
  5824. assumes there exists a `BLOCK DATA FOO' in the program and ensures that
  5825. by generating a reference to it so the linker will make sure it is
  5826. present.  (Specifically, `g77' outputs in the data section a static
  5827. pointer to the external name `FOO'.)
  5828.  
  5829.    The implementation `g77' currently uses to make this work is one of
  5830. the few things not compatible with `f2c' as currently shipped.  `f2c'
  5831. currently does nothing with `EXTERNAL FOO' except issue a warning that
  5832. `FOO' is not otherwise referenced, and for `BLOCK DATA FOO', f2c
  5833. doesn't generate a dummy procedure with the name `FOO'.  The upshot is
  5834. that you shouldn't mix `f2c' and `g77' in this particular case.  If you
  5835. use f2c to compile `BLOCK DATA FOO', then any `g77'-compiled program
  5836. unit that says `EXTERNAL FOO' will result in an unresolved reference
  5837. when linked.  If you do the opposite, then `FOO' might not be linked in
  5838. under various circumstances (such as when `FOO' is in a library, or
  5839. you're using a "clever" linker--so clever, it produces a broken program
  5840. with little or no warning by omitting initializations of global data
  5841. because they are contained in unreferenced procedures).
  5842.  
  5843.    The changes you make to your code to make `g77' handle this
  5844. situation, however, appear to be a widely portable way to handle it.
  5845. That is, many systems permit it (as they should, since the FORTRAN 77
  5846. standard permits `EXTERNAL FOO' when `FOO' is a block data program
  5847. unit), and of the ones that might not link `BLOCK DATA FOO' under some
  5848. circumstances, most of them appear to do so once `EXTERNAL FOO' is
  5849. present in the appropriate program units.
  5850.  
  5851. 
  5852. File: ^.!gcc.docs.fortran.g77,  Node: Faster Programs,  Next: Working Programs,  Prev: Block Data and Libraries,  Up: Collected Fortran Wisdom
  5853.  
  5854. Faster Programs
  5855. ===============
  5856.  
  5857.    Aside from the usual `gcc' options, such as `-O', `-ffast-math', and
  5858. so on, consider trying:
  5859.  
  5860. `-fno-f2c'
  5861.      Use this if you aren't linking with any code compiled using `f2c'.
  5862.      (Note that `libf2c' is *not* an example of code that is compiled
  5863.      using `f2c'--it is compiled by a C compiler, usually `gcc'.)
  5864.  
  5865.    If you're using `-fno-automatic' already, you probably should change
  5866. your code to allow compilation with `-fautomatic' (the default), to
  5867. allow the program to run faster.
  5868.  
  5869.    Similarly, you should be able to use `-fno-init-local-zero' (the
  5870. default) instead of `-finit-local-zero'.  This is because it is rare
  5871. that every variable affected by these options in a given program
  5872. actually needs to be so affected.
  5873.  
  5874.    For example, `-fno-automatic', which effectively `SAVE's every local
  5875. variable and array, affects even things like `DO' iteration variables,
  5876. which rarely need to be `SAVE'd, and this often reduces run-time
  5877. performances.  Similarly, `-fno-init-local-zero' forces such variables
  5878. to be initialized to zero--when `SAVE'd (such as when
  5879. `-fno-automatic'), this by itself generally affects only startup time
  5880. for a program, but when not `SAVE'd, it can slow down the procedure
  5881. every time it is called.
  5882.  
  5883.    *Note Overly Convenient Command-Line Options: Overly Convenient
  5884. Options, for information on the `-fno-automatic' and
  5885. `-finit-local-zero' options and how to convert their use into selective
  5886. changes in your own code.
  5887.  
  5888. 
  5889. File: ^.!gcc.docs.fortran.g77,  Node: Working Programs,  Next: Loops,  Prev: Faster Programs,  Up: Collected Fortran Wisdom
  5890.  
  5891. Working Programs
  5892. ================
  5893.  
  5894.    Getting Fortran programs to work in the first place can be quite a
  5895. challenge--even when the programs already work on other systems, or
  5896. when using other compilers.
  5897.  
  5898.    `g77' offers some options that might be useful for tracking down
  5899. bugs in such programs.  *Note Option Summary::, for a summary of these
  5900. and other options, and cross-references for each such option to the
  5901. pertinent material in this manual.
  5902.  
  5903. `-finit-local-zero'
  5904.      A program that works better when compiled with this option is
  5905.      depending on a particular system's, or compiler's, tendency to
  5906.      initialize some variables to zero.  It might be worthwhile finding
  5907.      such cases and fixing them.
  5908.  
  5909. `-fno-automatic'
  5910.      A program that works better when compiled with this option is
  5911.      depending on not having to use the `SAVE' statement as required by
  5912.      the Fortran standard.  It might be worthwhile finding such cases
  5913.      and fixing them.
  5914.  
  5915. `-Wimplicit'
  5916.      This might catch failures to properly specify the types of
  5917.      variables, arrays, and functions in the code.  However, in code
  5918.      that makes heavy use of Fortran's implicit-typing facility, this
  5919.      option might produce so many warnings about cases that are
  5920.      working, it would be hard to find the one or two that represent
  5921.      bugs.
  5922.  
  5923. `-Wunused'
  5924.      This can find bugs involving implicitly typing, sometimes more
  5925.      easily than using -Wimplicit in code that makes heavy use of
  5926.      implicit typing.  An unused variable or array might indicate that
  5927.      the spelling for its declaration is different from that of its
  5928.      intended uses.
  5929.  
  5930. `-Wuninitialized'
  5931.      This can find bugs involving uninitialized variables, which can in
  5932.      turn result from misspellings in declaration statements.
  5933.  
  5934. `-Wsurprising'
  5935.      This can find bugs involving expression evaluation or in the way
  5936.      `DO' loops with non-integral iteration variables are handled.
  5937.      Cases found by this option might indicate a difference of
  5938.      interpretation between the author of the code involved, and a
  5939.      standard-conforming compiler such as `g77'.  Such a difference
  5940.      might produce actual bugs.
  5941.  
  5942.      In any case, changing the code to explicitly do what the
  5943.      programmer might have expected it to do, so `g77' and other
  5944.      compilers are more likely to follow the programmer's expectations,
  5945.      might be worthwhile, especially if such changes make the program
  5946.      work better.
  5947.  
  5948. `-W'
  5949.      It is possible that the "extra" warnings enabled by this option
  5950.      could expose bugs in the code.
  5951.  
  5952. 
  5953. File: ^.!gcc.docs.fortran.g77,  Node: Loops,  Next: Advantages Over f2c,  Prev: Working Programs,  Up: Collected Fortran Wisdom
  5954.  
  5955. Loops
  5956. =====
  5957.  
  5958.    The meaning of a `DO' loop in Fortran is precisely specified in the
  5959. Fortran standard...and is quite different from what many programmers
  5960. might expect.
  5961.  
  5962.    In particular, Fortran `DO' loops are implemented as if the number
  5963. of trips through the loop is calculated *before* the loop is entered.
  5964.  
  5965.    The number of trips for a loop is calculated from the START, END,
  5966. and INCREMENT values specified in a statement such as:
  5967.  
  5968.      DO ITER = START, END, INCREMENT
  5969.  
  5970.    The trip count is evaluated using a fairly simple formula based on
  5971. the three values following the `=' in the statement, and it is that
  5972. trip count that is effectively decremented during each iteration of the
  5973. loop.  If, at the beginning of an iteration of the loop, the trip count
  5974. is zero or negative, the loop terminates.  The per-loop-iteration
  5975. modifications to ITER are not related to determining whether to
  5976. terminate the loop.
  5977.  
  5978.    There are two important things to remember about the trip count:
  5979.  
  5980.    * It can be *negative*, in which case it is treated as if it was
  5981.      zero--meaning the loop is not executed at all.
  5982.  
  5983.    * The type used to *calculate* the trip count the same type as ITER,
  5984.      but the final calculation, and thus the type of the trip count
  5985.      itself, always is `INTEGER'.
  5986.  
  5987.    These two items mean that there are loops that cannot be written in
  5988. straightforward fashion using the Fortran `DO'.
  5989.  
  5990.    For example, on a system with the canonical 32-bit two's-complement
  5991. implementation of `INTEGER', the following loop will not work:
  5992.  
  5993.      DO I = -2000000000, 2000000000
  5994.  
  5995. Although the START and END values are well within the range of
  5996. `INTEGER', the *trip count* is not.  The expected trip count is
  5997. 40000000001, which is outside the range of `INTEGER' on many systems.
  5998.  
  5999.    Instead, the above loop should be constructed this way:
  6000.  
  6001.      I = -2000000000
  6002.      DO
  6003.        IF (I .GT. 2000000000) EXIT
  6004.        ...
  6005.        I = I + 1
  6006.      END DO
  6007.  
  6008. The simple `DO' construct and the `EXIT' statement (used to leave the
  6009. innermost loop) are F90 features that `g77' supports.
  6010.  
  6011.    Some Fortran compilers have buggy implementations of `DO', in that
  6012. they don't follow the standard.  They implement `DO' as a
  6013. straightforward translation to what, in C, would be a `for' statement.
  6014. Instead of creating a temporary variable to hold the trip count as
  6015. calculated at run time, these compilers use the iteration variable ITER
  6016. to control whether the loop continues at each iteration.
  6017.  
  6018.    The bug in such an implementation shows up when the trip count is
  6019. within the range of the type of ITER, but the magnitude of `ABS(END) +
  6020. ABS(INCR)' exceeds that range.  For example:
  6021.  
  6022.      DO I = 2147483600, 2147483647
  6023.  
  6024. A loop started by the above statement will work as implemented by
  6025. `g77', but the use, by some compilers, of a more C-like implementation
  6026. akin to
  6027.  
  6028.      for (i = 2147483600; i <= 2147483647; ++i)
  6029.  
  6030. produces a loop that does not terminate, because `i' can never be
  6031. greater than 2147483647, since incrementing it beyond that value
  6032. overflows `i', setting it to -2147483648.  This is a large, negative
  6033. number that still is less than 2147483647.
  6034.  
  6035.    Another example of unexpected behavior of `DO' involves using a
  6036. nonintegral iteration variable ITER, such as a `REAL' or `DOUBLE
  6037. PRECISION' variable.  Consider the following program:
  6038.  
  6039.            DATA BEGIN, END, STEP /.1, .31, .007/
  6040.            DO 10 R = BEGIN, END, STEP
  6041.               IF (R .GT. END) PRINT *, R, ' .GT. ', END, '!!'
  6042.               PRINT *,R
  6043.      10    CONTINUE
  6044.            PRINT *,'LAST = ',R
  6045.            IF (R .LE. END) PRINT *, R, ' .LE. ', END, '!!'
  6046.            END
  6047.  
  6048. A C-like view of `DO' would hold that the two "exclamatory" `PRINT' are
  6049. never executed.  However, this is the output of running the above
  6050. program as compiled by `g77' on a Linux ix86 system:
  6051.  
  6052.       .100000001
  6053.       .107000001
  6054.       .114
  6055.       .120999999
  6056.       ...
  6057.       .289000005
  6058.       .296000004
  6059.       .303000003
  6060.      LAST =   .310000002
  6061.       .310000002 .LE.   .310000002!!
  6062.  
  6063.    Note that one of the two checks in the program turned up an apparent
  6064. violation of the programmer's expectation--yet, the loop is correctly
  6065. implemented by `g77', in that it has 30 iterations.  This trip count of
  6066. 30 is correct when evaluated using the floating-point representations
  6067. for the BEGIN, END, and INCR values (.1, .31, .007) on Linux ix86 are
  6068. used.  On other systems, an apparently more accurate trip count of 31
  6069. might result, but, nevertheless, `g77' is faithfully following the
  6070. Fortran standard, and the result is not what the author of the sample
  6071. program above apparently expected.  (Such other systems might, for
  6072. different values in the `DATA' statement, violate the other
  6073. programmer's expectation, for example.)
  6074.  
  6075.    Due to this combination of imprecise representation of
  6076. floating-point values and the often-misunderstood interpretation of
  6077. `DO' by standard-conforming compilers such as `g77', use of `DO' loops
  6078. with `REAL' or `DOUBLE PRECISION' iteration variables is not
  6079. recommended.  Such use can be caught by specifying `-Wsurprising'.
  6080. *Note Warning Options::, for more information on this option.
  6081.  
  6082. 
  6083. File: ^.!gcc.docs.fortran.g77,  Node: Advantages Over f2c,  Prev: Loops,  Up: Collected Fortran Wisdom
  6084.  
  6085. Advantages Over f2c
  6086. ===================
  6087.  
  6088.    Without `f2c', `g77' would have taken much longer to do and probably
  6089. not been as good for quite a while.  Sometimes people who notice how
  6090. much `g77' depends on, and documents encouragement to use, `f2c' ask
  6091. why `g77' was created if `f2c' already existed.
  6092.  
  6093.    This section gives some basic answers to these questions, though it
  6094. is not intended to be comprehensive.
  6095.  
  6096. * Menu:
  6097.  
  6098. * Language Extensions::  Features used by Fortran code.
  6099. * Compiler Options::     Features helpful during development.
  6100. * Compiler Speed::       Speed of the compilation process.
  6101. * Program Speed::        Speed of the generated, optimized code.
  6102. * Ease of Debugging::    Debugging ease-of-use at the source level.
  6103. * Character and Hollerith Constants::  A byte saved is a byte earned.
  6104.  
  6105. 
  6106. File: ^.!gcc.docs.fortran.g77,  Node: Language Extensions,  Next: Compiler Options,  Up: Advantages Over f2c
  6107.  
  6108. Language Extensions
  6109. -------------------
  6110.  
  6111.    `g77' offers several extensions to the Fortran language that `f2c'
  6112. doesn't.
  6113.  
  6114.    However, `f2c' offers a few that `g77' doesn't, like fairly complete
  6115. support for `INTEGER*2'.  It is expected that `g77' will offer some or
  6116. all of these missing features at some time in the future.  (Version
  6117. 0.5.18 of `g77' offers some rudimentary support for some of these
  6118. features.)
  6119.  
  6120. 
  6121. File: ^.!gcc.docs.fortran.g77,  Node: Compiler Options,  Next: Compiler Speed,  Prev: Language Extensions,  Up: Advantages Over f2c
  6122.  
  6123. Compiler Options
  6124. ----------------
  6125.  
  6126.    `g77' offers a whole bunch of compiler options that `f2c' doesn't.
  6127.  
  6128.    However, `f2c' offers a few that `g77' doesn't, like an option to
  6129. generate code to check array subscripts at run time.  It is expected
  6130. that `g77' will offer some or all of these missing options at some time
  6131. in the future.
  6132.  
  6133. 
  6134. File: ^.!gcc.docs.fortran.g77,  Node: Compiler Speed,  Next: Program Speed,  Prev: Compiler Options,  Up: Advantages Over f2c
  6135.  
  6136. Compiler Speed
  6137. --------------
  6138.  
  6139.    Saving the steps of writing and then rereading C code is a big reason
  6140. why `g77' should be able to compile code much faster than using `f2c'
  6141. in conjunction with the equivalent invocation of `gcc'.
  6142.  
  6143.    However, due to `g77''s youth, lots of self-checking is still being
  6144. performed.  As a result, this improvement is as yet unrealized (though
  6145. the potential seems to be there for quite a big speedup in the future).
  6146. It is possible that, as of version 0.5.18, `g77' is noticably faster
  6147. compiling many Fortran source files than using `f2c' in conjunction
  6148. with `gcc'.
  6149.  
  6150. 
  6151. File: ^.!gcc.docs.fortran.g77,  Node: Program Speed,  Next: Ease of Debugging,  Prev: Compiler Speed,  Up: Advantages Over f2c
  6152.  
  6153. Program Speed
  6154. -------------
  6155.  
  6156.    `g77' has the potential to better optimize code than `f2c', even
  6157. when `gcc' is used to compile the output of `f2c', because `f2c' must
  6158. necessarily translate Fortran into a somewhat lower-level language (C)
  6159. that cannot preserve all the information that is potentially useful for
  6160. optimization, while `g77' can gather, preserve, and transmit that
  6161. information directly to the GBE.
  6162.  
  6163.    For example, `g77' implements `ASSIGN' and assigned `GOTO' using
  6164. direct assignment of pointers to labels and direct jumps to labels,
  6165. whereas `f2c' maps the assigned labels to integer values and then uses
  6166. a C `switch' statement to encode the assigned `GOTO' statements.
  6167.  
  6168.    However, as is typical, theory and reality don't quite match, at
  6169. least not in all cases, so it is still the case that `f2c' plus `gcc'
  6170. can generate code that is faster than `g77'.
  6171.  
  6172.    It is hoped that version 0.5.18 of `g77' will offer default settings
  6173. and options that allow for better program speed, though it is not yet
  6174. known whether these same options, when applied to a `gcc' compilation
  6175. of `f2c' output, will improve the speed of programs compiled using that
  6176. method as well.
  6177.  
  6178. 
  6179. File: ^.!gcc.docs.fortran.g77,  Node: Ease of Debugging,  Next: Character and Hollerith Constants,  Prev: Program Speed,  Up: Advantages Over f2c
  6180.  
  6181. Ease of Debugging
  6182. -----------------
  6183.  
  6184.    Because `g77' compiles directly to assembler code like `gcc',
  6185. instead of translating to an intermediate language (C) as does `f2c',
  6186. support for debugging can be better for `g77' than `f2c'.
  6187.  
  6188.    However, although `g77' might be somewhat more "native" in terms of
  6189. debugging support than `f2c' plus `gcc', there still are a lot of
  6190. things "not quite right".  Many of the important ones should be
  6191. resolved in the near future.
  6192.  
  6193.    For example, `g77' doesn't have to worry about reserved names like
  6194. `f2c' does.  Given `FOR = WHILE', `f2c' must necessarily translate this
  6195. to something *other* than `for = while;', because C reserves those
  6196. words.
  6197.  
  6198.    However, `g77' does still uses things like an extra level of
  6199. indirection for `ENTRY'-laden procedures--in this case, because the
  6200. back end doesn't yet support multiple entry points.
  6201.  
  6202.    Another example is that, given
  6203.  
  6204.      COMMON A, B
  6205.      EQUIVALENCE (B, C)
  6206.  
  6207. the `g77' user should be able to access the variables directly, by name,
  6208. without having to traverse C-like structures and unions, while `f2c' is
  6209. unlikely to ever offer this ability (due to limitations in the C
  6210. language).
  6211.  
  6212.    However, due to apparent bugs in the back end, `g77' currently
  6213. doesn't take advantage of this facility at all--it doesn't emit any
  6214. debugging information for `COMMON' and `EQUIVALENCE' areas, other than
  6215. information on the array of `char' it creates (and, in the case of
  6216. local `EQUIVALENCE', names) for each such area.
  6217.  
  6218.    Yet another example is arrays.  `g77' represents them to the debugger
  6219. using the same "dimensionality" as in the source code, while `f2c' must
  6220. necessarily convert them all to one-dimensional arrays to fit into the
  6221. confines of the C language.  However, the level of support offered by
  6222. debuggers for interactive Fortran-style access to arrays as compiled by
  6223. `g77' can vary widely.  In some cases, it can actually be an advantage
  6224. that `f2c' converts everything to widely supported C semantics.
  6225.  
  6226.    In fairness, `g77' could do many of the things `f2c' does to get
  6227. things working at least as well as `f2c'--for now, the maintainers have
  6228. tended to prefer making `g77' work the way they think it is supposed
  6229. to, and find help improving the other products (the GBE of `gcc';
  6230. `gdb'; and so on) to get things working properly.
  6231.  
  6232. 
  6233. File: ^.!gcc.docs.fortran.g77,  Node: Character and Hollerith Constants,  Prev: Ease of Debugging,  Up: Advantages Over f2c
  6234.  
  6235. Character and Hollerith Constants
  6236. ---------------------------------
  6237.  
  6238.    To avoid the extensive hassle that would be needed to avoid this,
  6239. `f2c' uses C character constants to encode character and Hollerith
  6240. constants.  That means a constant like `'HELLO'' is translated to
  6241. `"hello"' in C, which further means that an extra null byte is present
  6242. at the end of the constant.  This null byte is superfluous.
  6243.  
  6244.    `g77' does not generate such null bytes.  This represents significant
  6245. savings of resources, such as on systems where `/dev/null' or
  6246. `/dev/zero' represent bottlenecks in the systems' performance, because
  6247. `g77' simply asks for fewer zeros from the operating system than `f2c'.
  6248.  
  6249. 
  6250. File: ^.!gcc.docs.fortran.g77,  Node: Trouble,  Next: Open Questions,  Prev: Collected Fortran Wisdom,  Up: Top
  6251.  
  6252. Known Causes of Trouble with GNU Fortran
  6253. ****************************************
  6254.  
  6255.    This section describes known problems that affect users of GNU
  6256. Fortran.  Most of these are not GNU Fortran bugs per se--if they were,
  6257. we would fix them.  But the result for a user may be like the result of
  6258. a bug.
  6259.  
  6260.    Some of these problems are due to bugs in other software, some are
  6261. missing features that are too much work to add, and some are places
  6262. where people's opinions differ as to what is best.
  6263.  
  6264.    Information on bugs that show up when configuring, porting, building,
  6265. or installing `g77' is not provided here.  *Note Problems Installing::.
  6266.  
  6267.    (Note that some of this portion of the manual is lifted directly
  6268. from the `gcc' manual, with minor modifications to tailor it to users
  6269. of `g77'.  Anytime a bug seems to have more to do with the `gcc'
  6270. portion of `g77', *Note Known Causes of Trouble with GNU CC:
  6271. (gcc)Trouble.)
  6272.  
  6273. * Menu:
  6274.  
  6275. * But-bugs::         Bugs really in other programs.
  6276. * Actual Bugs::      Bugs and misfeatures we will fix later.
  6277. * Missing Features:: Features we already know we want to add later.
  6278. * Disappointments::  Regrettable things we can't change.
  6279. * Non-bugs::         Things we think are right, but some others disagree.
  6280. * Warnings and Errors::  Which problems in your code get warnings,
  6281.                          and which get errors.
  6282.  
  6283. 
  6284. File: ^.!gcc.docs.fortran.g77,  Node: But-bugs,  Next: Actual Bugs,  Up: Trouble
  6285.  
  6286. Bugs Not In GNU Fortran
  6287. =======================
  6288.  
  6289.    These are bugs to which the maintainers often have to reply, "but
  6290. that isn't a bug in `g77'...".  Some of these already are fixed in new
  6291. versions of other software; some still need to be fixed; some are
  6292. problems with how `g77' is installed or is being used; some just cannot
  6293. be addressed at this time until more is known about the problem.
  6294.  
  6295.    Please don't re-report these bugs to the `g77' maintainers--if you
  6296. must remind someone how important it is to you that the problem be
  6297. fixed, talk to the people responsible for the other products identified
  6298. below, but preferably only after you've tried the latest versions of
  6299. those products.  The `g77' maintainers have their hands full working on
  6300. just fixing and improving `g77', without serving as a clearinghouse for
  6301. all bugs that happen to affect `g77' users.
  6302.  
  6303.    *Note Collected Fortran Wisdom::, for information on behavior of
  6304. Fortran programs, and the programs that compile them, that might be
  6305. *thought* to indicate bugs.
  6306.  
  6307.    * On some older Linux systems, programs with common blocks larger
  6308.      than 16MB cannot be linked without some kind of error message
  6309.      being produced.
  6310.  
  6311.      This is a bug in older versions of `ld', fixed in more recent
  6312.      versions of `binutils', such as version 2.6.
  6313.  
  6314.    * There are some known problems when using `gdb' on code compiled by
  6315.      `g77'.  Inadequate investigation as of the release of 0.5.16
  6316.      results in not knowing which products are the culprit, but
  6317.      `gdb-4.14' definitely crashes when, for example, an attempt is
  6318.      made to print the contents of a `COMPLEX*16' dummy array, on at
  6319.      least some Linux machines, plus some others.
  6320.  
  6321.    * On some systems, perhaps just those with out-of-date (shared?)
  6322.      libraries, unresolved-reference errors happen when linking
  6323.      `g77'-compiled programs (which should be done using `g77').
  6324.  
  6325.      If this happens to you, try appending `-lc' to the command you use
  6326.      to link the program, e.g. `g77 foo.f -lc'.  `g77' already
  6327.      specifies `-lf2c -lm' when it calls the linker, but it cannot also
  6328.      specify `-lc' because not all systems have a file named `libc.a'.
  6329.  
  6330.      It is unclear at this point whether there are legitimately
  6331.      installed systems where `-lf2c -lm' is insufficient to resolve
  6332.      code produced by `g77'.
  6333.  
  6334.    * If your program doesn't link, due to unresolved references to names
  6335.      like `_main', make sure you're using the `g77' command to do the
  6336.      link, since this command ensures that the necessary libraries are
  6337.      loaded by specifying `-lf2c -lm' when it invokes the `gcc' command
  6338.      to do the actual link.  (Use the `-v' option to discover more
  6339.      about what actually happens when you use the `g77' and `gcc'
  6340.      commands.)
  6341.  
  6342.      Also, try specifying `-lc' as the last item on the `g77' command
  6343.      line, because some systems need it and `g77' doesn't do it
  6344.      automatically.
  6345.  
  6346.    * Developers of Fortran code on NeXTStep (all architectures) have to
  6347.      watch out for the following problem when writing programs with
  6348.      large, statically allocated (i.e. non-stack based) data structures
  6349.      (common blocks, saved arrays).
  6350.  
  6351.      Due to the way the native loader (`/bin/ld') lays out data
  6352.      structures in virtual memory, it is very easy to create an
  6353.      executable wherein the `__DATA' segment overlaps (has addresses in
  6354.      common) with the `UNIX STACK' segment.
  6355.  
  6356.      This leads to all sorts of trouble, from the executable simply not
  6357.      executing, to bus errors.  The NeXTStep command line tool
  6358.      `ebadexec' points to the problem as follows:
  6359.  
  6360.           % `/bin/ebadexec a.out'
  6361.           /bin/ebadexec: __LINKEDIT segment (truncated address = 0x3de000
  6362.           rounded size = 0x2a000) of executable file: a.out overlaps with UNIX
  6363.           STACK segment (truncated address = 0x400000 rounded size =
  6364.           0x3c00000) of executable file: a.out
  6365.  
  6366.      (In the above case, it is the `__LINKEDIT' segment that overlaps
  6367.      the stack segment.)
  6368.  
  6369.      This can be cured by assigning the `__DATA' segment (virtual)
  6370.      addresses beyond the stack segment.  A conservative estimate for
  6371.      this is from address 6000000 (hexadecimal) onwards--this has
  6372.      always worked for me [Toon Moene]:
  6373.  
  6374.           % `g77 -segaddr __DATA 6000000 test.f'
  6375.           % `ebadexec a.out'
  6376.           ebadexec: file: a.out appears to be executable
  6377.           %
  6378.  
  6379.      Browsing through `gcc/f/Makefile.in', you will find that the
  6380.      `f771' program itself also has to be linked with these flags--it
  6381.      has large statically allocated data structures.  (Version 0.5.18
  6382.      reduces this somewhat, but probably not enough.)
  6383.  
  6384.      (The above item was contributed by Toon Moene
  6385.      (`toon@moene.indiv.nluug.nl').)
  6386.  
  6387.    * `g77' rejects some particularly nonportable, silent data-type
  6388.      conversions such as `LOGICAL' to `REAL' (as in `A=.FALSE.', where
  6389.      `A' is type `REAL'), that other compilers might quietly accept.
  6390.  
  6391.      Some of these conversions are accepted by `g77' when the `-fugly'
  6392.      option is specified.
  6393.  
  6394. 
  6395. File: ^.!gcc.docs.fortran.g77,  Node: GPC Bugs
  6396.  
  6397. Known bugs and how to report bugs
  6398. *********************************
  6399.  
  6400.    If you encounter a bug with GPC, please check whether it is one of
  6401. the known bugs.  If not, report it to the GNU Pascal mailing list
  6402. `gpc@hut.fi'.  (But always report it if you solve the problem! ;-)
  6403.  
  6404. Known bugs
  6405. ==========
  6406.  
  6407.    The GPC compiler does not yet implement the whole ISO 7185 Pascal
  6408. standard, so please take this into account when you consider using this
  6409. for any purpose.
  6410.  
  6411.    See the file `version.c' to find out the version number of this GPC
  6412. (or run `gpc -v')
  6413.  
  6414.    Problems in this GPC version:
  6415.  
  6416.    * High optimization levels do not work properly on the Alpha.  Some
  6417.      conformance tests FAIL when compiled with -O6 flag, which means
  6418.      that the compiler generates invalid code. Don't use this flag in
  6419.      the alpha before the problem gets fixed.  It might have something
  6420.      to do with automatic inlining, but I have not yet looked at this.
  6421.      -O flag should be ok.  (Also take care when using explicit inline
  6422.      functions)
  6423.  
  6424.    * For some reason the pascal main program does not get lineno stabs
  6425.      -> It is hard to debug it with gdb...
  6426.  
  6427.    * The modules export everything, not just the stuff in the export
  6428.      interfaces. However, the unexported variables and functions are
  6429.      invisible to modules in other files.
  6430.  
  6431.    * type checking is mostly what C does, not what Pascal requires, so
  6432.      GPC does not yet implement a strongly typed language.  Although
  6433.      correct programs compile, incorrect ones compile also.
  6434.  
  6435.    * run time errors are not checked.
  6436.  
  6437.    * the inline set operations have some problems with operations on
  6438.      two sets if the sets do not contain equally many segments.
  6439.  
  6440.    * In addition, the set code generated in the alpha causes runtime
  6441.      runtime errors in the generated code.
  6442.  
  6443.    * Conformant arrays don't yet work (in general).  Until they do,
  6444.      this is a LEVEL-0 compiler.
  6445.  
  6446. Inconveniences
  6447. ==============
  6448.  
  6449.    * NEW & DISPOSE optional tag field arguments are ignored (warning
  6450.      given, code works)
  6451.  
  6452.    * GDB does not yet understand pascal sets, files or subranges.  Now
  6453.      GDB allows you to debug these things, even though it does not yet
  6454.      understand some stabs.
  6455.  
  6456.    * PACKED does not pack. (implementation dependent, warning given,
  6457.      code works)
  6458.  
  6459.    * Files of integer subranges that would fit in a byte do not;
  6460.      instead they are handled as files of integer.  This is especially
  6461.      annoying with "file of 0..255".
  6462.  
  6463. Notes for debugging
  6464. ===================
  6465.  
  6466.    * Forward referencing pointers generate DBX style debugging symbols
  6467.      by outputting the `.stabs' as an unknown pointer and later it just
  6468.      outputs the same `.stabs' again, but this time it also tells what
  6469.      type the pointer points to.  This seems to work for gdb. As of
  6470.      this writing I have not checked what happens with SDB type
  6471.      debugging info.  It might be that the pointer is left to be a
  6472.      `(void *)' pointer, so you have to cast it in order to output the
  6473.      object the pointer points to.
  6474.  
  6475.      Also, I have not tried any other debugger than gdb.  If you do,
  6476.      please let me know what happens.
  6477.  
  6478.      I think that GDB does not yet support the kind of `.stabs' that
  6479.      should be used to do this correctly:
  6480.  
  6481.             .stabs ":tANUMBER=BNUMBER", WHATEVER
  6482.  
  6483.      where ANUMBER is the unknown pointer type referenced earlier, and
  6484.      the BNUMBER is the type which ANUMBER actually is. This construct
  6485.      is not required in C.
  6486.  
  6487.    * When debugging, please note that the Initial Letter In Each
  6488.      Identifier Is In Upper Case And The Rest Are In Lower Case. If
  6489.      you wish to call C-routines declare them with the "C" directive,
  6490.      as follows:
  6491.  
  6492.           Procedure FooBAR(i:integer);c;
  6493.  
  6494.      This makes the external name to be `_foobar' (replace `_' with you
  6495.      machine prefix.)
  6496.  
  6497.           Procedure FooBAR(i:Integer); External;
  6498.  
  6499.      Uses external name `_Foobar'.
  6500.  
  6501.      It is done like this to reduce name clashes with `libc.a' and
  6502.      other possible libraries.
  6503.  
  6504.    * All visible GPC runtime system library routines are named `_p_...'.
  6505.  
  6506.    * However, the main program name is not capitalized.  (this is a
  6507.      kludge -> it may now clash with libc  identifiers. We'll change
  6508.      this somehow later)
  6509.  
  6510. 
  6511. File: ^.!gcc.docs.fortran.g77,  Node: Missing Features,  Next: Disappointments,  Prev: Actual Bugs,  Up: Trouble
  6512.  
  6513. Missing Features
  6514. ================
  6515.  
  6516.    This section lists features we know are missing from `g77', and
  6517. which we want to add someday.  (There is no priority implied in the
  6518. ordering below.)
  6519.  
  6520.    * `g77' does not support many of the features that distinguish
  6521.      Fortran 90 (and, now, Fortran 95) from ANSI FORTRAN 77.
  6522.  
  6523.      Some Fortran 90 features are listed here, because they make sense
  6524.      to offer even to die-hard users of F77.  For example, many of them
  6525.      codify various ways F77 has been extended to meet users' needs
  6526.      during its tenure, so `g77' might as well offer them as the primary
  6527.      way to meet those same needs, even if it offers compatibility with
  6528.      one or more of the ways those needs were met by other F77
  6529.      compilers in the industry.
  6530.  
  6531.      Still, many important F90 features are not listed here, because no
  6532.      attempt has been made to research each and every feature and
  6533.      assess its viability in `g77'.  In the meantime, users who need
  6534.      those features must use Fortran 90 compilers anyway, and the best
  6535.      approach to adding some F90 features to GNU Fortran might well be
  6536.      to fund a comprehensive project to create GNU Fortran 95.
  6537.  
  6538.    * `g77' does not allow `REAL' and other non-integral types for
  6539.      arguments to intrinsics like `AND', `OR', and `SHIFT'.
  6540.  
  6541.    * `g77' doesn't support `INTEGER*2', `LOGICAL*1', and similar.
  6542.      Version 0.6 will provide full support for this extremely important
  6543.      set of features.  In the meantime, version 0.5.18 provides
  6544.      rudimentary support for them.
  6545.  
  6546.    * `g77' rejects things other compilers accept, like `INTRINSIC
  6547.      SIN,SIN'.  As time permits in the future, some of these things
  6548.      that are easy for humans to read and write and unlikely to be
  6549.      intended to mean something else will be accepted by `g77' (though
  6550.      `-fpedantic' should trigger warnings about such non-standard
  6551.      constructs).
  6552.  
  6553.      In the meantime, you might as well fix your code to be more
  6554.      standard-conforming and portable.
  6555.  
  6556.      The kind of case that is important to except from the
  6557.      recommendation to change your code is one where following good
  6558.      coding rules would force you to write non-standard code that
  6559.      nevertheless has a clear meaning.
  6560.  
  6561.      For example, when writing an `INCLUDE' file that defines a common
  6562.      block, it might be appropriate to include a `SAVE' statement for
  6563.      the common block (such as `SAVE /CBLOCK/'), so that variables
  6564.      defined in the common block retain their values even when all
  6565.      procedures declaring the common block become inactive (return to
  6566.      their callers).
  6567.  
  6568.      However, putting `SAVE' statements in an `INCLUDE' file would
  6569.      prevent otherwise standard-conforming code from also specifying
  6570.      the `SAVE' statement, by itself, to indicate that all local
  6571.      variables and arrays are to have the `SAVE' attribute.
  6572.  
  6573.      For this reason, `g77' already has been changed to allow this
  6574.      combination, because although the general problem of gratuitously
  6575.      rejecting unambiguous and "safe" constructs still exists in `g77',
  6576.      this particular construct was deemed useful enough that it was
  6577.      worth fixing `g77' for just this case.
  6578.  
  6579.      So, while there is no need to change your code to avoid using this
  6580.      particular construct, there might be other, equally appropriate
  6581.      but non-standard constructs, that you shouldn't have to stop using
  6582.      just because `g77' (or any other compiler) gratuitously rejects it.
  6583.  
  6584.      Until the general problem is solved, if you have any such
  6585.      construct you believe is worthwhile using (e.g. not just an
  6586.      arbitrary, redundant specification of an attribute), please submit
  6587.      a bug report with an explanation, so we can consider fixing `g77'
  6588.      just for cases like yours.
  6589.  
  6590.    * `g77' doesn't accept `PARAMETER I=1'.  Supporting this obsolete
  6591.      form of the `PARAMETER' statement would not be particularly hard,
  6592.      as most of the parsing code is already in place and working.
  6593.  
  6594.      Until time/money is spent implementing it, you might as well fix
  6595.      your code to use the standard form, `PARAMETER (I=1)' (possibly
  6596.      needing `INTEGER I' preceding the `PARAMETER' statement as well,
  6597.      otherwise, in the obsolete form of `PARAMETER', the type of the
  6598.      variable is set from the type of the constant being assigned to
  6599.      it).
  6600.  
  6601.    * `g77' doesn't support pointers or allocatable objects.  This set
  6602.      of features is probably considered just behind `INTEGER*2' and
  6603.      intrinsics in `PARAMETER' statements on the list of large,
  6604.      important things to add to `g77'.
  6605.  
  6606.    * `g77' doesn't support the I/O statements `TYPE' and `ACCEPT'.
  6607.      These are common extensions that should be easy to support, but
  6608.      also are fairly easy to work around in user code.
  6609.  
  6610.    * `g77' doesn't support `STRUCTURE', `UNION', `RECORD', `MAP'.  This
  6611.      set of extensions is quite a bit lower on the list of large,
  6612.      important things to add to `g77', partly because it requires a
  6613.      great deal of work either upgrading or replacing `libf2c'.
  6614.  
  6615.    * There is no support for keywords such as `DISP='DELETE'' in the
  6616.      `OPEN', `CLOSE', and `INQUIRE' statements.  These extensions are
  6617.      easy to add to `g77' itself, but require much more work on
  6618.      `libf2c'.
  6619.  
  6620.    * `g77' doesn't allow intrinsics in `PARAMETER' statements.  This
  6621.      feature is considered to be absolutely vital, even though it is
  6622.      not standard-conforming, and is scheduled for version 0.6.
  6623.  
  6624.      Related to this, `g77' doesn't allow non-integral exponentiation
  6625.      in `PARAMETER' statements, such as `PARAMETER (R=2**.25)'.  It is
  6626.      unlikely `g77' will ever support this feature, as doing it
  6627.      properly requires complete emulation of a target computer's
  6628.      floating-point facilities when building `g77' as a cross-compiler.
  6629.      But, if the `gcc' back end is enhanced to provide such a facility,
  6630.      `g77' will likely use that facility in implementing this feature
  6631.      soon afterwards.
  6632.  
  6633.    * `g77' doesn't support `FORMAT(I<J>)' and the like.  Supporting
  6634.      this requires a significant redesign or replacement of `libf2c'.
  6635.  
  6636.    * Need option to suppress information messages (notes).  `-w' does
  6637.      this but also suppresses warnings.  The default should be to
  6638.      suppress info messages.
  6639.  
  6640.    * Provide some way, a la `gcc', for `g77' code to specify assembler
  6641.      code.
  6642.  
  6643.    * Support `INTEGER', `REAL', and `COMPLEX' equivalents for all
  6644.      applicable back-end-supported types (`char', `short int', `int',
  6645.      `long int', `long long int', and `long double').  This means
  6646.      providing intrinsic support, and maybe constant support (using F90
  6647.      syntax) as well, and, for most machines will result in automatic
  6648.      support of `INTEGER*1', `INTEGER*2', `INTEGER*8', and so on.  This
  6649.      is scheduled for version 0.6.
  6650.  
  6651.    * Provide as the default source-line model a "pure visual" mode,
  6652.      where the interpretation of a source program in this mode can be
  6653.      accurately determined by a user looking at a traditionally
  6654.      displayed rendition of the program (assuming the user knows
  6655.      whether the program is fixed or free form).
  6656.  
  6657.      That is, assume the user cannot tell tabs from spaces and cannot
  6658.      see trailing spaces on lines, but has canonical tab stops and, for
  6659.      fixed-form source, has the ability to always know exactly where
  6660.      column 72 is.
  6661.  
  6662.      This would change the default treatment of fixed-form source to
  6663.      not treat lines with tabs as if they were infinitely long--instead,
  6664.      they would end at column 72 just as if the tabs were replaced by
  6665.      spaces in the canonical way.
  6666.  
  6667.      As part of this, provide common alternate models (Digital, `f2c',
  6668.      and so on) via command-line options.  This includes allowing
  6669.      arbitrarily long lines for free-form source as well as fixed-form
  6670.      source and providing various limits and diagnostics as appropriate.
  6671.  
  6672.    * Support more general expressions to dimension arrays, such as
  6673.      array element references, function references, etc.
  6674.  
  6675.    * A `FLUSH' statement that does what many systems provide via `CALL
  6676.      FLUSH', but that supports `*' as the unit designator (same unit as
  6677.      for `PRINT').
  6678.  
  6679.    * Finish support for old-style `PARAMETER' statement (like F77
  6680.      `PARAMETER', but type of destination is set from type of source
  6681.      expression).
  6682.  
  6683.    * Character-type selector/cases for `SELECT CASE'.
  6684.  
  6685.    * Option to initialize everything not explicitly initialized to
  6686.      "weird" (machine-dependent) values, e.g. NANs, bad (non-`NULL')
  6687.      pointers, and largest-magnitude integers.
  6688.  
  6689.    * Add run-time bounds-checking of array/subscript references a la
  6690.      `f2c'.
  6691.  
  6692.    * Output labels for use by debuggers that know how to support them.
  6693.      Same with weirder things like construct names.  It is not yet
  6694.      known if any debug formats or debuggers support these.
  6695.  
  6696.    * Support the POSIX standard for Fortran.
  6697.  
  6698.    * Support Digital-style lossage of virtual blanks at end of source
  6699.      line if some command-line option specified.
  6700.  
  6701.      This affects cases where a character constant is continued onto
  6702.      the next line in a fixed-form source file, as in the following
  6703.      example:
  6704.  
  6705.           10    PRINT *,'HOW MANY
  6706.                1 SPACES?'
  6707.  
  6708.      `g77', and many other compilers, virtually extend the continued
  6709.      line through column 72 with blanks that become part of the
  6710.      character constant, but Digital Fortran normally didn't, leaving
  6711.      only one space between `MANY' and `SPACES?' in the output of the
  6712.      above statement.
  6713.  
  6714.      Fairly recently, at least one version of Digital Fortran was
  6715.      enhanced to provide the other behavior when a command-line option
  6716.      is specified, apparently due to demand from readers of the USENET
  6717.      group `comp.lang.fortran' to offer conformance to this widespread
  6718.      practice in the industry.  `g77' should return the favor by
  6719.      offering conformance to Digital's approach to handling the above
  6720.      example.
  6721.  
  6722.    * Consider a preprocessor designed specifically for Fortran to
  6723.      replace `cpp -traditional'.  There are several out there worth
  6724.      evaluating, at least.
  6725.  
  6726.    * Have `-Wunused' warn about unused labels.
  6727.  
  6728.    * Warn about assigned `GOTO'/`FORMAT' usage without any `ASSIGN' to
  6729.      variable.  (Actually, use of `-O -Wuninitialized' should take care
  6730.      of most of these.)
  6731.  
  6732.    * Add `-Wintrinsics' to warn about use of non-standard intrinsics
  6733.      without explicit `INTRINSIC' statements for them (to help find
  6734.      code that might fail silently when ported to another compiler).
  6735.  
  6736.    * Support `-fpedantic' more thoroughly, and use it only to generate
  6737.      warnings instead of rejecting constructs outright.  Have it warn:
  6738.      if a variable that dimensions an array is not a dummy or placed
  6739.      explicitly in `COMMON' (F77 does not allow it to be placed in
  6740.      `COMMON' via `EQUIVALENCE'); if specification statements follow
  6741.      statement-function-definition statements; about all sorts of
  6742.      syntactic extensions.
  6743.  
  6744.    * Warn about modifying `DO' variables via `EQUIVALENCE'.  (This test
  6745.      might be useful in setting the internal "doiter" flag for a
  6746.      variable or even array reference within a loop, since that might
  6747.      produce faster code someday.)
  6748.  
  6749.    * Add `-Wpromotions' to warn if source code appears to expect
  6750.      automatic, silent, and somewhat dangerous compiler-assisted
  6751.      conversion of `REAL' constants to `DOUBLE PRECISION' based on
  6752.      context.
  6753.  
  6754.      For example, warn about cases like this:
  6755.  
  6756.           DOUBLE PRECISION FOO
  6757.           PARAMETER (PI = 3.14159)
  6758.           FOO = PI * 3D0
  6759.  
  6760.    * Generally continue processing for warnings and recoverable (user)
  6761.      errors whenever possible--don't gratuitously make bad code.
  6762.  
  6763.      For example:
  6764.  
  6765.           INTRINSIC ZABS
  6766.           CALL FOO(ZABS)
  6767.           END
  6768.  
  6769.      When compiling the above with `-ff2c-intrinsics-disable', `g77'
  6770.      should indeed complain about passing `ZABS', but it still should
  6771.      compile, instead of rejecting the entire `CALL' statement.  (Some
  6772.      of this is related to improving the compiler internals to improve
  6773.      how statements are analyzed.)
  6774.  
  6775.    * If `-fno-ugly', reject badly designed trailing-radix quoted
  6776.      (typeless) numbers, such as `'123'O'.
  6777.  
  6778.    * Add `-Wugly*', `-Wautomatic', `-Wvxt-not-f90', `-Wf90', and so on.
  6779.      These would warn about places in the user's source where
  6780.      ambiguities are found.
  6781.  
  6782.      One especially interesting case that `-Wf90' would catch is use of
  6783.      `REAL(Z)', where `Z' is `DOUBLE COMPLEX'.  Apparently, traditional
  6784.      extended F77 compilers treat this as what all compilers should
  6785.      agree is `REAL(REAL(Z))', while F90 compilers are required to
  6786.      treat `REAL(Z)' as the same as `DBLE(Z)', returning a `DOUBLE
  6787.      PRECISION' result rather than a `REAL' result.
  6788.  
  6789.    * `-Wconversion' and related should flag places where non-standard
  6790.      conversions are found.  Perhaps much of this would be part of
  6791.      `-Wugly*'.
  6792.  
  6793.    * Complain when list of dummies containing an adjustable dummy array
  6794.      does not also contain every variable listed in the dimension list
  6795.      of the adjustable array.
  6796.  
  6797.      Currently, `g77' does complain about a variable that dimensions an
  6798.      array but doesn't appear in any dummy list or `COMMON' area, but
  6799.      this needs to be extended to catch cases where it doesn't appear in
  6800.      every dummy list that also lists any arrays it dimensions.
  6801.  
  6802.    * Make sure things like `RETURN 2HAB' are invalid in both source
  6803.      forms (must be `RETURN (2HAB)', which probably still makes no
  6804.      sense but at least can be reliably parsed).  Fixed form rejects
  6805.      it, but not free form, except in a way that is a bit difficult to
  6806.      understand.
  6807.  
  6808.    * The sort of routines usually found in the BSD-ish `libU77' should
  6809.      be provided in addition to the few utility routines in `libf2c'.
  6810.      Much of this work has already been done, and is awaiting
  6811.      integration into `g77'.
  6812.  
  6813. 
  6814. File: ^.!gcc.docs.fortran.g77,  Node: Disappointments,  Next: Non-bugs,  Prev: Missing Features,  Up: Trouble
  6815.  
  6816. Disappointments and Misunderstandings
  6817. =====================================
  6818.  
  6819.    These problems are perhaps regrettable, but we don't know any
  6820. practical way around them for now.
  6821.  
  6822.    * `g77' disallows `IMPLICIT CHARACTER*(*)'.  This is not
  6823.      standard-conforming, and there are some very good reasons for that.
  6824.      When I next remember any, I'll try to write them down.
  6825.  
  6826.    * `g77' doesn't allow a common block and an external procedure or
  6827.      `BLOCK DATA' to have the same name.  Some systems allow this, but
  6828.      `g77' does not, to be compatible with `f2c'.
  6829.  
  6830.      `g77' could special-case the way it handles `BLOCK DATA', since it
  6831.      is not compatible with `f2c' in this particular area (necessarily,
  6832.      since `g77' offers an important feature here), but it is likely
  6833.      that such special-casing would be very annoying to people with
  6834.      programs that use `EXTERNAL FOO', with no other mention of `FOO'
  6835.      in the same program unit, to refer to external procedures, since
  6836.      the result would be that `g77' would treat these references as
  6837.      requests to force-load BLOCK DATA program units.
  6838.  
  6839.      In that case, if `g77' modified names of `BLOCK DATA' so they
  6840.      could have the same names as `COMMON', users would find that their
  6841.      programs wouldn't link because the `FOO' procedure didn't have its
  6842.      name translated the same way.
  6843.  
  6844.      (Strictly speaking, `g77' could emit a
  6845.      null-but-externally-satisfying definition of `FOO' with its name
  6846.      transformed as if it had been a `BLOCK DATA', but that probably
  6847.      invites more trouble than it's worth.)
  6848.  
  6849.    * The current external-interface design, which includes naming of
  6850.      external procedures, COMMON blocks, and the library interface, has
  6851.      various usability problems, including things like adding
  6852.      underscores where not really necessary (and preventing easier
  6853.      inter-language operability) and yet not providing complete
  6854.      namespace freedom for user C code linked with Fortran apps (due to
  6855.      the naming of functions in the library, among other things).
  6856.  
  6857.      Project GNU should at least get all this "right" for systems it
  6858.      fully controls, such as the Hurd, and provide defaults and options
  6859.      for compatibility with existing systems and interoperability with
  6860.      popular existing compilers.
  6861.  
  6862. 
  6863. File: ^.!gcc.docs.fortran.g77,  Node: Non-bugs,  Next: Warnings and Errors,  Prev: Disappointments,  Up: Trouble
  6864.  
  6865. Certain Changes We Don't Want to Make
  6866. =====================================
  6867.  
  6868.    This section lists changes that people frequently request, but which
  6869. we do not make because we think GNU Fortran is better without them.
  6870.  
  6871.    * `-fno-backslash' should be the default, not `-fbackslash'.
  6872.  
  6873.      First of all, you  can always specify `-fno-backslash' to turn off
  6874.      this processing.
  6875.  
  6876.      Despite not being within the spirit (though apparently within the
  6877.      letter) of the ANSI FORTRAN 77 standard, `g77' defaults to
  6878.      `-fbackslash' because that is what most UNIX `f77' commands
  6879.      default to, and apparently lots of code depends on this feature.
  6880.  
  6881.      This is a particularly troubling issue.  The use of a C construct
  6882.      in the midst of Fortran code is bad enough, worse when it makes
  6883.      existing Fortran programs stop working (as happens when programs
  6884.      written for non-UNIX systems are ported to UNIX systems with
  6885.      compilers that provide the `-fbackslash' feature as the
  6886.      default--sometimes with no option to turn it off).
  6887.  
  6888.      The author of GNU Fortran wished, for reasons of linguistic
  6889.      purity, to make `-fno-backslash' the default for GNU Fortran and
  6890.      thus require users of UNIX `f77' and `f2c' to specify
  6891.      `-fbackslash' to get the UNIX behavior.
  6892.  
  6893.      However, the realization that `g77' is intended as a replacement
  6894.      for *UNIX* `f77', caused the author to choose to make `g77' as
  6895.      compatible with `f77' as feasible, which meant making `-fbackslash'
  6896.      the default.
  6897.  
  6898.      The primary focus on compatibility is at the source-code level,
  6899.      and the question became "What will users expect a replacement for
  6900.      `f77' to do, by default?" Although at least one UNIX `f77' does
  6901.      not provide `-fbackslash' as a default, it appears that, by far,
  6902.      the majority of them do, which suggests that, by far, the majority
  6903.      of code that is compiled by UNIX `f77' compilers expects
  6904.      `-fbackslash' to be the default.
  6905.  
  6906.      It is probably the case that more code exists that would *not*
  6907.      work with `-fbackslash' in force than code that requires it be in
  6908.      force.
  6909.  
  6910.      However, most of *that* code is not being compiled with `f77', and
  6911.      when it is, new build procedures (shell scripts, makefiles, and so
  6912.      on) must be set up anyway so that they work under UNIX.  That
  6913.      makes a much more natural and safe opportunity for non-UNIX users
  6914.      to adapt their build procedures for `g77''s default of
  6915.      `-fbackslash' than would exist for the majority of UNIX `f77'
  6916.      users who would have to modify existing, working build procedures
  6917.      to explicitly specify `-fbackslash' if that was not the default.
  6918.  
  6919.      One suggestion has been to configure the default for `-fbackslash'
  6920.      (and perhaps other options as well) based on the configuration of
  6921.      `g77'.
  6922.  
  6923.      This is technically quite straightforward, but will be avoided
  6924.      even in cases where not configuring defaults to be dependent on a
  6925.      particular configuration greatly inconveniences some users of
  6926.      legacy code.
  6927.  
  6928.      Many users appreciate the GNU compilers because they provide an
  6929.      environment that is uniform across machines.  These users would be
  6930.      inconvenienced if the compiler treated things like the format of
  6931.      the source code differently on certain machines.
  6932.  
  6933.      Occasionally users write programs intended only for a particular
  6934.      machine type.  On these occasions, the users would benefit if the
  6935.      GNU Fortran compiler were to support by default the same dialect
  6936.      as the other compilers on that machine.  But such applications are
  6937.      rare.  And users writing a program to run on more than one type of
  6938.      machine cannot possibly benefit from this kind of compatibility.
  6939.      (This is consistent with the design goals for `gcc'.  To change
  6940.      them for `g77', you must first change them for `gcc'.  Do not ask
  6941.      the maintainers of `g77' to do this for you, or to disassociate
  6942.      `g77' from the widely understood, if not widely agreed-upon, goals
  6943.      for GNU compilers in general.)
  6944.  
  6945.      This is why GNU Fortran does and will treat backslashes in the same
  6946.      fashion on all types of machines (by default).
  6947.  
  6948.      Of course, users strongly concerned about portability should
  6949.      indicate explicitly in their build procedures which options are
  6950.      expected by their source code, or write source code that has as
  6951.      few such expectations as possible.
  6952.  
  6953.      For example, avoid writing code that depends on backslash (`\')
  6954.      being interpreted either way in particular, such as by starting a
  6955.      program unit with:
  6956.  
  6957.           CHARACTER BACKSL
  6958.           PARAMETER (BACKSL = '\\')
  6959.  
  6960.      Then, use concatenation of `BACKSL' anyplace a backslash is
  6961.      desired.  (However, this technique does not work for Hollerith
  6962.      constants--which is good, since the only generally portable uses
  6963.      for Hollerith constants are in places where character constants
  6964.      can and should be used instead, for readability.)
  6965.  
  6966.      In this way, users can write programs which have the same meaning
  6967.      in many Fortran dialects.
  6968.  
  6969.    * `g77' does not use context to determine the types of constants or
  6970.      named constants (`PARAMETER').
  6971.  
  6972.      For example, consider the following statement:
  6973.  
  6974.           PRINT *, 3.1415926535 * 2D0
  6975.  
  6976.      `g77' will interpret the (truncated) constant `3.1415926535' as a
  6977.      `REAL', not `DOUBLE PRECISION', constant, because the suffix `D0'
  6978.      is not specified.
  6979.  
  6980.      As a result, the output of the above statement when compiled by
  6981.      `g77' will appear to have "less precision" than when compiled by
  6982.      other compilers.
  6983.  
  6984.      In these and other cases, some compilers detect the fact that a
  6985.      single-precision constant is used in a double-precision context
  6986.      and therefore interpret the single-precision constant as if it was
  6987.      *explicitly* specified as a double-precision constant.  (This has
  6988.      the effect of appending *decimal*, not *binary*, zeros to the
  6989.      fractional part of the number--producing different computational
  6990.      results.)
  6991.  
  6992.      The reason this misfeature is dangerous is that a slight,
  6993.      apparently innocuous change to the source code can change the
  6994.      computational results.  Consider:
  6995.  
  6996.           REAL ALMOST, CLOSE
  6997.           DOUBLE PRECISION FIVE
  6998.           PARAMETER (ALMOST = 5.000000000001)
  6999.           FIVE = 5
  7000.           CLOSE = 5.000000000001
  7001.           PRINT *, 5.000000000001 - FIVE
  7002.           PRINT *, ALMOST - FIVE
  7003.           PRINT *, CLOSE - FIVE
  7004.           END
  7005.  
  7006.      Running the above program should result in the same value being
  7007.      printed three times.  With `g77' as the compiler, it does.
  7008.  
  7009.      However, compiled by many other compilers, running the above
  7010.      program would print two or three distinct values, because in two
  7011.      or three of the statements, the constant `5.000000000001', which
  7012.      on most systems is exactly equal to `5.' when interpreted as a
  7013.      single-precision constant, is instead interpreted as a
  7014.      double-precision constant, preserving the represented precision.
  7015.      However, this "clever" promotion of type does not extend to
  7016.      variables or, in some compilers, to named constants.
  7017.  
  7018.      Since programmers often are encouraged to replace manifest
  7019.      constants or permanently-assigned variables with named constants
  7020.      (`PARAMETER' in Fortran), and might need to replace some constants
  7021.      with variables having the same values for pertinent portions of
  7022.      code, it is important that compilers treat code so modified in the
  7023.      same way so that the results of such programs are the same.  `g77'
  7024.      helps in this regard by treating constants just the same as
  7025.      variables in terms of determining their types in a
  7026.      context-independent way.
  7027.  
  7028.      Still, there is a lot of existing Fortran code that has been
  7029.      written to depend on the way other compilers freely interpret
  7030.      constants' types based on context, so anything `g77' can do to
  7031.      help flag cases of this in such code could be very helpful.
  7032.  
  7033.    * `g77' treats procedure references to *possible* intrinsic names as
  7034.      always enabling their intrinsic nature, regardless of whether the
  7035.      *form* of the reference is valid for that intrinsic.
  7036.  
  7037.      For example, `CALL IFIX' is interpreted by `g77' first as a
  7038.      reference to the `IFIX' intrinsic, because the reference is a
  7039.      procedure invocation (as compared to `J=IFIX'); only after
  7040.      establishing that, in the program unit being compiled, `IFIX' is
  7041.      in fact an intrinsic and not a local name that happens to have the
  7042.      same name as an intrinsic, does `g77' recognize that the form of
  7043.      the reference is invalid for that particular intrinsic.  At that
  7044.      point, `g77' issues a diagnostic.
  7045.  
  7046.      Some users claim that it is "obvious" that `CALL IFIX' references
  7047.      an external subroutine of their own, not an intrinsic function.
  7048.  
  7049.      However, `g77' knows about intrinsic subroutines, not just
  7050.      functions, and is able to support both having the same names, for
  7051.      example.
  7052.  
  7053.      As a result of this, `g77' rejects calls to intrinsics that are
  7054.      not subroutines, and function invocations of intrinsics that are
  7055.      not functions, just as it (and most compilers) rejects invocations
  7056.      of intrinsics with the wrong number (or types) of arguments.
  7057.  
  7058.      Use the `EXTERNAL IFIX' statement in a program unit that calls a
  7059.      user-written subroutine named `IFIX'.
  7060.  
  7061.    * Allow `DATA VAR/.../' to come before `COMMON /.../ ...,VAR,...'.
  7062.  
  7063.      It is *possible* `g77' will someday allow this.
  7064.  
  7065.      Then again, maybe it is better to have `g77' always require
  7066.      placement of `DATA' so that it can possibly immediately write
  7067.      constants to the output file, thus saving time and space.
  7068.  
  7069.      That is, `DATA A/1000000*1/' should perhaps always be immediately
  7070.      writable to canonical assembler, unless it's already known to be
  7071.      in a `COMMON' area following as-yet-uninitialized stuff, and to do
  7072.      this it cannot be followed by `COMMON A'.
  7073.  
  7074.    * Making side effects happen in the same order as in some other
  7075.      compiler.
  7076.  
  7077.      It is never safe to depend on the order of evaluation of side
  7078.      effects.  For example, an expression like this may very well
  7079.      behave differently from one compiler to another:
  7080.  
  7081.           J = IFUNC() - IFUNC()
  7082.  
  7083.      There is no guarantee that `IFUNC' will be evaluated in any
  7084.      particular order.  Either invocation might happen first.  If
  7085.      `IFUNC' returns 5 the first time it is invoked, and returns 12 the
  7086.      second time, `J' might end up with the value `7', or it might end
  7087.      up with `-7'.
  7088.  
  7089.      Generally, in Fortran, procedures with side-effects intended to be
  7090.      visible to the caller are best designed as *subroutines*, not
  7091.      functions.  Examples of such side-effects include:
  7092.  
  7093.         * The generation of random numbers that are intended to
  7094.           influence return values.
  7095.  
  7096.         * Performing I/O (other than internal I/O to local variables).
  7097.  
  7098.         * Updating information in common blocks.
  7099.  
  7100.      An example of a side-effect that is not intended to be visible to
  7101.      the caller is a function that maintains a cache of recently
  7102.      calculated results, intended solely to speed repeated invocations
  7103.      of the function with identical arguments.  Such a function can be
  7104.      safely used in expressions, because if the compiler optimizes away
  7105.      one or more calls to the function, operation of the program is
  7106.      unaffected (aside from being speeded up).
  7107.  
  7108. 
  7109. File: ^.!gcc.docs.fortran.g77,  Node: Warnings and Errors,  Prev: Non-bugs,  Up: Trouble
  7110.  
  7111. Warning Messages and Error Messages
  7112. ===================================
  7113.  
  7114.    The GNU compiler can produce two kinds of diagnostics: errors and
  7115. warnings.  Each kind has a different purpose:
  7116.  
  7117.      *Errors* report problems that make it impossible to compile your
  7118.      program.  GNU Fortran reports errors with the source file name,
  7119.      line number, and column within the line where the problem is
  7120.      apparent.
  7121.  
  7122.      *Warnings* report other unusual conditions in your code that
  7123.      *might* indicate a problem, although compilation can (and does)
  7124.      proceed.  Warning messages also report the source file name, line
  7125.      number, and column information, but include the text `warning:' to
  7126.      distinguish them from error messages.
  7127.  
  7128.    Warnings might indicate danger points where you should check to make
  7129. sure that your program really does what you intend; or the use of
  7130. obsolete features; or the use of nonstandard features of GNU Fortran.
  7131. Many warnings are issued only if you ask for them, with one of the `-W'
  7132. options (for instance, `-Wall' requests a variety of useful warnings).
  7133.  
  7134.    *Note:* Currently, the text of the line and a pointer to the column
  7135. is printed in most `g77' diagnostics.  Probably, as of version 0.6,
  7136. `g77' will no longer print the text of the source line, instead printing
  7137. the column number following the file name and line number in a form
  7138. that GNU Emacs recognizes.  This change is expected to speed up and
  7139. reduce the memory usage of the `g77' compiler.
  7140.  
  7141.    *Note Options to Request or Suppress Warnings: Warning Options, for
  7142. more detail on these and related command-line options.
  7143.  
  7144. 
  7145. File: ^.!gcc.docs.fortran.g77,  Node: Open Questions,  Next: Bugs,  Prev: Trouble,  Up: Top
  7146.  
  7147. Open Questions
  7148. **************
  7149.  
  7150.    Please consider offering useful answers to these questions!
  7151.  
  7152.    * `g77' treats constants like `Z'ABCD'' and `'ABCD'Z' as typeless.
  7153.      It seems like maybe the prefix-letter form, `Z'ABCD'', should be
  7154.      `INTEGER' instead.
  7155.  
  7156.      You can test for yourself whether a particular compiler treats the
  7157.      prefix form as `INTEGER' or typeless by running the following
  7158.      program:
  7159.  
  7160.           EQUIVALENCE (I, R)
  7161.           R = Z'ABCD'
  7162.           J = Z'ABCD'
  7163.           IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS'
  7164.           IF (J .NE. I) PRINT *, 'Prefix form is INTEGER'
  7165.           END
  7166.  
  7167.      If you wish to report the results of this test to the maintainers
  7168.      of `g77', please include full information on the compiler, system,
  7169.      and version information you're using.  (We already know how `g77'
  7170.      handles it, of course.)
  7171.  
  7172.      Perhaps this will be changed in version 0.6.
  7173.  
  7174.    * `LOC()' and other intrinsics are probably somewhat misclassified.
  7175.      Is the a need for more precise classification of intrinsics, and
  7176.      if so, what are the appropriate groupings?  Is there a need to
  7177.      individually enable/disable/delete/hide intrinsics from the
  7178.      command line?
  7179.  
  7180. 
  7181. File: ^.!gcc.docs.fortran.g77,  Node: Bugs,  Next: Service,  Prev: Open Questions,  Up: Top
  7182.  
  7183. Reporting Bugs
  7184. **************
  7185.  
  7186.    Your bug reports play an essential role in making GNU Fortran
  7187. reliable.
  7188.  
  7189.    When you encounter a problem, the first thing to do is to see if it
  7190. is already known.  *Note Trouble::.  If it isn't known, then you should
  7191. report the problem.
  7192.  
  7193.    Reporting a bug might help you by bringing a solution to your
  7194. problem, or it might not.  (If it does not, look in the service
  7195. directory; see *Note Service::.) In any case, the principal function of
  7196. a bug report is to help the entire community by making the next version
  7197. of GNU Fortran work better.  Bug reports are your contribution to the
  7198. maintenance of GNU Fortran.
  7199.  
  7200.    Since the maintainers are very overloaded, we cannot respond to every
  7201. bug report.  However, if the bug has not been fixed, we are likely to
  7202. send you a patch and ask you to tell us whether it works.
  7203.  
  7204.    In order for a bug report to serve its purpose, you must include the
  7205. information that makes for fixing the bug.
  7206.  
  7207. * Menu:
  7208.  
  7209. * Criteria:  Bug Criteria.   Have you really found a bug?
  7210. * Where: Bug Lists.         Where to send your bug report.
  7211. * Reporting: Bug Reporting.  How to report a bug effectively.
  7212. * Patches: Sending Patches.  How to send a patch for GNU Fortran.
  7213. * Known: Trouble.            Known problems.
  7214. * Help: Service.             Where to ask for help.
  7215.  
  7216. 
  7217. File: ^.!gcc.docs.fortran.g77,  Node: Bug Criteria,  Next: Bug Lists,  Up: Bugs
  7218.  
  7219. Have You Found a Bug?
  7220. =====================
  7221.  
  7222.    If you are not sure whether you have found a bug, here are some
  7223. guidelines:
  7224.  
  7225.    * If the compiler gets a fatal signal, for any input whatever, that
  7226.      is a compiler bug.  Reliable compilers never crash--they just
  7227.      remain obsolete.
  7228.  
  7229.    * If the compiler produces invalid assembly code, for any input
  7230.      whatever (except an `asm' statement), that is a compiler bug,
  7231.      unless the compiler reports errors (not just warnings) which would
  7232.      ordinarily prevent the assembler from being run.
  7233.  
  7234.    * If the compiler produces valid assembly code that does not
  7235.      correctly execute the input source code, that is a compiler bug.
  7236.  
  7237.      However, you must double-check to make sure, because you might
  7238.      have run into an incompatibility between GNU Fortran and
  7239.      traditional Fortran.  These incompatibilities might be considered
  7240.      bugs, but they are inescapable consequences of valuable features.
  7241.  
  7242.      Or you might have a program whose behavior is undefined, which
  7243.      happened by chance to give the desired results with another
  7244.      Fortran compiler.  It is best to check the relevant Fortran
  7245.      standard thoroughly if it is possible that the program indeed does
  7246.      something undefined.
  7247.  
  7248.      After you have localized the error to a single source line, it
  7249.      should be easy to check for these things.  If your program is
  7250.      correct and well defined, you have found a compiler bug.
  7251.  
  7252.      It might help if, in your submission, you identified the specific
  7253.      language in the relevant Fortran standard that specifies the
  7254.      desired behavior, if it isn't likely to be obvious and agreed-upon
  7255.      by all Fortran users.
  7256.  
  7257.    * If the compiler produces an error message for valid input, that is
  7258.      a compiler bug.
  7259.  
  7260.    * If the compiler does not produce an error message for invalid
  7261.      input, that is a compiler bug.  However, you should note that your
  7262.      idea of "invalid input" might be someone else's idea of "an
  7263.      extension" or "support for traditional practice".
  7264.  
  7265.    * If you are an experienced user of Fortran compilers, your
  7266.      suggestions for improvement of GNU Fortran are welcome in any case.
  7267.  
  7268. 
  7269. File: ^.!gcc.docs.fortran.g77,  Node: Bug Lists,  Next: Bug Reporting,  Prev: Bug Criteria,  Up: Bugs
  7270.  
  7271. Where to Report Bugs
  7272. ====================
  7273.  
  7274.    Send bug reports for GNU Fortran to `fortran@gnu.ai.mit.edu'.
  7275.  
  7276.    Often people think of posting bug reports to a newsgroup instead of
  7277. mailing them.  This sometimes appears to work, but it has one problem
  7278. which can be crucial: a newsgroup posting does not contain a mail path
  7279. back to the sender.  Thus, if maintainers need more information, they
  7280. may be unable to reach you.  For this reason, you should always send
  7281. bug reports by mail to the proper mailing list.
  7282.  
  7283.    As a last resort, send bug reports on paper to:
  7284.  
  7285.      GNU Compiler Bugs
  7286.      Free Software Foundation
  7287.      59 Temple Place - Suite 330
  7288.      Boston, MA 02111-1307, USA
  7289.  
  7290. 
  7291. File: ^.!gcc.docs.fortran.g77,  Node: Bug Reporting,  Next: Sending Patches,  Prev: Bug Lists,  Up: Bugs
  7292.  
  7293. How to Report Bugs
  7294. ==================
  7295.  
  7296.    The fundamental principle of reporting bugs usefully is this:
  7297. *report all the facts*.  If you are not sure whether to state a fact or
  7298. leave it out, state it!
  7299.  
  7300.    Often people omit facts because they think they know what causes the
  7301. problem and they conclude that some details don't matter.  Thus, you
  7302. might assume that the name of the variable you use in an example does
  7303. not matter.  Well, probably it doesn't, but one cannot be sure.
  7304. Perhaps the bug is a stray memory reference which happens to fetch from
  7305. the location where that name is stored in memory; perhaps, if the name
  7306. were different, the contents of that location would fool the compiler
  7307. into doing the right thing despite the bug.  Play it safe and give a
  7308. specific, complete example.  That is the easiest thing for you to do,
  7309. and the most helpful.
  7310.  
  7311.    Keep in mind that the purpose of a bug report is to enable someone to
  7312. fix the bug if it is not known.  It isn't very important what happens if
  7313. the bug is already known.  Therefore, always write your bug reports on
  7314. the assumption that the bug is not known.
  7315.  
  7316.    Sometimes people give a few sketchy facts and ask, "Does this ring a
  7317. bell?" This cannot help us fix a bug, so it is rarely helpful.  We
  7318. respond by asking for enough details to enable us to investigate.  You
  7319. might as well expedite matters by sending them to begin with.
  7320. (Besides, there are enough bells ringing around here as it is.)
  7321.  
  7322.    Try to make your bug report self-contained.  If we have to ask you
  7323. for more information, it is best if you include all the previous
  7324. information in your response, as well as the information that was
  7325. missing.
  7326.  
  7327.    Please report each bug in a separate message.  This makes it easier
  7328. for us to track which bugs have been fixed and to forward your bugs
  7329. reports to the appropriate maintainer.
  7330.  
  7331.    Do not compress and encode any part of your bug report using programs
  7332. such as `uuencode'.  If you do so it will slow down the processing of
  7333. your bug.  If you must submit multiple large files, use `shar', which
  7334. allows us to read your message without having to run any decompression
  7335. programs.
  7336.  
  7337.    (As a special exception for GNU Fortran bug-reporting, at least for
  7338. now, if you are sending more than a few lines of code, if your
  7339. program's source file format contains "interesting" things like
  7340. trailing spaces or strange characters, or if you need to include binary
  7341. data files, it is acceptable to put all the files together in a `tar'
  7342. archive, and, whether you need to do that, it is acceptable to then
  7343. compress the single file (`tar' archive or source file) using `gzip'
  7344. and encode it via `uuencode'.  Do not use any MIME stuff--the current
  7345. maintainer can't decode this.  Using `compress' instead of `gzip' is
  7346. acceptable, assuming you have licensed the use of the patented
  7347. algorithm in `compress' from Unisys.)
  7348.  
  7349.    To enable someone to investigate the bug, you should include all
  7350. these things:
  7351.  
  7352.    * The version of GNU Fortran.  You can get this by running `g77'
  7353.      with the `-v' option.  (Ignore any error messages that might be
  7354.      displayed when the linker is run.)
  7355.  
  7356.      Without this, we won't know whether there is any point in looking
  7357.      for the bug in the current version of GNU Fortran.
  7358.  
  7359.    * A complete input file that will reproduce the bug.  If the bug is
  7360.      in the compiler proper (`f771') and you are using the C
  7361.      preprocessor, run your source file through the C preprocessor by
  7362.      doing `g77 -E SOURCEFILE > OUTFILE', then include the contents of
  7363.      OUTFILE in the bug report.  (When you do this, use the same `-I',
  7364.      `-D' or `-U' options that you used in actual compilation.)
  7365.  
  7366.      A single statement is not enough of an example.  In order to
  7367.      compile it, it must be embedded in a complete file of compiler
  7368.      input; and the bug might depend on the details of how this is done.
  7369.  
  7370.      Without a real example one can compile, all anyone can do about
  7371.      your bug report is wish you luck.  It would be futile to try to
  7372.      guess how to provoke the bug.  For example, bugs in register
  7373.      allocation and reloading frequently depend on every little detail
  7374.      of the function they happen in.
  7375.  
  7376.    * Note that you should include with your bug report any files
  7377.      included by the source file (via the `INCLUDE' statement) that you
  7378.      send, and any files they `INCLUDE', and so on.
  7379.  
  7380.      It is not necessary to replace the `INCLUDE' statements with the
  7381.      actual files in the version of the source file that you send, but
  7382.      it might make submitting the bug report easier on the ends.
  7383.      However, be sure to *reproduce* the bug using the *exact* version
  7384.      of the source material you submit, to avoid wild-goose chases.
  7385.  
  7386.    * The command arguments you gave GNU Fortran to compile that example
  7387.      and observe the bug.  For example, did you use `-O'?  To guarantee
  7388.      you won't omit something important, list all the options.
  7389.  
  7390.      If we were to try to guess the arguments, we would probably guess
  7391.      wrong and then we would not encounter the bug.
  7392.  
  7393.    * The type of machine you are using, and the operating system name
  7394.      and version number.  (Much of this information is printed by `g77
  7395.      -v'--if you include that, send along any additional info you have
  7396.      that you don't see clearly represented in that output.)
  7397.  
  7398.    * The operands you gave to the `configure' command when you installed
  7399.      the compiler.
  7400.  
  7401.    * A complete list of any modifications you have made to the compiler
  7402.      source.  (We don't promise to investigate the bug unless it
  7403.      happens in an unmodified compiler.  But if you've made
  7404.      modifications and don't tell us, then you are sending us on a
  7405.      wild-goose chase.)
  7406.  
  7407.      Be precise about these changes.  A description in English is not
  7408.      enough--send a context diff for them.
  7409.  
  7410.      Adding files of your own (such as a machine description for a
  7411.      machine we don't support) is a modification of the compiler source.
  7412.  
  7413.    * Details of any other deviations from the standard procedure for
  7414.      installing GNU Fortran.
  7415.  
  7416.    * A description of what behavior you observe that you believe is
  7417.      incorrect.  For example, "The compiler gets a fatal signal," or,
  7418.      "The assembler instruction at line 208 in the output is incorrect."
  7419.  
  7420.      Of course, if the bug is that the compiler gets a fatal signal,
  7421.      then one can't miss it.  But if the bug is incorrect output, the
  7422.      maintainer might not notice unless it is glaringly wrong.  None of
  7423.      us has time to study all the assembler code from a 50-line Fortran
  7424.      program just on the chance that one instruction might be wrong.
  7425.      We need *you* to do this part!
  7426.  
  7427.      Even if the problem you experience is a fatal signal, you should
  7428.      still say so explicitly.  Suppose something strange is going on,
  7429.      such as, your copy of the compiler is out of synch, or you have
  7430.      encountered a bug in the C library on your system.  (This has
  7431.      happened!)  Your copy might crash and the copy here would not.  If
  7432.      you said to expect a crash, then when the compiler here fails to
  7433.      crash, we would know that the bug was not happening.  If you don't
  7434.      say to expect a crash, then we would not know whether the bug was
  7435.      happening.  We would not be able to draw any conclusion from our
  7436.      observations.
  7437.  
  7438.      If the problem is a diagnostic when building GNU Fortran with some
  7439.      other compiler, say whether it is a warning or an error.
  7440.  
  7441.      Often the observed symptom is incorrect output when your program
  7442.      is run.  Sad to say, this is not enough information unless the
  7443.      program is short and simple.  None of us has time to study a large
  7444.      program to figure out how it would work if compiled correctly,
  7445.      much less which line of it was compiled wrong.  So you will have
  7446.      to do that.  Tell us which source line it is, and what incorrect
  7447.      result happens when that line is executed.  A person who
  7448.      understands the program can find this as easily as finding a bug
  7449.      in the program itself.
  7450.  
  7451.    * If you send examples of assembler code output from GNU Fortran,
  7452.      please use `-g' when you make them.  The debugging information
  7453.      includes source line numbers which are essential for correlating
  7454.      the output with the input.
  7455.  
  7456.    * If you wish to mention something in the GNU Fortran source, refer
  7457.      to it by context, not by line number.
  7458.  
  7459.      The line numbers in the development sources don't match those in
  7460.      your sources.  Your line numbers would convey no convenient
  7461.      information to the maintainers.
  7462.  
  7463.    * Additional information from a debugger might enable someone to
  7464.      find a problem on a machine which he does not have available.
  7465.      However, you need to think when you collect this information if
  7466.      you want it to have any chance of being useful.
  7467.  
  7468.      For example, many people send just a backtrace, but that is never
  7469.      useful by itself.  A simple backtrace with arguments conveys little
  7470.      about GNU Fortran because the compiler is largely data-driven; the
  7471.      same functions are called over and over for different RTL insns,
  7472.      doing different things depending on the details of the insn.
  7473.  
  7474.      Most of the arguments listed in the backtrace are useless because
  7475.      they are pointers to RTL list structure.  The numeric values of the
  7476.      pointers, which the debugger prints in the backtrace, have no
  7477.      significance whatever; all that matters is the contents of the
  7478.      objects they point to (and most of the contents are other such
  7479.      pointers).
  7480.  
  7481.      In addition, most compiler passes consist of one or more loops that
  7482.      scan the RTL insn sequence.  The most vital piece of information
  7483.      about such a loop--which insn it has reached--is usually in a
  7484.      local variable, not in an argument.
  7485.  
  7486.      What you need to provide in addition to a backtrace are the values
  7487.      of the local variables for several stack frames up.  When a local
  7488.      variable or an argument is an RTX, first print its value and then
  7489.      use the GDB command `pr' to print the RTL expression that it points
  7490.      to.  (If GDB doesn't run on your machine, use your debugger to call
  7491.      the function `debug_rtx' with the RTX as an argument.)  In
  7492.      general, whenever a variable is a pointer, its value is no use
  7493.      without the data it points to.
  7494.  
  7495.    Here are some things that are not necessary:
  7496.  
  7497.    * A description of the envelope of the bug.
  7498.  
  7499.      Often people who encounter a bug spend a lot of time investigating
  7500.      which changes to the input file will make the bug go away and which
  7501.      changes will not affect it.
  7502.  
  7503.      This is often time consuming and not very useful, because the way
  7504.      we will find the bug is by running a single example under the
  7505.      debugger with breakpoints, not by pure deduction from a series of
  7506.      examples.  You might as well save your time for something else.
  7507.  
  7508.      Of course, if you can find a simpler example to report *instead* of
  7509.      the original one, that is a convenience.  Errors in the output
  7510.      will be easier to spot, running under the debugger will take less
  7511.      time, etc.  Most GNU Fortran bugs involve just one function, so
  7512.      the most straightforward way to simplify an example is to delete
  7513.      all the function definitions except the one where the bug occurs.
  7514.      Those earlier in the file may be replaced by external declarations
  7515.      if the crucial function depends on them.  (Exception: inline
  7516.      functions may affect compilation of functions defined later in the
  7517.      file.)
  7518.  
  7519.      However, simplification is not vital; if you don't want to do this,
  7520.      report the bug anyway and send the entire test case you used.
  7521.  
  7522.    * In particular, some people insert conditionals `#ifdef BUG' around
  7523.      a statement which, if removed, makes the bug not happen.  These
  7524.      are just clutter; we won't pay any attention to them anyway.
  7525.      Besides, you should send us preprocessor output, and that can't
  7526.      have conditionals.
  7527.  
  7528.    * A patch for the bug.
  7529.  
  7530.      A patch for the bug is useful if it is a good one.  But don't omit
  7531.      the necessary information, such as the test case, on the
  7532.      assumption that a patch is all we need.  We might see problems
  7533.      with your patch and decide to fix the problem another way, or we
  7534.      might not understand it at all.
  7535.  
  7536.      Sometimes with a program as complicated as GNU Fortran it is very
  7537.      hard to construct an example that will make the program follow a
  7538.      certain path through the code.  If you don't send the example, we
  7539.      won't be able to construct one, so we won't be able to verify that
  7540.      the bug is fixed.
  7541.  
  7542.      And if we can't understand what bug you are trying to fix, or why
  7543.      your patch should be an improvement, we won't install it.  A test
  7544.      case will help us to understand.
  7545.  
  7546.      *Note Sending Patches::, for guidelines on how to make it easy for
  7547.      us to understand and install your patches.
  7548.  
  7549.    * A guess about what the bug is or what it depends on.
  7550.  
  7551.      Such guesses are usually wrong.  Even the maintainer can't guess
  7552.      right about such things without first using the debugger to find
  7553.      the facts.
  7554.  
  7555.    * A core dump file.
  7556.  
  7557.      We have no way of examining a core dump for your type of machine
  7558.      unless we have an identical system--and if we do have one, we
  7559.      should be able to reproduce the crash ourselves.
  7560.  
  7561. 
  7562. File: ^.!gcc.docs.fortran.g77,  Node: Sending Patches,  Prev: Bug Reporting,  Up: Bugs
  7563.  
  7564. Sending Patches for GNU Fortran
  7565. ===============================
  7566.  
  7567.    If you would like to write bug fixes or improvements for the GNU
  7568. Fortran compiler, that is very helpful.  Send suggested fixes to the
  7569. bug report mailing list, `fortran@gnu.ai.mit.edu'.
  7570.  
  7571.    Please follow these guidelines so we can study your patches
  7572. efficiently.  If you don't follow these guidelines, your information
  7573. might still be useful, but using it will take extra work.  Maintaining
  7574. GNU Fortran is a lot of work in the best of circumstances, and we can't
  7575. keep up unless you do your best to help.
  7576.  
  7577.    * Send an explanation with your changes of what problem they fix or
  7578.      what improvement they bring about.  For a bug fix, just include a
  7579.      copy of the bug report, and explain why the change fixes the bug.
  7580.  
  7581.      (Referring to a bug report is not as good as including it, because
  7582.      then we will have to look it up, and we have probably already
  7583.      deleted it if we've already fixed the bug.)
  7584.  
  7585.    * Always include a proper bug report for the problem you think you
  7586.      have fixed.  We need to convince ourselves that the change is
  7587.      right before installing it.  Even if it is right, we might have
  7588.      trouble judging it if we don't have a way to reproduce the problem.
  7589.  
  7590.    * Include all the comments that are appropriate to help people
  7591.      reading the source in the future understand why this change was
  7592.      needed.
  7593.  
  7594.    * Don't mix together changes made for different reasons.  Send them
  7595.      *individually*.
  7596.  
  7597.      If you make two changes for separate reasons, then we might not
  7598.      want to install them both.  We might want to install just one.  If
  7599.      you send them all jumbled together in a single set of diffs, we
  7600.      have to do extra work to disentangle them--to figure out which
  7601.      parts of the change serve which purpose.  If we don't have time
  7602.      for this, we might have to ignore your changes entirely.
  7603.  
  7604.      If you send each change as soon as you have written it, with its
  7605.      own explanation, then the two changes never get tangled up, and we
  7606.      can consider each one properly without any extra work to
  7607.      disentangle them.
  7608.  
  7609.      Ideally, each change you send should be impossible to subdivide
  7610.      into parts that we might want to consider separately, because each
  7611.      of its parts gets its motivation from the other parts.
  7612.  
  7613.    * Send each change as soon as that change is finished.  Sometimes
  7614.      people think they are helping us by accumulating many changes to
  7615.      send them all together.  As explained above, this is absolutely
  7616.      the worst thing you could do.
  7617.  
  7618.      Since you should send each change separately, you might as well
  7619.      send it right away.  That gives us the option of installing it
  7620.      immediately if it is important.
  7621.  
  7622.    * Use `diff -c' to make your diffs.  Diffs without context are hard
  7623.      for us to install reliably.  More than that, they make it hard for
  7624.      us to study the diffs to decide whether we want to install them.
  7625.      Unidiff format is better than contextless diffs, but not as easy
  7626.      to read as `-c' format.
  7627.  
  7628.      If you have GNU diff, use `diff -cp', which shows the name of the
  7629.      function that each change occurs in.  (The maintainer of GNU
  7630.      Fortran currently uses `diff -rcp2N'.)
  7631.  
  7632.    * Write the change log entries for your changes.  We get lots of
  7633.      changes, and we don't have time to do all the change log writing
  7634.      ourselves.
  7635.  
  7636.      Read the `ChangeLog' file to see what sorts of information to put
  7637.      in, and to learn the style that we use.  The purpose of the change
  7638.      log is to show people where to find what was changed.  So you need
  7639.      to be specific about what functions you changed; in large
  7640.      functions, it's often helpful to indicate where within the
  7641.      function the change was.
  7642.  
  7643.      On the other hand, once you have shown people where to find the
  7644.      change, you need not explain its purpose.  Thus, if you add a new
  7645.      function, all you need to say about it is that it is new.  If you
  7646.      feel that the purpose needs explaining, it probably does--but the
  7647.      explanation will be much more useful if you put it in comments in
  7648.      the code.
  7649.  
  7650.      If you would like your name to appear in the header line for who
  7651.      made the change, send us the header line.
  7652.  
  7653.    * When you write the fix, keep in mind that we can't install a
  7654.      change that would break other systems.
  7655.  
  7656.      People often suggest fixing a problem by changing
  7657.      machine-independent files such as `toplev.c' to do something
  7658.      special that a particular system needs.  Sometimes it is totally
  7659.      obvious that such changes would break GNU Fortran for almost all
  7660.      users.  We can't possibly make a change like that.  At best it
  7661.      might tell us how to write another patch that would solve the
  7662.      problem acceptably.
  7663.  
  7664.      Sometimes people send fixes that *might* be an improvement in
  7665.      general--but it is hard to be sure of this.  It's hard to install
  7666.      such changes because we have to study them very carefully.  Of
  7667.      course, a good explanation of the reasoning by which you concluded
  7668.      the change was correct can help convince us.
  7669.  
  7670.      The safest changes are changes to the configuration files for a
  7671.      particular machine.  These are safe because they can't create new
  7672.      bugs on other machines.
  7673.  
  7674.      Please help us keep up with the workload by designing the patch in
  7675.      a form that is good to install.
  7676.  
  7677. 
  7678. File: ^.!gcc.docs.fortran.g77,  Node: Service,  Next: Index,  Prev: Bugs,  Up: Top
  7679.  
  7680. How To Get Help with GNU Fortran
  7681. ********************************
  7682.  
  7683.    If you need help installing, using or changing GNU Fortran, there
  7684. are two ways to find it:
  7685.  
  7686.    * Look in the service directory for someone who might help you for a
  7687.      fee.  The service directory is found in the file named `SERVICE'
  7688.      in the GNU CC distribution.
  7689.  
  7690.    * Send a message to `fortran@gnu.ai.mit.edu'.
  7691.  
  7692. 
  7693. File: ^.!gcc.docs.fortran.g77,  Node: Index,  Prev: Service,  Up: Top
  7694.  
  7695. Index
  7696. *****
  7697.  
  7698. * Menu:
  7699.  
  7700. * #define:                              Overall Options.
  7701. * #if:                                  Overall Options.
  7702. * #include:                             Overall Options.
  7703. * %DESCR() intrinsic <1>:               Changes.
  7704. * %DESCR() intrinsic:                   Extensions.
  7705. * %LOC() intrinsic:                     Extensions.
  7706. * %REF() intrinsic:                     Extensions.
  7707. * %VAL() intrinsic:                     Extensions.
  7708. * *N notation:                          Types.
  7709. * --driver option <1>:                  G77 and GCC.
  7710. * --driver option:                      Invoking G77.
  7711. * -fGROUP-intrinsics-hide option:       Overly Convenient Options.
  7712. * -fcaller-saves option:                Optimize Options.
  7713. * -fcase-initcap option:                Fortran Dialect Options.
  7714. * -fcase-lower option:                  Fortran Dialect Options.
  7715. * -fcase-preserve option:               Fortran Dialect Options.
  7716. * -fcase-strict-lower option:           Fortran Dialect Options.
  7717. * -fcase-strict-upper option:           Fortran Dialect Options.
  7718. * -fcase-upper option:                  Fortran Dialect Options.
  7719. * -fdcp-intrinsics-delete option:       Fortran Dialect Options.
  7720. * -fdcp-intrinsics-disable option:      Fortran Dialect Options.
  7721. * -fdcp-intrinsics-enable option:       Fortran Dialect Options.
  7722. * -fdcp-intrinsics-hide option:         Fortran Dialect Options.
  7723. * -fdelayed-branch option:              Optimize Options.
  7724. * -fdollar-ok option:                   Fortran Dialect Options.
  7725. * -fexpensive-optimizations option:     Optimize Options.
  7726. * -ff2c-intrinsics-delete option:       Fortran Dialect Options.
  7727. * -ff2c-intrinsics-disable option:      Fortran Dialect Options.
  7728. * -ff2c-intrinsics-enable option:       Fortran Dialect Options.
  7729. * -ff2c-intrinsics-hide option:         Fortran Dialect Options.
  7730. * -ff2c-library option:                 Code Gen Options.
  7731. * -ff90 option:                         Fortran Dialect Options.
  7732. * -ff90-intrinsics-delete option:       Fortran Dialect Options.
  7733. * -ff90-intrinsics-disable option:      Fortran Dialect Options.
  7734. * -ff90-intrinsics-enable option:       Fortran Dialect Options.
  7735. * -ff90-intrinsics-hide option:         Fortran Dialect Options.
  7736. * -ff90-not-vxt option:                 Fortran Dialect Options.
  7737. * -ffast-math option:                   Optimize Options.
  7738. * -ffixed-line-length-N option:         Fortran Dialect Options.
  7739. * -ffloat-store option:                 Optimize Options.
  7740. * -fforce-addr option:                  Optimize Options.
  7741. * -fforce-mem option:                   Optimize Options.
  7742. * -ffree-form option:                   Fortran Dialect Options.
  7743. * -finit-local-zero option <1>:         Overly Convenient Options.
  7744. * -finit-local-zero option:             Code Gen Options.
  7745. * -fintrin-case-any option:             Fortran Dialect Options.
  7746. * -fintrin-case-initcap option:         Fortran Dialect Options.
  7747. * -fintrin-case-lower option:           Fortran Dialect Options.
  7748. * -fintrin-case-upper option:           Fortran Dialect Options.
  7749. * -fmatch-case-any option:              Fortran Dialect Options.
  7750. * -fmatch-case-initcap option:          Fortran Dialect Options.
  7751. * -fmatch-case-lower option:            Fortran Dialect Options.
  7752. * -fmatch-case-upper option:            Fortran Dialect Options.
  7753. * -fmil-intrinsics-delete option:       Fortran Dialect Options.
  7754. * -fmil-intrinsics-disable option:      Fortran Dialect Options.
  7755. * -fmil-intrinsics-enable option:       Fortran Dialect Options.
  7756. * -fmil-intrinsics-hide option:         Fortran Dialect Options.
  7757. * -fno-automatic option <1>:            Overly Convenient Options.
  7758. * -fno-automatic option:                Code Gen Options.
  7759. * -fno-backslash option:                Fortran Dialect Options.
  7760. * -fno-common option:                   Code Gen Options.
  7761. * -fno-f2c option <1>:                  Faster Programs.
  7762. * -fno-f2c option:                      Code Gen Options.
  7763. * -fno-fixed-form option:               Fortran Dialect Options.
  7764. * -fno-ident option:                    Code Gen Options.
  7765. * -fno-inline option:                   Optimize Options.
  7766. * -fno-second-underscore option:        Code Gen Options.
  7767. * -fno-ugly-args option:                Warning Options.
  7768. * -fno-ugly-init option:                Warning Options.
  7769. * -fno-underscoring option:             Code Gen Options.
  7770. * -fpack-struct option:                 Code Gen Options.
  7771. * -fpcc-struct-return option:           Code Gen Options.
  7772. * -fpedantic option:                    Warning Options.
  7773. * -freg-struct-return option:           Code Gen Options.
  7774. * -frerun-cse-after-loop option:        Optimize Options.
  7775. * -fschedule-insns option:              Optimize Options.
  7776. * -fschedule-insns2 option:             Optimize Options.
  7777. * -fset-g77-defaults option:            Overall Options.
  7778. * -fshort-double option:                Code Gen Options.
  7779. * -fsource-case-lower option:           Fortran Dialect Options.
  7780. * -fsource-case-preserve option:        Fortran Dialect Options.
  7781. * -fsource-case-upper option:           Fortran Dialect Options.
  7782. * -fstrength-reduce option:             Optimize Options.
  7783. * -fsymbol-case-any option:             Fortran Dialect Options.
  7784. * -fsymbol-case-initcap option:         Fortran Dialect Options.
  7785. * -fsymbol-case-lower option:           Fortran Dialect Options.
  7786. * -fsymbol-case-upper option:           Fortran Dialect Options.
  7787. * -fsyntax-only option:                 Warning Options.
  7788. * -fugly option <1>:                    Overly Convenient Options.
  7789. * -fugly option:                        Warning Options.
  7790. * -funix-intrinsics-delete option:      Fortran Dialect Options.
  7791. * -funix-intrinsics-disable option:     Fortran Dialect Options.
  7792. * -funix-intrinsics-enable option:      Fortran Dialect Options.
  7793. * -funix-intrinsics-hide option:        Fortran Dialect Options.
  7794. * -funroll-all-loops option:            Optimize Options.
  7795. * -funroll-loops option:                Optimize Options.
  7796. * -fversion option:                     Overall Options.
  7797. * -fvxt-intrinsics-delete option:       Fortran Dialect Options.
  7798. * -fvxt-intrinsics-disable option:      Fortran Dialect Options.
  7799. * -fvxt-intrinsics-enable option:       Fortran Dialect Options.
  7800. * -fvxt-intrinsics-hide option:         Fortran Dialect Options.
  7801. * -fvxt-not-f90 option:                 Fortran Dialect Options.
  7802. * -fzeros option:                       Code Gen Options.
  7803. * -g option:                            Debugging Options.
  7804. * -I- option:                           Directory Options.
  7805. * -Idir option:                         Directory Options.
  7806. * -pedantic option:                     Warning Options.
  7807. * -pedantic-errors option:              Warning Options.
  7808. * -u option:                            Warning Options.
  7809. * -v option:                            G77 and GCC.
  7810. * -w option:                            Warning Options.
  7811. * -Waggregate-return option:            Warning Options.
  7812. * -Wall option:                         Warning Options.
  7813. * -Wcomment option:                     Warning Options.
  7814. * -Wconversion option:                  Warning Options.
  7815. * -Werror option:                       Warning Options.
  7816. * -Wformat option:                      Warning Options.
  7817. * -Wid-clash-LEN option:                Warning Options.
  7818. * -Wimplicit option:                    Warning Options.
  7819. * -Wlarger-than-LEN option:             Warning Options.
  7820. * -Wparentheses option:                 Warning Options.
  7821. * -Wredundant-decls option:             Warning Options.
  7822. * -Wshadow option:                      Warning Options.
  7823. * -Wsurprising option:                  Warning Options.
  7824. * -Wswitch option:                      Warning Options.
  7825. * -Wtraditional option:                 Warning Options.
  7826. * -Wuninitialized option:               Warning Options.
  7827. * -Wunused option:                      Warning Options.
  7828. * .F:                                   Overall Options.
  7829. * .fpp:                                 Overall Options.
  7830. * /WARNINGS=DECLARATIONS switch:        Warning Options.
  7831. * 64-bit systems:                       Alpha Problems.
  7832. * bison:                                Missing bison?.
  7833. * g77, installation of:                 Installation of Binaries.
  7834. * gcc versions supported by g77:        Merging Distributions.
  7835. * gcc, installation of:                 Installation of Binaries.
  7836. * gdb support:                          But-bugs.
  7837. * makeinfo:                             Missing makeinfo?.
  7838. * ABORT() intrinsic:                    Fortran Dialect Options.
  7839. * ACCEPT statement:                     Missing Features.
  7840. * adjustable arrays:                    Adjustable Arrays.
  7841. * aggregate initialization:             Large Initialization.
  7842. * all warnings:                         Warning Options.
  7843. * Alpha, bugs:                          Alpha Problems.
  7844. * alternate entry points:               Alternate Entry Points.
  7845. * alternate returns:                    Alternate Returns.
  7846. * AND intrinsic:                        Missing Features.
  7847. * ANSI FORTRAN 77 support:              Standard Support.
  7848. * arguments, unused:                    Warning Options.
  7849. * array ordering:                       Arrays.
  7850. * arrays:                               Arrays.
  7851. * arrays, adjustable:                   Adjustable Arrays.
  7852. * arrays, automatic:                    Adjustable Arrays.
  7853. * arrays, dimensioning:                 Adjustable Arrays.
  7854. * as command:                           What is GNU Fortran?.
  7855. * assembler:                            What is GNU Fortran?.
  7856. * assembly code:                        What is GNU Fortran?.
  7857. * assembly code, invalid:               Bug Criteria.
  7858. * ASSIGN statement:                     Assigned Statement Labels.
  7859. * assigned statement labels:            Assigned Statement Labels.
  7860. * automatic arrays:                     Adjustable Arrays.
  7861. * back end, gcc:                        What is GNU Fortran?.
  7862. * backslash <1>:                        Fortran Dialect Options.
  7863. * backslash:                            Non-bugs.
  7864. * backtrace for bug reports:            Bug Reporting.
  7865. * basic concepts:                       What is GNU Fortran?.
  7866. * beginners:                            Getting Started.
  7867. * binaries, distributing:               Distributing Binaries.
  7868. * bit patterns:                         Floating-point Bit Patterns.
  7869. * block data:                           Disappointments.
  7870. * block data and libraries:             Block Data and Libraries.
  7871. * BLOCK DATA statement <1>:             Block Data and Libraries.
  7872. * BLOCK DATA statement:                 Disappointments.
  7873. * bootstrap build:                      Bootstrap Build.
  7874. * bug criteria:                         Bug Criteria.
  7875. * bug report mailing lists:             Bug Lists.
  7876. * bugs <1>:                             What is GNU Fortran?.
  7877. * bugs:                                 Bugs.
  7878. * bugs, known:                          Trouble.
  7879. * build, bootstrap:                     Bootstrap Build.
  7880. * build, straight:                      Straight Build.
  7881. * building g77:                         Building gcc.
  7882. * building gcc:                         Building gcc.
  7883. * but-bugs:                             But-bugs.
  7884. * C preprocessor:                       Overall Options.
  7885. * C routines calling Fortran:           Debugging and Interfacing.
  7886. * calling C routines:                   Debugging and Interfacing.
  7887. * card image:                           Fortran Dialect Options.
  7888. * carriage returns:                     Source Form.
  7889. * case sensitivity:                     Case Sensitivity.
  7890. * cc1 program:                          What is GNU Fortran?.
  7891. * cc1plus program:                      What is GNU Fortran?.
  7892. * changes, user-visible:                Changes.
  7893. * character constants <1>:              Fortran Dialect Options.
  7894. * character constants <1>:              Distensions.
  7895. * character constants <1>:              Dialects.
  7896. * character constants:                  Character and Hollerith Constants.
  7897. * character set:                        Fortran Dialect Options.
  7898. * characters, comment:                  Dialects.
  7899. * characters, continuation:             Dialects.
  7900. * CLOSE statement:                      Missing Features.
  7901. * code generation conventions:          Code Gen Options.
  7902. * code generator:                       What is GNU Fortran?.
  7903. * code, assembly:                       What is GNU Fortran?.
  7904. * code, distributing:                   Distributing Binaries.
  7905. * code, in-line:                        What is GNU Fortran?.
  7906. * code, legacy:                         Collected Fortran Wisdom.
  7907. * code, machine:                        What is GNU Fortran?.
  7908. * code, modifying:                      Unpacking.
  7909. * code, object:                         Object Compatibility.
  7910. * code, source <1>:                     What is GNU Fortran?.
  7911. * code, source <1>:                     Case Sensitivity.
  7912. * code, source <1>:                     Unpacking.
  7913. * code, source:                         Source Form.
  7914. * code, stack variables:                Maximum Stackable Size.
  7915. * code, user:                           But-bugs.
  7916. * code, writing:                        Collected Fortran Wisdom.
  7917. * column-major ordering:                Arrays.
  7918. * command options:                      Invoking G77.
  7919. * commands, as:                         What is GNU Fortran?.
  7920. * commands, f77:                        Installing f77.
  7921. * commands, g77 <1>:                    G77 and GCC.
  7922. * commands, g77:                        What is GNU Fortran?.
  7923. * commands, gcc <1>:                    G77 and GCC.
  7924. * commands, gcc:                        What is GNU Fortran?.
  7925. * commands, gdb:                        What is GNU Fortran?.
  7926. * commands, ld:                         What is GNU Fortran?.
  7927. * comment character:                    Dialects.
  7928. * COMMON blocks:                        Debugging Options.
  7929. * common blocks:                        Common Blocks.
  7930. * common blocks, large:                 But-bugs.
  7931. * COMMON statement <1>:                 Common Blocks.
  7932. * COMMON statement:                     Disappointments.
  7933. * compatibility <1>:                    Object Compatibility.
  7934. * compatibility <1>:                    Block Data and Libraries.
  7935. * compatibility:                        Faster Programs.
  7936. * compatibility, f2c:                   Code Gen Options.
  7937. * compilation, in-line:                 Optimize Options.
  7938. * compilation, pedantic:                Pedantic Compilation.
  7939. * compiler bugs, reporting:             Bug Reporting.
  7940. * compilers:                            What is GNU Fortran?.
  7941. * compilers, compatibility:             Object Compatibility.
  7942. * compiling programs:                   G77 and GCC.
  7943. * COMPLEX intrinsics:                   Fortran Dialect Options.
  7944. * COMPLEX type:                         Types.
  7945. * components of g77:                    What is GNU Fortran?.
  7946. * concepts, basic:                      What is GNU Fortran?.
  7947. * conformance, IEEE:                    Optimize Options.
  7948. * constants:                            Constants.
  7949. * constants, character <1>:             Dialects.
  7950. * constants, character <1>:             Distensions.
  7951. * constants, character:                 Character and Hollerith Constants.
  7952. * constants, Hollerith <1>:             Distensions.
  7953. * constants, Hollerith <1>:             Character and Hollerith Constants.
  7954. * constants, Hollerith:                 Changes.
  7955. * constants, octal:                     Dialects.
  7956. * constants, typeless:                  Changes.
  7957. * continuation character:               Dialects.
  7958. * contributors:                         Contributors.
  7959. * core dump:                            Bug Criteria.
  7960. * cpp preprocessor:                     Overall Options.
  7961. * cpp program <1>:                      Bug Reporting.
  7962. * cpp program <1>:                      Preprocessor Options.
  7963. * cpp program <1>:                      What is GNU Fortran?.
  7964. * cpp program:                          Overall Options.
  7965. * Cray pointers:                        Missing Features.
  7966. * creating patch files:                 Merging Distributions.
  7967. * credits:                              Contributors.
  7968. * cross-compilation:                    Cross-compiler Problems.
  7969. * cross-compiler, building:             Floating-point Bit Patterns.
  7970. * DATA statement:                       Code Gen Options.
  7971. * data types:                           Types.
  7972. * debugger:                             What is GNU Fortran?.
  7973. * debugging <1>:                        Main Program Unit.
  7974. * debugging:                            Debugging and Interfacing.
  7975. * debugging information options:        Debugging Options.
  7976. * debug_rtx:                            Bug Reporting.
  7977. * deleted intrinsics:                   Intrinsics.
  7978. * diagnostics, incorrect:               What is GNU Fortran?.
  7979. * dialect options:                      Fortran Dialect Options.
  7980. * dialects of language:                 Dialects.
  7981. * Digital Fortran features:             Fortran Dialect Options.
  7982. * DIMENSION statement <1>:              Adjustable Arrays.
  7983. * DIMENSION statement:                  Arrays.
  7984. * dimensioning arrays:                  Adjustable Arrays.
  7985. * directory options:                    Directory Options.
  7986. * directory search paths for inclusion: Directory Options.
  7987. * directory, updating info:             Updating Documentation.
  7988. * disabled intrinsics:                  Intrinsics.
  7989. * disposition of files:                 Missing Features.
  7990. * distensions:                          Distensions.
  7991. * distributions, unpacking:             Unpacking.
  7992. * distributions, why separate:          Merging Distributions.
  7993. * DO statement <1>:                     Loops.
  7994. * DO statement:                         Warning Options.
  7995. * documentation:                        Updating Documentation.
  7996. * dollar sign:                          Fortran Dialect Options.
  7997. * DOUBLE COMPLEX type:                  Types.
  7998. * DOUBLE PRECISION type:                Types.
  7999. * double quotes:                        Dialects.
  8000. * driver, gcc command as:               What is GNU Fortran?.
  8001. * dummies, unused:                      Warning Options.
  8002. * effecting IMPLICIT NONE:              Warning Options.
  8003. * enabled intrinsics:                   Intrinsics.
  8004. * entry points:                         Alternate Entry Points.
  8005. * ENTRY statement:                      Alternate Entry Points.
  8006. * environment variables:                Environment Variables.
  8007. * EQUIVALENCE areas:                    Debugging Options.
  8008. * equivalence areas:                    Local Equivalence Areas.
  8009. * EQUIVALENCE statement:                Local Equivalence Areas.
  8010. * error messages:                       Warnings and Errors.
  8011. * error messages, incorrect:            What is GNU Fortran?.
  8012. * errors, linker:                       But-bugs.
  8013. * exclamation points:                   Dialects.
  8014. * executable file:                      What is GNU Fortran?.
  8015. * EXIT() intrinsic:                     Fortran Dialect Options.
  8016. * extended-source option:               Fortran Dialect Options.
  8017. * extensions:                           Extensions.
  8018. * extensions, file name:                Overall Options.
  8019. * extensions, VXT:                      Dialects.
  8020. * extra warnings:                       Warning Options.
  8021. * f2c compatibility <1>:                Debugging and Interfacing.
  8022. * f2c compatibility <1>:                Code Gen Options.
  8023. * f2c compatibility <1>:                Block Data and Libraries.
  8024. * f2c compatibility <1>:                Faster Programs.
  8025. * f2c compatibility:                    Object Compatibility.
  8026. * f2c intrinsics:                       Fortran Dialect Options.
  8027. * F2CLIBOK:                             Installing f2c.
  8028. * F2C_INSTALL_FLAG:                     Installing f2c.
  8029. * f77 command:                          Installing f77.
  8030. * f77 support:                          Non-bugs.
  8031. * f771 program:                         What is GNU Fortran?.
  8032. * f771, linking error for:              General Problems.
  8033. * F77_INSTALL_FLAG:                     Installing f77.
  8034. * fatal signal:                         Bug Criteria.
  8035. * features, ugly <1>:                   Distensions.
  8036. * features, ugly:                       Warning Options.
  8037. * FFE:                                  What is GNU Fortran?.
  8038. * FFECOM_sizeMAXSTACKITEM:              Maximum Stackable Size.
  8039. * file format not recognized:           What is GNU Fortran?.
  8040. * file name extension:                  Overall Options.
  8041. * file name suffix:                     Overall Options.
  8042. * file type:                            Overall Options.
  8043. * file, source:                         What is GNU Fortran?.
  8044. * files, executable:                    What is GNU Fortran?.
  8045. * files, source:                        Source Form.
  8046. * fixed form <1>:                       Source Form.
  8047. * fixed form:                           Fortran Dialect Options.
  8048. * fixed-form line length:               Fortran Dialect Options.
  8049. * floating-point bit patterns:          Floating-point Bit Patterns.
  8050. * FLUSH() intrinsic:                    Fortran Dialect Options.
  8051. * FORMAT statement:                     Missing Features.
  8052. * Fortran 90 features <1>:              Fortran Dialect Options.
  8053. * Fortran 90 features <1>:              Dialects.
  8054. * Fortran 90 features:                  Fortran Dialect Options.
  8055. * Fortran 90 intrinsics:                Fortran Dialect Options.
  8056. * Fortran 90 support:                   Missing Features.
  8057. * Fortran preprocessor:                 Overall Options.
  8058. * free form <1>:                        Fortran Dialect Options.
  8059. * free form:                            Source Form.
  8060. * front end, g77:                       What is GNU Fortran?.
  8061. * FSF, funding the:                     Funding GNU Fortran.
  8062. * FUNCTION statement <1>:               Functions.
  8063. * FUNCTION statement:                   Procedures.
  8064. * functions:                            Functions.
  8065. * functions, intrinsic:                 Fortran Dialect Options.
  8066. * funding improvements:                 Funding GNU Fortran.
  8067. * funding the FSF:                      Funding GNU Fortran.
  8068. * g77 command <1>:                      What is GNU Fortran?.
  8069. * g77 command:                          G77 and GCC.
  8070. * g77 front end:                        What is GNU Fortran?.
  8071. * g77 options, -driver:                 G77 and GCC.
  8072. * g77 options, -v:                      G77 and GCC.
  8073. * g77 options, driver:                  Invoking G77.
  8074. * g77, components of:                   What is GNU Fortran?.
  8075. * GBE <1>:                              What is GNU Fortran?.
  8076. * GBE:                                  General Problems.
  8077. * gcc back end:                         What is GNU Fortran?.
  8078. * gcc command <1>:                      G77 and GCC.
  8079. * gcc command:                          What is GNU Fortran?.
  8080. * gcc command as driver:                What is GNU Fortran?.
  8081. * gcc not recognizing Fortran source:   What is GNU Fortran?.
  8082. * gdb command:                          What is GNU Fortran?.
  8083. * GETARG() intrinsic:                   Main Program Unit.
  8084. * getting started:                      Getting Started.
  8085. * GNU Back End (GBE):                   What is GNU Fortran?.
  8086. * GNU C required:                       General Problems.
  8087. * GNU Fortran command options:          Invoking G77.
  8088. * GNU Fortran Front End (FFE):          What is GNU Fortran?.
  8089. * GOTO statement:                       Assigned Statement Labels.
  8090. * groups of intrinsics:                 Intrinsics.
  8091. * hidden intrinsics:                    Intrinsics.
  8092. * Hollerith constants <1>:              Character and Hollerith Constants.
  8093. * Hollerith constants <1>:              Fortran Dialect Options.
  8094. * Hollerith constants <1>:              Distensions.
  8095. * Hollerith constants <1>:              Changes.
  8096. * Hollerith constants:                  Distensions.
  8097. * IARGC() intrinsic:                    Main Program Unit.
  8098. * IEEE conformance:                     Optimize Options.
  8099. * IMPLICIT CHARACTER*(*) statement:     Disappointments.
  8100. * implicit declaration, warning:        Warning Options.
  8101. * IMPLICIT NONE, similar effect:        Warning Options.
  8102. * improvements, funding:                Funding GNU Fortran.
  8103. * in-line code:                         What is GNU Fortran?.
  8104. * in-line compilation:                  Optimize Options.
  8105. * INCLUDE statement <1>:                Preprocessor Options.
  8106. * INCLUDE statement <1>:                Bug Reporting.
  8107. * INCLUDE statement:                    Directory Options.
  8108. * included files:                       Bug Reporting.
  8109. * inclusion, directory search paths for: Directory Options.
  8110. * incorrect diagnostics:                What is GNU Fortran?.
  8111. * incorrect error messages:             What is GNU Fortran?.
  8112. * incorrect use of language:            What is GNU Fortran?.
  8113. * info, updating directory:             Updating Documentation.
  8114. * initialization of local variables:    Code Gen Options.
  8115. * INQUIRE statement:                    Missing Features.
  8116. * installation of binaries:             Installation of Binaries.
  8117. * installation problems:                Problems Installing.
  8118. * installation trouble:                 Trouble.
  8119. * installing GNU Fortran:               Installation.
  8120. * installing, checking before:          Pre-installation Checks.
  8121. * INTEGER type:                         Types.
  8122. * INTEGER*2 support:                    Missing Features.
  8123. * interfacing:                          Debugging and Interfacing.
  8124. * intrinsic functions:                  Fortran Dialect Options.
  8125. * intrinsic subroutines:                Fortran Dialect Options.
  8126. * intrinsics, %DESCR() <1>:             Extensions.
  8127. * intrinsics, %DESCR():                 Changes.
  8128. * intrinsics, %LOC():                   Extensions.
  8129. * intrinsics, %REF():                   Extensions.
  8130. * intrinsics, %VAL():                   Extensions.
  8131. * intrinsics, ABORT():                  Fortran Dialect Options.
  8132. * intrinsics, AND:                      Missing Features.
  8133. * intrinsics, COMPLEX:                  Fortran Dialect Options.
  8134. * intrinsics, deleted:                  Intrinsics.
  8135. * intrinsics, disabled:                 Intrinsics.
  8136. * intrinsics, enabled:                  Intrinsics.
  8137. * intrinsics, EXIT():                   Fortran Dialect Options.
  8138. * intrinsics, f2c:                      Fortran Dialect Options.
  8139. * intrinsics, FLUSH():                  Fortran Dialect Options.
  8140. * intrinsics, Fortran 90:               Fortran Dialect Options.
  8141. * intrinsics, GETARG():                 Main Program Unit.
  8142. * intrinsics, groups:                   Intrinsics.
  8143. * intrinsics, groups of:                Intrinsics.
  8144. * intrinsics, hidden:                   Intrinsics.
  8145. * intrinsics, IARGC():                  Main Program Unit.
  8146. * intrinsics, LOC():                    Extensions.
  8147. * intrinsics, MIL-STD 1753:             Fortran Dialect Options.
  8148. * intrinsics, OR:                       Missing Features.
  8149. * intrinsics, SHIFT:                    Missing Features.
  8150. * intrinsics, side effects of:          Fortran Dialect Options.
  8151. * intrinsics, SIGNAL():                 Fortran Dialect Options.
  8152. * intrinsics, SYSTEM():                 Fortran Dialect Options.
  8153. * intrinsics, UNIX:                     Fortran Dialect Options.
  8154. * intrinsics, VXT:                      Fortran Dialect Options.
  8155. * Introduction:                         Top.
  8156. * invalid assembly code:                Bug Criteria.
  8157. * invalid input:                        Bug Criteria.
  8158. * KIND= notation:                       Types.
  8159. * known causes of trouble:              Trouble.
  8160. * language dialect options:             Fortran Dialect Options.
  8161. * language dialects:                    Dialects.
  8162. * language extensions:                  Extensions.
  8163. * language, incorrect use of:           What is GNU Fortran?.
  8164. * LANGUAGES:                            Building gcc.
  8165. * large common blocks:                  But-bugs.
  8166. * large initialization:                 Large Initialization.
  8167. * ld can't find strange names:          But-bugs.
  8168. * ld can't find _main:                  But-bugs.
  8169. * ld can't find _strtoul:               General Problems.
  8170. * ld command:                           What is GNU Fortran?.
  8171. * ld error for f771:                    General Problems.
  8172. * ld error for user code:               But-bugs.
  8173. * ld errors:                            But-bugs.
  8174. * legacy code:                          Collected Fortran Wisdom.
  8175. * length of source lines:               Fortran Dialect Options.
  8176. * letters, lowercase:                   Case Sensitivity.
  8177. * letters, uppercase:                   Case Sensitivity.
  8178. * libf2c library:                       What is GNU Fortran?.
  8179. * libraries:                            What is GNU Fortran?.
  8180. * libraries, containing BLOCK DATA:     Block Data and Libraries.
  8181. * libraries, libf2c:                    What is GNU Fortran?.
  8182. * line length:                          Fortran Dialect Options.
  8183. * linker errors:                        But-bugs.
  8184. * linking:                              What is GNU Fortran?.
  8185. * linking error for f771:               General Problems.
  8186. * linking error for user code:          But-bugs.
  8187. * LOC() intrinsic:                      Extensions.
  8188. * local equivalence areas:              Local Equivalence Areas.
  8189. * LOGICAL type:                         Types.
  8190. * LOGICAL*1 support:                    Missing Features.
  8191. * loops, speeding up:                   Optimize Options.
  8192. * loops, unrolling:                     Optimize Options.
  8193. * lowercase letters:                    Case Sensitivity.
  8194. * machine code:                         What is GNU Fortran?.
  8195. * main program unit, debugging:         Main Program Unit.
  8196. * main():                               Main Program Unit.
  8197. * MAIN__():                             Main Program Unit.
  8198. * MAP statement:                        Missing Features.
  8199. * maximum stackable size:               Maximum Stackable Size.
  8200. * memory utilization:                   Large Initialization.
  8201. * merging distributions:                Merging Distributions.
  8202. * messages, warning:                    Warning Options.
  8203. * messages, warning and error:          Warnings and Errors.
  8204. * MIL-STD 1753:                         Fortran Dialect Options.
  8205. * missing bison:                        Missing bison?.
  8206. * missing makeinfo:                     Missing makeinfo?.
  8207. * missing debug features:               Debugging Options.
  8208. * mistakes:                             What is GNU Fortran?.
  8209. * modifying g77:                        Unpacking.
  8210. * NAMELIST statement:                   Extensions.
  8211. * naming conflicts:                     Disappointments.
  8212. * native compiler:                      Installing f77.
  8213. * negative forms of options:            Invoking G77.
  8214. * new users:                            Getting Started.
  8215. * newbies:                              Getting Started.
  8216. * null byte, trailing:                  Character and Hollerith Constants.
  8217. * number of trips:                      Loops.
  8218. * object code:                          Object Compatibility.
  8219. * octal constants:                      Dialects.
  8220. * OPEN statement:                       Missing Features.
  8221. * optimizations, Pentium:               Unpacking.
  8222. * optimize options:                     Optimize Options.
  8223. * options to control warnings:          Warning Options.
  8224. * options, -driver <1>:                 G77 and GCC.
  8225. * options, -driver:                     Invoking G77.
  8226. * options, -fGROUP-intrinsics-hide:     Overly Convenient Options.
  8227. * options, -fcaller-saves:              Optimize Options.
  8228. * options, -fcase-initcap:              Fortran Dialect Options.
  8229. * options, -fcase-lower:                Fortran Dialect Options.
  8230. * options, -fcase-preserve:             Fortran Dialect Options.
  8231. * options, -fcase-strict-lower:         Fortran Dialect Options.
  8232. * options, -fcase-strict-upper:         Fortran Dialect Options.
  8233. * options, -fcase-upper:                Fortran Dialect Options.
  8234. * options, -fdcp-intrinsics-delete:     Fortran Dialect Options.
  8235. * options, -fdcp-intrinsics-disable:    Fortran Dialect Options.
  8236. * options, -fdcp-intrinsics-enable:     Fortran Dialect Options.
  8237. * options, -fdcp-intrinsics-hide:       Fortran Dialect Options.
  8238. * options, -fdelayed-branch:            Optimize Options.
  8239. * options, -fdollar-ok:                 Fortran Dialect Options.
  8240. * options, -fexpensive-optimizations:   Optimize Options.
  8241. * options, -ff2c-intrinsics-delete:     Fortran Dialect Options.
  8242. * options, -ff2c-intrinsics-disable:    Fortran Dialect Options.
  8243. * options, -ff2c-intrinsics-enable:     Fortran Dialect Options.
  8244. * options, -ff2c-intrinsics-hide:       Fortran Dialect Options.
  8245. * options, -ff2c-library:               Code Gen Options.
  8246. * options, -ff90:                       Fortran Dialect Options.
  8247. * options, -ff90-intrinsics-delete:     Fortran Dialect Options.
  8248. * options, -ff90-intrinsics-disable:    Fortran Dialect Options.
  8249. * options, -ff90-intrinsics-enable:     Fortran Dialect Options.
  8250. * options, -ff90-intrinsics-hide:       Fortran Dialect Options.
  8251. * options, -ff90-not-vxt:               Fortran Dialect Options.
  8252. * options, -ffast-math:                 Optimize Options.
  8253. * options, -ffixed-line-length-N:       Fortran Dialect Options.
  8254. * options, -ffloat-store:               Optimize Options.
  8255. * options, -fforce-addr:                Optimize Options.
  8256. * options, -fforce-mem:                 Optimize Options.
  8257. * options, -ffree-form:                 Fortran Dialect Options.
  8258. * options, -finit-local-zero <1>:       Overly Convenient Options.
  8259. * options, -finit-local-zero:           Code Gen Options.
  8260. * options, -fintrin-case-any:           Fortran Dialect Options.
  8261. * options, -fintrin-case-initcap:       Fortran Dialect Options.
  8262. * options, -fintrin-case-lower:         Fortran Dialect Options.
  8263. * options, -fintrin-case-upper:         Fortran Dialect Options.
  8264. * options, -fmatch-case-any:            Fortran Dialect Options.
  8265. * options, -fmatch-case-initcap:        Fortran Dialect Options.
  8266. * options, -fmatch-case-lower:          Fortran Dialect Options.
  8267. * options, -fmatch-case-upper:          Fortran Dialect Options.
  8268. * options, -fmil-intrinsics-delete:     Fortran Dialect Options.
  8269. * options, -fmil-intrinsics-disable:    Fortran Dialect Options.
  8270. * options, -fmil-intrinsics-enable:     Fortran Dialect Options.
  8271. * options, -fmil-intrinsics-hide:       Fortran Dialect Options.
  8272. * options, -fno-automatic <1>:          Overly Convenient Options.
  8273. * options, -fno-automatic:              Code Gen Options.
  8274. * options, -fno-backslash:              Fortran Dialect Options.
  8275. * options, -fno-common:                 Code Gen Options.
  8276. * options, -fno-f2c <1>:                Code Gen Options.
  8277. * options, -fno-f2c:                    Faster Programs.
  8278. * options, -fno-fixed-form:             Fortran Dialect Options.
  8279. * options, -fno-ident:                  Code Gen Options.
  8280. * options, -fno-inline:                 Optimize Options.
  8281. * options, -fno-second-underscore:      Code Gen Options.
  8282. * options, -fno-ugly-args:              Warning Options.
  8283. * options, -fno-ugly-init:              Warning Options.
  8284. * options, -fno-underscoring:           Code Gen Options.
  8285. * options, -fpack-struct:               Code Gen Options.
  8286. * options, -fpcc-struct-return:         Code Gen Options.
  8287. * options, -fpedantic:                  Warning Options.
  8288. * options, -freg-struct-return:         Code Gen Options.
  8289. * options, -frerun-cse-after-loop:      Optimize Options.
  8290. * options, -fschedule-insns:            Optimize Options.
  8291. * options, -fschedule-insns2:           Optimize Options.
  8292. * options, -fset-g77-defaults:          Overall Options.
  8293. * options, -fshort-double:              Code Gen Options.
  8294. * options, -fsource-case-lower:         Fortran Dialect Options.
  8295. * options, -fsource-case-preserve:      Fortran Dialect Options.
  8296. * options, -fsource-case-upper:         Fortran Dialect Options.
  8297. * options, -fstrength-reduce:           Optimize Options.
  8298. * options, -fsymbol-case-any:           Fortran Dialect Options.
  8299. * options, -fsymbol-case-initcap:       Fortran Dialect Options.
  8300. * options, -fsymbol-case-lower:         Fortran Dialect Options.
  8301. * options, -fsymbol-case-upper:         Fortran Dialect Options.
  8302. * options, -fsyntax-only:               Warning Options.
  8303. * options, -fugly <1>:                  Overly Convenient Options.
  8304. * options, -fugly:                      Warning Options.
  8305. * options, -funix-intrinsics-delete:    Fortran Dialect Options.
  8306. * options, -funix-intrinsics-disable:   Fortran Dialect Options.
  8307. * options, -funix-intrinsics-enable:    Fortran Dialect Options.
  8308. * options, -funix-intrinsics-hide:      Fortran Dialect Options.
  8309. * options, -funroll-all-loops:          Optimize Options.
  8310. * options, -funroll-loops:              Optimize Options.
  8311. * options, -fversion:                   Overall Options.
  8312. * options, -fvxt-intrinsics-delete:     Fortran Dialect Options.
  8313. * options, -fvxt-intrinsics-disable:    Fortran Dialect Options.
  8314. * options, -fvxt-intrinsics-enable:     Fortran Dialect Options.
  8315. * options, -fvxt-intrinsics-hide:       Fortran Dialect Options.
  8316. * options, -fvxt-not-f90:               Fortran Dialect Options.
  8317. * options, -fzeros:                     Code Gen Options.
  8318. * options, -g:                          Debugging Options.
  8319. * options, -I-:                         Directory Options.
  8320. * options, -Idir:                       Directory Options.
  8321. * options, -pedantic:                   Warning Options.
  8322. * options, -pedantic-errors:            Warning Options.
  8323. * options, -v:                          G77 and GCC.
  8324. * options, -W:                          Warning Options.
  8325. * options, -Waggregate-return:          Warning Options.
  8326. * options, -Wall:                       Warning Options.
  8327. * options, -Wcomment:                   Warning Options.
  8328. * options, -Wconversion:                Warning Options.
  8329. * options, -Werror:                     Warning Options.
  8330. * options, -Wformat:                    Warning Options.
  8331. * options, -Wid-clash-LEN:              Warning Options.
  8332. * options, -Wimplicit:                  Warning Options.
  8333. * options, -Wlarger-than-LEN:           Warning Options.
  8334. * options, -Wparentheses:               Warning Options.
  8335. * options, -Wredundant-decls:           Warning Options.
  8336. * options, -Wshadow:                    Warning Options.
  8337. * options, -Wsurprising:                Warning Options.
  8338. * options, -Wswitch:                    Warning Options.
  8339. * options, -Wtraditional:               Warning Options.
  8340. * options, -Wuninitialized:             Warning Options.
  8341. * options, -Wunused:                    Warning Options.
  8342. * options, code generation:             Code Gen Options.
  8343. * options, debugging:                   Debugging Options.
  8344. * options, dialect:                     Fortran Dialect Options.
  8345. * options, directory search:            Directory Options.
  8346. * options, GNU Fortran command:         Invoking G77.
  8347. * options, negative forms:              Invoking G77.
  8348. * options, optimization:                Optimize Options.
  8349. * options, overall:                     Overall Options.
  8350. * options, overly convenient:           Overly Convenient Options.
  8351. * options, preprocessor:                Preprocessor Options.
  8352. * OR intrinsic:                         Missing Features.
  8353. * order of evaluation, side effects:    Non-bugs.
  8354. * ordering, array:                      Arrays.
  8355. * overall options:                      Overall Options.
  8356. * overflow:                             Warning Options.
  8357. * overly convenient options:            Overly Convenient Options.
  8358. * packages:                             Unpacking.
  8359. * PARAMETER statement:                  Missing Features.
  8360. * parameters, unused:                   Warning Options.
  8361. * patch files:                          General Problems.
  8362. * patch files, creating:                Merging Distributions.
  8363. * pedantic compilation:                 Pedantic Compilation.
  8364. * Pentium optimizations:                Unpacking.
  8365. * POINTER statement:                    Missing Features.
  8366. * pre-installation checks:              Pre-installation Checks.
  8367. * preprocessor <1>:                     Bug Reporting.
  8368. * preprocessor <1>:                     What is GNU Fortran?.
  8369. * preprocessor:                         Overall Options.
  8370. * preprocessor options:                 Preprocessor Options.
  8371. * prerequisites:                        Prerequisites.
  8372. * printing version information <1>:     Overall Options.
  8373. * printing version information:         What is GNU Fortran?.
  8374. * problems installing:                  Problems Installing.
  8375. * procedures:                           Procedures.
  8376. * PROGRAM statement:                    Main Program Unit.
  8377. * programs, cc1:                        What is GNU Fortran?.
  8378. * programs, cc1plus:                    What is GNU Fortran?.
  8379. * programs, compiling:                  G77 and GCC.
  8380. * programs, cpp <1>:                    Bug Reporting.
  8381. * programs, cpp <1>:                    What is GNU Fortran?.
  8382. * programs, cpp <1>:                    Overall Options.
  8383. * programs, cpp:                        Preprocessor Options.
  8384. * programs, f771:                       What is GNU Fortran?.
  8385. * programs, speeding up:                Faster Programs.
  8386. * questionable instructions:            What is GNU Fortran?.
  8387. * quick start:                          Quick Start.
  8388. * REAL type:                            Types.
  8389. * recent versions <1>:                  Changes.
  8390. * recent versions:                      News.
  8391. * RECORD statement:                     Missing Features.
  8392. * reporting bugs:                       Bugs.
  8393. * requirements, GNU C:                  General Problems.
  8394. * RETURN statement <1>:                 Functions.
  8395. * RETURN statement:                     Alternate Returns.
  8396. * return type of functions:             Functions.
  8397. * row-major ordering:                   Arrays.
  8398. * run-time library:                     What is GNU Fortran?.
  8399. * run-time options:                     Code Gen Options.
  8400. * SAVE statement:                       Code Gen Options.
  8401. * search path:                          Directory Options.
  8402. * searching for included files:         Directory Options.
  8403. * semicolons:                           Extensions.
  8404. * separate distributions:               Merging Distributions.
  8405. * SHIFT intrinsic:                      Missing Features.
  8406. * side effects:                         Fortran Dialect Options.
  8407. * side effects, order of evaluation:    Non-bugs.
  8408. * SIGNAL() intrinsic:                   Fortran Dialect Options.
  8409. * signature of procedures:              Procedures.
  8410. * slow compiler:                        Large Initialization.
  8411. * source code <1>:                      Case Sensitivity.
  8412. * source code <1>:                      What is GNU Fortran?.
  8413. * source code <1>:                      Unpacking.
  8414. * source code:                          Source Form.
  8415. * source file:                          What is GNU Fortran?.
  8416. * source file form:                     Fortran Dialect Options.
  8417. * source file format <1>:               Fortran Dialect Options.
  8418. * source file format <1>:               Case Sensitivity.
  8419. * source file format:                   Source Form.
  8420. * source form:                          Source Form.
  8421. * source tree:                          Unpacking.
  8422. * speed, compiler:                      Large Initialization.
  8423. * speeding up loops:                    Optimize Options.
  8424. * speeding up programs:                 Faster Programs.
  8425. * standard support:                     Standard Support.
  8426. * statement labels, assigned:           Assigned Statement Labels.
  8427. * statements, ACCEPT:                   Missing Features.
  8428. * statements, ASSIGN:                   Assigned Statement Labels.
  8429. * statements, BLOCK DATA <1>:           Disappointments.
  8430. * statements, BLOCK DATA:               Block Data and Libraries.
  8431. * statements, CLOSE:                    Missing Features.
  8432. * statements, COMMON <1>:               Disappointments.
  8433. * statements, COMMON:                   Common Blocks.
  8434. * statements, DATA:                     Code Gen Options.
  8435. * statements, DIMENSION <1>:            Adjustable Arrays.
  8436. * statements, DIMENSION:                Arrays.
  8437. * statements, DO <1>:                   Loops.
  8438. * statements, DO:                       Warning Options.
  8439. * statements, ENTRY:                    Alternate Entry Points.
  8440. * statements, EQUIVALENCE:              Local Equivalence Areas.
  8441. * statements, FORMAT:                   Missing Features.
  8442. * statements, FUNCTION <1>:             Functions.
  8443. * statements, FUNCTION:                 Procedures.
  8444. * statements, GOTO:                     Assigned Statement Labels.
  8445. * statements, IMPLICIT CHARACTER*(*):   Disappointments.
  8446. * statements, INCLUDE <1>:              Directory Options.
  8447. * statements, INCLUDE <1>:              Preprocessor Options.
  8448. * statements, INCLUDE:                  Bug Reporting.
  8449. * statements, INQUIRE:                  Missing Features.
  8450. * statements, MAP:                      Missing Features.
  8451. * statements, NAMELIST:                 Extensions.
  8452. * statements, OPEN:                     Missing Features.
  8453. * statements, PARAMETER:                Missing Features.
  8454. * statements, POINTER:                  Missing Features.
  8455. * statements, PROGRAM:                  Main Program Unit.
  8456. * statements, RECORD:                   Missing Features.
  8457. * statements, RETURN <1>:               Alternate Returns.
  8458. * statements, RETURN:                   Functions.
  8459. * statements, SAVE:                     Code Gen Options.
  8460. * statements, separated by semicolon:   Extensions.
  8461. * statements, STRUCTURE:                Missing Features.
  8462. * statements, SUBROUTINE <1>:           Procedures.
  8463. * statements, SUBROUTINE:               Alternate Returns.
  8464. * statements, TYPE <1>:                 Dialects.
  8465. * statements, TYPE:                     Missing Features.
  8466. * statements, UNION:                    Missing Features.
  8467. * straight build:                       Straight Build.
  8468. * STRUCTURE statement:                  Missing Features.
  8469. * SUBROUTINE statement <1>:             Procedures.
  8470. * SUBROUTINE statement:                 Alternate Returns.
  8471. * subroutines:                          Alternate Returns.
  8472. * subroutines, intrinsic:               Fortran Dialect Options.
  8473. * suffixes, file name:                  Overall Options.
  8474. * support for gcc versions:             Merging Distributions.
  8475. * support for ANSI FORTRAN 77:          Standard Support.
  8476. * support, gdb:                         But-bugs.
  8477. * support, f77:                         Non-bugs.
  8478. * support, Fortran 90:                  Missing Features.
  8479. * suppressing warnings:                 Warning Options.
  8480. * symbol names <1>:                     Names.
  8481. * symbol names:                         Fortran Dialect Options.
  8482. * symbol names, transforming:           Code Gen Options.
  8483. * symbol names, underscores:            Code Gen Options.
  8484. * syntax checking:                      Warning Options.
  8485. * SYSTEM() intrinsic:                   Fortran Dialect Options.
  8486. * tab characters:                       Source Form.
  8487. * texinfo:                              Updating Documentation.
  8488. * trailing null byte:                   Character and Hollerith Constants.
  8489. * transformation of symbol names:       Names.
  8490. * transforming symbol names:            Code Gen Options.
  8491. * translation of user programs:         What is GNU Fortran?.
  8492. * trips, number of:                     Loops.
  8493. * TYPE statement <1>:                   Missing Features.
  8494. * TYPE statement:                       Dialects.
  8495. * typeless constants:                   Changes.
  8496. * types, COMPLEX:                       Types.
  8497. * types, constants:                     Constants.
  8498. * types, DOUBLE COMPLEX:                Types.
  8499. * types, DOUBLE PRECISION:              Types.
  8500. * types, file:                          Overall Options.
  8501. * types, INTEGER:                       Types.
  8502. * types, LOGICAL:                       Types.
  8503. * types, of data:                       Types.
  8504. * types, REAL:                          Types.
  8505. * ugly features <1>:                    Distensions.
  8506. * ugly features:                        Warning Options.
  8507. * undefined behavior:                   Bug Criteria.
  8508. * undefined function value:             Bug Criteria.
  8509. * undefined reference (_main):          But-bugs.
  8510. * undefined reference (_strtoul):       General Problems.
  8511. * underscores:                          Code Gen Options.
  8512. * uninitialized variables <1>:          Warning Options.
  8513. * uninitialized variables:              Code Gen Options.
  8514. * UNION statement:                      Missing Features.
  8515. * UNIX intrinsics:                      Fortran Dialect Options.
  8516. * unpacking distributions:              Unpacking.
  8517. * unrecognized file format:             What is GNU Fortran?.
  8518. * unresolved reference (various):       But-bugs.
  8519. * unrolling loops:                      Optimize Options.
  8520. * unsupported warnings:                 Warning Options.
  8521. * unused arguments:                     Warning Options.
  8522. * unused dummies:                       Warning Options.
  8523. * unused parameters:                    Warning Options.
  8524. * unused variables:                     Warning Options.
  8525. * updating info directory:              Updating Documentation.
  8526. * uppercase letters:                    Case Sensitivity.
  8527. * user-visible changes:                 Changes.
  8528. * variables, initialization of:         Code Gen Options.
  8529. * variables, uninitialized <1>:         Warning Options.
  8530. * variables, uninitialized:             Code Gen Options.
  8531. * variables, unused:                    Warning Options.
  8532. * version information, printing <1>:    What is GNU Fortran?.
  8533. * version information, printing:        Overall Options.
  8534. * versions of gcc:                      Merging Distributions.
  8535. * versions, recent <1>:                 Changes.
  8536. * versions, recent:                     News.
  8537. * VXT extensions:                       Dialects.
  8538. * VXT features <1>:                     Dialects.
  8539. * VXT features:                         Fortran Dialect Options.
  8540. * VXT intrinsics:                       Fortran Dialect Options.
  8541. * warning messages:                     Warning Options.
  8542. * warnings:                             What is GNU Fortran?.
  8543. * warnings vs errors:                   Warnings and Errors.
  8544. * warnings, all:                        Warning Options.
  8545. * warnings, extra:                      Warning Options.
  8546. * warnings, implicit declaration:       Warning Options.
  8547. * warnings, unsupported:                Warning Options.
  8548. * why separate distributions:           Merging Distributions.
  8549. * wisdom:                               Collected Fortran Wisdom.
  8550. * writing code:                         Collected Fortran Wisdom.
  8551. * zero byte, trailing:                  Character and Hollerith Constants.
  8552. * _strtoul:                             General Problems.
  8553.  
  8554.  
  8555. 
  8556. Tag Table:
  8557. Node: Top1563
  8558. Node: Copying3134
  8559. Node: Contributors22331
  8560. Node: Funding25183
  8561. Node: Funding GNU Fortran27701
  8562. Node: Look and Feel30520
  8563. Node: Getting Started31037
  8564. Node: What is GNU Fortran?33370
  8565. Node: G77 and GCC42922
  8566. Node: Invoking G7744288
  8567. Node: Option Summary46377
  8568. Node: Overall Options50422
  8569. Node: Fortran Dialect Options53759
  8570. Node: Warning Options61505
  8571. Node: Debugging Options70141
  8572. Node: Optimize Options70989
  8573. Node: Preprocessor Options73251
  8574. Node: Directory Options74001
  8575. Node: Code Gen Options75250
  8576. Node: Environment Variables82351
  8577. Node: News82824
  8578. Node: Changes107364
  8579. Node: Language113636
  8580. Node: Standard Support115169
  8581. Node: Extensions117580
  8582. Node: Types120540
  8583. Node: Constants125025
  8584. Node: Source Form126194
  8585. Node: Pedantic Compilation130041
  8586. Node: Case Sensitivity133433
  8587. Node: Intrinsics142015
  8588. Node: Dialects145294
  8589. Node: Object Compatibility146954
  8590. Node: Dropping f2c Compatibility149280
  8591. Node: Other Compilers152061
  8592. Node: Distensions153848
  8593. Node: Installation156193
  8594. Node: Prerequisites157346
  8595. Node: Problems Installing161898
  8596. Node: General Problems162542
  8597. Node: Cross-compiler Problems165629
  8598. Node: Quick Start167661
  8599. Node: Complete Installation175650
  8600. Node: Unpacking176245
  8601. Node: Merging Distributions179359
  8602. Node: Installing f77184604
  8603. Node: Installing f2c185964
  8604. Node: Patching GNU Fortran188904
  8605. Node: Where to Install190154
  8606. Node: Configuring gcc193405
  8607. Node: Building gcc195192
  8608. Node: Bootstrap Build197214
  8609. Node: Straight Build199137
  8610. Node: Pre-installation Checks200541
  8611. Node: Installation of Binaries203765
  8612. Node: Updating Documentation205125
  8613. Node: Missing bison?205961
  8614. Node: Missing makeinfo?207328
  8615. Node: Distributing Binaries207868
  8616. Node: Settings213578
  8617. Node: Maximum Stackable Size214425
  8618. Node: Floating-point Bit Patterns215006
  8619. Node: Large Initialization215767
  8620. Node: Alpha Problems217364
  8621. Node: Debugging and Interfacing218443
  8622. Node: Names221016
  8623. Node: Main Program Unit224077
  8624. Node: Arrays226434
  8625. Node: Procedures229776
  8626. Node: Adjustable Arrays232152
  8627. Node: Alternate Returns235025
  8628. Node: Functions235912
  8629. Node: Common Blocks237547
  8630. Node: Local Equivalence Areas238722
  8631. Node: Alternate Entry Points240241
  8632. Node: Assigned Statement Labels247022
  8633. Node: Collected Fortran Wisdom248876
  8634. Node: Overly Convenient Options250327
  8635. Node: Block Data and Libraries253327
  8636. Node: Faster Programs255741
  8637. Node: Working Programs257364
  8638. Node: Loops260047
  8639. Node: Advantages Over f2c265266
  8640. Node: Language Extensions266171
  8641. Node: Compiler Options266693
  8642. Node: Compiler Speed267160
  8643. Node: Program Speed267884
  8644. Node: Ease of Debugging269182
  8645. Node: Character and Hollerith Constants271635
  8646. Node: Trouble272444
  8647. Node: But-bugs273911
  8648. Node: GPC Bugs279044
  8649. Node: Missing Features283336
  8650. Node: Disappointments297381
  8651. Node: Non-bugs299795
  8652. Node: Warnings and Errors311379
  8653. Node: Open Questions313078
  8654. Node: Bugs314381
  8655. Node: Bug Criteria315786
  8656. Node: Bug Lists318047
  8657. Node: Bug Reporting318832
  8658. Node: Sending Patches332259
  8659. Node: Service337756
  8660. Node: Index338230
  8661. 
  8662. End Tag Table
  8663.