g77 - Online Manual Page Of Unix/Linux

  Command: man perldoc info search(apropos)

WebSearch:
Our Recommended Sites: Full-Featured Editor
 

File: g77.info,  Node: Top,  Next: Copying,  Up: (DIR)

Introduction
************

This manual documents how to run, install and port `g77', as well as
its new features and incompatibilities, and how to report bugs.  It
corresponds to the GCC-3.4.6 version of `g77'.

* Menu:

* Copying::         GNU General Public License says
                    how you can copy and share GNU Fortran.
* GNU Free Documentation License::
		    How you can copy and share this manual.
* Contributors::    People who have contributed to GNU Fortran.
* Funding::         How to help assure continued work for free software.
* Funding GNU Fortran::  How to help assure continued work on GNU Fortran.

* Getting Started:: Finding your way around this manual.
* What is GNU Fortran?::  How `g77' fits into the universe.
* G77 and GCC::     You can compile Fortran, C, or other programs.
* Invoking G77::    Command options supported by `g77'.
* News::            News about recent releases of `g77'.
* Changes::         User-visible changes to recent releases of `g77'.
* Language::        The GNU Fortran language.
* Compiler::        The GNU Fortran compiler.
* Other Dialects::  Dialects of Fortran supported by `g77'.
* Other Compilers:: Fortran compilers other than `g77'.
* Other Languages:: Languages other than Fortran.
* Debugging and Interfacing::  How `g77' generates code.
* Collected Fortran Wisdom::  How to avoid Trouble.
* Trouble::         If you have trouble with GNU Fortran.
* Open Questions::  Things we'd like to know.
* Bugs::            How, why, and where to report bugs.
* Service::         How to find suppliers of support for GNU Fortran.

* Adding Options::  Guidance on teaching `g77' about new options.
* Projects::        Projects for `g77' internals hackers.
* Front End::       Design and implementation of the `g77' front end.

* M: Diagnostics.   Diagnostics produced by `g77'.

* Keyword Index::   Index of concepts and symbol names.

File: g77.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Top,  Up: Top

GNU GENERAL PUBLIC LICENSE
**************************

                         Version 2, June 1991

     Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

Preamble
========

The licenses for most software are designed to take away your freedom
to share and change it.  By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

   When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it in
new free programs; and that you know you can do these things.

   To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

   For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

   We protect your rights with two steps: (1) copyright the software,
and (2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

   Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

   Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

   The precise terms and conditions for copying, distribution and
modification follow.

    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  0. This License applies to any program or other work which contains a
     notice placed by the copyright holder saying it may be distributed
     under the terms of this General Public License.  The "Program",
     below, refers to any such program or work, and a "work based on
     the Program" means either the Program or any derivative work under
     copyright law: that is to say, a work containing the Program or a
     portion of it, either verbatim or with modifications and/or
     translated into another language.  (Hereinafter, translation is
     included without limitation in the term "modification".)  Each
     licensee is addressed as "you".

     Activities other than copying, distribution and modification are
     not covered by this License; they are outside its scope.  The act
     of running the Program is not restricted, and the output from the
     Program is covered only if its contents constitute a work based on
     the Program (independent of having been made by running the
     Program).  Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
     source code as you receive it, in any medium, provided that you
     conspicuously and appropriately publish on each copy an appropriate
     copyright notice and disclaimer of warranty; keep intact all the
     notices that refer to this License and to the absence of any
     warranty; and give any other recipients of the Program a copy of
     this License along with the Program.

     You may charge a fee for the physical act of transferring a copy,
     and you may at your option offer warranty protection in exchange
     for a fee.

  2. You may modify your copy or copies of the Program or any portion
     of it, thus forming a work based on the Program, and copy and
     distribute such modifications or work under the terms of Section 1
     above, provided that you also meet all of these conditions:

       a. You must cause the modified files to carry prominent notices
          stating that you changed the files and the date of any change.

       b. You must cause any work that you distribute or publish, that
          in whole or in part contains or is derived from the Program
          or any part thereof, to be licensed as a whole at no charge
          to all third parties under the terms of this License.

       c. If the modified program normally reads commands interactively
          when run, you must cause it, when started running for such
          interactive use in the most ordinary way, to print or display
          an announcement including an appropriate copyright notice and
          a notice that there is no warranty (or else, saying that you
          provide a warranty) and that users may redistribute the
          program under these conditions, and telling the user how to
          view a copy of this License.  (Exception: if the Program
          itself is interactive but does not normally print such an
          announcement, your work based on the Program is not required
          to print an announcement.)

     These requirements apply to the modified work as a whole.  If
     identifiable sections of that work are not derived from the
     Program, and can be reasonably considered independent and separate
     works in themselves, then this License, and its terms, do not
     apply to those sections when you distribute them as separate
     works.  But when you distribute the same sections as part of a
     whole which is a work based on the Program, the distribution of
     the whole must be on the terms of this License, whose permissions
     for other licensees extend to the entire whole, and thus to each
     and every part regardless of who wrote it.

     Thus, it is not the intent of this section to claim rights or
     contest your rights to work written entirely by you; rather, the
     intent is to exercise the right to control the distribution of
     derivative or collective works based on the Program.

     In addition, mere aggregation of another work not based on the
     Program with the Program (or with a work based on the Program) on
     a volume of a storage or distribution medium does not bring the
     other work under the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
     under Section 2) in object code or executable form under the terms
     of Sections 1 and 2 above provided that you also do one of the
     following:

       a. Accompany it with the complete corresponding machine-readable
          source code, which must be distributed under the terms of
          Sections 1 and 2 above on a medium customarily used for
          software interchange; or,

       b. Accompany it with a written offer, valid for at least three
          years, to give any third party, for a charge no more than your
          cost of physically performing source distribution, a complete
          machine-readable copy of the corresponding source code, to be
          distributed under the terms of Sections 1 and 2 above on a
          medium customarily used for software interchange; or,

       c. Accompany it with the information you received as to the offer
          to distribute corresponding source code.  (This alternative is
          allowed only for noncommercial distribution and only if you
          received the program in object code or executable form with
          such an offer, in accord with Subsection b above.)

     The source code for a work means the preferred form of the work for
     making modifications to it.  For an executable work, complete
     source code means all the source code for all modules it contains,
     plus any associated interface definition files, plus the scripts
     used to control compilation and installation of the executable.
     However, as a special exception, the source code distributed need
     not include anything that is normally distributed (in either
     source or binary form) with the major components (compiler,
     kernel, and so on) of the operating system on which the executable
     runs, unless that component itself accompanies the executable.

     If distribution of executable or object code is made by offering
     access to copy from a designated place, then offering equivalent
     access to copy the source code from the same place counts as
     distribution of the source code, even though third parties are not
     compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense or distribute the Program is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses
     terminated so long as such parties remain in full compliance.

  5. You are not required to accept this License, since you have not
     signed it.  However, nothing else grants you permission to modify
     or distribute the Program or its derivative works.  These actions
     are prohibited by law if you do not accept this License.
     Therefore, by modifying or distributing the Program (or any work
     based on the Program), you indicate your acceptance of this
     License to do so, and all its terms and conditions for copying,
     distributing or modifying the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
     Program), the recipient automatically receives a license from the
     original licensor to copy, distribute or modify the Program
     subject to these terms and conditions.  You may not impose any
     further restrictions on the recipients' exercise of the rights
     granted herein.  You are not responsible for enforcing compliance
     by third parties to this License.

  7. If, as a consequence of a court judgment or allegation of patent
     infringement or for any other reason (not limited to patent
     issues), conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot distribute so as to satisfy simultaneously
     your obligations under this License and any other pertinent
     obligations, then as a consequence you may not distribute the
     Program at all.  For example, if a patent license would not permit
     royalty-free redistribution of the Program by all those who
     receive copies directly or indirectly through you, then the only
     way you could satisfy both it and this License would be to refrain
     entirely from distribution of the Program.

     If any portion of this section is held invalid or unenforceable
     under any particular circumstance, the balance of the section is
     intended to apply and the section as a whole is intended to apply
     in other circumstances.

     It is not the purpose of this section to induce you to infringe any
     patents or other property right claims or to contest validity of
     any such claims; this section has the sole purpose of protecting
     the integrity of the free software distribution system, which is
     implemented by public license practices.  Many people have made
     generous contributions to the wide range of software distributed
     through that system in reliance on consistent application of that
     system; it is up to the author/donor to decide if he or she is
     willing to distribute software through any other system and a
     licensee cannot impose that choice.

     This section is intended to make thoroughly clear what is believed
     to be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
     certain countries either by patents or by copyrighted interfaces,
     the original copyright holder who places the Program under this
     License may add an explicit geographical distribution limitation
     excluding those countries, so that distribution is permitted only
     in or among countries not thus excluded.  In such case, this
     License incorporates the limitation as if written in the body of
     this License.

  9. The Free Software Foundation may publish revised and/or new
     versions of the General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.

     Each version is given a distinguishing version number.  If the
     Program specifies a version number of this License which applies
     to it and "any later version", you have the option of following
     the terms and conditions either of that version or of any later
     version published by the Free Software Foundation.  If the Program
     does not specify a version number of this License, you may choose
     any version ever published by the Free Software Foundation.

 10. If you wish to incorporate parts of the Program into other free
     programs whose distribution conditions are different, write to the
     author to ask for permission.  For software which is copyrighted
     by the Free Software Foundation, write to the Free Software
     Foundation; we sometimes make exceptions for this.  Our decision
     will be guided by the two goals of preserving the free status of
     all derivatives of our free software and of promoting the sharing
     and reuse of software generally.

                                NO WARRANTY
 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
     HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
     FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
     QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
     SERVICING, REPAIR OR CORRECTION.

 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

                      END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
=============================================

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

   To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

     ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
     Copyright (C) YEAR  NAME OF AUTHOR

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software Foundation,
     Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

   Also add information on how to contact you by electronic and paper
mail.

   If the program is interactive, make it output a short notice like
this when it starts in an interactive mode:

     Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR
     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
     type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.

   The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.

   You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary.  Here is a sample; alter the names:

     Yoyodyne, Inc., hereby disclaims all copyright interest in the program
     `Gnomovision' (which makes passes at compilers) written by James Hacker.

     SIGNATURE OF TY COON, 1 April 1989
     Ty Coon, President of Vice

   This General Public License does not permit incorporating your
program into proprietary programs.  If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library.  If this is what you want to do, use the
GNU Library General Public License instead of this License.

File: g77.info,  Node: GNU Free Documentation License,  Next: Contributors,  Prev: Copying,  Up: Top

GNU Free Documentation License
******************************

                      Version 1.2, November 2002

     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307, USA

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

  0. PREAMBLE

     The purpose of this License is to make a manual, textbook, or other
     functional and useful document "free" in the sense of freedom: to
     assure everyone the effective freedom to copy and redistribute it,
     with or without modifying it, either commercially or
     noncommercially.  Secondarily, this License preserves for the
     author and publisher a way to get credit for their work, while not
     being considered responsible for modifications made by others.

     This License is a kind of "copyleft", which means that derivative
     works of the document must themselves be free in the same sense.
     It complements the GNU General Public License, which is a copyleft
     license designed for free software.

     We have designed this License in order to use it for manuals for
     free software, because free software needs free documentation: a
     free program should come with manuals providing the same freedoms
     that the software does.  But this License is not limited to
     software manuals; it can be used for any textual work, regardless
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
     instruction or reference.

  1. APPLICABILITY AND DEFINITIONS

     This License applies to any manual or other work, in any medium,
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
     grants a world-wide, royalty-free license, unlimited in duration,
     to use that work under the conditions stated herein.  The
     "Document", below, refers to any such manual or work.  Any member
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.

     A "Modified Version" of the Document means any work containing the
     Document or a portion of it, either copied verbatim, or with
     modifications and/or translated into another language.

     A "Secondary Section" is a named appendix or a front-matter section
     of the Document that deals exclusively with the relationship of the
     publishers or authors of the Document to the Document's overall
     subject (or to related matters) and contains nothing that could
     fall directly within that overall subject.  (Thus, if the Document
     is in part a textbook of mathematics, a Secondary Section may not
     explain any mathematics.)  The relationship could be a matter of
     historical connection with the subject or with related matters, or
     of legal, commercial, philosophical, ethical or political position
     regarding them.

     The "Invariant Sections" are certain Secondary Sections whose
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.

     The "Cover Texts" are certain short passages of text that are
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
     that says that the Document is released under this License.  A
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     be at most 25 words.

     A "Transparent" copy of the Document means a machine-readable copy,
     represented in a format whose specification is available to the
     general public, that is suitable for revising the document
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".

     Examples of suitable formats for Transparent copies include plain
     ASCII without markup, Texinfo input format, LaTeX input format,
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.

     The "Title Page" means, for a printed book, the title page itself,
     plus such following pages as are needed to hold, legibly, the
     material this License requires to appear in the title page.  For
     works in formats which do not have any title page as such, "Title
     Page" means the text near the most prominent appearance of the
     work's title, preceding the beginning of the body of the text.

     A section "Entitled XYZ" means a named subunit of the Document
     whose title either is precisely XYZ or contains XYZ in parentheses
     following text that translates XYZ in another language.  (Here XYZ
     stands for a specific section name mentioned below, such as
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
     To "Preserve the Title" of such a section when you modify the
     Document means that it remains a section "Entitled XYZ" according
     to this definition.

     The Document may include Warranty Disclaimers next to the notice
     which states that this License applies to the Document.  These
     Warranty Disclaimers are considered to be included by reference in
     this License, but only as regards disclaiming warranties: any other
     implication that these Warranty Disclaimers may have is void and
     has no effect on the meaning of this License.

  2. VERBATIM COPYING

     You may copy and distribute the Document in any medium, either
     commercially or noncommercially, provided that this License, the
     copyright notices, and the license notice saying this License
     applies to the Document are reproduced in all copies, and that you
     add no other conditions whatsoever to those of this License.  You
     may not use technical measures to obstruct or control the reading
     or further copying of the copies you make or distribute.  However,
     you may accept compensation in exchange for copies.  If you
     distribute a large enough number of copies you must also follow
     the conditions in section 3.

     You may also lend copies, under the same conditions stated above,
     and you may publicly display copies.

  3. COPYING IN QUANTITY

     If you publish printed copies (or copies in media that commonly
     have printed covers) of the Document, numbering more than 100, and
     the Document's license notice requires Cover Texts, you must
     enclose the copies in covers that carry, clearly and legibly, all
     these Cover Texts: Front-Cover Texts on the front cover, and
     Back-Cover Texts on the back cover.  Both covers must also clearly
     and legibly identify you as the publisher of these copies.  The
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.

     If the required texts for either cover are too voluminous to fit
     legibly, you should put the first ones listed (as many as fit
     reasonably) on the actual cover, and continue the rest onto
     adjacent pages.

     If you publish or distribute Opaque copies of the Document
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.

     It is requested, but not required, that you contact the authors of
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.

  4. MODIFICATIONS

     You may copy and distribute a Modified Version of the Document
     under the conditions of sections 2 and 3 above, provided that you
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:

       A. Use in the Title Page (and on the covers, if any) a title
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.

       B. List on the Title Page, as authors, one or more persons or
          entities responsible for authorship of the modifications in
          the Modified Version, together with at least five of the
          principal authors of the Document (all of its principal
          authors, if it has fewer than five), unless they release you
          from this requirement.

       C. State on the Title page the name of the publisher of the
          Modified Version, as the publisher.

       D. Preserve all the copyright notices of the Document.

       E. Add an appropriate copyright notice for your modifications
          adjacent to the other copyright notices.

       F. Include, immediately after the copyright notices, a license
          notice giving the public permission to use the Modified
          Version under the terms of this License, in the form shown in
          the Addendum below.

       G. Preserve in that license notice the full lists of Invariant
          Sections and required Cover Texts given in the Document's
          license notice.

       H. Include an unaltered copy of this License.

       I. Preserve the section Entitled "History", Preserve its Title,
          and add to it an item stating at least the title, year, new
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.

       J. Preserve the network location, if any, given in the Document
          for public access to a Transparent copy of the Document, and
          likewise the network locations given in the Document for
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.

       K. For any section Entitled "Acknowledgements" or "Dedications",
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
          acknowledgements and/or dedications given therein.

       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.

       M. Delete any section Entitled "Endorsements".  Such a section
          may not be included in the Modified Version.

       N. Do not retitle any existing section to be Entitled
          "Endorsements" or to conflict in title with any Invariant
          Section.

       O. Preserve any Warranty Disclaimers.

     If the Modified Version includes new front-matter sections or
     appendices that qualify as Secondary Sections and contain no
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.

     You may add a section Entitled "Endorsements", provided it contains
     nothing but endorsements of your Modified Version by various
     parties--for example, statements of peer review or that the text
     has been approved by an organization as the authoritative
     definition of a standard.

     You may add a passage of up to five words as a Front-Cover Text,
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.

     The author(s) and publisher(s) of the Document do not by this
     License give permission to use their names for publicity for or to
     assert or imply endorsement of any Modified Version.

  5. COMBINING DOCUMENTS

     You may combine the Document with other documents released under
     this License, under the terms defined in section 4 above for
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
     unmodified, and list them all as Invariant Sections of your
     combined work in its license notice, and that you preserve all
     their Warranty Disclaimers.

     The combined work need only contain one copy of this License, and
     multiple identical Invariant Sections may be replaced with a single
     copy.  If there are multiple Invariant Sections with the same name
     but different contents, make the title of each such section unique
     by adding at the end of it, in parentheses, the name of the
     original author or publisher of that section if known, or else a
     unique number.  Make the same adjustment to the section titles in
     the list of Invariant Sections in the license notice of the
     combined work.

     In the combination, you must combine any sections Entitled
     "History" in the various original documents, forming one section
     Entitled "History"; likewise combine any sections Entitled
     "Acknowledgements", and any sections Entitled "Dedications".  You
     must delete all sections Entitled "Endorsements."

  6. COLLECTIONS OF DOCUMENTS

     You may make a collection consisting of the Document and other
     documents released under this License, and replace the individual
     copies of this License in the various documents with a single copy
     that is included in the collection, provided that you follow the
     rules of this License for verbatim copying of each of the
     documents in all other respects.

     You may extract a single document from such a collection, and
     distribute it individually under this License, provided you insert
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.

  7. AGGREGATION WITH INDEPENDENT WORKS

     A compilation of the Document or its derivatives with other
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
     copyright resulting from the compilation is not used to limit the
     legal rights of the compilation's users beyond what the individual
     works permit.  When the Document is included an aggregate, this
     License does not apply to the other works in the aggregate which
     are not themselves derivative works of the Document.

     If the Cover Text requirement of section 3 is applicable to these
     copies of the Document, then if the Document is less than one half
     of the entire aggregate, the Document's Cover Texts may be placed
     on covers that bracket the Document within the aggregate, or the
     electronic equivalent of covers if the Document is in electronic
     form.  Otherwise they must appear on printed covers that bracket
     the whole aggregate.

  8. TRANSLATION

     Translation is considered a kind of modification, so you may
     distribute translations of the Document under the terms of section
     4.  Replacing Invariant Sections with translations requires special
     permission from their copyright holders, but you may include
     translations of some or all Invariant Sections in addition to the
     original versions of these Invariant Sections.  You may include a
     translation of this License, and all the license notices in the
     Document, and any Warrany Disclaimers, provided that you also
     include the original English version of this License and the
     original versions of those notices and disclaimers.  In case of a
     disagreement between the translation and the original version of
     this License or a notice or disclaimer, the original version will
     prevail.

     If a section in the Document is Entitled "Acknowledgements",
     "Dedications", or "History", the requirement (section 4) to
     Preserve its Title (section 1) will typically require changing the
     actual title.

  9. TERMINATION

     You may not copy, modify, sublicense, or distribute the Document
     except as expressly provided for under this License.  Any other
     attempt to copy, modify, sublicense or distribute the Document is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses
     terminated so long as such parties remain in full compliance.

 10. FUTURE REVISIONS OF THIS LICENSE

     The Free Software Foundation may publish new, revised versions of
     the GNU Free Documentation License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.  See
     `http://www.gnu.org/copyleft/'.

     Each version of the License is given a distinguishing version
     number.  If the Document specifies that a particular numbered
     version of this License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that specified version or of any later version that has been
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.

ADDENDUM: How to use this License for your documents
====================================================

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:

       Copyright (C)  YEAR  YOUR NAME.
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.2
       or any later version published by the Free Software Foundation;
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
       A copy of the license is included in the section entitled ``GNU
       Free Documentation License''.

   If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this:

         with the Invariant Sections being LIST THEIR TITLES, with
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
         being LIST.

   If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

   If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.

File: g77.info,  Node: Contributors,  Next: Funding,  Prev: GNU Free Documentation License,  Up: Top

Contributors to GNU Fortran
***************************

In addition to James Craig Burley, who wrote the front end, many people
have helped create and improve GNU Fortran.

   * The packaging and compiler portions of GNU Fortran are based
     largely on the GCC compiler.  *Note Contributors to GCC:
     (gcc)Contributors, for more information.

   * The run-time library used by GNU Fortran is a repackaged version
     of the `libf2c' library (combined from the `libF77' and `libI77'
     libraries) provided as part of `f2c', available for free from
     `netlib' sites on the Internet.

   * Cygnus Support and The Free Software Foundation contributed
     significant money and/or equipment to Craig's efforts.

   * The following individuals served as alpha testers prior to `g77''s
     public release.  This work consisted of testing, researching,
     sometimes debugging, and occasionally providing small amounts of
     code and fixes for `g77', plus offering plenty of helpful advice
     to Craig:

          Jonathan Corbet

          Dr. Mark Fernyhough

          Takafumi Hayashi (The University of
          Aizu)--<takafumi AT u-aizu.jp>

          Kate Hedstrom

          Michel Kern (INRIA and Rice
          University)--<Michel.Kern AT inria.fr>

          Dr. A. O. V. Le Blanc

          Dave Love

          Rick Lutowski

          Toon Moene

          Rick Niles

          Derk Reefman

          Wayne K. Schroll

          Bill Thorson

          Pedro A. M. Vazquez

          Ian Watson

   * Dave Love (<d.love AT dl.uk>) wrote the libU77 part of the
     run-time library.

   * Scott Snyder (<snyder AT d0sgif.gov>) provided the patch to add
     rudimentary support for `INTEGER*1', `INTEGER*2', and `LOGICAL*1'.
     This inspired Craig to add further support, even though the
     resulting support would still be incomplete.  This support is
     believed to be completed at version 3.4 of `gcc' by Roger Sayle
     (<roger AT eyesopen.com>).

   * David Ronis (<ronis AT onsager.ca>) inspired and
     encouraged Craig to rewrite the documentation in texinfo format by
     contributing a first pass at a translation of the old
     `g77-0.5.16/f/DOC' file.

   * Toon Moene (<toon AT moene.nl>) performed some analysis
     of generated code as part of an overall project to improve `g77'
     code generation to at least be as good as `f2c' used in
     conjunction with `gcc'.  So far, this has resulted in the three,
     somewhat experimental, options added by `g77' to the `gcc'
     compiler and its back end.

     (These, in turn, had made their way into the `egcs' version of the
     compiler, and do not exist in `gcc' version 2.8 or versions of
     `g77' based on that version of `gcc'.)

   * John Carr (<jfc AT mit.edu>) wrote the alias analysis improvements.

   * Thanks to Mary Cortani and the staff at Craftwork Solutions
     (<support AT craftwork.com>) for all of their support.

   * Many other individuals have helped debug, test, and improve `g77'
     over the past several years, and undoubtedly more people will be
     doing so in the future.  If you have done so, and would like to
     see your name listed in the above list, please ask!  The default
     is that people wish to remain anonymous.

File: g77.info,  Node: Funding,  Next: Funding GNU Fortran,  Prev: Contributors,  Up: Top

Funding Free Software
*********************

If you want to have more free software a few years from now, it makes
sense for you to help encourage people to contribute funds for its
development.  The most effective approach known is to encourage
commercial redistributors to donate.

   Users of free software systems can boost the pace of development by
encouraging for-a-fee distributors to donate part of their selling price
to free software developers--the Free Software Foundation, and others.

   The way to convince distributors to do this is to demand it and
expect it from them.  So when you compare distributors, judge them
partly by how much they give to free software development.  Show
distributors they must compete to be the one who gives the most.

   To make this approach work, you must insist on numbers that you can
compare, such as, "We will donate ten dollars to the Frobnitz project
for each disk sold."  Don't be satisfied with a vague promise, such as
"A portion of the profits are donated," since it doesn't give a basis
for comparison.

   Even a precise fraction "of the profits from this disk" is not very
meaningful, since creative accounting and unrelated business decisions
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
than a dollar; it might be a few cents, or nothing at all.

   Some redistributors do development work themselves.  This is useful
too; but to keep everyone honest, you need to inquire how much they do,
and what kind.  Some kinds of development make much more long-term
difference than others.  For example, maintaining a separate version of
a program contributes very little; maintaining the standard version of a
program for the whole community contributes much.  Easy new ports
contribute little, since someone else would surely do them; difficult
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.

   By establishing the idea that supporting further development is "the
proper thing to do" when distributing free software for a fee, we can
assure a steady flow of resources into making more free software.

     Copyright (C) 1994 Free Software Foundation, Inc.
     Verbatim copying and redistribution of this section is permitted
     without royalty; alteration is not permitted.

File: g77.info,  Node: Funding GNU Fortran,  Next: Getting Started,  Prev: Funding,  Up: Top

1 Funding GNU Fortran
*********************

James Craig Burley (<craig AT jcb-sc.com>), the original author of `g77',
stopped working on it in September 1999 (He has a web page at
`http://world.std.com/%7Eburley/'.)

   GNU Fortran is currently maintained by Toon Moene
(<toon AT moene.nl>), with the help of countless other
volunteers.

   As with other GNU software, funding is important because it can pay
for needed equipment, personnel, and so on.

   The FSF provides information on the best way to fund ongoing
development of GNU software (such as GNU Fortran) in documents such as
the "GNUS Bulletin".  Email <gnu AT gnu.org> for information on funding
the FSF.

   Another important way to support work on GNU Fortran is to volunteer
to help out.

   Email <gcc AT gcc.org> to volunteer for this work.

   However, we strongly expect that there will never be a version 0.6
of `g77'.  Work on this compiler has stopped as of the release of GCC
3.1, except for bug fixing.  `g77' will be succeeded by `g95' - see
`http://g95.sourceforge.net'.

   *Note Funding Free Software: Funding, for more information.

File: g77.info,  Node: Getting Started,  Next: What is GNU Fortran?,  Prev: Funding GNU Fortran,  Up: Top

2 Getting Started
*****************

If you don't need help getting started reading the portions of this
manual that are most important to you, you should skip this portion of
the manual.

   If you are new to compilers, especially Fortran compilers, or new to
how compilers are structured under UNIX and UNIX-like systems, you'll
want to see *Note What is GNU Fortran?::.

   If you are new to GNU compilers, or have used only one GNU compiler
in the past and not had to delve into how it lets you manage various
versions and configurations of `gcc', you should see *Note G77 and
GCC::.

   Everyone except experienced `g77' users should see *Note Invoking
G77::.

   If you're acquainted with previous versions of `g77', you should see
*Note News About GNU Fortran: News.  Further, if you've actually used
previous versions of `g77', especially if you've written or modified
Fortran code to be compiled by previous versions of `g77', you should
see *Note Changes::.

   If you intend to write or otherwise compile code that is not already
strictly conforming ANSI FORTRAN 77--and this is probably everyone--you
should see *Note Language::.

   If you run into trouble getting Fortran code to compile, link, run,
or work properly, you might find answers if you see *Note Debugging and
Interfacing::, see *Note Collected Fortran Wisdom::, and see *Note
Trouble::.  You might also find that the problems you are encountering
are bugs in `g77'--see *Note Bugs::, for information on reporting them,
after reading the other material.

   If you need further help with `g77', or with freely redistributable
software in general, see *Note Service::.

   If you would like to help the `g77' project, see *Note Funding GNU
Fortran::, for information on helping financially, and see *Note
Projects::, for information on helping in other ways.

   If you're generally curious about the future of `g77', see *Note
Projects::.  If you're curious about its past, see *Note Contributors::,
and see *Note Funding GNU Fortran::.

   To see a few of the questions maintainers of `g77' have, and that
you might be able to answer, see *Note Open Questions::.

File: g77.info,  Node: What is GNU Fortran?,  Next: G77 and GCC,  Prev: Getting Started,  Up: Top

3 What is GNU Fortran?
**********************

GNU Fortran, or `g77', is designed initially as a free replacement for,
or alternative to, the UNIX `f77' command.  (Similarly, `gcc' is
designed as a replacement for the UNIX `cc' command.)

   `g77' also is designed to fit in well with the other fine GNU
compilers and tools.

   Sometimes these design goals conflict--in such cases, resolution
often is made in favor of fitting in well with Project GNU.  These
cases are usually identified in the appropriate sections of this manual.

   As compilers, `g77', `gcc', and `f77' share the following
characteristics:

   * They read a user's program, stored in a file and containing
     instructions written in the appropriate language (Fortran, C, and
     so on).  This file contains "source code".

   * They translate the user's program into instructions a computer can
     carry out more quickly than it takes to translate the instructions
     in the first place.  These instructions are called "machine
     code"--code designed to be efficiently translated and processed by
     a machine such as a computer.  Humans usually aren't as good
     writing machine code as they are at writing Fortran or C, because
     it is easy to make tiny mistakes writing machine code.  When
     writing Fortran or C, it is easy to make big mistakes.

   * They provide information in the generated machine code that can
     make it easier to find bugs in the program (using a debugging
     tool, called a "debugger", such as `gdb').

   * They locate and gather machine code already generated to perform
     actions requested by statements in the user's program.  This
     machine code is organized into "libraries" and is located and
     gathered during the "link" phase of the compilation process.
     (Linking often is thought of as a separate step, because it can be
     directly invoked via the `ld' command.  However, the `g77' and
     `gcc' commands, as with most compiler commands, automatically
     perform the linking step by calling on `ld' directly, unless asked
     to not do so by the user.)

   * They attempt to diagnose cases where the user's program contains
     incorrect usages of the language.  The "diagnostics" produced by
     the compiler indicate the problem and the location in the user's
     source file where the problem was first noticed.  The user can use
     this information to locate and fix the problem.  (Sometimes an
     incorrect usage of the language leads to a situation where the
     compiler can no longer make any sense of what follows--while a
     human might be able to--and thus ends up complaining about many
     "problems" it encounters that, in fact, stem from just one
     problem, usually the first one reported.)

   * They attempt to diagnose cases where the user's program contains a
     correct usage of the language, but instructs the computer to do
     something questionable.  These diagnostics often are in the form
     of "warnings", instead of the "errors" that indicate incorrect
     usage of the language.

   How these actions are performed is generally under the control of
the user.  Using command-line options, the user can specify how
persnickety the compiler is to be regarding the program (whether to
diagnose questionable usage of the language), how much time to spend
making the generated machine code run faster, and so on.

   `g77' consists of several components:

   * A modified version of the `gcc' command, which also might be
     installed as the system's `cc' command.  (In many cases, `cc'
     refers to the system's "native" C compiler, which might be a
     non-GNU compiler, or an older version of `gcc' considered more
     stable or that is used to build the operating system kernel.)

   * The `g77' command itself, which also might be installed as the
     system's `f77' command.

   * The `libg2c' run-time library.  This library contains the machine
     code needed to support capabilities of the Fortran language that
     are not directly provided by the machine code generated by the
     `g77' compilation phase.

     `libg2c' is just the unique name `g77' gives to its version of
     `libf2c' to distinguish it from any copy of `libf2c' installed
     from `f2c' (or versions of `g77' that built `libf2c' under that
     same name) on the system.

     The maintainer of `libf2c' currently is <dmg AT bell-labs.com>.

   * The compiler itself, internally named `f771'.

     Note that `f771' does not generate machine code directly--it
     generates "assembly code" that is a more readable form of machine
     code, leaving the conversion to actual machine code to an
     "assembler", usually named `as'.

   `gcc' is often thought of as "the C compiler" only, but it does more
than that.  Based on command-line options and the names given for files
on the command line, `gcc' determines which actions to perform,
including preprocessing, compiling (in a variety of possible
languages), assembling, and linking.

   For example, the command `gcc foo.c' "drives" the file `foo.c'
through the preprocessor `cpp', then the C compiler (internally named
`cc1'), then the assembler (usually `as'), then the linker (`ld'),
producing an executable program named `a.out' (on UNIX systems).

   As another example, the command `gcc foo.cc' would do much the same
as `gcc foo.c', but instead of using the C compiler named `cc1', `gcc'
would use the C++ compiler (named `cc1plus').

   In a GNU Fortran installation, `gcc' recognizes Fortran source files
by name just like it does C and C++ source files.  It knows to use the
Fortran compiler named `f771', instead of `cc1' or `cc1plus', to
compile Fortran files.

   Non-Fortran-related operation of `gcc' is generally unaffected by
installing the GNU Fortran version of `gcc'.  However, without the
installed version of `gcc' being the GNU Fortran version, `gcc' will
not be able to compile and link Fortran programs--and since `g77' uses
`gcc' to do most of the actual work, neither will `g77'!

   The `g77' command is essentially just a front-end for the `gcc'
command.  Fortran users will normally use `g77' instead of `gcc',
because `g77' knows how to specify the libraries needed to link with
Fortran programs (`libg2c' and `lm').  `g77' can still compile and link
programs and source files written in other languages, just like `gcc'.

   The command `g77 -v' is a quick way to display lots of version
information for the various programs used to compile a typical
preprocessed Fortran source file--this produces much more output than
`gcc -v' currently does.  (If it produces an error message near the end
of the output--diagnostics from the linker, usually `ld'--you might
have an out-of-date `libf2c' that improperly handles complex
arithmetic.)  In the output of this command, the line beginning `GNU
Fortran Front End' identifies the version number of GNU Fortran;
immediately preceding that line is a line identifying the version of
`gcc' with which that version of `g77' was built.

   The `libf2c' library is distributed with GNU Fortran for the
convenience of its users, but is not part of GNU Fortran.  It contains
the procedures needed by Fortran programs while they are running.

   For example, while code generated by `g77' is likely to do
additions, subtractions, and multiplications "in line"--in the actual
compiled code--it is not likely to do trigonometric functions this way.

   Instead, operations like trigonometric functions are compiled by the
`f771' compiler (invoked by `g77' when compiling Fortran code) into
machine code that, when run, calls on functions in `libg2c', so
`libg2c' must be linked with almost every useful program having any
component compiled by GNU Fortran.  (As mentioned above, the `g77'
command takes care of all this for you.)

   The `f771' program represents most of what is unique to GNU Fortran.
While much of the `libg2c' component comes from the `libf2c' component
of `f2c', a free Fortran-to-C converter distributed by Bellcore (AT&T),
plus `libU77', provided by Dave Love, and the `g77' command is just a
small front-end to `gcc', `f771' is a combination of two rather large
chunks of code.

   One chunk is the so-called "GNU Back End", or GBE, which knows how
to generate fast code for a wide variety of processors.  The same GBE
is used by the C, C++, and Fortran compiler programs `cc1', `cc1plus',
and `f771', plus others.  Often the GBE is referred to as the "gcc back
end" or even just "gcc"--in this manual, the term GBE is used whenever
the distinction is important.

   The other chunk of `f771' is the majority of what is unique about
GNU Fortran--the code that knows how to interpret Fortran programs to
determine what they are intending to do, and then communicate that
knowledge to the GBE for actual compilation of those programs.  This
chunk is called the "Fortran Front End" (FFE).  The `cc1' and `cc1plus'
programs have their own front ends, for the C and C++ languages,
respectively.  These fronts ends are responsible for diagnosing
incorrect usage of their respective languages by the programs the
process, and are responsible for most of the warnings about
questionable constructs as well.  (The GBE handles producing some
warnings, like those concerning possible references to undefined
variables.)

   Because so much is shared among the compilers for various languages,
much of the behavior and many of the user-selectable options for these
compilers are similar.  For example, diagnostics (error messages and
warnings) are similar in appearance; command-line options like `-Wall'
have generally similar effects; and the quality of generated code (in
terms of speed and size) is roughly similar (since that work is done by
the shared GBE).

File: g77.info,  Node: G77 and GCC,  Next: Invoking G77,  Prev: What is GNU Fortran?,  Up: Top

4 Compile Fortran, C, or Other Programs
***************************************

A GNU Fortran installation includes a modified version of the `gcc'
command.

   In a non-Fortran installation, `gcc' recognizes C, C++, and
Objective-C source files.

   In a GNU Fortran installation, `gcc' also recognizes Fortran source
files and accepts Fortran-specific command-line options, plus some
command-line options that are designed to cater to Fortran users but
apply to other languages as well.

   *Note Programming Languages Supported by GCC: (gcc)G++ and GCC, for
information on the way different languages are handled by the GCC
compiler (`gcc').

   Also provided as part of GNU Fortran is the `g77' command.  The
`g77' command is designed to make compiling and linking Fortran
programs somewhat easier than when using the `gcc' command for these
tasks.  It does this by analyzing the command line somewhat and
changing it appropriately before submitting it to the `gcc' command.

   Use the `-v' option with `g77' to see what is going on--the first
line of output is the invocation of the `gcc' command.

File: g77.info,  Node: Invoking G77,  Next: News,  Prev: G77 and GCC,  Up: Top

5 GNU Fortran Command Options
*****************************

The `g77' command supports all the options supported by the `gcc'
command.  *Note GCC Command Options: (gcc)Invoking GCC, for information
on the non-Fortran-specific aspects of the `gcc' command (and,
therefore, the `g77' command).

   All `gcc' and `g77' options are accepted both by `g77' and by `gcc'
(as well as any other drivers built at the same time, such as `g++'),
since adding `g77' to the `gcc' distribution enables acceptance of
`g77' options by all of the relevant drivers.

   In some cases, options have positive and negative forms; the
negative form of `-ffoo' would be `-fno-foo'.  This manual documents
only one of these two forms, whichever one is not the default.

* Menu:

* Option Summary::      Brief list of all `g77' options,
                        without explanations.
* Overall Options::     Controlling the kind of output:
                        an executable, object files, assembler files,
                        or preprocessed source.
* Shorthand Options::   Options that are shorthand for other options.
* Fortran Dialect Options::  Controlling the variant of Fortran language
                             compiled.
* Warning Options::     How picky should the compiler be?
* Debugging Options::   Symbol tables, measurements, and debugging dumps.
* Optimize Options::    How much optimization?
* Preprocessor Options:: Controlling header files and macro definitions.
                         Also, getting dependency information for Make.
* Directory Options::   Where to find header files and libraries.
                        Where to find the compiler executable files.
* Code Gen Options::    Specifying conventions for function calls, data layout
                        and register usage.
* Environment Variables:: Env vars that affect GNU Fortran.

File: g77.info,  Node: Option Summary,  Next: Overall Options,  Up: Invoking G77

5.1 Option Summary
==================

Here is a summary of all the options specific to GNU Fortran, grouped
by type.  Explanations are in the following sections.

_Overall Options_
     *Note Options Controlling the Kind of Output: Overall Options.
          -fversion  -fset-g77-defaults  -fno-silent

_Shorthand Options_
     *Note Shorthand Options::.
          -ff66  -fno-f66  -ff77  -fno-f77  -fno-ugly

_Fortran Language Options_
     *Note Options Controlling Fortran Dialect: Fortran Dialect Options.
          -ffree-form  -fno-fixed-form  -ff90
          -fvxt  -fdollar-ok  -fno-backslash
          -fno-ugly-args  -fno-ugly-assign  -fno-ugly-assumed
          -fugly-comma  -fugly-complex  -fugly-init  -fugly-logint
          -fonetrip  -ftypeless-boz
          -fintrin-case-initcap  -fintrin-case-upper
          -fintrin-case-lower  -fintrin-case-any
          -fmatch-case-initcap  -fmatch-case-upper
          -fmatch-case-lower  -fmatch-case-any
          -fsource-case-upper  -fsource-case-lower
          -fsource-case-preserve
          -fsymbol-case-initcap  -fsymbol-case-upper
          -fsymbol-case-lower  -fsymbol-case-any
          -fcase-strict-upper  -fcase-strict-lower
          -fcase-initcap  -fcase-upper  -fcase-lower  -fcase-preserve
          -ff2c-intrinsics-delete  -ff2c-intrinsics-hide
          -ff2c-intrinsics-disable  -ff2c-intrinsics-enable
          -fbadu77-intrinsics-delete  -fbadu77-intrinsics-hide
          -fbadu77-intrinsics-disable  -fbadu77-intrinsics-enable
          -ff90-intrinsics-delete  -ff90-intrinsics-hide
          -ff90-intrinsics-disable  -ff90-intrinsics-enable
          -fgnu-intrinsics-delete  -fgnu-intrinsics-hide
          -fgnu-intrinsics-disable  -fgnu-intrinsics-enable
          -fmil-intrinsics-delete  -fmil-intrinsics-hide
          -fmil-intrinsics-disable  -fmil-intrinsics-enable
          -funix-intrinsics-delete  -funix-intrinsics-hide
          -funix-intrinsics-disable  -funix-intrinsics-enable
          -fvxt-intrinsics-delete  -fvxt-intrinsics-hide
          -fvxt-intrinsics-disable  -fvxt-intrinsics-enable
          -ffixed-line-length-N  -ffixed-line-length-none

_Warning Options_
     *Note Options to Request or Suppress Warnings: Warning Options.
          -fsyntax-only  -pedantic  -pedantic-errors  -fpedantic
          -w  -Wno-globals  -Wimplicit  -Wunused  -Wuninitialized
          -Wall  -Wsurprising
          -Werror  -W

_Debugging Options_
     *Note Options for Debugging Your Program or GCC: Debugging Options.
          -g

_Optimization Options_
     *Note Options that Control Optimization: Optimize Options.
          -malign-double
          -ffloat-store  -fforce-mem  -fforce-addr  -fno-inline
          -ffast-math  -fstrength-reduce  -frerun-cse-after-loop
          -funsafe-math-optimizations -ffinite-math-only -fno-trapping-math
          -fexpensive-optimizations  -fdelayed-branch
          -fschedule-insns  -fschedule-insn2  -fcaller-saves
          -funroll-loops  -funroll-all-loops
          -fno-move-all-movables  -fno-reduce-all-givs
          -fno-rerun-loop-opt

_Directory Options_
     *Note Options for Directory Search: Directory Options.
          -IDIR  -I-

_Code Generation Options_
     *Note Options for Code Generation Conventions: Code Gen Options.
          -fno-automatic  -finit-local-zero  -fno-f2c
          -ff2c-library  -fno-underscoring  -fno-ident
          -fpcc-struct-return  -freg-struct-return
          -fshort-double  -fno-common  -fpack-struct
          -fzeros  -fno-second-underscore
          -femulate-complex
          -falias-check  -fargument-alias
          -fargument-noalias  -fno-argument-noalias-global
          -fno-globals  -fflatten-arrays
          -fbounds-check  -ffortran-bounds-check


* Menu:

* Overall Options::     Controlling the kind of output:
                        an executable, object files, assembler files,
                        or preprocessed source.
* Shorthand Options::   Options that are shorthand for other options.
* Fortran Dialect Options::  Controlling the variant of Fortran language
                             compiled.
* Warning Options::     How picky should the compiler be?
* Debugging Options::   Symbol tables, measurements, and debugging dumps.
* Optimize Options::    How much optimization?
* Preprocessor Options:: Controlling header files and macro definitions.
                         Also, getting dependency information for Make.
* Directory Options::   Where to find header files and libraries.
                        Where to find the compiler executable files.
* Code Gen Options::    Specifying conventions for function calls, data layout
                        and register usage.

File: g77.info,  Node: Overall Options,  Next: Shorthand Options,  Prev: Option Summary,  Up: Invoking G77

5.2 Options Controlling the Kind of Output
==========================================

Compilation can involve as many as four stages: preprocessing, code
generation (often what is really meant by the term "compilation"),
assembly, and linking, always in that order.  The first three stages
apply to an individual source file, and end by producing an object
file; linking combines all the object files (those newly compiled, and
those specified as input) into an executable file.

   For any given input file, the file name suffix determines what kind
of program is contained in the file--that is, the language in which the
program is written is generally indicated by the suffix.  Suffixes
specific to GNU Fortran are listed below.  *Note Options Controlling
the Kind of Output: (gcc)Overall Options, for information on suffixes
recognized by GCC.

`FILE.f'

`FILE.for'

`FILE.FOR'
     Fortran source code that should not be preprocessed.

     Such source code cannot contain any preprocessor directives, such
     as `#include', `#define', `#if', and so on.

     You can force `.f' files to be preprocessed by `cpp' by using `-x
     f77-cpp-input'.  *Note LEX::.

`FILE.F'

`FILE.fpp'

`FILE.FPP'
     Fortran source code that must be preprocessed (by the C
     preprocessor `cpp', which is part of GCC).

     Note that preprocessing is not extended to the contents of files
     included by the `INCLUDE' directive--the `#include' preprocessor
     directive must be used instead.

`FILE.r'
     Ratfor source code, which must be preprocessed by the `ratfor'
     command, which is available separately (as it is not yet part of
     the GNU Fortran distribution).  A public domain version in C is at
     `http://sepwww.stanford.edu/sep/prof/ratfor.shar.2'.

   UNIX users typically use the `FILE.f' and `FILE.F' nomenclature.
Users of other operating systems, especially those that cannot
distinguish upper-case letters from lower-case letters in their file
names, typically use the `FILE.for' and `FILE.fpp' nomenclature.

   Use of the preprocessor `cpp' allows use of C-like constructs such
as `#define' and `#include', but can lead to unexpected, even mistaken,
results due to Fortran's source file format.  It is recommended that
use of the C preprocessor be limited to `#include' and, in conjunction
with `#define', only `#if' and related directives, thus avoiding
in-line macro expansion entirely.  This recommendation applies
especially when using the traditional fixed source form.  With free
source form, fewer unexpected transformations are likely to happen, but
use of constructs such as Hollerith and character constants can
nevertheless present problems, especially when these are continued
across multiple source lines.  These problems result, primarily, from
differences between the way such constants are interpreted by the C
preprocessor and by a Fortran compiler.

   Another example of a problem that results from using the C
preprocessor is that a Fortran comment line that happens to contain any
characters "interesting" to the C preprocessor, such as a backslash at
the end of the line, is not recognized by the preprocessor as a comment
line, so instead of being passed through "raw", the line is edited
according to the rules for the preprocessor.  For example, the
backslash at the end of the line is removed, along with the subsequent
newline, resulting in the next line being effectively commented
out--unfortunate if that line is a non-comment line of important code!

   _Note:_ The `-traditional' and `-undef' flags are supplied to `cpp'
by default, to help avoid unpleasant surprises.  *Note Options
Controlling the Preprocessor: (gcc)Preprocessor Options.  This means
that ANSI C preprocessor features (such as the `#' operator) aren't
available, and only variables in the C reserved namespace (generally,
names with a leading underscore) are liable to substitution by C
predefines.  Thus, if you want to do system-specific tests, use, for
example, `#ifdef __linux__' rather than `#ifdef linux'.  Use the `-v'
option to see exactly how the preprocessor is invoked.

   Unfortunately, the `-traditional' flag will not avoid an error from
anything that `cpp' sees as an unterminated C comment, such as:
     C Some Fortran compilers accept /* as starting
     C an inline comment.
   *Note Trailing Comment::.

   The following options that affect overall processing are recognized
by the `g77' and `gcc' commands in a GNU Fortran installation:

`-fversion'
     Ensure that the `g77' version of the compiler phase is reported,
     if run, and, starting in `egcs' version 1.1, that internal
     consistency checks in the `f771' program are run.

     This option is supplied automatically when `-v' or `--verbose' is
     specified as a command-line option for `g77' or `gcc' and when the
     resulting commands compile Fortran source files.

     In GCC 3.1, this is changed back to the behavior `gcc' displays
     for `.c' files.

`-fset-g77-defaults'
     _Version info:_ This option was obsolete as of `egcs' version 1.1.
     The effect is instead achieved by the `lang_init_options' routine
     in `gcc/gcc/f/com.c'.

     Set up whatever `gcc' options are to apply to Fortran
     compilations, and avoid running internal consistency checks that
     might take some time.

     This option is supplied automatically when compiling Fortran code
     via the `g77' or `gcc' command.  The description of this option is
     provided so that users seeing it in the output of, say, `g77 -v'
     understand why it is there.

     Also, developers who run `f771' directly might want to specify it
     by hand to get the same defaults as they would running `f771' via
     `g77' or `gcc' However, such developers should, after linking a
     new `f771' executable, invoke it without this option once, e.g.
     via `./f771 -quiet < /dev/null', to ensure that they have not
     introduced any internal inconsistencies (such as in the table of
     intrinsics) before proceeding--`g77' will crash with a diagnostic
     if it detects an inconsistency.

`-fno-silent'
     Print (to `stderr') the names of the program units as they are
     compiled, in a form similar to that used by popular UNIX `f77'
     implementations and `f2c'

   *Note Options Controlling the Kind of Output: (gcc)Overall Options,
for information on more options that control the overall operation of
the `gcc' command (and, by extension, the `g77' command).

File: g77.info,  Node: Shorthand Options,  Next: Fortran Dialect Options,  Prev: Overall Options,  Up: Invoking G77

5.3 Shorthand Options
=====================

The following options serve as "shorthand" for other options accepted
by the compiler:

`-fugly'
     _Note:_ This option is no longer supported.  The information,
     below, is provided to aid in the conversion of old scripts.

     Specify that certain "ugly" constructs are to be quietly accepted.
     Same as:

          -fugly-args -fugly-assign -fugly-assumed
          -fugly-comma -fugly-complex -fugly-init
          -fugly-logint

     These constructs are considered inappropriate to use in new or
     well-maintained portable Fortran code, but widely used in old code.
     *Note Distensions::, for more information.

`-fno-ugly'
     Specify that all "ugly" constructs are to be noisily rejected.
     Same as:

          -fno-ugly-args -fno-ugly-assign -fno-ugly-assumed
          -fno-ugly-comma -fno-ugly-complex -fno-ugly-init
          -fno-ugly-logint

     *Note Distensions::, for more information.

`-ff66'
     Specify that the program is written in idiomatic FORTRAN 66.  Same
     as `-fonetrip -fugly-assumed'.

     The `-fno-f66' option is the inverse of `-ff66'.  As such, it is
     the same as `-fno-onetrip -fno-ugly-assumed'.

     The meaning of this option is likely to be refined as future
     versions of `g77' provide more compatibility with other existing
     and obsolete Fortran implementations.

`-ff77'
     Specify that the program is written in idiomatic UNIX FORTRAN 77
     and/or the dialect accepted by the `f2c' product.  Same as
     `-fbackslash -fno-typeless-boz'.

     The meaning of this option is likely to be refined as future
     versions of `g77' provide more compatibility with other existing
     and obsolete Fortran implementations.

`-fno-f77'
     The `-fno-f77' option is _not_ the inverse of `-ff77'.  It
     specifies that the program is not written in idiomatic UNIX
     FORTRAN 77 or `f2c' but in a more widely portable dialect.
     `-fno-f77' is the same as `-fno-backslash'.

     The meaning of this option is likely to be refined as future
     versions of `g77' provide more compatibility with other existing
     and obsolete Fortran implementations.

File: g77.info,  Node: Fortran Dialect Options,  Next: Warning Options,  Prev: Shorthand Options,  Up: Invoking G77

5.4 Options Controlling Fortran Dialect
=======================================

The following options control the dialect of Fortran that the compiler
accepts:

`-ffree-form'

`-fno-fixed-form'
     Specify that the source file is written in free form (introduced
     in Fortran 90) instead of the more-traditional fixed form.

`-ff90'
     Allow certain Fortran-90 constructs.

     This option controls whether certain Fortran 90 constructs are
     recognized.  (Other Fortran 90 constructs might or might not be
     recognized depending on other options such as `-fvxt',
     `-ff90-intrinsics-enable', and the current level of support for
     Fortran 90.)

     *Note Fortran 90::, for more information.

`-fvxt'
     Specify the treatment of certain constructs that have different
     meanings depending on whether the code is written in GNU Fortran
     (based on FORTRAN 77 and akin to Fortran 90) or VXT Fortran (more
     like VAX FORTRAN).

     The default is `-fno-vxt'.  `-fvxt' specifies that the VXT Fortran
     interpretations for those constructs are to be chosen.

     *Note VXT Fortran::, for more information.

`-fdollar-ok'
     Allow `$' as a valid character in a symbol name.

`-fno-backslash'
     Specify that `\' is not to be specially interpreted in character
     and Hollerith constants a la C and many UNIX Fortran compilers.

     For example, with `-fbackslash' in effect, `A\nB' specifies three
     characters, with the second one being newline.  With
     `-fno-backslash', it specifies four characters, `A', `\', `n', and
     `B'.

     Note that `g77' implements a fairly general form of backslash
     processing that is incompatible with the narrower forms supported
     by some other compilers.  For example, `'A\003B'' is a
     three-character string in `g77' whereas other compilers that
     support backslash might not support the three-octal-digit form,
     and thus treat that string as longer than three characters.

     *Note Backslash in Constants::, for information on why
     `-fbackslash' is the default instead of `-fno-backslash'.

`-fno-ugly-args'
     Disallow passing Hollerith and typeless constants as actual
     arguments (for example, `CALL FOO(4HABCD)').

     *Note Ugly Implicit Argument Conversion::, for more information.

`-fugly-assign'
     Use the same storage for a given variable regardless of whether it
     is used to hold an assigned-statement label (as in `ASSIGN 10 TO
     I') or used to hold numeric data (as in `I = 3').

     *Note Ugly Assigned Labels::, for more information.

`-fugly-assumed'
     Assume any dummy array with a final dimension specified as `1' is
     really an assumed-size array, as if `*' had been specified for the
     final dimension instead of `1'.

     For example, `DIMENSION X(1)' is treated as if it had read
     `DIMENSION X(*)'.

     *Note Ugly Assumed-Size Arrays::, for more information.

`-fugly-comma'
     In an external-procedure invocation, treat a trailing comma in the
     argument list as specification of a trailing null argument, and
     treat an empty argument list as specification of a single null
     argument.

     For example, `CALL FOO(,)' is treated as `CALL FOO(%VAL(0),
     %VAL(0))'.  That is, _two_ null arguments are specified by the
     procedure call when `-fugly-comma' is in force.  And `F = FUNC()'
     is treated as `F = FUNC(%VAL(0))'.

     The default behavior, `-fno-ugly-comma', is to ignore a single
     trailing comma in an argument list.  So, by default, `CALL
     FOO(X,)' is treated exactly the same as `CALL FOO(X)'.

     *Note Ugly Null Arguments::, for more information.

`-fugly-complex'
     Do not complain about `REAL(EXPR)' or `AIMAG(EXPR)' when EXPR is a
     `COMPLEX' type other than `COMPLEX(KIND=1)'--usually this is used
     to permit `COMPLEX(KIND=2)' (`DOUBLE COMPLEX') operands.

     The `-ff90' option controls the interpretation of this construct.

     *Note Ugly Complex Part Extraction::, for more information.

`-fno-ugly-init'
     Disallow use of Hollerith and typeless constants as initial values
     (in `PARAMETER' and `DATA' statements), and use of character
     constants to initialize numeric types and vice versa.

     For example, `DATA I/'F'/, CHRVAR/65/, J/4HABCD/' is disallowed by
     `-fno-ugly-init'.

     *Note Ugly Conversion of Initializers::, for more information.

`-fugly-logint'
     Treat `INTEGER' and `LOGICAL' variables and expressions as
     potential stand-ins for each other.

     For example, automatic conversion between `INTEGER' and `LOGICAL'
     is enabled, for many contexts, via this option.

     *Note Ugly Integer Conversions::, for more information.

`-fonetrip'
     Executable iterative `DO' loops are to be executed at least once
     each time they are reached.

     ANSI FORTRAN 77 and more recent versions of the Fortran standard
     specify that the body of an iterative `DO' loop is not executed if
     the number of iterations calculated from the parameters of the
     loop is less than 1.  (For example, `DO 10 I = 1, 0'.)  Such a
     loop is called a "zero-trip loop".

     Prior to ANSI FORTRAN 77, many compilers implemented `DO' loops
     such that the body of a loop would be executed at least once, even
     if the iteration count was zero.  Fortran code written assuming
     this behavior is said to require "one-trip loops".  For example,
     some code written to the FORTRAN 66 standard expects this behavior
     from its `DO' loops, although that standard did not specify this
     behavior.

     The `-fonetrip' option specifies that the source file(s) being
     compiled require one-trip loops.

     This option affects only those loops specified by the (iterative)
     `DO' statement and by implied-`DO' lists in I/O statements.  Loops
     specified by implied-`DO' lists in `DATA' and specification
     (non-executable) statements are not affected.

`-ftypeless-boz'
     Specifies that prefix-radix non-decimal constants, such as
     `Z'ABCD'', are typeless instead of `INTEGER(KIND=1)'.

     You can test for yourself whether a particular compiler treats the
     prefix form as `INTEGER(KIND=1)' or typeless by running the
     following program:

          EQUIVALENCE (I, R)
          R = Z'ABCD1234'
          J = Z'ABCD1234'
          IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS'
          IF (J .NE. I) PRINT *, 'Prefix form is INTEGER'
          END

     Reports indicate that many compilers process this form as
     `INTEGER(KIND=1)', though a few as typeless, and at least one
     based on a command-line option specifying some kind of
     compatibility.

`-fintrin-case-initcap'

`-fintrin-case-upper'

`-fintrin-case-lower'

`-fintrin-case-any'
     Specify expected case for intrinsic names.  `-fintrin-case-lower'
     is the default.

`-fmatch-case-initcap'

`-fmatch-case-upper'

`-fmatch-case-lower'

`-fmatch-case-any'
     Specify expected case for keywords.  `-fmatch-case-lower' is the
     default.

`-fsource-case-upper'

`-fsource-case-lower'

`-fsource-case-preserve'
     Specify whether source text other than character and Hollerith
     constants is to be translated to uppercase, to lowercase, or
     preserved as is.  `-fsource-case-lower' is the default.

`-fsymbol-case-initcap'

`-fsymbol-case-upper'

`-fsymbol-case-lower'

`-fsymbol-case-any'
     Specify valid cases for user-defined symbol names.
     `-fsymbol-case-any' is the default.

`-fcase-strict-upper'
     Same as `-fintrin-case-upper -fmatch-case-upper
     -fsource-case-preserve -fsymbol-case-upper'.  (Requires all
     pertinent source to be in uppercase.)

`-fcase-strict-lower'
     Same as `-fintrin-case-lower -fmatch-case-lower
     -fsource-case-preserve -fsymbol-case-lower'.  (Requires all
     pertinent source to be in lowercase.)

`-fcase-initcap'
     Same as `-fintrin-case-initcap -fmatch-case-initcap
     -fsource-case-preserve -fsymbol-case-initcap'.  (Requires all
     pertinent source to be in initial capitals, as in `Print
     *,SqRt(Value)'.)

`-fcase-upper'
     Same as `-fintrin-case-any -fmatch-case-any -fsource-case-upper
     -fsymbol-case-any'.  (Maps all pertinent source to uppercase.)

`-fcase-lower'
     Same as `-fintrin-case-any -fmatch-case-any -fsource-case-lower
     -fsymbol-case-any'.  (Maps all pertinent source to lowercase.)

`-fcase-preserve'
     Same as `-fintrin-case-any -fmatch-case-any -fsource-case-preserve
     -fsymbol-case-any'.  (Preserves all case in user-defined symbols,
     while allowing any-case matching of intrinsics and keywords.  For
     example, `call Foo(i,I)' would pass two _different_ variables
     named `i' and `I' to a procedure named `Foo'.)

`-fbadu77-intrinsics-delete'

`-fbadu77-intrinsics-hide'

`-fbadu77-intrinsics-disable'

`-fbadu77-intrinsics-enable'
     Specify status of UNIX intrinsics having inappropriate forms.
     `-fbadu77-intrinsics-enable' is the default.  *Note Intrinsic
     Groups::.

`-ff2c-intrinsics-delete'

`-ff2c-intrinsics-hide'

`-ff2c-intrinsics-disable'

`-ff2c-intrinsics-enable'
     Specify status of f2c-specific intrinsics.
     `-ff2c-intrinsics-enable' is the default.  *Note Intrinsic
     Groups::.

`-ff90-intrinsics-delete'

`-ff90-intrinsics-hide'

`-ff90-intrinsics-disable'

`-ff90-intrinsics-enable'
     Specify status of F90-specific intrinsics.
     `-ff90-intrinsics-enable' is the default.  *Note Intrinsic
     Groups::.

`-fgnu-intrinsics-delete'

`-fgnu-intrinsics-hide'

`-fgnu-intrinsics-disable'

`-fgnu-intrinsics-enable'
     Specify status of Digital's COMPLEX-related intrinsics.
     `-fgnu-intrinsics-enable' is the default.  *Note Intrinsic
     Groups::.

`-fmil-intrinsics-delete'

`-fmil-intrinsics-hide'

`-fmil-intrinsics-disable'

`-fmil-intrinsics-enable'
     Specify status of MIL-STD-1753-specific intrinsics.
     `-fmil-intrinsics-enable' is the default.  *Note Intrinsic
     Groups::.

`-funix-intrinsics-delete'

`-funix-intrinsics-hide'

`-funix-intrinsics-disable'

`-funix-intrinsics-enable'
     Specify status of UNIX intrinsics.  `-funix-intrinsics-enable' is
     the default.  *Note Intrinsic Groups::.

`-fvxt-intrinsics-delete'

`-fvxt-intrinsics-hide'

`-fvxt-intrinsics-disable'

`-fvxt-intrinsics-enable'
     Specify status of VXT intrinsics.  `-fvxt-intrinsics-enable' is
     the default.  *Note Intrinsic Groups::.

`-ffixed-line-length-N'
     Set column after which characters are ignored in typical fixed-form
     lines in the source file, and through which spaces are assumed (as
     if padded to that length) after the ends of short fixed-form lines.

     Popular values for N include 72 (the standard and the default), 80
     (card image), and 132 (corresponds to "extended-source" options in
     some popular compilers).  N may be `none', meaning that the entire
     line is meaningful and that continued character constants never
     have implicit spaces appended to them to fill out the line.
     `-ffixed-line-length-0' means the same thing as
     `-ffixed-line-length-none'.

     *Note Source Form::, for more information.

File: g77.info,  Node: Warning Options,  Next: Debugging Options,  Prev: Fortran Dialect Options,  Up: Invoking G77

5.5 Options to Request or Suppress Warnings
===========================================

Warnings are diagnostic messages that report constructions which are
not inherently erroneous but which are risky or suggest there might
have been an error.

   You can request many specific warnings with options beginning `-W',
for example `-Wimplicit' to request warnings on implicit declarations.
Each of these specific warning options also has a negative form
beginning `-Wno-' to turn off warnings; for example, `-Wno-implicit'.
This manual lists only one of the two forms, whichever is not the
default.

   These options control the amount and kinds of warnings produced by
GNU Fortran:

`-fsyntax-only'
     Check the code for syntax errors, but don't do anything beyond
     that.

`-pedantic'
     Issue warnings for uses of extensions to ANSI FORTRAN 77.
     `-pedantic' also applies to C-language constructs where they occur
     in GNU Fortran source files, such as use of `\e' in a character
     constant within a directive like `#include'.

     Valid ANSI FORTRAN 77 programs should compile properly with or
     without this option.  However, without this option, certain GNU
     extensions and traditional Fortran features are supported as well.
     With this option, many of them are rejected.

     Some users try to use `-pedantic' to check programs for strict ANSI
     conformance.  They soon find that it does not do quite what they
     want--it finds some non-ANSI practices, but not all.  However,
     improvements to `g77' in this area are welcome.

`-pedantic-errors'
     Like `-pedantic', except that errors are produced rather than
     warnings.

`-fpedantic'
     Like `-pedantic', but applies only to Fortran constructs.

`-w'
     Inhibit all warning messages.

`-Wno-globals'
     Inhibit warnings about use of a name as both a global name (a
     subroutine, function, or block data program unit, or a common
     block) and implicitly as the name of an intrinsic in a source file.

     Also inhibit warnings about inconsistent invocations and/or
     definitions of global procedures (function and subroutines).  Such
     inconsistencies include different numbers of arguments and
     different types of arguments.

`-Wimplicit'
     Warn whenever a variable, array, or function is implicitly
     declared.  Has an effect similar to using the `IMPLICIT NONE'
     statement in every program unit.  (Some Fortran compilers provide
     this feature by an option named `-u' or `/WARNINGS=DECLARATIONS'.)

`-Wunused'
     Warn whenever a variable is unused aside from its declaration.

`-Wuninitialized'
     Warn whenever an automatic variable is used without first being
     initialized.

     These warnings are possible only in optimizing compilation,
     because they require data-flow information that is computed only
     when optimizing.  If you don't specify `-O', you simply won't get
     these warnings.

     These warnings occur only for variables that are candidates for
     register allocation.  Therefore, they do not occur for a variable
     whose address is taken, or whose size is other than 1, 2, 4 or 8
     bytes.  Also, they do not occur for arrays, even when they are in
     registers.

     Note that there might be no warning about a variable that is used
     only to compute a value that itself is never used, because such
     computations may be deleted by data-flow analysis before the
     warnings are printed.

     These warnings are made optional because GNU Fortran is not smart
     enough to see all the reasons why the code might be correct
     despite appearing to have an error.  Here is one example of how
     this can happen:

          SUBROUTINE DISPAT(J)
          IF (J.EQ.1) I=1
          IF (J.EQ.2) I=4
          IF (J.EQ.3) I=5
          CALL FOO(I)
          END

     If the value of `J' is always 1, 2 or 3, then `I' is always
     initialized, but GNU Fortran doesn't know this.  Here is another
     common case:

          SUBROUTINE MAYBE(FLAG)
          LOGICAL FLAG
          IF (FLAG) VALUE = 9.4
          ...
          IF (FLAG) PRINT *, VALUE
          END

     This has no bug because `VALUE' is used only if it is set.

`-Wall'
     The `-Wunused' and `-Wuninitialized' options combined.  These are
     all the options which pertain to usage that we recommend avoiding
     and that we believe is easy to avoid.  (As more warnings are added
     to `g77' some might be added to the list enabled by `-Wall'.)

   The remaining `-W...' options are not implied by `-Wall' because
they warn about constructions that we consider reasonable to use, on
occasion, in clean programs.

`-Wsurprising'
     Warn about "suspicious" constructs that are interpreted by the
     compiler in a way that might well be surprising to someone reading
     the code.  These differences can result in subtle,
     compiler-dependent (even machine-dependent) behavioral differences.
     The constructs warned about include:

        * Expressions having two arithmetic operators in a row, such as
          `X*-Y'.  Such a construct is nonstandard, and can produce
          unexpected results in more complicated situations such as
          `X**-Y*Z'.  `g77' along with many other compilers, interprets
          this example differently than many programmers, and a few
          other compilers.  Specifically, `g77' interprets `X**-Y*Z' as
          `(X**(-Y))*Z', while others might think it should be
          interpreted as `X**(-(Y*Z))'.

          A revealing example is the constant expression `2**-2*1.',
          which `g77' evaluates to .25, while others might evaluate it
          to 0., the difference resulting from the way precedence
          affects type promotion.

          (The `-fpedantic' option also warns about expressions having
          two arithmetic operators in a row.)

        * Expressions with a unary minus followed by an operand and then
          a binary operator other than plus or minus.  For example,
          `-2**2' produces a warning, because the precedence is
          `-(2**2)', yielding -4, not `(-2)**2', which yields 4, and
          which might represent what a programmer expects.

          An example of an expression producing different results in a
          surprising way is `-I*S', where I holds the value
          `-2147483648' and S holds `0.5'.  On many systems, negating I
          results in the same value, not a positive number, because it
          is already the lower bound of what an `INTEGER(KIND=1)'
          variable can hold.  So, the expression evaluates to a
          positive number, while the "expected" interpretation,
          `(-I)*S', would evaluate to a negative number.

          Even cases such as `-I*J' produce warnings, even though, in
          most configurations and situations, there is no computational
          difference between the results of the two
          interpretations--the purpose of this warning is to warn about
          differing interpretations and encourage a better style of
          coding, not to identify only those places where bugs might
          exist in the user's code.

        * `DO' loops with `DO' variables that are not of integral
          type--that is, using `REAL' variables as loop control
          variables.  Although such loops can be written to work in the
          "obvious" way, the way `g77' is required by the Fortran
          standard to interpret such code is likely to be quite
          different from the way many programmers expect.  (This is
          true of all `DO' loops, but the differences are pronounced
          for non-integral loop control variables.)

          *Note Loops::, for more information.

`-Werror'
     Make all warnings into errors.

`-W'
     Turns on "extra warnings" and, if optimization is specified via
     `-O', the `-Wuninitialized' option.  (This might change in future
     versions of `g77'

     "Extra warnings" are issued for:

        * Unused parameters to a procedure (when `-Wunused' also is
          specified).

        * Overflows involving floating-point constants (not available
          for certain configurations).

   *Note Options to Request or Suppress Warnings: (gcc)Warning Options,
for information on more options offered by the GBE shared by `g77'
`gcc' and other GNU compilers.

   Some of these have no effect when compiling programs written in
Fortran:

`-Wcomment'

`-Wformat'

`-Wparentheses'

`-Wswitch'

`-Wswitch-default'

`-Wswitch-enum'

`-Wtraditional'

`-Wshadow'

`-Wid-clash-LEN'

`-Wlarger-than-LEN'

`-Wconversion'

`-Waggregate-return'

`-Wredundant-decls'
     These options all could have some relevant meaning for GNU Fortran
     programs, but are not yet supported.

File: g77.info,  Node: Debugging Options,  Next: Optimize Options,  Prev: Warning Options,  Up: Invoking G77

5.6 Options for Debugging Your Program or GNU Fortran
=====================================================

GNU Fortran has various special options that are used for debugging
either your program or `g77'

`-g'
     Produce debugging information in the operating system's native
     format (stabs, COFF, XCOFF, or DWARF).  GDB can work with this
     debugging information.

     A sample debugging session looks like this (note the use of the
     breakpoint):
          $ cat gdb.f
                PROGRAM PROG
                DIMENSION A(10)
                DATA A /1.,2.,3.,4.,5.,6.,7.,8.,9.,10./
                A(5) = 4.
                PRINT*,A
                END
          $ g77 -g -O gdb.f
          $ gdb a.out
          ...
          (gdb) break MAIN__
          Breakpoint 1 at 0x8048e96: file gdb.f, line 4.
          (gdb) run
          Starting program: /home/toon/g77-bugs/./a.out
          Breakpoint 1, MAIN__ () at gdb.f:4
          4             A(5) = 4.
          Current language:  auto; currently fortran
          (gdb) print a(5)
          $1 = 5
          (gdb) step
          5             PRINT*,A
          (gdb) print a(5)
          $2 = 4
          ...
     One could also add the setting of the breakpoint and the first run
     command to the file `.gdbinit' in the current directory, to
     simplify the debugging session.

   *Note Options for Debugging Your Program or GCC: (gcc)Debugging
Options, for more information on debugging options.

File: g77.info,  Node: Optimize Options,  Next: Preprocessor Options,  Prev: Debugging Options,  Up: Invoking G77

5.7 Options That Control Optimization
=====================================

Most Fortran users will want to use no optimization when developing and
testing programs, and use `-O' or `-O2' when compiling programs for
late-cycle testing and for production use.  However, note that certain
diagnostics--such as for uninitialized variables--depend on the flow
analysis done by `-O', i.e. you must use `-O' or `-O2' to get such
diagnostics.

   The following flags have particular applicability when compiling
Fortran programs:

`-malign-double'
     (Intel x86 architecture only.)

     Noticeably improves performance of `g77' programs making heavy use
     of `REAL(KIND=2)' (`DOUBLE PRECISION') data on some systems.  In
     particular, systems using Pentium, Pentium Pro, 586, and 686
     implementations of the i386 architecture execute programs faster
     when `REAL(KIND=2)' (`DOUBLE PRECISION') data are aligned on
     64-bit boundaries in memory.

     This option can, at least, make benchmark results more consistent
     across various system configurations, versions of the program, and
     data sets.

     _Note:_ The warning in the `gcc' documentation about this option
     does not apply, generally speaking, to Fortran code compiled by
     `g77'

     *Note Aligned Data::, for more information on alignment issues.

     _Also also note:_ The negative form of `-malign-double' is
     `-mno-align-double', not `-benign-double'.

`-ffloat-store'
     Might help a Fortran program that depends on exact IEEE
     conformance on some machines, but might slow down a program that
     doesn't.

     This option is effective when the floating-point unit is set to
     work in IEEE 854 `extended precision'--as it typically is on x86
     and m68k GNU systems--rather than IEEE 754 double precision.
     `-ffloat-store' tries to remove the extra precision by spilling
     data from floating-point registers into memory and this typically
     involves a big performance hit.  However, it doesn't affect
     intermediate results, so that it is only partially effective.
     `Excess precision' is avoided in code like:
          a = b + c
          d = a * e
     but not in code like:
                d = (b + c) * e

     For another, potentially better, way of controlling the precision,
     see *Note Floating-point precision::.

`-fforce-mem'

`-fforce-addr'
     Might improve optimization of loops.

`-fno-inline'
     Don't compile statement functions inline.  Might reduce the size
     of a program unit--which might be at expense of some speed (though
     it should compile faster).  Note that if you are not optimizing,
     no functions can be expanded inline.

`-ffast-math'
     Might allow some programs designed to not be too dependent on IEEE
     behavior for floating-point to run faster, or die trying.  Sets
     `-funsafe-math-optimizations', `-ffinite-math-only', and
     `-fno-trapping-math'.

`-funsafe-math-optimizations'
     Allow optimizations that may be give incorrect results for certain
     IEEE inputs.

`-ffinite-math-only'
     Allow optimizations for floating-point arithmetic that assume that
     arguments and results are not NaNs or +-Infs.

     This option should never be turned on by any `-O' option since it
     can result in incorrect output for programs which depend on an
     exact implementation of IEEE or ISO rules/specifications.

     The default is `-fno-finite-math-only'.

`-fno-trapping-math'
     Allow the compiler to assume that floating-point arithmetic will
     not generate traps on any inputs.  This is useful, for example,
     when running a program using IEEE "non-stop" floating-point
     arithmetic.

`-fstrength-reduce'
     Might make some loops run faster.

`-frerun-cse-after-loop'

`-fexpensive-optimizations'

`-fdelayed-branch'

`-fschedule-insns'

`-fschedule-insns2'

`-fcaller-saves'
     Might improve performance on some code.

`-funroll-loops'
     Typically improves performance on code using iterative `DO' loops
     by unrolling them and is probably generally appropriate for
     Fortran, though it is not turned on at any optimization level.
     Note that outer loop unrolling isn't done specifically; decisions
     about whether to unroll a loop are made on the basis of its
     instruction count.

     Also, no `loop discovery'(1) is done, so only loops written with
     `DO' benefit from loop optimizations, including--but not limited
     to--unrolling.  Loops written with `IF' and `GOTO' are not
     currently recognized as such.  This option unrolls only iterative
     `DO' loops, not `DO WHILE' loops.

`-funroll-all-loops'
     Probably improves performance on code using `DO WHILE' loops by
     unrolling them in addition to iterative `DO' loops.  In the absence
     of `DO WHILE', this option is equivalent to `-funroll-loops' but
     possibly slower.

`-fno-move-all-movables'

`-fno-reduce-all-givs'

`-fno-rerun-loop-opt'
     In general, the optimizations enabled with these options will lead
     to faster code being generated by GNU Fortran; hence they are
     enabled by default when issuing the `g77' command.

     `-fmove-all-movables' and `-freduce-all-givs' will enable loop
     optimization to move all loop-invariant index computations in
     nested loops over multi-rank array dummy arguments out of these
     loops.

     `-frerun-loop-opt' will move offset calculations resulting from
     the fact that Fortran arrays by default have a lower bound of 1
     out of the loops.

     These three options are intended to be removed someday, once loop
     optimization is sufficiently advanced to perform all those
     transformations without help from these options.

   *Note Options That Control Optimization: (gcc)Optimize Options, for
more information on options to optimize the generated machine code.

   ---------- Footnotes ----------

   (1) "loop discovery" refers to the process by which a compiler, or
indeed any reader of a program, determines which portions of the
program are more likely to be executed repeatedly as it is being run.
Such discovery typically is done early when compiling using
optimization techniques, so the "discovered" loops get more
attention--and more run-time resources, such as registers--from the
compiler.  It is easy to "discover" loops that are constructed out of
looping constructs in the language (such as Fortran's `DO').  For some
programs, "discovering" loops constructed out of lower-level constructs
(such as `IF' and `GOTO') can lead to generation of more optimal code
than otherwise.

File: g77.info,  Node: Preprocessor Options,  Next: Directory Options,  Prev: Optimize Options,  Up: Invoking G77

5.8 Options Controlling the Preprocessor
========================================

These options control the C preprocessor, which is run on each C source
file before actual compilation.

   *Note Options Controlling the Preprocessor: (gcc)Preprocessor
Options, for information on C preprocessor options.

   Some of these options also affect how `g77' processes the `INCLUDE'
directive.  Since this directive is processed even when preprocessing
is not requested, it is not described in this section.  *Note Options
for Directory Search: Directory Options, for information on how `g77'
processes the `INCLUDE' directive.

   However, the `INCLUDE' directive does not apply preprocessing to the
contents of the included file itself.

   Therefore, any file that contains preprocessor directives (such as
`#include', `#define', and `#if') must be included via the `#include'
directive, not via the `INCLUDE' directive.  Therefore, any file
containing preprocessor directives, if included, is necessarily
included by a file that itself contains preprocessor directives.

File: g77.info,  Node: Directory Options,  Next: Code Gen Options,  Prev: Preprocessor Options,  Up: Invoking G77

5.9 Options for Directory Search
================================

These options affect how the `cpp' preprocessor searches for files
specified via the `#include' directive.  Therefore, when compiling
Fortran programs, they are meaningful when the preprocessor is used.

   Some of these options also affect how `g77' searches for files
specified via the `INCLUDE' directive, although files included by that
directive are not, themselves, preprocessed.  These options are:

`-I-'

`-IDIR'
     These affect interpretation of the `INCLUDE' directive (as well as
     of the `#include' directive of the `cpp' preprocessor).

     Note that `-IDIR' must be specified _without_ any spaces between
     `-I' and the directory name--that is, `-Ifoo/bar' is valid, but
     `-I foo/bar' is rejected by the `g77' compiler (though the
     preprocessor supports the latter form).  Also note that the
     general behavior of `-I' and `INCLUDE' is pretty much the same as
     of `-I' with `#include' in the `cpp' preprocessor, with regard to
     looking for `header.gcc' files and other such things.

     *Note Options for Directory Search: (gcc)Directory Options, for
     information on the `-I' option.

File: g77.info,  Node: Code Gen Options,  Next: Environment Variables,  Prev: Directory Options,  Up: Invoking G77

5.10 Options for Code Generation Conventions
============================================

These machine-independent options control the interface conventions
used in code generation.

   Most of them have both positive and negative forms; the negative form
of `-ffoo' would be `-fno-foo'.  In the table below, only one of the
forms is listed--the one which is not the default.  You can figure out
the other form by either removing `no-' or adding it.

`-fno-automatic'
     Treat each program unit as if the `SAVE' statement was specified
     for every local variable and array referenced in it.  Does not
     affect common blocks.  (Some Fortran compilers provide this option
     under the name `-static'.)

`-finit-local-zero'
     Specify that variables and arrays that are local to a program unit
     (not in a common block and not passed as an argument) are to be
     initialized to binary zeros.

     Since there is a run-time penalty for initialization of variables
     that are not given the `SAVE' attribute, it might be a good idea
     to also use `-fno-automatic' with `-finit-local-zero'.

`-fno-f2c'
     Do not generate code designed to be compatible with code generated
     by `f2c' use the GNU calling conventions instead.

     The `f2c' calling conventions require functions that return type
     `REAL(KIND=1)' to actually return the C type `double', and
     functions that return type `COMPLEX' to return the values via an
     extra argument in the calling sequence that points to where to
     store the return value.  Under the GNU calling conventions, such
     functions simply return their results as they would in GNU
     C--`REAL(KIND=1)' functions return the C type `float', and
     `COMPLEX' functions return the GNU C type `complex' (or its
     `struct' equivalent).

     This does not affect the generation of code that interfaces with
     the `libg2c' library.

     However, because the `libg2c' library uses `f2c' calling
     conventions, `g77' rejects attempts to pass intrinsics implemented
     by routines in this library as actual arguments when `-fno-f2c' is
     used, to avoid bugs when they are actually called by code
     expecting the GNU calling conventions to work.

     For example, `INTRINSIC ABS;CALL FOO(ABS)' is rejected when
     `-fno-f2c' is in force.  (Future versions of the `g77' run-time
     library might offer routines that provide GNU-callable versions of
     the routines that implement the `f2c' intrinsics that may be
     passed as actual arguments, so that valid programs need not be
     rejected when `-fno-f2c' is used.)

     *Caution:* If `-fno-f2c' is used when compiling any source file
     used in a program, it must be used when compiling _all_ Fortran
     source files used in that program.

`-ff2c-library'
     Specify that use of `libg2c' (or the original `libf2c') is
     required.  This is the default for the current version of `g77'

     Currently it is not valid to specify `-fno-f2c-library'.  This
     option is provided so users can specify it in shell scripts that
     build programs and libraries that require the `libf2c' library,
     even when being compiled by future versions of `g77' that might
     otherwise default to generating code for an incompatible library.

`-fno-underscoring'
     Do not transform names of entities specified in the Fortran source
     file by appending underscores to them.

     With `-funderscoring' in effect, `g77' appends two underscores to
     names with underscores and one underscore to external names with
     no underscores.  (`g77' also appends two underscores to internal
     names with underscores to avoid naming collisions with external
     names.  The `-fno-second-underscore' option disables appending of
     the second underscore in all cases.)

     This is done to ensure compatibility with code produced by many
     UNIX Fortran compilers, including `f2c' which perform the same
     transformations.

     Use of `-fno-underscoring' is not recommended unless you are
     experimenting with issues such as integration of (GNU) Fortran into
     existing system environments (vis-a-vis existing libraries, tools,
     and so on).

     For example, with `-funderscoring', and assuming other defaults
     like `-fcase-lower' and that `j()' and `max_count()' are external
     functions while `my_var' and `lvar' are local variables, a
     statement like

          I = J() + MAX_COUNT (MY_VAR, LVAR)

     is implemented as something akin to:

          i = j_() + max_count__(&my_var__, &lvar);

     With `-fno-underscoring', the same statement is implemented as:

          i = j() + max_count(&my_var, &lvar);

     Use of `-fno-underscoring' allows direct specification of
     user-defined names while debugging and when interfacing `g77' code
     with other languages.

     Note that just because the names match does _not_ mean that the
     interface implemented by `g77' for an external name matches the
     interface implemented by some other language for that same name.
     That is, getting code produced by `g77' to link to code produced
     by some other compiler using this or any other method can be only a
     small part of the overall solution--getting the code generated by
     both compilers to agree on issues other than naming can require
     significant effort, and, unlike naming disagreements, linkers
     normally cannot detect disagreements in these other areas.

     Also, note that with `-fno-underscoring', the lack of appended
     underscores introduces the very real possibility that a
     user-defined external name will conflict with a name in a system
     library, which could make finding unresolved-reference bugs quite
     difficult in some cases--they might occur at program run time, and
     show up only as buggy behavior at run time.

     In future versions of `g77' we hope to improve naming and linking
     issues so that debugging always involves using the names as they
     appear in the source, even if the names as seen by the linker are
     mangled to prevent accidental linking between procedures with
     incompatible interfaces.

`-fno-second-underscore'
     Do not append a second underscore to names of entities specified
     in the Fortran source file.

     This option has no effect if `-fno-underscoring' is in effect.

     Otherwise, with this option, an external name such as `MAX_COUNT'
     is implemented as a reference to the link-time external symbol
     `max_count_', instead of `max_count__'.

`-fno-ident'
     Ignore the `#ident' directive.

`-fzeros'
     Treat initial values of zero as if they were any other value.

     As of version 0.5.18, `g77' normally treats `DATA' and other
     statements that are used to specify initial values of zero for
     variables and arrays as if no values were actually specified, in
     the sense that no diagnostics regarding multiple initializations
     are produced.

     This is done to speed up compiling of programs that initialize
     large arrays to zeros.

     Use `-fzeros' to revert to the simpler, slower behavior that can
     catch multiple initializations by keeping track of all
     initializations, zero or otherwise.

     _Caution:_ Future versions of `g77' might disregard this option
     (and its negative form, the default) or interpret it somewhat
     differently.  The interpretation changes will affect only
     non-standard programs; standard-conforming programs should not be
     affected.

`-femulate-complex'
     Implement `COMPLEX' arithmetic via emulation, instead of using the
     facilities of the `gcc' back end that provide direct support of
     `complex' arithmetic.

     (`gcc' had some bugs in its back-end support for `complex'
     arithmetic, due primarily to the support not being completed as of
     version 2.8.1 and `egcs' 1.1.2.)

     Use `-femulate-complex' if you suspect code-generation bugs, or
     experience compiler crashes, that might result from `g77' using
     the `COMPLEX' support in the `gcc' back end.  If using that option
     fixes the bugs or crashes you are seeing, that indicates a likely
     `g77' bugs (though, all compiler crashes are considered bugs), so,
     please report it.  (Note that the known bugs, now believed fixed,
     produced compiler crashes rather than causing the generation of
     incorrect code.)

     Use of this option should not affect how Fortran code compiled by
     `g77' works in terms of its interfaces to other code, e.g. that
     compiled by `f2c'

     As of GCC version 3.0, this option is not necessary anymore.

     _Caution:_ Future versions of `g77' might ignore both forms of
     this option.

`-falias-check'

`-fargument-alias'

`-fargument-noalias'

`-fno-argument-noalias-global'
     _Version info:_ These options are not supported by versions of
     `g77' based on `gcc' version 2.8.

     These options specify to what degree aliasing (overlap) is
     permitted between arguments (passed as pointers) and `COMMON'
     (external, or public) storage.

     The default for Fortran code, as mandated by the FORTRAN 77 and
     Fortran 90 standards, is `-fargument-noalias-global'.  The default
     for code written in the C language family is `-fargument-alias'.

     Note that, on some systems, compiling with `-fforce-addr' in
     effect can produce more optimal code when the default aliasing
     options are in effect (and when optimization is enabled).

     *Note Aliasing Assumed To Work::, for detailed information on the
     implications of compiling Fortran code that depends on the ability
     to alias dummy arguments.

`-fno-globals'
     Disable diagnostics about inter-procedural analysis problems, such
     as disagreements about the type of a function or a procedure's
     argument, that might cause a compiler crash when attempting to
     inline a reference to a procedure within a program unit.  (The
     diagnostics themselves are still produced, but as warnings, unless
     `-Wno-globals' is specified, in which case no relevant diagnostics
     are produced.)

     Further, this option disables such inlining, to avoid compiler
     crashes resulting from incorrect code that would otherwise be
     diagnosed.

     As such, this option might be quite useful when compiling
     existing, "working" code that happens to have a few bugs that do
     not generally show themselves, but which `g77' diagnoses.

     Use of this option therefore has the effect of instructing `g77'
     to behave more like it did up through version 0.5.19.1, when it
     paid little or no attention to disagreements between program units
     about a procedure's type and argument information, and when it
     performed no inlining of procedures (except statement functions).

     Without this option, `g77' defaults to performing the potentially
     inlining procedures as it started doing in version 0.5.20, but as
     of version 0.5.21, it also diagnoses disagreements that might
     cause such inlining to crash the compiler as (fatal) errors, and
     warns about similar disagreements that are currently believed to
     not likely to result in the compiler later crashing or producing
     incorrect code.

`-fflatten-arrays'
     Use back end's C-like constructs (pointer plus offset) instead of
     its `ARRAY_REF' construct to handle all array references.

     _Note:_ This option is not supported.  It is intended for use only
     by `g77' developers, to evaluate code-generation issues.  It might
     be removed at any time.

`-fbounds-check'
`-ffortran-bounds-check'
     Enable generation of run-time checks for array subscripts and
     substring start and end points against the (locally) declared
     minimum and maximum values.

     The current implementation uses the `libf2c' library routine
     `s_rnge' to print the diagnostic.

     However, whereas `f2c' generates a single check per reference for
     a multi-dimensional array, of the computed offset against the
     valid offset range (0 through the size of the array), `g77'
     generates a single check per _subscript_ expression.  This catches
     some cases of potential bugs that `f2c' does not, such as
     references to below the beginning of an assumed-size array.

     `g77' also generates checks for `CHARACTER' substring references,
     something `f2c' currently does not do.

     Use the new `-ffortran-bounds-check' option to specify
     bounds-checking for only the Fortran code you are compiling, not
     necessarily for code written in other languages.

     _Note:_ To provide more detailed information on the offending
     subscript, `g77' provides the `libg2c' run-time library routine
     `s_rnge' with somewhat differently-formatted information.  Here's
     a sample diagnostic:

          Subscript out of range on file line 4, procedure rnge.f/bf.
          Attempt to access the -6-th element of variable b[subscript-2-of-2].
          Aborted

     The above message indicates that the offending source line is line
     4 of the file `rnge.f', within the program unit (or statement
     function) named `bf'.  The offended array is named `b'.  The
     offended array dimension is the second for a two-dimensional array,
     and the offending, computed subscript expression was `-6'.

     For a `CHARACTER' substring reference, the second line has this
     appearance:

          Attempt to access the 11-th element of variable a[start-substring].

     This indicates that the offended `CHARACTER' variable or array is
     named `a', the offended substring position is the starting
     (leftmost) position, and the offending substring expression is
     `11'.

     (Though the verbage of `s_rnge' is not ideal for the purpose of
     the `g77' compiler, the above information should provide adequate
     diagnostic abilities to it users.)

   *Note Options for Code Generation Conventions: (gcc)Code Gen
Options, for information on more options offered by the GBE shared by
`g77' `gcc' and other GNU compilers.

   Some of these do _not_ work when compiling programs written in
Fortran:

`-fpcc-struct-return'

`-freg-struct-return'
     You should not use these except strictly the same way as you used
     them to build the version of `libg2c' with which you will be
     linking all code compiled by `g77' with the same option.

`-fshort-double'
     This probably either has no effect on Fortran programs, or makes
     them act loopy.

`-fno-common'
     Do not use this when compiling Fortran programs, or there will be
     Trouble.

`-fpack-struct'
     This probably will break any calls to the `libg2c' library, at the
     very least, even if it is built with the same option.

File: g77.info,  Node: Environment Variables,  Prev: Code Gen Options,  Up: Invoking G77

5.11 Environment Variables Affecting GNU Fortran
================================================

GNU Fortran currently does not make use of any environment variables to
control its operation above and beyond those that affect the operation
of `gcc'.

   *Note Environment Variables Affecting GCC: (gcc)Environment
Variables, for information on environment variables.

File: g77.info,  Node: News,  Next: Changes,  Prev: Invoking G77,  Up: Top

6 News About GNU Fortran
************************

   _`GCC' 3.4.x is the last edition of `GCC' to contain `g77' - from
`GCC' 4.0 onwards, use `gfortran'_

   Changes made to recent versions of GNU Fortran are listed below,
with the most recent version first.

   The changes are generally listed in order:

  1. Code-generation and run-time-library bug-fixes

  2. Compiler and run-time-library crashes involving valid code that
     have been fixed

  3. New features

  4. Fixes and enhancements to existing features

  5. New diagnostics

  6. Internal improvements

  7. Miscellany

   This order is not strict--for example, some items involve a
combination of these elements.

   Note that two variants of `g77' are tracked below.  The `egcs'
variant is described vis-a-vis previous versions of `egcs' and/or an
official FSF version, as appropriate.  Note that all such variants are
obsolete _as of July 1999_ - the information is retained here only for
its historical value.

   Therefore, `egcs' versions sometimes have multiple listings to help
clarify how they differ from other versions, though this can make
getting a complete picture of what a particular `egcs' version contains
somewhat more difficult.

   For information on bugs in the GCC-3.4.6 version of `g77', see *Note
Known Bugs In GNU Fortran: Known Bugs.

   The following information was last updated on 2004-12-29:

In `GCC' 3.4 versus `GCC' 3.3:
==============================

   * Problem Reports fixed (in chronological order of submission):
    `8485'
          g77 doesn't accept INTEGER*8 constant in PARAMETER
          multiplication.

    `11918'
          (libf2c) isatty does not call f_init.

    `12317'
          Incorrect documentation for Fortran debugging features.

   * Roger Sayle (<roger AT eyesopen.com>) fixed the remaining problems
     with regard to the support of INTEGER*8, INTEGER*2 and INTEGER*1
     as a fallout of fixing PR 8485.

In `GCC' 3.3 versus `GCC' 3.2:
==============================

   * Problem Reports fixed (in chronological order of submission):
    `1832'
          -list directed i/o overflow hangs, -fbounds-check doesn't
          detect

    `3924'
          g77 generates code which is rejected by GAS if COFF debugging
          info is requested

    `6286'
          Broken links on web pages

    `6367'
          (libf2c) multiple repeat counts confuse namelist read into
          array

    `6491'
          Logical operations error on logicals when using -fugly-logint

    `6742'
          Generation of C++ Prototype for FORTRAN and extern "C"

    `7113'
          Failure of g77.f-torture/execute/f90-intrinsic-bit.f -Os on
          irix6.5

    `7236'
          (libf2c) OPEN(...,RECL=nnn,...) without ACCESS='DIRECT'
          should assume a direct access file

    `7278'
          g77 "bug"; the executable misbehave (use of options -O2
          -fno-automatic gave wrong results)

    `7384'
          (libf2c) DATE_AND_TIME milliseconds field inactive on Windows

    `7388'
          Incorrect output with 0-based array of characters

    `8587'
          Double complex zero ** double precision number -> NaN instead
          of zero

    `9038'
          -ffixed-line-length-none -x f77-cpp-input gives: Warning:
          unknown register name line-length-none

    `9263'
          ICE caused by invalid PARAMETER in implied DO loop

    `10197'
          Direct access files not unformatted by default

    `10726'
          Documentation for function IDATE Intrinsic (UNIX) is wrong
          [fixed in 3.3.1].

   * Richard Henderson (<rth AT redhat.com>) analyzed and improved the
     handling of (no-)aliasing information for dummy arguments and
     improved the optimization of induction variables in unrolled loops.

In `GCC' 3.2 versus `GCC' 3.1:
==============================

   * Problem Reports fixed (in chronological order of submission):
    `7681'
          ICE in compensate_edge, at reg-stack.c:2591

    `8308'
          gcc-3.x does not compile files with suffix .r (RATFOR) [Fixed
          in 3.2.1]

    `9258'
          [3.2/3.3/3.4 regression] ICE in compensate_edge, at
          reg-stack.c:2589

In `GCC' 3.1 (formerly known as g77-0.5.27) versus `GCC' 3.0:
=============================================================

   * Problem Reports fixed (in chronological order of submission):
    `947'
          Data statement initialization with subscript of kind INTEGER*2

    `3743'
          Reference to intrinsic `ISHFT' invalid

    `3807'
          Function BESJN(integer,double) problems

    `3957'
          g77 -pipe -xf77-cpp-input sends output to stdout

    `4279'
          g77 -h" gives bogus output

    `4730'
          ICE on valid input using CALL EXIT(%VAL(...))

    `4752'
          g77 -v -c -xf77-version /dev/null -xnone causes ice

    `4885'
          BACKSPACE example that doesn't work as of gcc/g77-3.0.x

    `5122'
          g77 rejects accepted use of INTEGER*2 as type of DATA
          statement loop index

    `5397'
          ICE on compiling source with 540 000 000 REAL array

    `5473'
          ICE on BESJN(integer*8,real)

    `5837'
          bug in loop unrolling

    `6106'
          sparc-sun-solaris2.7 gcc-3.1 extra g77 testsuite failures
          w/-m64

    `6138'
          Incorrect acces of integer*1 variables on PA

    `6304'
          Failure of LAPACK test dtest on irix6.5 with -mabi=64 -O2

   * `g77' now has its man page generated from the texinfo
     documentation, to guarantee that it remains up to date.

   * `g77' used to reject the following program on 32-bit targets:
          PROGRAM PROG
          DIMENSION A(140 000 000)
          END
     with the message:
          prog.f: In program `prog':
          prog.f:2:
                   DIMENSION A(140 000 000)
                             ^
          Array `a' at (^) is too large to handle
     because 140 000 000 REALs is larger than the largest bit-extent
     that can be expressed in 32 bits.  However, bit-sizes never play a
     role after offsets have been converted to byte addresses.
     Therefore this check has been removed, and the limit is now 2
     Gbyte of memory (around 530 000 000 REALs).  Note: On GNU/Linux
     systems one has to compile and link programs that occupy more than
     1 Gbyte statically, i.e. `g77 -static ...'.

   * Based on work done by Juergen Pfeifer (<juergen.pfeifer AT gmx.net>)
     libf2c is now a shared library.  One can still link in all objects
     with the program by specifying the `-static' option.

   * Robert Anderson (<rwa AT alumni.edu>) thought up a two line
     change that enables g77 to compile such code as:
          SUBROUTINE SUB(A, N)
          DIMENSION N(2)
          DIMENSION A(N(1),N(2))
          A(1,1) = 1.
          END
     Note the use of array elements in the bounds of the adjustable
     array A.

   * George Helffrich (<george AT geo.jp>) implemented a change
     in substring index checking (when specifying `-fbounds-check')
     that permits the use of zero length substrings of the form
     `string(1:0)'.

   * Based on code developed by Pedro Vazquez
     (<vazquez AT penelope.br>), the `libf2c' library is now
     able to read and write files larger than 2 Gbyte on 32-bit target
     machines, if the operating system supports this.

In 0.5.26, `GCC' 3.0 versus `GCC' 2.95:
=======================================

   * When a REWIND was issued after a WRITE statement on an unformatted
     file, the implicit truncation was performed by copying the
     truncated file to /tmp and copying the result back.  This has been
     fixed by using the `ftruncate' OS function.  Thanks go to the
     GAMESS developers for bringing this to our attention.

   * Using options `-g', `-ggdb' or `-gdwarf[-2]' (where appropriate
     for your target) now also enables debugging information for COMMON
     BLOCK and EQUIVALENCE items to be emitted.  Thanks go to Andrew
     Vaught (<andy AT xena.edu>) and George Helffrich
     (<george AT geology.uk>) for fixing this longstanding
     problem.

   * It is not necessary anymore to use the option `-femulate-complex'
     to compile Fortran code using COMPLEX arithmetic, even on 64-bit
     machines (like the Alpha).  This will improve code generation.

   * INTRINSIC arithmetic functions are now treated as routines that do
     not depend on anything but their argument(s).  This enables
     further instruction scheduling, because it is known that they
     cannot read or modify arbitrary locations.

   * Upgrade to `libf2c' as of 2000-12-05.

     This fixes a bug where a namelist containing initialization of
     LOGICAL items and a variable starting with T or F would be read
     incorrectly.

   * The `TtyNam' intrinsics now set NAME to all spaces (at run time)
     if the system has no `ttyname' implementation available.

   * Upgrade to `libf2c' as of 1999-06-28.

     This fixes a bug whereby input to a `NAMELIST' read involving a
     repeat count, such as `K(5)=10*3', was not properly handled by
     `libf2c'.  The first item was written to `K(5)', but the remaining
     nine were written elsewhere (still within the array), not
     necessarily starting at `K(6)'.

In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
=======================================================

   * `g77' no longer generates bad code for assignments, or other
     conversions, of `REAL' or `COMPLEX' constant expressions to type
     `INTEGER(KIND=2)' (often referred to as `INTEGER*8').

     For example, `INTEGER*8 J; J = 4E10' now works as documented.

   * `g77' no longer truncates `INTEGER(KIND=2)' (usually `INTEGER*8')
     subscript expressions when evaluating array references on systems
     with pointers widers than `INTEGER(KIND=1)' (such as Alphas).

   * `g77' no longer generates bad code for an assignment to a
     `COMPLEX' variable or array that partially overlaps one or more of
     the sources of the same assignment (a very rare construction).  It
     now assigns through a temporary, in cases where such partial
     overlap is deemed possible.

   * `libg2c' (`libf2c') no longer loses track of the file being worked
     on during a `BACKSPACE' operation.

   * `libg2c' (`libf2c') fixes a bug whereby input to a `NAMELIST' read
     involving a repeat count, such as `K(5)=10*3', was not properly
     handled by `libf2c'.  The first item was written to `K(5)', but
     the remaining nine were written elsewhere (still within the array),
     not necessarily starting at `K(6)'.

   * Automatic arrays now seem to be working on HP-UX systems.

   * The `Date' intrinsic now returns the correct result on big-endian
     systems.

   * Fix `g77' so it no longer crashes when compiling I/O statements
     using keywords that define `INTEGER' values, such as `IOSTAT=J',
     where J is other than default `INTEGER' (such as `INTEGER*2').
     Instead, it issues a diagnostic.

   * Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is
     not default `INTEGER', such as `INTEGER*2', instead of producing a
     spurious diagnostic.  Also fix `DATA (A(I),I=1,N)', where `N' is
     not default `INTEGER' to work instead of crashing `g77'.

   * The `-ax' option is now obeyed when compiling Fortran programs.
     (It is passed to the `f771' driver.)

   * The new `-fbounds-check' option causes `g77' to compile run-time
     bounds checks of array subscripts, as well as of substring start
     and end points.

   * `libg2c' now supports building as multilibbed library, which
     provides better support for systems that require options such as
     `-mieee' to work properly.

   * Source file names with the suffixes `.FOR' and `.FPP' now are
     recognized by `g77' as if they ended in `.for' and `.fpp',
     respectively.

   * The order of arguments to the _subroutine_ forms of the `CTime',
     `DTime', `ETime', and `TtyNam' intrinsics has been swapped.  The
     argument serving as the returned value for the corresponding
     function forms now is the _second_ argument, making these
     consistent with the other subroutine forms of `libU77' intrinsics.

   * `g77' now warns about a reference to an intrinsic that has an
     interface that is not Year 2000 (Y2K) compliant.  Also, `libg2c'
     has been changed to increase the likelihood of catching references
     to the implementations of these intrinsics using the `EXTERNAL'
     mechanism (which would avoid the new warnings).

     *Note Year 2000 (Y2K) Problems::, for more information.

   * `g77' now warns about a reference to a function when the
     corresponding _subsequent_ function program unit disagrees with
     the reference concerning the type of the function.

   * `-fno-emulate-complex' is now the default option.  This should
     result in improved performance of code that uses the `COMPLEX'
     data type.

   * The `-malign-double' option now reliably aligns _all_
     double-precision variables and arrays on Intel x86 targets.

   * Even without the `-malign-double' option, `g77' reliably aligns
     local double-precision variables that are not in `EQUIVALENCE'
     areas and not `SAVE''d.

   * `g77' now open-codes ("inlines") division of `COMPLEX' operands
     instead of generating a run-time call to the `libf2c' routines
     `c_div' or `z_div', unless the `-Os' option is specified.

   * `g77' no longer generates code to maintain `errno', a C-language
     concept, when performing operations such as the `SqRt' intrinsic.

   * `g77' developers can temporarily use the `-fflatten-arrays' option
     to compare how the compiler handles code generation using C-like
     constructs as compared to the Fortran-like method constructs
     normally used.

   * A substantial portion of the `g77' front end's code-generation
     component was rewritten.  It now generates code using facilities
     more robustly supported by the `gcc' back end.  One effect of this
     rewrite is that some codes no longer produce a spurious "label LAB
     used before containing binding contour" message.

   * Support for the `-fugly' option has been removed.

   * Improve documentation and indexing, including information on Year
     2000 (Y2K) compliance, and providing more information on internals
     of the front end.

   * Upgrade to `libf2c' as of 1999-05-10.

In 0.5.24 versus 0.5.23:
========================

There is no `g77' version 0.5.24 at this time, or planned.  0.5.24 is
the version number designated for bug fixes and, perhaps, some new
features added, to 0.5.23.  Version 0.5.23 requires `gcc' 2.8.1, as
0.5.24 was planned to require.

   Due to `EGCS' becoming `GCC' (which is now an acronym for "GNU
Compiler Collection"), and `EGCS' 1.2 becoming officially designated
`GCC' 2.95, there seems to be no need for an actual 0.5.24 release.

   To reduce the confusion already resulting from use of 0.5.24 to
designate `g77' versions within `EGCS' versions 1.0 and 1.1, as well as
in versions of `g77' documentation and notices during that period,
"mainline" `g77' version numbering resumes at 0.5.25 with `GCC' 2.95
(`EGCS' 1.2), skipping over 0.5.24 as a placeholder version number.

   To repeat, there is no `g77' 0.5.24, but there is now a 0.5.25.
Please remain calm and return to your keypunch units.

In `EGCS' 1.1.2 versus `EGCS' 1.1.1:
====================================

   * Fix the `IDate' intrinsic (VXT) (in `libg2c') so the returned year
     is in the documented, non-Y2K-compliant range of 0-99, instead of
     being returned as 100 in the year 2000.

     *Note IDate Intrinsic (VXT)::, for more information.

   * Fix the `Date_and_Time' intrinsic (in `libg2c') to return the
     milliseconds value properly in VALUES(8).

   * Fix the `LStat' intrinsic (in `libg2c') to return device-ID
     information properly in SARRAY(7).

   * Improve documentation.

In `EGCS' 1.1.1 versus `EGCS' 1.1:
==================================

   * Fix `libg2c' so it performs an implicit `ENDFILE' operation (as
     appropriate) whenever a `REWIND' is done.

     (This bug was introduced in 0.5.23 and `egcs' 1.1 in `g77''s
     version of `libf2c'.)

   * Fix `libg2c' so it no longer crashes with a spurious diagnostic
     upon doing any I/O following a direct formatted write.

     (This bug was introduced in 0.5.23 and `egcs' 1.1 in `g77''s
     version of `libf2c'.)

   * Fix `g77' so it no longer crashes compiling references to the
     `Rand' intrinsic on some systems.

   * Fix `g77' portion of installation process so it works better on
     some systems (those with shells requiring `else true' clauses on
     `if' constructs for the completion code to be set properly).

In `EGCS' 1.1 versus `EGCS' 1.0.3:
==================================

   * Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte
     beyond the end of its `CHARACTER' argument, and in the `libU77'
     intrinsics `GMTime' and `LTime' that overwrote their arguments.

   * Assumed arrays with negative bounds (such as `REAL A(-1:*)') no
     longer elicit spurious diagnostics from `g77', even on systems
     with pointers having different sizes than integers.

     This bug is not known to have existed in any recent version of
     `gcc'.  It was introduced in an early release of `egcs'.

   * Valid combinations of `EXTERNAL', passing that external as a dummy
     argument without explicitly giving it a type, and, in a subsequent
     program unit, referencing that external as an external function
     with a different type no longer crash `g77'.

   * `CASE DEFAULT' no longer crashes `g77'.

   * The `-Wunused' option no longer issues a spurious warning about
     the "master" procedure generated by `g77' for procedures
     containing `ENTRY' statements.

   * Support `FORMAT(I<EXPR>)' when EXPR is a compile-time constant
     `INTEGER' expression.

   * Fix `g77' `-g' option so procedures that use `ENTRY' can be
     stepped through, line by line, in `gdb'.

   * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'.

   * Use `tempnam', if available, to open scratch files (as in
     `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment
     variable, if present, is used.

   * `g77''s version of `libf2c' separates out the setting of global
     state (such as command-line arguments and signal handling) from
     `main.o' into distinct, new library archive members.

     This should make it easier to write portable applications that
     have their own (non-Fortran) `main()' routine properly set up the
     `libf2c' environment, even when `libf2c' (now `libg2c') is a
     shared library.

   * `g77' no longer installs the `f77' command and `f77.1' man page in
     the `/usr' or `/usr/local' hierarchy, even if the `f77-install-ok'
     file exists in the source or build directory.  See the
     installation documentation for more information.

   * `g77' no longer installs the `libf2c.a' library and `f2c.h'
     include file in the `/usr' or `/usr/local' hierarchy, even if the
     `f2c-install-ok' or `f2c-exists-ok' files exist in the source or
     build directory.  See the installation documentation for more
     information.

   * The `libf2c.a' library produced by `g77' has been renamed to
     `libg2c.a'.  It is installed only in the `gcc' "private" directory
     hierarchy, `gcc-lib'.  This allows system administrators and users
     to choose which version of the `libf2c' library from `netlib' they
     wish to use on a case-by-case basis.  See the installation
     documentation for more information.

   * The `f2c.h' include (header) file produced by `g77' has been
     renamed to `g2c.h'.  It is installed only in the `gcc' "private"
     directory hierarchy, `gcc-lib'.  This allows system administrators
     and users to choose which version of the include file from
     `netlib' they wish to use on a case-by-case basis.  See the
     installation documentation for more information.

   * The `g77' command now expects the run-time library to be named
     `libg2c.a' instead of `libf2c.a', to ensure that a version other
     than the one built and installed as part of the same `g77' version
     is picked up.

   * During the configuration and build process, `g77' creates
     subdirectories it needs only as it needs them.  Other cleaning up
     of the configuration and build process has been performed as well.

   * `install-info' now used to update the directory of Info
     documentation to contain an entry for `g77' (during installation).

   * Some diagnostics have been changed from warnings to errors, to
     prevent inadvertent use of the resulting, probably buggy, programs.
     These mostly include diagnostics about use of unsupported features
     in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
     about truncations of various sorts of constants.

   * Improve compilation of `FORMAT' expressions so that a null byte is
     appended to the last operand if it is a constant.  This provides a
     cleaner run-time diagnostic as provided by `libf2c' for statements
     like `PRINT '(I1', 42'.

   * Improve documentation and indexing.

   * The upgrade to `libf2c' as of 1998-06-18 should fix a variety of
     problems, including those involving some uses of the `T' format
     specifier, and perhaps some build (porting) problems as well.

In `EGCS' 1.1 versus `g77' 0.5.23:
==================================

   * Fix a code-generation bug that afflicted Intel x86 targets when
     `-O2' was specified compiling, for example, an old version of the
     `DNRM2' routine.

     The x87 coprocessor stack was being mismanaged in cases involving
     assigned `GOTO' and `ASSIGN'.

   * `g77' no longer produces incorrect code and initial values for
     `EQUIVALENCE' and `COMMON' aggregates that, due to "unnatural"
     ordering of members vis-a-vis their types, require initial padding.

   * Fix `g77' crash compiling code containing the construct
     `CMPLX(0.)' or similar.

   * `g77' no longer crashes when compiling code containing
     specification statements such as `INTEGER(KIND=7) PTR'.

   * `g77' no longer crashes when compiling code such as `J = SIGNAL(1,
     2)'.

   * `g77' now treats `%LOC(EXPR)' and `LOC(EXPR)' as "ordinary"
     expressions when they are used as arguments in procedure calls.
     This change applies only to global (filewide) analysis, making it
     consistent with how `g77' actually generates code for these cases.

     Previously, `g77' treated these expressions as denoting special
     "pointer" arguments for the purposes of filewide analysis.

   * Fix `g77' crash (or apparently infinite run-time) when compiling
     certain complicated expressions involving `COMPLEX' arithmetic
     (especially multiplication).

   * Align static double-precision variables and arrays on Intel x86
     targets regardless of whether `-malign-double' is specified.

     Generally, this affects only local variables and arrays having the
     `SAVE' attribute or given initial values via `DATA'.

   * The `g77' driver now ensures that `-lg2c' is specified in the link
     phase prior to any occurrence of `-lm'.  This prevents
     accidentally linking to a routine in the SunOS4 `-lm' library when
     the generated code wants to link to the one in `libf2c' (`libg2c').

   * `g77' emits more debugging information when `-g' is used.

     This new information allows, for example, `which __g77_length_a'
     to be used in `gdb' to determine the type of the phantom length
     argument supplied with `CHARACTER' variables.

     This information pertains to internally-generated type, variable,
     and other information, not to the longstanding deficiencies
     vis-a-vis `COMMON' and `EQUIVALENCE'.

   * The F90 `Date_and_Time' intrinsic now is supported.

   * The F90 `System_Clock' intrinsic allows the optional arguments
     (except for the `Count' argument) to be omitted.

   * Upgrade to `libf2c' as of 1998-06-18.

   * Improve documentation and indexing.

In 0.5.23 versus 0.5.22:
========================

   * This release contains several regressions against version 0.5.22
     of `g77', due to using the "vanilla" `gcc' back end instead of
     patching it to fix a few bugs and improve performance in a few
     cases.

     Features that have been dropped from this version of `g77' due to
     their being implemented via `g77'-specific patches to the `gcc'
     back end in previous releases include:

        - Support for `__restrict__' keyword, the options
          `-fargument-alias', `-fargument-noalias', and
          `-fargument-noalias-global', and the corresponding
          alias-analysis code.

          (`egcs' has the alias-analysis code, but not the
          `__restrict__' keyword.  `egcs' `g77' users benefit from the
          alias-analysis code despite the lack of the `__restrict__'
          keyword, which is a C-language construct.)

        - Support for the GNU compiler options `-fmove-all-movables',
          `-freduce-all-givs', and `-frerun-loop-opt'.

          (`egcs' supports these options.  `g77' users of `egcs'
          benefit from them even if they are not explicitly specified,
          because the defaults are optimized for `g77' users.)

        - Support for the `-W' option warning about integer division by
          zero.

        - The Intel x86-specific option `-malign-double' applying to
          stack-allocated data as well as statically-allocate data.

     Note that the `gcc/f/gbe/' subdirectory has been removed from this
     distribution as a result of `g77' no longer including patches for
     the `gcc' back end.

   * Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte
     beyond the end of its `CHARACTER' argument, and in the `libU77'
     intrinsics `GMTime' and `LTime' that overwrote their arguments.

   * Support `gcc' version 2.8, and remove support for prior versions
     of `gcc'.

   * Remove support for the `--driver' option, as `g77' now does all
     the driving, just like `gcc'.

   * `CASE DEFAULT' no longer crashes `g77'.

   * Valid combinations of `EXTERNAL', passing that external as a dummy
     argument without explicitly giving it a type, and, in a subsequent
     program unit, referencing that external as an external function
     with a different type no longer crash `g77'.

   * `g77' no longer installs the `f77' command and `f77.1' man page in
     the `/usr' or `/usr/local' hierarchy, even if the `f77-install-ok'
     file exists in the source or build directory.  See the
     installation documentation for more information.

   * `g77' no longer installs the `libf2c.a' library and `f2c.h'
     include file in the `/usr' or `/usr/local' hierarchy, even if the
     `f2c-install-ok' or `f2c-exists-ok' files exist in the source or
     build directory.  See the installation documentation for more
     information.

   * The `libf2c.a' library produced by `g77' has been renamed to
     `libg2c.a'.  It is installed only in the `gcc' "private" directory
     hierarchy, `gcc-lib'.  This allows system administrators and users
     to choose which version of the `libf2c' library from `netlib' they
     wish to use on a case-by-case basis.  See the installation
     documentation for more information.

   * The `f2c.h' include (header) file produced by `g77' has been
     renamed to `g2c.h'.  It is installed only in the `gcc' "private"
     directory hierarchy, `gcc-lib'.  This allows system administrators
     and users to choose which version of the include file from
     `netlib' they wish to use on a case-by-case basis.  See the
     installation documentation for more information.

   * The `g77' command now expects the run-time library to be named
     `libg2c.a' instead of `libf2c.a', to ensure that a version other
     than the one built and installed as part of the same `g77' version
     is picked up.

   * The `-Wunused' option no longer issues a spurious warning about
     the "master" procedure generated by `g77' for procedures
     containing `ENTRY' statements.

   * `g77''s version of `libf2c' separates out the setting of global
     state (such as command-line arguments and signal handling) from
     `main.o' into distinct, new library archive members.

     This should make it easier to write portable applications that
     have their own (non-Fortran) `main()' routine properly set up the
     `libf2c' environment, even when `libf2c' (now `libg2c') is a
     shared library.

   * During the configuration and build process, `g77' creates
     subdirectories it needs only as it needs them, thus avoiding
     unnecessary creation of, for example, `stage1/f/runtime' when
     doing a non-bootstrap build.  Other cleaning up of the
     configuration and build process has been performed as well.

   * `install-info' now used to update the directory of Info
     documentation to contain an entry for `g77' (during installation).

   * Some diagnostics have been changed from warnings to errors, to
     prevent inadvertent use of the resulting, probably buggy, programs.
     These mostly include diagnostics about use of unsupported features
     in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
     about truncations of various sorts of constants.

   * Improve documentation and indexing.

   * Upgrade to `libf2c' as of 1998-04-20.

     This should fix a variety of problems, including those involving
     some uses of the `T' format specifier, and perhaps some build
     (porting) problems as well.

In 0.5.22 versus 0.5.21:
========================

   * Fix code generation for iterative `DO' loops that have one or more
     references to the iteration variable, or to aliases of it, in
     their control expressions.  For example, `DO 10 J=2,J' now is
     compiled correctly.

   * Fix a code-generation bug that afflicted Intel x86 targets when
     `-O2' was specified compiling, for example, an old version of the
     `DNRM2' routine.

     The x87 coprocessor stack was being mismanaged in cases involving
     assigned `GOTO' and `ASSIGN'.

   * Fix `DTime' intrinsic so as not to truncate results to integer
     values (on some systems).

   * Fix `Signal' intrinsic so it offers portable support for 64-bit
     systems (such as Digital Alphas running GNU/Linux).

   * Fix run-time crash involving `NAMELIST' on 64-bit machines such as
     Alphas.

   * Fix `g77' version of `libf2c' so it no longer produces a spurious
     `I/O recursion' diagnostic at run time when an I/O operation (such
     as `READ *,I') is interrupted in a manner that causes the program
     to be terminated via the `f_exit' routine (such as via `C-c').

   * Fix `g77' crash triggered by `CASE' statement with an omitted
     lower or upper bound.

   * Fix `g77' crash compiling references to `CPU_Time' intrinsic.

   * Fix `g77' crash (or apparently infinite run-time) when compiling
     certain complicated expressions involving `COMPLEX' arithmetic
     (especially multiplication).

   * Fix `g77' crash on statements such as `PRINT *,
     (REAL(Z(I)),I=1,2)', where `Z' is `DOUBLE COMPLEX'.

   * Fix a `g++' crash.

   * Support `FORMAT(I<EXPR>)' when EXPR is a compile-time constant
     `INTEGER' expression.

   * Fix `g77' `-g' option so procedures that use `ENTRY' can be
     stepped through, line by line, in `gdb'.

   * Fix a profiling-related bug in `gcc' back end for Intel x86
     architecture.

   * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'.

   * Allow any numeric argument to intrinsics `Int2' and `Int8'.

   * Use `tempnam', if available, to open scratch files (as in
     `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment
     variable, if present, is used.

   * Rename the `gcc' keyword `restrict' to `__restrict__', to avoid
     rejecting valid, existing, C programs.  Support for `restrict' is
     now more like support for `complex'.

   * Fix `-fpedantic' to not reject procedure invocations such as
     `I=J()' and `CALL FOO()'.

   * Fix `-fugly-comma' to affect invocations of only external
     procedures.  Restore rejection of gratuitous trailing omitted
     arguments to intrinsics, as in `I=MAX(3,4,,)'.

   * Fix compiler so it accepts `-fgnu-intrinsics-*' and
     `-fbadu77-intrinsics-*' options.

   * Improve diagnostic messages from `libf2c' so it is more likely
     that the printing of the active format string is limited to the
     string, with no trailing garbage being printed.

     (Unlike `f2c', `g77' did not append a null byte to its compiled
     form of every format string specified via a `FORMAT' statement.
     However, `f2c' would exhibit the problem anyway for a statement
     like `PRINT '(I)garbage', 1' by printing `(I)garbage' as the
     format string.)

   * Improve compilation of `FORMAT' expressions so that a null byte is
     appended to the last operand if it is a constant.  This provides a
     cleaner run-time diagnostic as provided by `libf2c' for statements
     like `PRINT '(I1', 42'.

   * Fix various crashes involving code with diagnosed errors.

   * Fix cross-compilation bug when configuring `libf2c'.

   * Improve diagnostics.

   * Improve documentation and indexing.

   * Upgrade to `libf2c' as of 1997-09-23.  This fixes a formatted-I/O
     bug that afflicted 64-bit systems with 32-bit integers (such as
     Digital Alpha running GNU/Linux).

In `EGCS' 1.0.2 versus `EGCS' 1.0.1:
====================================

   * Fix `g77' crash triggered by `CASE' statement with an omitted
     lower or upper bound.

   * Fix `g77' crash on statements such as `PRINT *,
     (REAL(Z(I)),I=1,2)', where `Z' is `DOUBLE COMPLEX'.

   * Fix `-fPIC' (such as compiling for ELF targets) on the Intel x86
     architecture target so invalid assembler code is no longer
     produced.

   * Fix `-fpedantic' to not reject procedure invocations such as
     `I=J()' and `CALL FOO()'.

   * Fix `-fugly-comma' to affect invocations of only external
     procedures.  Restore rejection of gratuitous trailing omitted
     arguments to intrinsics, as in `I=MAX(3,4,,)'.

   * Fix compiler so it accepts `-fgnu-intrinsics-*' and
     `-fbadu77-intrinsics-*' options.

In `EGCS' 1.0.1 versus `EGCS' 1.0:
==================================

   * Fix run-time crash involving `NAMELIST' on 64-bit machines such as
     Alphas.

In `EGCS' 1.0 versus `g77' 0.5.21:
==================================

   * Version 1.0 of `egcs' contains several regressions against version
     0.5.21 of `g77', due to using the "vanilla" `gcc' back end instead
     of patching it to fix a few bugs and improve performance in a few
     cases.

     Features that have been dropped from this version of `g77' due to
     their being implemented via `g77'-specific patches to the `gcc'
     back end in previous releases include:

        - Support for the C-language `restrict' keyword.

        - Support for the `-W' option warning about integer division by
          zero.

        - The Intel x86-specific option `-malign-double' applying to
          stack-allocated data as well as statically-allocate data.

     Note that the `gcc/f/gbe/' subdirectory has been removed from this
     distribution as a result of `g77' being fully integrated with the
     `egcs' variant of the `gcc' back end.

   * Fix code generation for iterative `DO' loops that have one or more
     references to the iteration variable, or to aliases of it, in
     their control expressions.  For example, `DO 10 J=2,J' now is
     compiled correctly.

   * Fix `DTime' intrinsic so as not to truncate results to integer
     values (on some systems).

   * Some Fortran code, miscompiled by `g77' built on `gcc' version
     2.8.1 on m68k-next-nextstep3 configurations when using the `-O2'
     option, is now compiled correctly.  It is believed that a C
     function known to miscompile on that configuration when using the
     `-O2 -funroll-loops' options also is now compiled correctly.

   * Remove support for non-`egcs' versions of `gcc'.

   * Remove support for the `--driver' option, as `g77' now does all
     the driving, just like `gcc'.

   * Allow any numeric argument to intrinsics `Int2' and `Int8'.

   * Improve diagnostic messages from `libf2c' so it is more likely
     that the printing of the active format string is limited to the
     string, with no trailing garbage being printed.

     (Unlike `f2c', `g77' did not append a null byte to its compiled
     form of every format string specified via a `FORMAT' statement.
     However, `f2c' would exhibit the problem anyway for a statement
     like `PRINT '(I)garbage', 1' by printing `(I)garbage' as the
     format string.)

   * Upgrade to `libf2c' as of 1997-09-23.  This fixes a formatted-I/O
     bug that afflicted 64-bit systems with 32-bit integers (such as
     Digital Alpha running GNU/Linux).

In 0.5.21:
==========

   * Fix a code-generation bug introduced by 0.5.20 caused by loop
     unrolling (by specifying `-funroll-loops' or similar).  This bug
     afflicted all code compiled by version 2.7.2.2.f.2 of `gcc' (C,
     C++, Fortran, and so on).

   * Fix a code-generation bug manifested when combining local
     `EQUIVALENCE' with a `DATA' statement that follows the first
     executable statement (or is treated as an executable-context
     statement as a result of using the `-fpedantic' option).

   * Fix a compiler crash that occurred when an integer division by a
     constant zero is detected.  Instead, when the `-W' option is
     specified, the `gcc' back end issues a warning about such a case.
     This bug afflicted all code compiled by version 2.7.2.2.f.2 of
     `gcc' (C, C++, Fortran, and so on).

   * Fix a compiler crash that occurred in some cases of procedure
     inlining.  (Such cases became more frequent in 0.5.20.)

   * Fix a compiler crash resulting from using `DATA' or similar to
     initialize a `COMPLEX' variable or array to zero.

   * Fix compiler crashes involving use of `AND', `OR', or `XOR'
     intrinsics.

   * Fix compiler bug triggered when using a `COMMON' or `EQUIVALENCE'
     variable as the target of an `ASSIGN' or assigned-`GOTO' statement.

   * Fix compiler crashes due to using the name of a some non-standard
     intrinsics (such as `FTell' or `FPutC') as such and as the name of
     a procedure or common block.  Such dual use of a name in a program
     is allowed by the standard.

   * Place automatic arrays on the stack, even if `SAVE' or the
     `-fno-automatic' option is in effect.  This avoids a compiler
     crash in some cases.

   * The `-malign-double' option now reliably aligns `DOUBLE PRECISION'
     optimally on Pentium and Pentium Pro architectures (586 and 686 in
     `gcc').

   * New option `-Wno-globals' disables warnings about "suspicious" use
     of a name both as a global name and as the implicit name of an
     intrinsic, and warnings about disagreements over the number or
     natures of arguments passed to global procedures, or the natures
     of the procedures themselves.

     The default is to issue such warnings, which are new as of this
     version of `g77'.

   * New option `-fno-globals' disables diagnostics about potentially
     fatal disagreements analysis problems, such as disagreements over
     the number or natures of arguments passed to global procedures, or
     the natures of those procedures themselves.

     The default is to issue such diagnostics and flag the compilation
     as unsuccessful.  With this option, the diagnostics are issued as
     warnings, or, if `-Wno-globals' is specified, are not issued at
     all.

     This option also disables inlining of global procedures, to avoid
     compiler crashes resulting from coding errors that these
     diagnostics normally would identify.

   * Diagnose cases where a reference to a procedure disagrees with the
     type of that procedure, or where disagreements about the number or
     nature of arguments exist.  This avoids a compiler crash.

   * Fix parsing bug whereby `g77' rejected a second initialization
     specification immediately following the first's closing `/' without
     an intervening comma in a `DATA' statement, and the second
     specification was an implied-DO list.

   * Improve performance of the `gcc' back end so certain complicated
     expressions involving `COMPLEX' arithmetic (especially
     multiplication) don't appear to take forever to compile.

   * Fix a couple of profiling-related bugs in `gcc' back end.

   * Integrate GNU Ada's (GNAT's) changes to the back end, which
     consist almost entirely of bug fixes.  These fixes are circa
     version 3.10p of GNAT.

   * Include some other `gcc' fixes that seem useful in `g77''s version
     of `gcc'.  (See `gcc/ChangeLog' for details--compare it to that
     file in the vanilla `gcc-2.7.2.3.tar.gz' distribution.)

   * Fix `libU77' routines that accept file and other names to strip
     trailing blanks from them, for consistency with other
     implementations.  Blanks may be forcibly appended to such names by
     appending a single null character (`CHAR(0)') to the significant
     trailing blanks.

   * Fix `CHMOD' intrinsic to work with file names that have embedded
     blanks, commas, and so on.

   * Fix `SIGNAL' intrinsic so it accepts an optional third `Status'
     argument.

   * Fix `IDATE()' intrinsic subroutine (VXT form) so it accepts
     arguments in the correct order.  Documentation fixed accordingly,
     and for `GMTIME()' and `LTIME()' as well.

   * Make many changes to `libU77' intrinsics to support existing code
     more directly.

     Such changes include allowing both subroutine and function forms
     of many routines, changing `MCLOCK()' and `TIME()' to return
     `INTEGER(KIND=1)' values, introducing `MCLOCK8()' and `TIME8()' to
     return `INTEGER(KIND=2)' values, and placing functions that are
     intended to perform side effects in a new intrinsic group,
     `badu77'.

   * Improve `libU77' so it is more portable.

   * Add options `-fbadu77-intrinsics-delete',
     `-fbadu77-intrinsics-hide', and so on.

   * Fix crashes involving diagnosed or invalid code.

   * `g77' and `gcc' now do a somewhat better job detecting and
     diagnosing arrays that are too large to handle before these cause
     diagnostics during the assembler or linker phase, a compiler
     crash, or generation of incorrect code.

   * Make some fixes to alias analysis code.

   * Add support for `restrict' keyword in `gcc' front end.

   * Support `gcc' version 2.7.2.3 (modified by `g77' into version
     2.7.2.3.f.1), and remove support for prior versions of `gcc'.

   * Incorporate GNAT's patches to the `gcc' back end into `g77''s, so
     GNAT users do not need to apply GNAT's patches to build both GNAT
     and `g77' from the same source tree.

   * Modify `make' rules and related code so that generation of Info
     documentation doesn't require compilation using `gcc'.  Now, any
     ANSI C compiler should be adequate to produce the `g77'
     documentation (in particular, the tables of intrinsics) from
     scratch.

   * Add `INT2' and `INT8' intrinsics.

   * Add `CPU_TIME' intrinsic.

   * Add `ALARM' intrinsic.

   * `CTIME' intrinsic now accepts any `INTEGER' argument, not just
     `INTEGER(KIND=2)'.

   * Warn when explicit type declaration disagrees with the type of an
     intrinsic invocation.

   * Support `*f771' entry in `gcc' `specs' file.

   * Fix typo in `make' rule `g77-cross', used only for cross-compiling.

   * Fix `libf2c' build procedure to re-archive library if previous
     attempt to archive was interrupted.

   * Change `gcc' to unroll loops only during the last invocation (of
     as many as two invocations) of loop optimization.

   * Improve handling of `-fno-f2c' so that code that attempts to pass
     an intrinsic as an actual argument, such as `CALL FOO(ABS)', is
     rejected due to the fact that the run-time-library routine is,
     effectively, compiled with `-ff2c' in effect.

   * Fix `g77' driver to recognize `-fsyntax-only' as an option that
     inhibits linking, just like `-c' or `-S', and to recognize and
     properly handle the `-nostdlib', `-M', `-MM', `-nodefaultlibs',
     and `-Xlinker' options.

   * Upgrade to `libf2c' as of 1997-08-16.

   * Modify `libf2c' to consistently and clearly diagnose recursive I/O
     (at run time).

   * `g77' driver now prints version information (such as produced by
     `g77 -v') to `stderr' instead of `stdout'.

   * The `.r' suffix now designates a Ratfor source file, to be
     preprocessed via the `ratfor' command, available separately.

   * Fix some aspects of how `gcc' determines what kind of system is
     being configured and what kinds are supported.  For example, GNU
     Linux/Alpha ELF systems now are directly supported.

   * Improve diagnostics.

   * Improve documentation and indexing.

   * Include all pertinent files for `libf2c' that come from
     `netlib.bell-labs.com'; give any such files that aren't quite
     accurate in `g77''s version of `libf2c' the suffix `.netlib'.

   * Reserve `INTEGER(KIND=0)' for future use.

In 0.5.20:
==========

   * The `-fno-typeless-boz' option is now the default.

     This option specifies that non-decimal-radix constants using the
     prefixed-radix form (such as `Z'1234'') are to be interpreted as
     `INTEGER(KIND=1)' constants.  Specify `-ftypeless-boz' to cause
     such constants to be interpreted as typeless.

     (Version 0.5.19 introduced `-fno-typeless-boz' and its inverse.)

     *Note Options Controlling Fortran Dialect: Fortran Dialect Options,
     for information on the `-ftypeless-boz' option.

   * Options `-ff90-intrinsics-enable' and `-fvxt-intrinsics-enable'
     now are the defaults.

     Some programs might use names that clash with intrinsic names
     defined (and now enabled) by these options or by the new `libU77'
     intrinsics.  Users of such programs might need to compile them
     differently (using, for example, `-ff90-intrinsics-disable') or,
     better yet, insert appropriate `EXTERNAL' statements specifying
     that these names are not intended to be names of intrinsics.

   * The `ALWAYS_FLUSH' macro is no longer defined when building
     `libf2c', which should result in improved I/O performance,
     especially over NFS.

     _Note:_ If you have code that depends on the behavior of `libf2c'
     when built with `ALWAYS_FLUSH' defined, you will have to modify
     `libf2c' accordingly before building it from this and future
     versions of `g77'.

     *Note Output Assumed To Flush::, for more information.

   * Dave Love's implementation of `libU77' has been added to the
     version of `libf2c' distributed with and built as part of `g77'.
     `g77' now knows about the routines in this library as intrinsics.

   * New option `-fvxt' specifies that the source file is written in
     VXT Fortran, instead of GNU Fortran.

     *Note VXT Fortran::, for more information on the constructs
     recognized when the `-fvxt' option is specified.

   * The `-fvxt-not-f90' option has been deleted, along with its
     inverse, `-ff90-not-vxt'.

     If you used one of these deleted options, you should re-read the
     pertinent documentation to determine which options, if any, are
     appropriate for compiling your code with this version of `g77'.

     *Note Other Dialects::, for more information.

   * The `-fugly' option now issues a warning, as it likely will be
     removed in a future version.

     (Enabling all the `-fugly-*' options is unlikely to be feasible,
     or sensible, in the future, so users should learn to specify only
     those `-fugly-*' options they really need for a particular source
     file.)

   * The `-fugly-assumed' option, introduced in version 0.5.19, has
     been changed to better accommodate old and new code.

     *Note Ugly Assumed-Size Arrays::, for more information.

   * Make a number of fixes to the `g77' front end and the `gcc' back
     end to better support Alpha (AXP) machines.  This includes
     providing at least one bug-fix to the `gcc' back end for Alphas.

   * Related to supporting Alpha (AXP) machines, the `LOC()' intrinsic
     and `%LOC()' construct now return values of `INTEGER(KIND=0)' type,
     as defined by the GNU Fortran language.

     This type is wide enough (holds the same number of bits) as the
     character-pointer type on the machine.

     On most machines, this won't make a difference, whereas, on Alphas
     and other systems with 64-bit pointers, the `INTEGER(KIND=0)' type
     is equivalent to `INTEGER(KIND=2)' (often referred to as
     `INTEGER*8') instead of the more common `INTEGER(KIND=1)' (often
     referred to as `INTEGER*4').

   * Emulate `COMPLEX' arithmetic in the `g77' front end, to avoid bugs
     in `complex' support in the `gcc' back end.  New option
     `-fno-emulate-complex' causes `g77' to revert the 0.5.19 behavior.

   * Fix bug whereby `REAL A(1)', for example, caused a compiler crash
     if `-fugly-assumed' was in effect and A was a local (automatic)
     array.  That case is no longer affected by the new handling of
     `-fugly-assumed'.

   * Fix `g77' command driver so that `g77 -o foo.f' no longer deletes
     `foo.f' before issuing other diagnostics, and so the `-x' option
     is properly handled.

   * Enable inlining of subroutines and functions by the `gcc' back end.
     This works as it does for `gcc' itself--program units may be
     inlined for invocations that follow them in the same program unit,
     as long as the appropriate compile-time options are specified.

   * Dummy arguments are no longer assumed to potentially alias
     (overlap) other dummy arguments or `COMMON' areas when any of
     these are defined (assigned to) by Fortran code.

     This can result in faster and/or smaller programs when compiling
     with optimization enabled, though on some systems this effect is
     observed only when `-fforce-addr' also is specified.

     New options `-falias-check', `-fargument-alias',
     `-fargument-noalias', and `-fno-argument-noalias-global' control
     the way `g77' handles potential aliasing.

     *Note Aliasing Assumed To Work::, for detailed information on why
     the new defaults might result in some programs no longer working
     the way they did when compiled by previous versions of `g77'.

   * The `CONJG()' and `DCONJG()' intrinsics now are compiled in-line.

   * The bug-fix for 0.5.19.1 has been re-done.  The `g77' compiler has
     been changed back to assume `libf2c' has no aliasing problems in
     its implementations of the `COMPLEX' (and `DOUBLE COMPLEX')
     intrinsics.  The `libf2c' has been changed to have no such
     problems.

     As a result, 0.5.20 is expected to offer improved performance over
     0.5.19.1, perhaps as good as 0.5.19 in most or all cases, due to
     this change alone.

     _Note:_ This change requires version 0.5.20 of `libf2c', at least,
     when linking code produced by any versions of `g77' other than
     0.5.19.1.  Use `g77 -v' to determine the version numbers of the
     `libF77', `libI77', and `libU77' components of the `libf2c'
     library.  (If these version numbers are not printed--in
     particular, if the linker complains about unresolved references to
     names like `g77__fvers__'--that strongly suggests your
     installation has an obsolete version of `libf2c'.)

   * New option `-fugly-assign' specifies that the same memory
     locations are to be used to hold the values assigned by both
     statements `I = 3' and `ASSIGN 10 TO I', for example.  (Normally,
     `g77' uses a separate memory location to hold assigned statement
     labels.)

     *Note Ugly Assigned Labels::, for more information.

   * `FORMAT' and `ENTRY' statements now are allowed to precede
     `IMPLICIT NONE' statements.

   * Produce diagnostic for unsupported `SELECT CASE' on `CHARACTER'
     type, instead of crashing, at compile time.

   * Fix crashes involving diagnosed or invalid code.

   * Change approach to building `libf2c' archive (`libf2c.a') so that
     members are added to it only when truly necessary, so the user
     that installs an already-built `g77' doesn't need to have write
     access to the build tree (whereas the user doing the build might
     not have access to install new software on the system).

   * Support `gcc' version 2.7.2.2 (modified by `g77' into version
     2.7.2.2.f.2), and remove support for prior versions of `gcc'.

   * Upgrade to `libf2c' as of 1997-02-08, and fix up some of the build
     procedures.

   * Improve general build procedures for `g77', fixing minor bugs
     (such as deletion of any file named `f771' in the parent directory
     of `gcc/').

   * Enable full support of `INTEGER(KIND=2)' (often referred to as
     `INTEGER*8') available in `libf2c' and `f2c.h' so that `f2c' users
     may make full use of its features via the `g77' version of `f2c.h'
     and the `INTEGER(KIND=2)' support routines in the `g77' version of
     `libf2c'.

   * Improve `g77' driver and `libf2c' so that `g77 -v' yields version
     information on the library.

   * The `SNGL' and `FLOAT' intrinsics now are specific intrinsics,
     instead of synonyms for the generic intrinsic `REAL'.

   * New intrinsics have been added.  These are `REALPART', `IMAGPART',
     `COMPLEX', `LONG', and `SHORT'.

   * A new group of intrinsics, `gnu', has been added to contain the
     new `REALPART', `IMAGPART', and `COMPLEX' intrinsics.  An old
     group, `dcp', has been removed.

   * Complain about industry-wide ambiguous references `REAL(EXPR)' and
     `AIMAG(EXPR)', where EXPR is `DOUBLE COMPLEX' (or any complex type
     other than `COMPLEX'), unless `-ff90' option specifies Fortran 90
     interpretation or new `-fugly-complex' option, in conjunction with
     `-fnot-f90', specifies `f2c' interpretation.

   * Make improvements to diagnostics.

   * Speed up compiler a bit.

   * Improvements to documentation and indexing, including a new
     chapter containing information on one, later more, diagnostics
     that users are directed to pull up automatically via a message in
     the diagnostic itself.

     (Hence the menu item `M' for the node `Diagnostics' in the
     top-level menu of the Info documentation.)

In previous versions:
=====================

Information on previous versions is archived in `gcc/gcc/f/news.texi'
following the test of the `DOC-OLDNEWS' macro.

File: g77.info,  Node: Changes,  Next: Language,  Prev: News,  Up: Top

7 User-visible Changes
**********************

This chapter describes changes to `g77' that are visible to the
programmers who actually write and maintain Fortran code they compile
with `g77'.  Information on changes to installation procedures, changes
to the documentation, and bug fixes is not provided here, unless it is
likely to affect how users use `g77'.  *Note News About GNU Fortran:
News, for information on such changes to `g77'.

   Note that two variants of `g77' are tracked below.  The `egcs'
variant is described vis-a-vis previous versions of `egcs' and/or an
official FSF version, as appropriate.  Note that all such variants are
obsolete _as of July 1999_ - the information is retained here only for
its historical value.

   Therefore, `egcs' versions sometimes have multiple listings to help
clarify how they differ from other versions, though this can make
getting a complete picture of what a particular `egcs' version contains
somewhat more difficult.

   For information on bugs in the GCC-3.4.6 version of `g77', see *Note
Known Bugs In GNU Fortran: Known Bugs.

   The following information was last updated on 2004-12-29:

In `GCC' 3.4 versus `GCC' 3.3:
==============================

   * Problem Reports fixed (in chronological order of submission):
    `8485'
          g77 doesn't accept INTEGER*8 constant in PARAMETER
          multiplication.

    `11918'
          (libf2c) isatty does not call f_init.

    `12317'
          Incorrect documentation for Fortran debugging features.

   * Roger Sayle (<roger AT eyesopen.com>) fixed the remaining problems
     with regard to the support of INTEGER*8, INTEGER*2 and INTEGER*1
     as a fallout of fixing PR 8485.

In `GCC' 3.3 versus `GCC' 3.2:
==============================

   * Problem Reports fixed (in chronological order of submission):
    `1832'
          -list directed i/o overflow hangs, -fbounds-check doesn't
          detect

    `3924'
          g77 generates code which is rejected by GAS if COFF debugging
          info is requested

    `6286'
          Broken links on web pages

    `6367'
          (libf2c) multiple repeat counts confuse namelist read into
          array

    `6491'
          Logical operations error on logicals when using -fugly-logint

    `6742'
          Generation of C++ Prototype for FORTRAN and extern "C"

    `7113'
          Failure of g77.f-torture/execute/f90-intrinsic-bit.f -Os on
          irix6.5

    `7236'
          (libf2c) OPEN(...,RECL=nnn,...) without ACCESS='DIRECT'
          should assume a direct access file

    `7278'
          g77 "bug"; the executable misbehave (use of options -O2
          -fno-automatic gave wrong results)

    `7384'
          (libf2c) DATE_AND_TIME milliseconds field inactive on Windows

    `7388'
          Incorrect output with 0-based array of characters

    `8587'
          Double complex zero ** double precision number -> NaN instead
          of zero

    `9038'
          -ffixed-line-length-none -x f77-cpp-input gives: Warning:
          unknown register name line-length-none

    `9263'
          ICE caused by invalid PARAMETER in implied DO loop

    `10197'
          Direct access files not unformatted by default

    `10726'
          Documentation for function IDATE Intrinsic (UNIX) is wrong
          [fixed in 3.3.1].

   * Richard Henderson (<rth AT redhat.com>) analyzed and improved the
     handling of (no-)aliasing information for dummy arguments and
     improved the optimization of induction variables in unrolled loops.

In `GCC' 3.2 versus `GCC' 3.1:
==============================

   * Problem Reports fixed (in chronological order of submission):
    `7681'
          ICE in compensate_edge, at reg-stack.c:2591

    `8308'
          gcc-3.x does not compile files with suffix .r (RATFOR) [Fixed
          in 3.2.1]

    `9258'
          [3.2/3.3/3.4 regression] ICE in compensate_edge, at
          reg-stack.c:2589

In `GCC' 3.1 (formerly known as g77-0.5.27) versus `GCC' 3.0:
=============================================================

   * Problem Reports fixed (in chronological order of submission):
    `947'
          Data statement initialization with subscript of kind INTEGER*2

    `3743'
          Reference to intrinsic `ISHFT' invalid

    `3807'
          Function BESJN(integer,double) problems

    `3957'
          g77 -pipe -xf77-cpp-input sends output to stdout

    `4279'
          g77 -h" gives bogus output

    `4730'
          ICE on valid input using CALL EXIT(%VAL(...))

    `4752'
          g77 -v -c -xf77-version /dev/null -xnone causes ice

    `4885'
          BACKSPACE example that doesn't work as of gcc/g77-3.0.x

    `5122'
          g77 rejects accepted use of INTEGER*2 as type of DATA
          statement loop index

    `5397'
          ICE on compiling source with 540 000 000 REAL array

    `5473'
          ICE on BESJN(integer*8,real)

    `5837'
          bug in loop unrolling

    `6106'
          sparc-sun-solaris2.7 gcc-3.1 extra g77 testsuite failures
          w/-m64

    `6138'
          Incorrect acces of integer*1 variables on PA

    `6304'
          Failure of LAPACK test dtest on irix6.5 with -mabi=64 -O2

   * `g77' now has its man page generated from the texinfo
     documentation, to guarantee that it remains up to date.

   * `g77' used to reject the following program on 32-bit targets:
          PROGRAM PROG
          DIMENSION A(140 000 000)
          END
     with the message:
          prog.f: In program `prog':
          prog.f:2:
                   DIMENSION A(140 000 000)
                             ^
          Array `a' at (^) is too large to handle
     because 140 000 000 REALs is larger than the largest bit-extent
     that can be expressed in 32 bits.  However, bit-sizes never play a
     role after offsets have been converted to byte addresses.
     Therefore this check has been removed, and the limit is now 2
     Gbyte of memory (around 530 000 000 REALs).  Note: On GNU/Linux
     systems one has to compile and link programs that occupy more than
     1 Gbyte statically, i.e. `g77 -static ...'.

   * Based on work done by Juergen Pfeifer (<juergen.pfeifer AT gmx.net>)
     libf2c is now a shared library.  One can still link in all objects
     with the program by specifying the `-static' option.

   * Robert Anderson (<rwa AT alumni.edu>) thought up a two line
     change that enables g77 to compile such code as:
          SUBROUTINE SUB(A, N)
          DIMENSION N(2)
          DIMENSION A(N(1),N(2))
          A(1,1) = 1.
          END
     Note the use of array elements in the bounds of the adjustable
     array A.

   * George Helffrich (<george AT geo.jp>) implemented a change
     in substring index checking (when specifying `-fbounds-check')
     that permits the use of zero length substrings of the form
     `string(1:0)'.

   * Based on code developed by Pedro Vazquez
     (<vazquez AT penelope.br>), the `libf2c' library is now
     able to read and write files larger than 2 Gbyte on 32-bit target
     machines, if the operating system supports this.

In 0.5.26, `GCC' 3.0 versus `GCC' 2.95:
=======================================

   * When a REWIND was issued after a WRITE statement on an unformatted
     file, the implicit truncation was performed by copying the
     truncated file to /tmp and copying the result back.  This has been
     fixed by using the `ftruncate' OS function.  Thanks go to the
     GAMESS developers for bringing this to our attention.

   * Using options `-g', `-ggdb' or `-gdwarf[-2]' (where appropriate
     for your target) now also enables debugging information for COMMON
     BLOCK and EQUIVALENCE items to be emitted.  Thanks go to Andrew
     Vaught (<andy AT xena.edu>) and George Helffrich
     (<george AT geology.uk>) for fixing this longstanding
     problem.

   * It is not necessary anymore to use the option `-femulate-complex'
     to compile Fortran code using COMPLEX arithmetic, even on 64-bit
     machines (like the Alpha).  This will improve code generation.

   * INTRINSIC arithmetic functions are now treated as routines that do
     not depend on anything but their argument(s).  This enables
     further instruction scheduling, because it is known that they
     cannot read or modify arbitrary locations.


In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
=======================================================

   * The new `-fbounds-check' option causes `g77' to compile run-time
     bounds checks of array subscripts, as well as of substring start
     and end points.

   * `libg2c' now supports building as multilibbed library, which
     provides better support for systems that require options such as
     `-mieee' to work properly.

   * Source file names with the suffixes `.FOR' and `.FPP' now are
     recognized by `g77' as if they ended in `.for' and `.fpp',
     respectively.

   * The order of arguments to the _subroutine_ forms of the `CTime',
     `DTime', `ETime', and `TtyNam' intrinsics has been swapped.  The
     argument serving as the returned value for the corresponding
     function forms now is the _second_ argument, making these
     consistent with the other subroutine forms of `libU77' intrinsics.

   * `g77' now warns about a reference to an intrinsic that has an
     interface that is not Year 2000 (Y2K) compliant.  Also, `libg2c'
     has been changed to increase the likelihood of catching references
     to the implementations of these intrinsics using the `EXTERNAL'
     mechanism (which would avoid the new warnings).

     *Note Year 2000 (Y2K) Problems::, for more information.

   * `-fno-emulate-complex' is now the default option.  This should
     result in improved performance of code that uses the `COMPLEX'
     data type.

   * The `-malign-double' option now reliably aligns _all_
     double-precision variables and arrays on Intel x86 targets.

   * `g77' no longer generates code to maintain `errno', a C-language
     concept, when performing operations such as the `SqRt' intrinsic.

   * Support for the `-fugly' option has been removed.


In 0.5.24 versus 0.5.23:
========================

There is no `g77' version 0.5.24 at this time, or planned.  0.5.24 is
the version number designated for bug fixes and, perhaps, some new
features added, to 0.5.23.  Version 0.5.23 requires `gcc' 2.8.1, as
0.5.24 was planned to require.

   Due to `EGCS' becoming `GCC' (which is now an acronym for "GNU
Compiler Collection"), and `EGCS' 1.2 becoming officially designated
`GCC' 2.95, there seems to be no need for an actual 0.5.24 release.

   To reduce the confusion already resulting from use of 0.5.24 to
designate `g77' versions within `EGCS' versions 1.0 and 1.1, as well as
in versions of `g77' documentation and notices during that period,
"mainline" `g77' version numbering resumes at 0.5.25 with `GCC' 2.95
(`EGCS' 1.2), skipping over 0.5.24 as a placeholder version number.

   To repeat, there is no `g77' 0.5.24, but there is now a 0.5.25.
Please remain calm and return to your keypunch units.

In `EGCS' 1.1.2 versus `EGCS' 1.1.1:
====================================

In `EGCS' 1.1.1 versus `EGCS' 1.1:
==================================

In `EGCS' 1.1 versus `EGCS' 1.0.3:
==================================

   * Support `FORMAT(I<EXPR>)' when EXPR is a compile-time constant
     `INTEGER' expression.

   * Fix `g77' `-g' option so procedures that use `ENTRY' can be
     stepped through, line by line, in `gdb'.

   * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'.

   * Use `tempnam', if available, to open scratch files (as in
     `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment
     variable, if present, is used.

   * `g77''s version of `libf2c' separates out the setting of global
     state (such as command-line arguments and signal handling) from
     `main.o' into distinct, new library archive members.

     This should make it easier to write portable applications that
     have their own (non-Fortran) `main()' routine properly set up the
     `libf2c' environment, even when `libf2c' (now `libg2c') is a
     shared library.

   * The `g77' command now expects the run-time library to be named
     `libg2c.a' instead of `libf2c.a', to ensure that a version other
     than the one built and installed as part of the same `g77' version
     is picked up.

   * Some diagnostics have been changed from warnings to errors, to
     prevent inadvertent use of the resulting, probably buggy, programs.
     These mostly include diagnostics about use of unsupported features
     in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
     about truncations of various sorts of constants.


In `EGCS' 1.1 versus `g77' 0.5.23:
==================================

   * `g77' now treats `%LOC(EXPR)' and `LOC(EXPR)' as "ordinary"
     expressions when they are used as arguments in procedure calls.
     This change applies only to global (filewide) analysis, making it
     consistent with how `g77' actually generates code for these cases.

     Previously, `g77' treated these expressions as denoting special
     "pointer" arguments for the purposes of filewide analysis.

   * Align static double-precision variables and arrays on Intel x86
     targets regardless of whether `-malign-double' is specified.

     Generally, this affects only local variables and arrays having the
     `SAVE' attribute or given initial values via `DATA'.

   * The `g77' driver now ensures that `-lg2c' is specified in the link
     phase prior to any occurrence of `-lm'.  This prevents
     accidentally linking to a routine in the SunOS4 `-lm' library when
     the generated code wants to link to the one in `libf2c' (`libg2c').

   * `g77' emits more debugging information when `-g' is used.

     This new information allows, for example, `which __g77_length_a'
     to be used in `gdb' to determine the type of the phantom length
     argument supplied with `CHARACTER' variables.

     This information pertains to internally-generated type, variable,
     and other information, not to the longstanding deficiencies
     vis-a-vis `COMMON' and `EQUIVALENCE'.

   * The F90 `Date_and_Time' intrinsic now is supported.

   * The F90 `System_Clock' intrinsic allows the optional arguments
     (except for the `Count' argument) to be omitted.


In 0.5.23 versus 0.5.22:
========================

   * This release contains several regressions against version 0.5.22
     of `g77', due to using the "vanilla" `gcc' back end instead of
     patching it to fix a few bugs and improve performance in a few
     cases.

     Features that have been dropped from this version of `g77' due to
     their being implemented via `g77'-specific patches to the `gcc'
     back end in previous releases include:

        - Support for `__restrict__' keyword, the options
          `-fargument-alias', `-fargument-noalias', and
          `-fargument-noalias-global', and the corresponding
          alias-analysis code.

          (`egcs' has the alias-analysis code, but not the
          `__restrict__' keyword.  `egcs' `g77' users benefit from the
          alias-analysis code despite the lack of the `__restrict__'
          keyword, which is a C-language construct.)

        - Support for the GNU compiler options `-fmove-all-movables',
          `-freduce-all-givs', and `-frerun-loop-opt'.

          (`egcs' supports these options.  `g77' users of `egcs'
          benefit from them even if they are not explicitly specified,
          because the defaults are optimized for `g77' users.)

        - Support for the `-W' option warning about integer division by
          zero.

        - The Intel x86-specific option `-malign-double' applying to
          stack-allocated data as well as statically-allocate data.

   * Support `gcc' version 2.8, and remove support for prior versions
     of `gcc'.

   * Remove support for the `--driver' option, as `g77' now does all
     the driving, just like `gcc'.

   * The `g77' command now expects the run-time library to be named
     `libg2c.a' instead of `libf2c.a', to ensure that a version other
     than the one built and installed as part of the same `g77' version
     is picked up.

   * `g77''s version of `libf2c' separates out the setting of global
     state (such as command-line arguments and signal handling) from
     `main.o' into distinct, new library archive members.

     This should make it easier to write portable applications that
     have their own (non-Fortran) `main()' routine properly set up the
     `libf2c' environment, even when `libf2c' (now `libg2c') is a
     shared library.

   * Some diagnostics have been changed from warnings to errors, to
     prevent inadvertent use of the resulting, probably buggy, programs.
     These mostly include diagnostics about use of unsupported features
     in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
     about truncations of various sorts of constants.


In 0.5.22 versus 0.5.21:
========================

   * Fix `Signal' intrinsic so it offers portable support for 64-bit
     systems (such as Digital Alphas running GNU/Linux).

   * Support `FORMAT(I<EXPR>)' when EXPR is a compile-time constant
     `INTEGER' expression.

   * Fix `g77' `-g' option so procedures that use `ENTRY' can be
     stepped through, line by line, in `gdb'.

   * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'.

   * Allow any numeric argument to intrinsics `Int2' and `Int8'.

   * Use `tempnam', if available, to open scratch files (as in
     `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment
     variable, if present, is used.

   * Rename the `gcc' keyword `restrict' to `__restrict__', to avoid
     rejecting valid, existing, C programs.  Support for `restrict' is
     now more like support for `complex'.

   * Fix `-fugly-comma' to affect invocations of only external
     procedures.  Restore rejection of gratuitous trailing omitted
     arguments to intrinsics, as in `I=MAX(3,4,,)'.

   * Fix compiler so it accepts `-fgnu-intrinsics-*' and
     `-fbadu77-intrinsics-*' options.


In `EGCS' 1.0.2 versus `EGCS' 1.0.1:
====================================

   * Fix compiler so it accepts `-fgnu-intrinsics-*' and
     `-fbadu77-intrinsics-*' options.

In `EGCS' 1.0.1 versus `EGCS' 1.0:
==================================

In `EGCS' 1.0 versus `g77' 0.5.21:
==================================

   * Version 1.0 of `egcs' contains several regressions against version
     0.5.21 of `g77', due to using the "vanilla" `gcc' back end instead
     of patching it to fix a few bugs and improve performance in a few
     cases.

     Features that have been dropped from this version of `g77' due to
     their being implemented via `g77'-specific patches to the `gcc'
     back end in previous releases include:

        - Support for the C-language `restrict' keyword.

        - Support for the `-W' option warning about integer division by
          zero.

        - The Intel x86-specific option `-malign-double' applying to
          stack-allocated data as well as statically-allocate data.

   * Remove support for the `--driver' option, as `g77' now does all
     the driving, just like `gcc'.

   * Allow any numeric argument to intrinsics `Int2' and `Int8'.


In 0.5.21:
==========

   * When the `-W' option is specified, `gcc', `g77', and other GNU
     compilers that incorporate the `gcc' back end as modified by
     `g77', issue a warning about integer division by constant zero.

   * New option `-Wno-globals' disables warnings about "suspicious" use
     of a name both as a global name and as the implicit name of an
     intrinsic, and warnings about disagreements over the number or
     natures of arguments passed to global procedures, or the natures
     of the procedures themselves.

     The default is to issue such warnings, which are new as of this
     version of `g77'.

   * New option `-fno-globals' disables diagnostics about potentially
     fatal disagreements analysis problems, such as disagreements over
     the number or natures of arguments passed to global procedures, or
     the natures of those procedures themselves.

     The default is to issue such diagnostics and flag the compilation
     as unsuccessful.  With this option, the diagnostics are issued as
     warnings, or, if `-Wno-globals' is specified, are not issued at
     all.

     This option also disables inlining of global procedures, to avoid
     compiler crashes resulting from coding errors that these
     diagnostics normally would identify.

   * Fix `libU77' routines that accept file and other names to strip
     trailing blanks from them, for consistency with other
     implementations.  Blanks may be forcibly appended to such names by
     appending a single null character (`CHAR(0)') to the significant
     trailing blanks.

   * Fix `CHMOD' intrinsic to work with file names that have embedded
     blanks, commas, and so on.

   * Fix `SIGNAL' intrinsic so it accepts an optional third `Status'
     argument.

   * Make many changes to `libU77' intrinsics to support existing code
     more directly.

     Such changes include allowing both subroutine and function forms
     of many routines, changing `MCLOCK()' and `TIME()' to return
     `INTEGER(KIND=1)' values, introducing `MCLOCK8()' and `TIME8()' to
     return `INTEGER(KIND=2)' values, and placing functions that are
     intended to perform side effects in a new intrinsic group,
     `badu77'.

   * Add options `-fbadu77-intrinsics-delete',
     `-fbadu77-intrinsics-hide', and so on.

   * Add `INT2' and `INT8' intrinsics.

   * Add `CPU_TIME' intrinsic.

   * Add `ALARM' intrinsic.

   * `CTIME' intrinsic now accepts any `INTEGER' argument, not just
     `INTEGER(KIND=2)'.

   * `g77' driver now prints version information (such as produced by
     `g77 -v') to `stderr' instead of `stdout'.

   * The `.r' suffix now designates a Ratfor source file, to be
     preprocessed via the `ratfor' command, available separately.


In 0.5.20:
==========

   * The `-fno-typeless-boz' option is now the default.

     This option specifies that non-decimal-radix constants using the
     prefixed-radix form (such as `Z'1234'') are to be interpreted as
     `INTEGER(KIND=1)' constants.  Specify `-ftypeless-boz' to cause
     such constants to be interpreted as typeless.

     (Version 0.5.19 introduced `-fno-typeless-boz' and its inverse.)

     *Note Options Controlling Fortran Dialect: Fortran Dialect Options,
     for information on the `-ftypeless-boz' option.

   * Options `-ff90-intrinsics-enable' and `-fvxt-intrinsics-enable'
     now are the defaults.

     Some programs might use names that clash with intrinsic names
     defined (and now enabled) by these options or by the new `libU77'
     intrinsics.  Users of such programs might need to compile them
     differently (using, for example, `-ff90-intrinsics-disable') or,
     better yet, insert appropriate `EXTERNAL' statements specifying
     that these names are not intended to be names of intrinsics.

   * The `ALWAYS_FLUSH' macro is no longer defined when building
     `libf2c', which should result in improved I/O performance,
     especially over NFS.

     _Note:_ If you have code that depends on the behavior of `libf2c'
     when built with `ALWAYS_FLUSH' defined, you will have to modify
     `libf2c' accordingly before building it from this and future
     versions of `g77'.

     *Note Output Assumed To Flush::, for more information.

   * Dave Love's implementation of `libU77' has been added to the
     version of `libf2c' distributed with and built as part of `g77'.
     `g77' now knows about the routines in this library as intrinsics.

   * New option `-fvxt' specifies that the source file is written in
     VXT Fortran, instead of GNU Fortran.

     *Note VXT Fortran::, for more information on the constructs
     recognized when the `-fvxt' option is specified.

   * The `-fvxt-not-f90' option has been deleted, along with its
     inverse, `-ff90-not-vxt'.

     If you used one of these deleted options, you should re-read the
     pertinent documentation to determine which options, if any, are
     appropriate for compiling your code with this version of `g77'.

     *Note Other Dialects::, for more information.

   * The `-fugly' option now issues a warning, as it likely will be
     removed in a future version.

     (Enabling all the `-fugly-*' options is unlikely to be feasible,
     or sensible, in the future, so users should learn to specify only
     those `-fugly-*' options they really need for a particular source
     file.)

   * The `-fugly-assumed' option, introduced in version 0.5.19, has
     been changed to better accommodate old and new code.

     *Note Ugly Assumed-Size Arrays::, for more information.

   * Related to supporting Alpha (AXP) machines, the `LOC()' intrinsic
     and `%LOC()' construct now return values of `INTEGER(KIND=0)' type,
     as defined by the GNU Fortran language.

     This type is wide enough (holds the same number of bits) as the
     character-pointer type on the machine.

     On most machines, this won't make a difference, whereas, on Alphas
     and other systems with 64-bit pointers, the `INTEGER(KIND=0)' type
     is equivalent to `INTEGER(KIND=2)' (often referred to as
     `INTEGER*8') instead of the more common `INTEGER(KIND=1)' (often
     referred to as `INTEGER*4').

   * Emulate `COMPLEX' arithmetic in the `g77' front end, to avoid bugs
     in `complex' support in the `gcc' back end.  New option
     `-fno-emulate-complex' causes `g77' to revert the 0.5.19 behavior.

   * Dummy arguments are no longer assumed to potentially alias
     (overlap) other dummy arguments or `COMMON' areas when any of
     these are defined (assigned to) by Fortran code.

     This can result in faster and/or smaller programs when compiling
     with optimization enabled, though on some systems this effect is
     observed only when `-fforce-addr' also is specified.

     New options `-falias-check', `-fargument-alias',
     `-fargument-noalias', and `-fno-argument-noalias-global' control
     the way `g77' handles potential aliasing.

     *Note Aliasing Assumed To Work::, for detailed information on why
     the new defaults might result in some programs no longer working
     the way they did when compiled by previous versions of `g77'.

   * New option `-fugly-assign' specifies that the same memory
     locations are to be used to hold the values assigned by both
     statements `I = 3' and `ASSIGN 10 TO I', for example.  (Normally,
     `g77' uses a separate memory location to hold assigned statement
     labels.)

     *Note Ugly Assigned Labels::, for more information.

   * `FORMAT' and `ENTRY' statements now are allowed to precede
     `IMPLICIT NONE' statements.

   * Enable full support of `INTEGER(KIND=2)' (often referred to as
     `INTEGER*8') available in `libf2c' and `f2c.h' so that `f2c' users
     may make full use of its features via the `g77' version of `f2c.h'
     and the `INTEGER(KIND=2)' support routines in the `g77' version of
     `libf2c'.

   * Improve `g77' driver and `libf2c' so that `g77 -v' yields version
     information on the library.

   * The `SNGL' and `FLOAT' intrinsics now are specific intrinsics,
     instead of synonyms for the generic intrinsic `REAL'.

   * New intrinsics have been added.  These are `REALPART', `IMAGPART',
     `COMPLEX', `LONG', and `SHORT'.

   * A new group of intrinsics, `gnu', has been added to contain the
     new `REALPART', `IMAGPART', and `COMPLEX' intrinsics.  An old
     group, `dcp', has been removed.

   * Complain about industry-wide ambiguous references `REAL(EXPR)' and
     `AIMAG(EXPR)', where EXPR is `DOUBLE COMPLEX' (or any complex type
     other than `COMPLEX'), unless `-ff90' option specifies Fortran 90
     interpretation or new `-fugly-complex' option, in conjunction with
     `-fnot-f90', specifies `f2c' interpretation.


In previous versions:
=====================

Information on previous versions is archived in `gcc/gcc/f/news.texi'
following the test of the `DOC-OLDNEWS' macro.

File: g77.info,  Node: Language,  Next: Compiler,  Prev: Changes,  Up: Top

8 The GNU Fortran Language
**************************

GNU Fortran supports a variety of extensions to, and dialects of, the
Fortran language.  Its primary base is the ANSI FORTRAN 77 standard,
currently available on the network at
`http://www.fortran.com/fortran/F77_std/rjcnf0001.html' or as
monolithic text at
`http://www.fortran.com/fortran/F77_std/f77_std.html'.  It offers some
extensions that are popular among users of UNIX `f77' and `f2c'
compilers, some that are popular among users of other compilers (such
as Digital products), some that are popular among users of the newer
Fortran 90 standard, and some that are introduced by GNU Fortran.

   (If you need a text on Fortran, a few freely available electronic
references have pointers from `http://www.fortran.com/F/books.html'.
There is a `cooperative net project', `User Notes on Fortran
Programming' at `ftp://vms.huji.ac.il/fortran/' and mirrors elsewhere;
some of this material might not apply specifically to `g77'.)

   Part of what defines a particular implementation of a Fortran
system, such as `g77', is the particular characteristics of how it
supports types, constants, and so on.  Much of this is left up to the
implementation by the various Fortran standards and accepted practice
in the industry.

   The GNU Fortran _language_ is described below.  Much of the material
is organized along the same lines as the ANSI FORTRAN 77 standard
itself.

   *Note Other Dialects::, for information on features `g77' supports
that are not part of the GNU Fortran language.

   _Note_: This portion of the documentation definitely needs a lot of
work!

* Menu:

Relationship to the ANSI FORTRAN 77 standard:
* Direction of Language Development::  Where GNU Fortran is headed.
* Standard Support::  Degree of support for the standard.

Extensions to the ANSI FORTRAN 77 standard:
* Conformance::
* Notation Used::
* Terms and Concepts::
* Characters Lines Sequence::
* Data Types and Constants::
* Expressions::
* Specification Statements::
* Control Statements::
* Functions and Subroutines::
* Scope and Classes of Names::
* I/O::
* Fortran 90 Features::

File: g77.info,  Node: Direction of Language Development,  Next: Standard Support,  Up: Language

8.1 Direction of Language Development
=====================================

The purpose of the following description of the GNU Fortran language is
to promote wide portability of GNU Fortran programs.

   GNU Fortran is an evolving language, due to the fact that `g77'
itself is in beta test.  Some current features of the language might
later be redefined as dialects of Fortran supported by `g77' when
better ways to express these features are added to `g77', for example.
Such features would still be supported by `g77', but would be available
only when one or more command-line options were used.

   The GNU Fortran _language_ is distinct from the GNU Fortran
_compilation system_ (`g77').

   For example, `g77' supports various dialects of Fortran--in a sense,
these are languages other than GNU Fortran--though its primary purpose
is to support the GNU Fortran language, which also is described in its
documentation and by its implementation.

   On the other hand, non-GNU compilers might offer support for the GNU
Fortran language, and are encouraged to do so.

   Currently, the GNU Fortran language is a fairly fuzzy object.  It
represents something of a cross between what `g77' accepts when
compiling using the prevailing defaults and what this document
describes as being part of the language.

   Future versions of `g77' are expected to clarify the definition of
the language in the documentation.  Often, this will mean adding new
features to the language, in the form of both new documentation and new
support in `g77'.  However, it might occasionally mean removing a
feature from the language itself to "dialect" status.  In such a case,
the documentation would be adjusted to reflect the change, and `g77'
itself would likely be changed to require one or more command-line
options to continue supporting the feature.

   The development of the GNU Fortran language is intended to strike a
balance between:

   * Serving as a mostly-upwards-compatible language from the de facto
     UNIX Fortran dialect as supported by `f77'.

   * Offering new, well-designed language features.  Attributes of such
     features include not making existing code any harder to read (for
     those who might be unaware that the new features are not in use)
     and not making state-of-the-art compilers take longer to issue
     diagnostics, among others.

   * Supporting existing, well-written code without gratuitously
     rejecting non-standard constructs, regardless of the origin of the
     code (its dialect).

   * Offering default behavior and command-line options to reduce and,
     where reasonable, eliminate the need for programmers to make any
     modifications to code that already works in existing production
     environments.

   * Diagnosing constructs that have different meanings in different
     systems, languages, and dialects, while offering clear, less
     ambiguous ways to express each of the different meanings so
     programmers can change their code appropriately.

   One of the biggest practical challenges for the developers of the
GNU Fortran language is meeting the sometimes contradictory demands of
the above items.

   For example, a feature might be widely used in one popular
environment, but the exact same code that utilizes that feature might
not work as expected--perhaps it might mean something entirely
different--in another popular environment.

   Traditionally, Fortran compilers--even portable ones--have solved
this problem by simply offering the appropriate feature to users of the
respective systems.  This approach treats users of various Fortran
systems and dialects as remote "islands", or camps, of programmers, and
assume that these camps rarely come into contact with each other (or,
especially, with each other's code).

   Project GNU takes a radically different approach to software and
language design, in that it assumes that users of GNU software do not
necessarily care what kind of underlying system they are using,
regardless of whether they are using software (at the user-interface
level) or writing it (for example, writing Fortran or C code).

   As such, GNU users rarely need consider just what kind of underlying
hardware (or, in many cases, operating system) they are using at any
particular time.  They can use and write software designed for a
general-purpose, widely portable, heterogeneous environment--the GNU
environment.

   In line with this philosophy, GNU Fortran must evolve into a product
that is widely ported and portable not only in the sense that it can be
successfully built, installed, and run by users, but in the larger
sense that its users can use it in the same way, and expect largely the
same behaviors from it, regardless of the kind of system they are using
at any particular time.

   This approach constrains the solutions `g77' can use to resolve
conflicts between various camps of Fortran users.  If these two camps
disagree about what a particular construct should mean, `g77' cannot
simply be changed to treat that particular construct as having one
meaning without comment (such as a warning), lest the users expecting
it to have the other meaning are unpleasantly surprised that their code
misbehaves when executed.

   The use of the ASCII backslash character in character constants is
an excellent (and still somewhat unresolved) example of this kind of
controversy.  *Note Backslash in Constants::.  Other examples are
likely to arise in the future, as `g77' developers strive to improve
its ability to accept an ever-wider variety of existing Fortran code
without requiring significant modifications to said code.

   Development of GNU Fortran is further constrained by the desire to
avoid requiring programmers to change their code.  This is important
because it allows programmers, administrators, and others to more
faithfully evaluate and validate `g77' (as an overall product and as
new versions are distributed) without having to support multiple
versions of their programs so that they continue to work the same way
on their existing systems (non-GNU perhaps, but possibly also earlier
versions of `g77').

File: g77.info,  Node: Standard Support,  Next: Conformance,  Prev: Direction of Language Development,  Up: Language

8.2 ANSI FORTRAN 77 Standard Support
====================================

GNU Fortran supports ANSI FORTRAN 77 with the following caveats.  In
summary, the only ANSI FORTRAN 77 features `g77' doesn't support are
those that are probably rarely used in actual code, some of which are
explicitly disallowed by the Fortran 90 standard.

* Menu:

* No Passing External Assumed-length::  CHAR*(*) CFUNC restriction.
* No Passing Dummy Assumed-length::     CHAR*(*) CFUNC restriction.
* No Pathological Implied-DO::          No `((..., I=...), I=...)'.
* No Useless Implied-DO::               No `(A, I=1, 1)'.

File: g77.info,  Node: No Passing External Assumed-length,  Next: No Passing Dummy Assumed-length,  Up: Standard Support

8.2.1 No Passing External Assumed-length
----------------------------------------

`g77' disallows passing of an external procedure as an actual argument
if the procedure's type is declared `CHARACTER*(*)'.  For example:

     CHARACTER*(*) CFUNC
     EXTERNAL CFUNC
     CALL FOO(CFUNC)
     END

It isn't clear whether the standard considers this conforming.

File: g77.info,  Node: No Passing Dummy Assumed-length,  Next: No Pathological Implied-DO,  Prev: No Passing External Assumed-length,  Up: Standard Support

8.2.2 No Passing Dummy Assumed-length
-------------------------------------

`g77' disallows passing of a dummy procedure as an actual argument if
the procedure's type is declared `CHARACTER*(*)'.

     SUBROUTINE BAR(CFUNC)
     CHARACTER*(*) CFUNC
     EXTERNAL CFUNC
     CALL FOO(CFUNC)
     END

It isn't clear whether the standard considers this conforming.

File: g77.info,  Node: No Pathological Implied-DO,  Next: No Useless Implied-DO,  Prev: No Passing Dummy Assumed-length,  Up: Standard Support

8.2.3 No Pathological Implied-DO
--------------------------------

The `DO' variable for an implied-`DO' construct in a `DATA' statement
may not be used as the `DO' variable for an outer implied-`DO'
construct.  For example, this fragment is disallowed by `g77':

     DATA ((A(I, I), I= 1, 10), I= 1, 10) /.../

This also is disallowed by Fortran 90, as it offers no additional
capabilities and would have a variety of possible meanings.

   Note that it is _very_ unlikely that any production Fortran code
tries to use this unsupported construct.

File: g77.info,  Node: No Useless Implied-DO,  Prev: No Pathological Implied-DO,  Up: Standard Support

8.2.4 No Useless Implied-DO
---------------------------

An array element initializer in an implied-`DO' construct in a `DATA'
statement must contain at least one reference to the `DO' variables of
each outer implied-`DO' construct.  For example, this fragment is
disallowed by `g77':

     DATA (A, I= 1, 1) /1./

This also is disallowed by Fortran 90, as FORTRAN 77's more permissive
requirements offer no additional capabilities.  However, `g77' doesn't
necessarily diagnose all cases where this requirement is not met.

   Note that it is _very_ unlikely that any production Fortran code
tries to use this unsupported construct.

File: g77.info,  Node: Conformance,  Next: Notation Used,  Prev: Standard Support,  Up: Language

8.3 Conformance
===============

(The following information augments or overrides the information in
Section 1.4 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 1 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

   The definition of the GNU Fortran language is akin to that of the
ANSI FORTRAN 77 language in that it does not generally require
conforming implementations to diagnose cases where programs do not
conform to the language.

   However, `g77' as a compiler is being developed in a way that is
intended to enable it to diagnose such cases in an easy-to-understand
manner.

   A program that conforms to the GNU Fortran language should, when
compiled, linked, and executed using a properly installed `g77' system,
perform as described by the GNU Fortran language definition.  Reasons
for different behavior include, among others:

   * Use of resources (memory--heap, stack, and so on; disk space; CPU
     time; etc.) exceeds those of the system.

   * Range and/or precision of calculations required by the program
     exceeds that of the system.

   * Excessive reliance on behaviors that are system-dependent
     (non-portable Fortran code).

   * Bugs in the program.

   * Bug in `g77'.

   * Bugs in the system.

   Despite these "loopholes", the availability of a clear specification
of the language of programs submitted to `g77', as this document is
intended to provide, is considered an important aspect of providing a
robust, clean, predictable Fortran implementation.

   The definition of the GNU Fortran language, while having no special
legal status, can therefore be viewed as a sort of contract, or
agreement.  This agreement says, in essence, "if you write a program in
this language, and run it in an environment (such as a `g77' system)
that supports this language, the program should behave in a largely
predictable way".

File: g77.info,  Node: Notation Used,  Next: Terms and Concepts,  Prev: Conformance,  Up: Language

8.4 Notation Used in This Chapter
=================================

(The following information augments or overrides the information in
Section 1.5 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 1 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

   In this chapter, "must" denotes a requirement, "may" denotes
permission, and "must not" and "may not" denote prohibition.  Terms
such as "might", "should", and "can" generally add little or nothing in
the way of weight to the GNU Fortran language itself, but are used to
explain or illustrate the language.

   For example:

     "The `FROBNITZ' statement must precede all executable
     statements in a program unit, and may not specify any dummy
     arguments.  It may specify local or common variables and arrays.
     Its use should be limited to portions of the program designed to
     be non-portable and system-specific, because it might cause the
     containing program unit to behave quite differently on different
     systems."

   Insofar as the GNU Fortran language is specified, the requirements
and permissions denoted by the above sample statement are limited to
the placement of the statement and the kinds of things it may specify.
The rest of the statement--the content regarding non-portable portions
of the program and the differing behavior of program units containing
the `FROBNITZ' statement--does not pertain the GNU Fortran language
itself.  That content offers advice and warnings about the `FROBNITZ'
statement.

   _Remember:_ The GNU Fortran language definition specifies both what
constitutes a valid GNU Fortran program and how, given such a program,
a valid GNU Fortran implementation is to interpret that program.

   It is _not_ incumbent upon a valid GNU Fortran implementation to
behave in any particular way, any consistent way, or any predictable
way when it is asked to interpret input that is _not_ a valid GNU
Fortran program.

   Such input is said to have "undefined" behavior when interpreted by
a valid GNU Fortran implementation, though an implementation may choose
to specify behaviors for some cases of inputs that are not valid GNU
Fortran programs.

   Other notation used herein is that of the GNU texinfo format, which
is used to generate printed hardcopy, on-line hypertext (Info), and
on-line HTML versions, all from a single source document.  This
notation is used as follows:

   * Keywords defined by the GNU Fortran language are shown in
     uppercase, as in: `COMMON', `INTEGER', and `BLOCK DATA'.

     Note that, in practice, many Fortran programs are written in
     lowercase--uppercase is used in this manual as a means to readily
     distinguish keywords and sample Fortran-related text from the
     prose in this document.

   * Portions of actual sample program, input, or output text look like
     this: `Actual program text'.

     Generally, uppercase is used for all Fortran-specific and
     Fortran-related text, though this does not always include literal
     text within Fortran code.

     For example: `PRINT *, 'My name is Bob''.

   * A metasyntactic variable--that is, a name used in this document to
     serve as a placeholder for whatever text is used by the user or
     programmer--appears as shown in the following example:

     "The `INTEGER IVAR' statement specifies that IVAR is a variable or
     array of type `INTEGER'."

     In the above example, any valid text may be substituted for the
     metasyntactic variable IVAR to make the statement apply to a
     specific instance, as long as the same text is substituted for
     _both_ occurrences of IVAR.

   * Ellipses ("...") are used to indicate further text that is either
     unimportant or expanded upon further, elsewhere.

   * Names of data types are in the style of Fortran 90, in most cases.

     *Note Kind Notation::, for information on the relationship between
     Fortran 90 nomenclature (such as `INTEGER(KIND=1)') and the more
     traditional, less portably concise nomenclature (such as
     `INTEGER*4').

File: g77.info,  Node: Terms and Concepts,  Next: Characters Lines Sequence,  Prev: Notation Used,  Up: Language

8.5 Fortran Terms and Concepts
==============================

(The following information augments or overrides the information in
Chapter 2 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 2 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

* Menu:

* Syntactic Items::
* Statements Comments Lines::
* Scope of Names and Labels::

File: g77.info,  Node: Syntactic Items,  Next: Statements Comments Lines,  Up: Terms and Concepts

8.5.1 Syntactic Items
---------------------

(Corresponds to Section 2.2 of ANSI X3.9-1978 FORTRAN 77.)

   In GNU Fortran, a symbolic name is at least one character long, and
has no arbitrary upper limit on length.  However, names of entities
requiring external linkage (such as external functions, external
subroutines, and `COMMON' areas) might be restricted to some arbitrary
length by the system.  Such a restriction is no more constrained than
that of one through six characters.

   Underscores (`_') are accepted in symbol names after the first
character (which must be a letter).

File: g77.info,  Node: Statements Comments Lines,  Next: Scope of Names and Labels,  Prev: Syntactic Items,  Up: Terms and Concepts

8.5.2 Statements, Comments, and Lines
-------------------------------------

(Corresponds to Section 2.3 of ANSI X3.9-1978 FORTRAN 77.)

   Use of an exclamation point (`!') to begin a trailing comment (a
comment that extends to the end of the same source line) is permitted
under the following conditions:

   * The exclamation point does not appear in column 6.  Otherwise, it
     is treated as an indicator of a continuation line.

   * The exclamation point appears outside a character or Hollerith
     constant.  Otherwise, the exclamation point is considered part of
     the constant.

   * The exclamation point appears to the left of any other possible
     trailing comment.  That is, a trailing comment may contain
     exclamation points in their commentary text.

   Use of a semicolon (`;') as a statement separator is permitted under
the following conditions:

   * The semicolon appears outside a character or Hollerith constant.
     Otherwise, the semicolon is considered part of the constant.

   * The semicolon appears to the left of a trailing comment.
     Otherwise, the semicolon is considered part of that comment.

   * Neither a logical `IF' statement nor a non-construct `WHERE'
     statement (a Fortran 90 feature) may be followed (in the same,
     possibly continued, line) by a semicolon used as a statement
     separator.

     This restriction avoids the confusion that can result when reading
     a line such as:

          IF (VALIDP) CALL FOO; CALL BAR

     Some readers might think the `CALL BAR' is executed only if
     `VALIDP' is `.TRUE.', while others might assume its execution is
     unconditional.

     (At present, `g77' does not diagnose code that violates this
     restriction.)

File: g77.info,  Node: Scope of Names and Labels,  Prev: Statements Comments Lines,  Up: Terms and Concepts

8.5.3 Scope of Symbolic Names and Statement Labels
--------------------------------------------------

(Corresponds to Section 2.9 of ANSI X3.9-1978 FORTRAN 77.)

   Included in the list of entities that have a scope of a program unit
are construct names (a Fortran 90 feature).  *Note Construct Names::,
for more information.

File: g77.info,  Node: Characters Lines Sequence,  Next: Data Types and Constants,  Prev: Terms and Concepts,  Up: Language

8.6 Characters, Lines, and Execution Sequence
=============================================

(The following information augments or overrides the information in
Chapter 3 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 3 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

* Menu:

* Character Set::
* Lines::
* Continuation Line::
* Statements::
* Statement Labels::
* Order::
* INCLUDE::
* Cpp-style directives::

File: g77.info,  Node: Character Set,  Next: Lines,  Up: Characters Lines Sequence

8.6.1 GNU Fortran Character Set
-------------------------------

(Corresponds to Section 3.1 of ANSI X3.9-1978 FORTRAN 77.)

   Letters include uppercase letters (the twenty-six characters of the
English alphabet) and lowercase letters (their lowercase equivalent).
Generally, lowercase letters may be used in place of uppercase letters,
though in character and Hollerith constants, they are distinct.

   Special characters include:

   * Semicolon (`;')

   * Exclamation point (`!')

   * Double quote (`"')

   * Backslash (`\')

   * Question mark (`?')

   * Hash mark (`#')

   * Ampersand (`&')

   * Percent sign (`%')

   * Underscore (`_')

   * Open angle (`<')

   * Close angle (`>')

   * The FORTRAN 77 special characters (<SPC>, `=', `+', `-', `*', `/',
     `(', `)', `,', `.', `$', `'', and `:')

   Note that this document refers to <SPC> as "space", while X3.9-1978
FORTRAN 77 refers to it as "blank".

File: g77.info,  Node: Lines,  Next: Continuation Line,  Prev: Character Set,  Up: Characters Lines Sequence

8.6.2 Lines
-----------

(Corresponds to Section 3.2 of ANSI X3.9-1978 FORTRAN 77.)

   The way a Fortran compiler views source files depends entirely on the
implementation choices made for the compiler, since those choices are
explicitly left to the implementation by the published Fortran
standards.

   The GNU Fortran language mandates a view applicable to UNIX-like
text files--files that are made up of an arbitrary number of lines,
each with an arbitrary number of characters (sometimes called
stream-based files).

   This view does not apply to types of files that are specified as
having a particular number of characters on every single line (sometimes
referred to as record-based files).

   Because a "line in a program unit is a sequence of 72 characters",
to quote X3.9-1978, the GNU Fortran language specifies that a
stream-based text file is translated to GNU Fortran lines as follows:

   * A newline in the file is the character that represents the end of
     a line of text to the underlying system.  For example, on
     ASCII-based systems, a newline is the <NL> character, which has
     ASCII value 10 (decimal).

   * Each newline in the file serves to end the line of text that
     precedes it (and that does not contain a newline).

   * The end-of-file marker (`EOF') also serves to end the line of text
     that precedes it (and that does not contain a newline).

   * Any line of text that is shorter than 72 characters is padded to
     that length with spaces (called "blanks" in the standard).

   * Any line of text that is longer than 72 characters is truncated to
     that length, but the truncated remainder must consist entirely of
     spaces.

   * Characters other than newline and the GNU Fortran character set
     are invalid.

   For the purposes of the remainder of this description of the GNU
Fortran language, the translation described above has already taken
place, unless otherwise specified.

   The result of the above translation is that the source file appears,
in terms of the remainder of this description of the GNU Fortran
language, as if it had an arbitrary number of 72-character lines, each
character being among the GNU Fortran character set.

   For example, if the source file itself has two newlines in a row,
the second newline becomes, after the above translation, a single line
containing 72 spaces.

File: g77.info,  Node: Continuation Line,  Next: Statements,  Prev: Lines,  Up: Characters Lines Sequence

8.6.3 Continuation Line
-----------------------

(Corresponds to Section 3.2.3 of ANSI X3.9-1978 FORTRAN 77.)

   A continuation line is any line that both

   * Contains a continuation character, and

   * Contains only spaces in columns 1 through 5

   A continuation character is any character of the GNU Fortran
character set other than space (<SPC>) or zero (`0') in column 6, or a
digit (`0' through `9') in column 7 through 72 of a line that has only
spaces to the left of that digit.

   The continuation character is ignored as far as the content of the
statement is concerned.

   The GNU Fortran language places no limit on the number of
continuation lines in a statement.  In practice, the limit depends on a
variety of factors, such as available memory, statement content, and so
on, but no GNU Fortran system may impose an arbitrary limit.

File: g77.info,  Node: Statements,  Next: Statement Labels,  Prev: Continuation Line,  Up: Characters Lines Sequence

8.6.4 Statements
----------------

(Corresponds to Section 3.3 of ANSI X3.9-1978 FORTRAN 77.)

   Statements may be written using an arbitrary number of continuation
lines.

   Statements may be separated using the semicolon (`;'), except that
the logical `IF' and non-construct `WHERE' statements may not be
separated from subsequent statements using only a semicolon as
statement separator.

   The `END PROGRAM', `END SUBROUTINE', `END FUNCTION', and `END BLOCK
DATA' statements are alternatives to the `END' statement.  These
alternatives may be written as normal statements--they are not subject
to the restrictions of the `END' statement.

   However, no statement other than `END' may have an initial line that
appears to be an `END' statement--even `END PROGRAM', for example, must
not be written as:

           END
          &PROGRAM

File: g77.info,  Node: Statement Labels,  Next: Order,  Prev: Statements,  Up: Characters Lines Sequence

8.6.5 Statement Labels
----------------------

(Corresponds to Section 3.4 of ANSI X3.9-1978 FORTRAN 77.)

   A statement separated from its predecessor via a semicolon may be
labeled as follows:

   * The semicolon is followed by the label for the statement, which in
     turn follows the label.

   * The label must be no more than five digits in length.

   * The first digit of the label for the statement is not the first
     non-space character on a line.  Otherwise, that character is
     treated as a continuation character.

   A statement may have only one label defined for it.

File: g77.info,  Node: Order,  Next: INCLUDE,  Prev: Statement Labels,  Up: Characters Lines Sequence

8.6.6 Order of Statements and Lines
-----------------------------------

(Corresponds to Section 3.5 of ANSI X3.9-1978 FORTRAN 77.)

   Generally, `DATA' statements may precede executable statements.
However, specification statements pertaining to any entities
initialized by a `DATA' statement must precede that `DATA' statement.
For example, after `DATA I/1/', `INTEGER I' is not permitted, but
`INTEGER J' is permitted.

   The last line of a program unit may be an `END' statement, or may be:

   * An `END PROGRAM' statement, if the program unit is a main program.

   * An `END SUBROUTINE' statement, if the program unit is a subroutine.

   * An `END FUNCTION' statement, if the program unit is a function.

   * An `END BLOCK DATA' statement, if the program unit is a block data.

File: g77.info,  Node: INCLUDE,  Next: Cpp-style directives,  Prev: Order,  Up: Characters Lines Sequence

8.6.7 Including Source Text
---------------------------

Additional source text may be included in the processing of the source
file via the `INCLUDE' directive:

     INCLUDE FILENAME

The source text to be included is identified by FILENAME, which is a
literal GNU Fortran character constant.  The meaning and interpretation
of FILENAME depends on the implementation, but typically is a filename.

   (`g77' treats it as a filename that it searches for in the current
directory and/or directories specified via the `-I' command-line
option.)

   The effect of the `INCLUDE' directive is as if the included text
directly replaced the directive in the source file prior to
interpretation of the program.  Included text may itself use `INCLUDE'.
The depth of nested `INCLUDE' references depends on the implementation,
but typically is a positive integer.

   This virtual replacement treats the statements and `INCLUDE'
directives in the included text as syntactically distinct from those in
the including text.

   Therefore, the first non-comment line of the included text must not
be a continuation line.  The included text must therefore have, after
the non-comment lines, either an initial line (statement), an `INCLUDE'
directive, or nothing (the end of the included text).

   Similarly, the including text may end the `INCLUDE' directive with a
semicolon or the end of the line, but it cannot follow an `INCLUDE'
directive at the end of its line with a continuation line.  Thus, the
last statement in an included text may not be continued.

   Any statements between two `INCLUDE' directives on the same line are
treated as if they appeared in between the respective included texts.
For example:

     INCLUDE 'A'; PRINT *, 'B'; INCLUDE 'C'; END PROGRAM

If the text included by `INCLUDE 'A'' constitutes a `PRINT *, 'A''
statement and the text included by `INCLUDE 'C'' constitutes a `PRINT
*, 'C'' statement, then the output of the above sample program would be

     A
     B
     C

(with suitable allowances for how an implementation defines its
handling of output).

   Included text must not include itself directly or indirectly,
regardless of whether the FILENAME used to reference the text is the
same.

   Note that `INCLUDE' is _not_ a statement.  As such, it is neither a
non-executable or executable statement.  However, if the text it
includes constitutes one or more executable statements, then the
placement of `INCLUDE' is subject to effectively the same restrictions
as those on executable statements.

   An `INCLUDE' directive may be continued across multiple lines as if
it were a statement.  This permits long names to be used for FILENAME.

File: g77.info,  Node: Cpp-style directives,  Prev: INCLUDE,  Up: Characters Lines Sequence

8.6.8 Cpp-style directives
--------------------------

`cpp' output-style `#' directives (*note C Preprocessor Output: (cpp)C
Preprocessor Output.)  are recognized by the compiler even when the
preprocessor isn't run on the input (as it is when compiling `.F'
files).  (Note the distinction between these `cpp' `#' _output_
directives and `#line' _input_ directives.)

File: g77.info,  Node: Data Types and Constants,  Next: Expressions,  Prev: Characters Lines Sequence,  Up: Language

8.7 Data Types and Constants
============================

(The following information augments or overrides the information in
Chapter 4 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 4 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

   To more concisely express the appropriate types for entities, this
document uses the more concise Fortran 90 nomenclature such as
`INTEGER(KIND=1)' instead of the more traditional, but less portably
concise, byte-size-based nomenclature such as `INTEGER*4', wherever
reasonable.

   When referring to generic types--in contexts where the specific
precision and range of a type are not important--this document uses the
generic type names `INTEGER', `LOGICAL', `REAL', `COMPLEX', and
`CHARACTER'.

   In some cases, the context requires specification of a particular
type.  This document uses the `KIND=' notation to accomplish this
throughout, sometimes supplying the more traditional notation for
clarification, though the traditional notation might not work the same
way on all GNU Fortran implementations.

   Use of `KIND=' makes this document more concise because `g77' is
able to define values for `KIND=' that have the same meanings on all
systems, due to the way the Fortran 90 standard specifies these values
are to be used.

   (In particular, that standard permits an implementation to
arbitrarily assign nonnegative values.  There are four distinct sets of
assignments: one to the `CHARACTER' type; one to the `INTEGER' type;
one to the `LOGICAL' type; and the fourth to both the `REAL' and
`COMPLEX' types.  Implementations are free to assign these values in
any order, leave gaps in the ordering of assignments, and assign more
than one value to a representation.)

   This makes `KIND=' values superior to the values used in
non-standard statements such as `INTEGER*4', because the meanings of
the values in those statements vary from machine to machine, compiler
to compiler, even operating system to operating system.

   However, use of `KIND=' is _not_ generally recommended when writing
portable code (unless, for example, the code is going to be compiled
only via `g77', which is a widely ported compiler).  GNU Fortran does
not yet have adequate language constructs to permit use of `KIND=' in a
fashion that would make the code portable to Fortran 90
implementations; and, this construct is known to _not_ be accepted by
many popular FORTRAN 77 implementations, so it cannot be used in code
that is to be ported to those.

   The distinction here is that this document is able to use specific
values for `KIND=' to concisely document the types of various
operations and operands.

   A Fortran program should use the FORTRAN 77 designations for the
appropriate GNU Fortran types--such as `INTEGER' for `INTEGER(KIND=1)',
`REAL' for `REAL(KIND=1)', and `DOUBLE COMPLEX' for
`COMPLEX(KIND=2)'--and, where no such designations exist, make use of
appropriate techniques (preprocessor macros, parameters, and so on) to
specify the types in a fashion that may be easily adjusted to suit each
particular implementation to which the program is ported.  (These types
generally won't need to be adjusted for ports of `g77'.)

   Further details regarding GNU Fortran data types and constants are
provided below.

* Menu:

* Types::
* Constants::
* Integer Type::
* Character Type::

File: g77.info,  Node: Types,  Next: Constants,  Up: Data Types and Constants

8.7.1 Data Types
----------------

(Corresponds to Section 4.1 of ANSI X3.9-1978 FORTRAN 77.)

   GNU Fortran supports these types:

  1. Integer (generic type `INTEGER')

  2. Real (generic type `REAL')

  3. Double precision

  4. Complex (generic type `COMPLEX')

  5. Logical (generic type `LOGICAL')

  6. Character (generic type `CHARACTER')

  7. Double Complex

   (The types numbered 1 through 6 above are standard FORTRAN 77 types.)

   The generic types shown above are referred to in this document using
only their generic type names.  Such references usually indicate that
any specific type (kind) of that generic type is valid.

   For example, a context described in this document as accepting the
`COMPLEX' type also is likely to accept the `DOUBLE COMPLEX' type.

   The GNU Fortran language supports three ways to specify a specific
kind of a generic type.

* Menu:

* Double Notation::  As in `DOUBLE COMPLEX'.
* Star Notation::    As in `INTEGER*4'.
* Kind Notation::    As in `INTEGER(KIND=1)'.

File: g77.info,  Node: Double Notation,  Next: Star Notation,  Up: Types

8.7.1.1 Double Notation
.......................

The GNU Fortran language supports two uses of the keyword `DOUBLE' to
specify a specific kind of type:

   * `DOUBLE PRECISION', equivalent to `REAL(KIND=2)'

   * `DOUBLE COMPLEX', equivalent to `COMPLEX(KIND=2)'

   Use one of the above forms where a type name is valid.

   While use of this notation is popular, it doesn't scale well in a
language or dialect rich in intrinsic types, as is the case for the GNU
Fortran language (especially planned future versions of it).

   After all, one rarely sees type names such as `DOUBLE INTEGER',
`QUADRUPLE REAL', or `QUARTER INTEGER'.  Instead, `INTEGER*8',
`REAL*16', and `INTEGER*1' often are substituted for these,
respectively, even though they do not always have the same meanings on
all systems.  (And, the fact that `DOUBLE REAL' does not exist as such
is an inconsistency.)

   Therefore, this document uses "double notation" only on occasion for
the benefit of those readers who are accustomed to it.

File: g77.info,  Node: Star Notation,  Next: Kind Notation,  Prev: Double Notation,  Up: Types

8.7.1.2 Star Notation
.....................

The following notation specifies the storage size for a type:

     GENERIC-TYPE*N

GENERIC-TYPE must be a generic type--one of `INTEGER', `REAL',
`COMPLEX', `LOGICAL', or `CHARACTER'.  N must be one or more digits
comprising a decimal integer number greater than zero.

   Use the above form where a type name is valid.

   The `*N' notation specifies that the amount of storage occupied by
variables and array elements of that type is N times the storage
occupied by a `CHARACTER*1' variable.

   This notation might indicate a different degree of precision and/or
range for such variables and array elements, and the functions that
return values of types using this notation.  It does not limit the
precision or range of values of that type in any particular way--use
explicit code to do that.

   Further, the GNU Fortran language requires no particular values for
N to be supported by an implementation via the `*N' notation.  `g77'
supports `INTEGER*1' (as `INTEGER(KIND=3)') on all systems, for example,
but not all implementations are required to do so, and `g77' is known
to not support `REAL*1' on most (or all) systems.

   As a result, except for GENERIC-TYPE of `CHARACTER', uses of this
notation should be limited to isolated portions of a program that are
intended to handle system-specific tasks and are expected to be
non-portable.

   (Standard FORTRAN 77 supports the `*N' notation for only
`CHARACTER', where it signifies not only the amount of storage
occupied, but the number of characters in entities of that type.
However, almost all Fortran compilers have supported this notation for
generic types, though with a variety of meanings for N.)

   Specifications of types using the `*N' notation always are
interpreted as specifications of the appropriate types described in
this document using the `KIND=N' notation, described below.

   While use of this notation is popular, it doesn't serve well in the
context of a widely portable dialect of Fortran, such as the GNU
Fortran language.

   For example, even on one particular machine, two or more popular
Fortran compilers might well disagree on the size of a type declared
`INTEGER*2' or `REAL*16'.  Certainly there is known to be disagreement
over such things among Fortran compilers on _different_ systems.

   Further, this notation offers no elegant way to specify sizes that
are not even multiples of the "byte size" typically designated by
`INTEGER*1'.  Use of "absurd" values (such as `INTEGER*1000') would
certainly be possible, but would perhaps be stretching the original
intent of this notation beyond the breaking point in terms of
widespread readability of documentation and code making use of it.

   Therefore, this document uses "star notation" only on occasion for
the benefit of those readers who are accustomed to it.

File: g77.info,  Node: Kind Notation,  Prev: Star Notation,  Up: Types

8.7.1.3 Kind Notation
.....................

The following notation specifies the kind-type selector of a type:

     GENERIC-TYPE(KIND=N)

Use the above form where a type name is valid.

   GENERIC-TYPE must be a generic type--one of `INTEGER', `REAL',
`COMPLEX', `LOGICAL', or `CHARACTER'.  N must be an integer
initialization expression that is a positive, nonzero value.

   Programmers are discouraged from writing these values directly into
their code.  Future versions of the GNU Fortran language will offer
facilities that will make the writing of code portable to `g77' _and_
Fortran 90 implementations simpler.

   However, writing code that ports to existing FORTRAN 77
implementations depends on avoiding the `KIND=' construct.

   The `KIND=' construct is thus useful in the context of GNU Fortran
for two reasons:

   * It provides a means to specify a type in a fashion that is
     portable across all GNU Fortran implementations (though not other
     FORTRAN 77 and Fortran 90 implementations).

   * It provides a sort of Rosetta stone for this document to use to
     concisely describe the types of various operations and operands.

   The values of N in the GNU Fortran language are assigned using a
scheme that:

   * Attempts to maximize the ability of readers of this document to
     quickly familiarize themselves with assignments for popular types

   * Provides a unique value for each specific desired meaning

   * Provides a means to automatically assign new values so they have a
     "natural" relationship to existing values, if appropriate, or, if
     no such relationship exists, will not interfere with future values
     assigned on the basis of such relationships

   * Avoids using values that are similar to values used in the
     existing, popular `*N' notation, to prevent readers from expecting
     that these implied correspondences work on all GNU Fortran
     implementations

   The assignment system accomplishes this by assigning to each
"fundamental meaning" of a specific type a unique prime number.
Combinations of fundamental meanings--for example, a type that is two
times the size of some other type--are assigned values of N that are
the products of the values for those fundamental meanings.

   A prime value of N is never given more than one fundamental meaning,
to avoid situations where some code or system cannot reasonably provide
those meanings in the form of a single type.

   The values of N assigned so far are:

`KIND=0'
     This value is reserved for future use.

     The planned future use is for this value to designate, explicitly,
     context-sensitive kind-type selection.  For example, the
     expression `1D0 * 0.1_0' would be equivalent to `1D0 * 0.1D0'.

`KIND=1'
     This corresponds to the default types for `REAL', `INTEGER',
     `LOGICAL', `COMPLEX', and `CHARACTER', as appropriate.

     These are the "default" types described in the Fortran 90 standard,
     though that standard does not assign any particular `KIND=' value
     to these types.

     (Typically, these are `REAL*4', `INTEGER*4', `LOGICAL*4', and
     `COMPLEX*8'.)

`KIND=2'
     This corresponds to types that occupy twice as much storage as the
     default types.  `REAL(KIND=2)' is `DOUBLE PRECISION' (typically
     `REAL*8'), `COMPLEX(KIND=2)' is `DOUBLE COMPLEX' (typically
     `COMPLEX*16'),

     These are the "double precision" types described in the Fortran 90
     standard, though that standard does not assign any particular
     `KIND=' value to these types.

     N of 4 thus corresponds to types that occupy four times as much
     storage as the default types, N of 8 to types that occupy eight
     times as much storage, and so on.

     The `INTEGER(KIND=2)' and `LOGICAL(KIND=2)' types are not
     necessarily supported by every GNU Fortran implementation.

`KIND=3'
     This corresponds to types that occupy as much storage as the
     default `CHARACTER' type, which is the same effective type as
     `CHARACTER(KIND=1)' (making that type effectively the same as
     `CHARACTER(KIND=3)').

     (Typically, these are `INTEGER*1' and `LOGICAL*1'.)

     N of 6 thus corresponds to types that occupy twice as much storage
     as the N=3 types, N of 12 to types that occupy four times as much
     storage, and so on.

     These are not necessarily supported by every GNU Fortran
     implementation.

`KIND=5'
     This corresponds to types that occupy half the storage as the
     default (N=1) types.

     (Typically, these are `INTEGER*2' and `LOGICAL*2'.)

     N of 25 thus corresponds to types that occupy one-quarter as much
     storage as the default types.

     These are not necessarily supported by every GNU Fortran
     implementation.

`KIND=7'
     This is valid only as `INTEGER(KIND=7)' and denotes the `INTEGER'
     type that has the smallest storage size that holds a pointer on
     the system.

     A pointer representable by this type is capable of uniquely
     addressing a `CHARACTER*1' variable, array, array element, or
     substring.

     (Typically this is equivalent to `INTEGER*4' or, on 64-bit
     systems, `INTEGER*8'.  In a compatible C implementation, it
     typically would be the same size and semantics of the C type `void
     *'.)

   Note that these are _proposed_ correspondences and might change in
future versions of `g77'--avoid writing code depending on them while
`g77', and therefore the GNU Fortran language it defines, is in beta
testing.

   Values not specified in the above list are reserved to future
versions of the GNU Fortran language.

   Implementation-dependent meanings will be assigned new, unique prime
numbers so as to not interfere with other implementation-dependent
meanings, and offer the possibility of increasing the portability of
code depending on such types by offering support for them in other GNU
Fortran implementations.

   Other meanings that might be given unique values are:

   * Types that make use of only half their storage size for
     representing precision and range.

     For example, some compilers offer options that cause `INTEGER'
     types to occupy the amount of storage that would be needed for
     `INTEGER(KIND=2)' types, but the range remains that of
     `INTEGER(KIND=1)'.

   * The IEEE single floating-point type.

   * Types with a specific bit pattern (endianness), such as the
     little-endian form of `INTEGER(KIND=1)'.  These could permit,
     conceptually, use of portable code and implementations on data
     files written by existing systems.

   Future _prime_ numbers should be given meanings in as incremental a
fashion as possible, to allow for flexibility and expressiveness in
combining types.

   For example, instead of defining a prime number for little-endian
IEEE doubles, one prime number might be assigned the meaning
"little-endian", another the meaning "IEEE double", and the value of N
for a little-endian IEEE double would thus naturally be the product of
those two respective assigned values.  (It could even be reasonable to
have IEEE values result from the products of prime values denoting
exponent and fraction sizes and meanings, hidden bit usage,
availability and representations of special values such as subnormals,
infinities, and Not-A-Numbers (NaNs), and so on.)

   This assignment mechanism, while not inherently required for future
versions of the GNU Fortran language, is worth using because it could
ease management of the "space" of supported types much easier in the
long run.

   The above approach suggests a mechanism for specifying inheritance
of intrinsic (built-in) types for an entire, widely portable product
line.  It is certainly reasonable that, unlike programmers of other
languages offering inheritance mechanisms that employ verbose names for
classes and subclasses, along with graphical browsers to elucidate the
relationships, Fortran programmers would employ a mechanism that works
by multiplying prime numbers together and finding the prime factors of
such products.

   Most of the advantages for the above scheme have been explained
above.  One disadvantage is that it could lead to the defining, by the
GNU Fortran language, of some fairly large prime numbers.  This could
lead to the GNU Fortran language being declared "munitions" by the
United States Department of Defense.

File: g77.info,  Node: Constants,  Next: Integer Type,  Prev: Types,  Up: Data Types and Constants

8.7.2 Constants
---------------

(Corresponds to Section 4.2 of ANSI X3.9-1978 FORTRAN 77.)

   A "typeless constant" has one of the following forms:

     'BINARY-DIGITS'B
     'OCTAL-DIGITS'O
     'HEXADECIMAL-DIGITS'Z
     'HEXADECIMAL-DIGITS'X

BINARY-DIGITS, OCTAL-DIGITS, and HEXADECIMAL-DIGITS are nonempty
strings of characters in the set `01', `01234567', and
`0123456789ABCDEFabcdef', respectively.  (The value for `A' (and `a')
is 10, for `B' and `b' is 11, and so on.)

   A prefix-radix constant, such as `Z'ABCD'', can optionally be
treated as typeless.  *Note Options Controlling Fortran Dialect:
Fortran Dialect Options, for information on the `-ftypeless-boz' option.

   Typeless constants have values that depend on the context in which
they are used.

   All other constants, called "typed constants", are
interpreted--converted to internal form--according to their inherent
type.  Thus, context is _never_ a determining factor for the type, and
hence the interpretation, of a typed constant.  (All constants in the
ANSI FORTRAN 77 language are typed constants.)

   For example, `1' is always type `INTEGER(KIND=1)' in GNU Fortran
(called default INTEGER in Fortran 90), `9.435784839284958' is always
type `REAL(KIND=1)' (even if the additional precision specified is
lost, and even when used in a `REAL(KIND=2)' context), `1E0' is always
type `REAL(KIND=2)', and `1D0' is always type `REAL(KIND=2)'.

File: g77.info,  Node: Integer Type,  Next: Character Type,  Prev: Constants,  Up: Data Types and Constants

8.7.3 Integer Type
------------------

(Corresponds to Section 4.3 of ANSI X3.9-1978 FORTRAN 77.)

   An integer constant also may have one of the following forms:

     B'BINARY-DIGITS'
     O'OCTAL-DIGITS'
     Z'HEXADECIMAL-DIGITS'
     X'HEXADECIMAL-DIGITS'

BINARY-DIGITS, OCTAL-DIGITS, and HEXADECIMAL-DIGITS are nonempty
strings of characters in the set `01', `01234567', and
`0123456789ABCDEFabcdef', respectively.  (The value for `A' (and `a')
is 10, for `B' and `b' is 11, and so on.)

File: g77.info,  Node: Character Type,  Prev: Integer Type,  Up: Data Types and Constants

8.7.4 Character Type
--------------------

(Corresponds to Section 4.8 of ANSI X3.9-1978 FORTRAN 77.)

   A character constant may be delimited by a pair of double quotes
(`"') instead of apostrophes.  In this case, an apostrophe within the
constant represents a single apostrophe, while a double quote is
represented in the source text of the constant by two consecutive double
quotes with no intervening spaces.

   A character constant may be empty (have a length of zero).

   A character constant may include a substring specification, The
value of such a constant is the value of the substring--for example,
the value of `'hello'(3:5)' is the same as the value of `'llo''.

File: g77.info,  Node: Expressions,  Next: Specification Statements,  Prev: Data Types and Constants,  Up: Language

8.8 Expressions
===============

(The following information augments or overrides the information in
Chapter 6 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 6 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

* Menu:

* %LOC()::

File: g77.info,  Node: %LOC(),  Up: Expressions

8.8.1 The `%LOC()' Construct
----------------------------

     %LOC(ARG)

   The `%LOC()' construct is an expression that yields the value of the
location of its argument, ARG, in memory.  The size of the type of the
expression depends on the system--typically, it is equivalent to either
`INTEGER(KIND=1)' or `INTEGER(KIND=2)', though it is actually type
`INTEGER(KIND=7)'.

   The argument to `%LOC()' must be suitable as the left-hand side of
an assignment statement.  That is, it may not be a general expression
involving operators such as addition, subtraction, and so on, nor may
it be a constant.

   Use of `%LOC()' is recommended only for code that is accessing
facilities outside of GNU Fortran, such as operating system or
windowing facilities.  It is best to constrain such uses to isolated
portions of a program--portions that deal specifically and exclusively
with low-level, system-dependent facilities.  Such portions might well
provide a portable interface for use by the program as a whole, but are
themselves not portable, and should be thoroughly tested each time they
are rebuilt using a new compiler or version of a compiler.

   Do not depend on `%LOC()' returning a pointer that can be safely
used to _define_ (change) the argument.  While this might work in some
circumstances, it is hard to predict whether it will continue to work
when a program (that works using this unsafe behavior) is recompiled
using different command-line options or a different version of `g77'.

   Generally, `%LOC()' is safe when used as an argument to a procedure
that makes use of the value of the corresponding dummy argument only
during its activation, and only when such use is restricted to
referencing (reading) the value of the argument to `%LOC()'.

   _Implementation Note:_ Currently, `g77' passes arguments (those not
passed using a construct such as `%VAL()') by reference or descriptor,
depending on the type of the actual argument.  Thus, given `INTEGER I',
`CALL FOO(I)' would seem to mean the same thing as `CALL
FOO(%VAL(%LOC(I)))', and in fact might compile to identical code.

   However, `CALL FOO(%VAL(%LOC(I)))' emphatically means "pass, by
value, the address of `I' in memory".  While `CALL FOO(I)' might use
that same approach in a particular version of `g77', another version or
compiler might choose a different implementation, such as
copy-in/copy-out, to effect the desired behavior--and which will
therefore not necessarily compile to the same code as would `CALL
FOO(%VAL(%LOC(I)))' using the same version or compiler.

   *Note Debugging and Interfacing::, for detailed information on how
this particular version of `g77' implements various constructs.

File: g77.info,  Node: Specification Statements,  Next: Control Statements,  Prev: Expressions,  Up: Language

8.9 Specification Statements
============================

(The following information augments or overrides the information in
Chapter 8 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 8 of that document otherwise serves as the basis for
the relevant aspects of GNU Fortran.)

* Menu:

* NAMELIST::
* DOUBLE COMPLEX::

File: g77.info,  Node: NAMELIST,  Next: DOUBLE COMPLEX,  Up: Specification Statements

8.9.1 `NAMELIST' Statement
--------------------------

The `NAMELIST' statement, and related I/O constructs, are supported by
the GNU Fortran language in essentially the same way as they are by
`f2c'.

   This follows Fortran 90 with the restriction that on `NAMELIST'
input, subscripts must have the form
     SUBSCRIPT [ `:' SUBSCRIPT [ `:' STRIDE]]
   i.e.
     &xx x(1:3,8:10:2)=1,2,3,4,5,6/
   is allowed, but not, say,
     &xx x(:3,8::2)=1,2,3,4,5,6/

   As an extension of the Fortran 90 form, `$' and `$END' may be used
in place of `&' and `/' in `NAMELIST' input, so that
     $&xx x(1:3,8:10:2)=1,2,3,4,5,6 $end
   could be used instead of the example above.

File: g77.info,  Node: DOUBLE COMPLEX,  Prev: NAMELIST,  Up: Specification Statements

8.9.2 `DOUBLE COMPLEX' Statement
--------------------------------

`DOUBLE COMPLEX' is a type-statement (and type) that specifies the type
`COMPLEX(KIND=2)' in GNU Fortran.

File: g77.info,  Node: Control Statements,  Next: Functions and Subroutines,  Prev: Specification Statements,  Up: Language

8.10 Control Statements
=======================

(The following information augments or overrides the information in
Chapter 11 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 11 of that document otherwise serves as the basis
for the relevant aspects of GNU Fortran.)

* Menu:

* DO WHILE::
* END DO::
* Construct Names::
* CYCLE and EXIT::

File: g77.info,  Node: DO WHILE,  Next: END DO,  Up: Control Statements

8.10.1 DO WHILE
---------------

The `DO WHILE' statement, a feature of both the MIL-STD 1753 and
Fortran 90 standards, is provided by the GNU Fortran language.  The
Fortran 90 "do forever" statement comprising just `DO' is also
supported.

File: g77.info,  Node: END DO,  Next: Construct Names,  Prev: DO WHILE,  Up: Control Statements

8.10.2 END DO
-------------

The `END DO' statement is provided by the GNU Fortran language.

   This statement is used in one of two ways:

   * The Fortran 90 meaning, in which it specifies the termination
     point of a single `DO' loop started with a `DO' statement that
     specifies no termination label.

   * The MIL-STD 1753 meaning, in which it specifies the termination
     point of one or more `DO' loops, all of which start with a `DO'
     statement that specify the label defined for the `END DO'
     statement.

     This kind of `END DO' statement is merely a synonym for
     `CONTINUE', except it is permitted only when the statement is
     labeled and a target of one or more labeled `DO' loops.

     It is expected that this use of `END DO' will be removed from the
     GNU Fortran language in the future, though it is likely that it
     will long be supported by `g77' as a dialect form.

File: g77.info,  Node: Construct Names,  Next: CYCLE and EXIT,  Prev: END DO,  Up: Control Statements

8.10.3 Construct Names
----------------------

The GNU Fortran language supports construct names as defined by the
Fortran 90 standard.  These names are local to the program unit and are
defined as follows:

     CONSTRUCT-NAME: BLOCK-STATEMENT

Here, CONSTRUCT-NAME is the construct name itself; its definition is
connoted by the single colon (`:'); and BLOCK-STATEMENT is an `IF',
`DO', or `SELECT CASE' statement that begins a block.

   A block that is given a construct name must also specify the same
construct name in its termination statement:

     END BLOCK CONSTRUCT-NAME

Here, BLOCK must be `IF', `DO', or `SELECT', as appropriate.

File: g77.info,  Node: CYCLE and EXIT,  Prev: Construct Names,  Up: Control Statements

8.10.4 The `CYCLE' and `EXIT' Statements
----------------------------------------

The `CYCLE' and `EXIT' statements specify that the remaining statements
in the current iteration of a particular active (enclosing) `DO' loop
are to be skipped.

   `CYCLE' specifies that these statements are skipped, but the `END
DO' statement that marks the end of the `DO' loop be executed--that is,
the next iteration, if any, is to be started.  If the statement marking
the end of the `DO' loop is not `END DO'--in other words, if the loop
is not a block `DO'--the `CYCLE' statement does not execute that
statement, but does start the next iteration (if any).

   `EXIT' specifies that the loop specified by the `DO' construct is
terminated.

   The `DO' loop affected by `CYCLE' and `EXIT' is the innermost
enclosing `DO' loop when the following forms are used:

     CYCLE
     EXIT

   Otherwise, the following forms specify the construct name of the
pertinent `DO' loop:

     CYCLE CONSTRUCT-NAME
     EXIT CONSTRUCT-NAME

   `CYCLE' and `EXIT' can be viewed as glorified `GO TO' statements.
However, they cannot be easily thought of as `GO TO' statements in
obscure cases involving FORTRAN 77 loops.  For example:

           DO 10 I = 1, 5
           DO 10 J = 1, 5
              IF (J .EQ. 5) EXIT
           DO 10 K = 1, 5
              IF (K .EQ. 3) CYCLE
     10    PRINT *, 'I=', I, ' J=', J, ' K=', K
     20    CONTINUE

In particular, neither the `EXIT' nor `CYCLE' statements above are
equivalent to a `GO TO' statement to either label `10' or `20'.

   To understand the effect of `CYCLE' and `EXIT' in the above
fragment, it is helpful to first translate it to its equivalent using
only block `DO' loops:

           DO I = 1, 5
              DO J = 1, 5
                 IF (J .EQ. 5) EXIT
                 DO K = 1, 5
                    IF (K .EQ. 3) CYCLE
     10             PRINT *, 'I=', I, ' J=', J, ' K=', K
                 END DO
              END DO
           END DO
     20    CONTINUE

   Adding new labels allows translation of `CYCLE' and `EXIT' to `GO
TO' so they may be more easily understood by programmers accustomed to
FORTRAN coding:

           DO I = 1, 5
              DO J = 1, 5
                 IF (J .EQ. 5) GOTO 18
                 DO K = 1, 5
                    IF (K .EQ. 3) GO TO 12
     10             PRINT *, 'I=', I, ' J=', J, ' K=', K
     12          END DO
              END DO
     18    END DO
     20    CONTINUE

Thus, the `CYCLE' statement in the innermost loop skips over the
`PRINT' statement as it begins the next iteration of the loop, while
the `EXIT' statement in the middle loop ends that loop but _not_ the
outermost loop.

File: g77.info,  Node: Functions and Subroutines,  Next: Scope and Classes of Names,  Prev: Control Statements,  Up: Language

8.11 Functions and Subroutines
==============================

(The following information augments or overrides the information in
Chapter 15 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 15 of that document otherwise serves as the basis
for the relevant aspects of GNU Fortran.)

* Menu:

* %VAL()::
* %REF()::
* %DESCR()::
* Generics and Specifics::
* REAL() and AIMAG() of Complex::
* CMPLX() of DOUBLE PRECISION::
* MIL-STD 1753::
* f77/f2c Intrinsics::
* Table of Intrinsic Functions::

File: g77.info,  Node: %VAL(),  Next: %REF(),  Up: Functions and Subroutines

8.11.1 The `%VAL()' Construct
-----------------------------

     %VAL(ARG)

   The `%VAL()' construct specifies that an argument, ARG, is to be
passed by value, instead of by reference or descriptor.

   `%VAL()' is restricted to actual arguments in invocations of
external procedures.

   Use of `%VAL()' is recommended only for code that is accessing
facilities outside of GNU Fortran, such as operating system or
windowing facilities.  It is best to constrain such uses to isolated
portions of a program--portions the deal specifically and exclusively
with low-level, system-dependent facilities.  Such portions might well
provide a portable interface for use by the program as a whole, but are
themselves not portable, and should be thoroughly tested each time they
are rebuilt using a new compiler or version of a compiler.

   _Implementation Note:_ Currently, `g77' passes all arguments either
by reference or by descriptor.

   Thus, use of `%VAL()' tends to be restricted to cases where the
called procedure is written in a language other than Fortran that
supports call-by-value semantics.  (C is an example of such a language.)

   *Note Procedures (SUBROUTINE and FUNCTION): Procedures, for detailed
information on how this particular version of `g77' passes arguments to
procedures.

File: g77.info,  Node: %REF(),  Next: %DESCR(),  Prev: %VAL(),  Up: Functions and Subroutines

8.11.2 The `%REF()' Construct
-----------------------------

     %REF(ARG)

   The `%REF()' construct specifies that an argument, ARG, is to be
passed by reference, instead of by value or descriptor.

   `%REF()' is restricted to actual arguments in invocations of
external procedures.

   Use of `%REF()' is recommended only for code that is accessing
facilities outside of GNU Fortran, such as operating system or
windowing facilities.  It is best to constrain such uses to isolated
portions of a program--portions the deal specifically and exclusively
with low-level, system-dependent facilities.  Such portions might well
provide a portable interface for use by the program as a whole, but are
themselves not portable, and should be thoroughly tested each time they
are rebuilt using a new compiler or version of a compiler.

   Do not depend on `%REF()' supplying a pointer to the procedure being
invoked.  While that is a likely implementation choice, other
implementation choices are available that preserve Fortran
pass-by-reference semantics without passing a pointer to the argument,
ARG.  (For example, a copy-in/copy-out implementation.)

   _Implementation Note:_ Currently, `g77' passes all arguments (other
than variables and arrays of type `CHARACTER') by reference.  Future
versions of, or dialects supported by, `g77' might not pass `CHARACTER'
functions by reference.

   Thus, use of `%REF()' tends to be restricted to cases where ARG is
type `CHARACTER' but the called procedure accesses it via a means other
than the method used for Fortran `CHARACTER' arguments.

   *Note Procedures (SUBROUTINE and FUNCTION): Procedures, for detailed
information on how this particular version of `g77' passes arguments to
procedures.

File: g77.info,  Node: %DESCR(),  Next: Generics and Specifics,  Prev: %REF(),  Up: Functions and Subroutines

8.11.3 The `%DESCR()' Construct
-------------------------------

     %DESCR(ARG)

   The `%DESCR()' construct specifies that an argument, ARG, is to be
passed by descriptor, instead of by value or reference.

   `%DESCR()' is restricted to actual arguments in invocations of
external procedures.

   Use of `%DESCR()' is recommended only for code that is accessing
facilities outside of GNU Fortran, such as operating system or
windowing facilities.  It is best to constrain such uses to isolated
portions of a program--portions the deal specifically and exclusively
with low-level, system-dependent facilities.  Such portions might well
provide a portable interface for use by the program as a whole, but are
themselves not portable, and should be thoroughly tested each time they
are rebuilt using a new compiler or version of a compiler.

   Do not depend on `%DESCR()' supplying a pointer and/or a length
passed by value to the procedure being invoked.  While that is a likely
implementation choice, other implementation choices are available that
preserve the pass-by-reference semantics without passing a pointer to
the argument, ARG.  (For example, a copy-in/copy-out implementation.)
And, future versions of `g77' might change the way descriptors are
implemented, such as passing a single argument pointing to a record
containing the pointer/length information instead of passing that same
information via two arguments as it currently does.

   _Implementation Note:_ Currently, `g77' passes all variables and
arrays of type `CHARACTER' by descriptor.  Future versions of, or
dialects supported by, `g77' might pass `CHARACTER' functions by
descriptor as well.

   Thus, use of `%DESCR()' tends to be restricted to cases where ARG is
not type `CHARACTER' but the called procedure accesses it via a means
similar to the method used for Fortran `CHARACTER' arguments.

   *Note Procedures (SUBROUTINE and FUNCTION): Procedures, for detailed
information on how this particular version of `g77' passes arguments to
procedures.

File: g77.info,  Node: Generics and Specifics,  Next: REAL() and AIMAG() of Complex,  Prev: %DESCR(),  Up: Functions and Subroutines

8.11.4 Generics and Specifics
-----------------------------

The ANSI FORTRAN 77 language defines generic and specific intrinsics.
In short, the distinctions are:

   * _Specific_ intrinsics have specific types for their arguments and
     a specific return type.

   * _Generic_ intrinsics are treated, on a case-by-case basis in the
     program's source code, as one of several possible specific
     intrinsics.

     Typically, a generic intrinsic has a return type that is
     determined by the type of one or more of its arguments.

   The GNU Fortran language generalizes these concepts somewhat,
especially by providing intrinsic subroutines and generic intrinsics
that are treated as either a specific intrinsic subroutine or a
specific intrinsic function (e.g. `SECOND').

   However, GNU Fortran avoids generalizing this concept to the point
where existing code would be accepted as meaning something possibly
different than what was intended.

   For example, `ABS' is a generic intrinsic, so all working code
written using `ABS' of an `INTEGER' argument expects an `INTEGER'
return value.  Similarly, all such code expects that `ABS' of an
`INTEGER*2' argument returns an `INTEGER*2' return value.

   Yet, `IABS' is a _specific_ intrinsic that accepts only an
`INTEGER(KIND=1)' argument.  Code that passes something other than an
`INTEGER(KIND=1)' argument to `IABS' is not valid GNU Fortran code,
because it is not clear what the author intended.

   For example, if `J' is `INTEGER(KIND=6)', `IABS(J)' is not defined
by the GNU Fortran language, because the programmer might have used
that construct to mean any of the following, subtly different, things:

   * Convert `J' to `INTEGER(KIND=1)' first (as if `IABS(INT(J))' had
     been written).

   * Convert the result of the intrinsic to `INTEGER(KIND=1)' (as if
     `INT(ABS(J))' had been written).

   * No conversion (as if `ABS(J)' had been written).

   The distinctions matter especially when types and values wider than
`INTEGER(KIND=1)' (such as `INTEGER(KIND=2)'), or when operations
performing more "arithmetic" than absolute-value, are involved.

   The following sample program is not a valid GNU Fortran program, but
might be accepted by other compilers.  If so, the output is likely to
be revealing in terms of how a given compiler treats intrinsics (that
normally are specific) when they are given arguments that do not
conform to their stated requirements:

           PROGRAM JCB002
     C Version 1:
     C Modified 1999-02-15 (Burley) to delete my email address.
     C Modified 1997-05-21 (Burley) to accommodate compilers that implement
     C INT(I1-I2) as INT(I1)-INT(I2) given INTEGER*2 I1,I2.
     C
     C Version 0:
     C Written by James Craig Burley 1997-02-20.
     C
     C Purpose:
     C Determine how compilers handle non-standard IDIM
     C on INTEGER*2 operands, which presumably can be
     C extrapolated into understanding how the compiler
     C generally treats specific intrinsics that are passed
     C arguments not of the correct types.
     C
     C If your compiler implements INTEGER*2 and INTEGER
     C as the same type, change all INTEGER*2 below to
     C INTEGER*1.
     C
           INTEGER*2 I0, I4
           INTEGER I1, I2, I3
           INTEGER*2 ISMALL, ILARGE
           INTEGER*2 ITOOLG, ITWO
           INTEGER*2 ITMP
           LOGICAL L2, L3, L4
     C
     C Find smallest INTEGER*2 number.
     C
           ISMALL=0
      10   I0 = ISMALL-1
           IF ((I0 .GE. ISMALL) .OR. (I0+1 .NE. ISMALL)) GOTO 20
           ISMALL = I0
           GOTO 10
      20   CONTINUE
     C
     C Find largest INTEGER*2 number.
     C
           ILARGE=0
      30   I0 = ILARGE+1
           IF ((I0 .LE. ILARGE) .OR. (I0-1 .NE. ILARGE)) GOTO 40
           ILARGE = I0
           GOTO 30
      40   CONTINUE
     C
     C Multiplying by two adds stress to the situation.
     C
           ITWO = 2
     C
     C Need a number that, added to -2, is too wide to fit in I*2.
     C
           ITOOLG = ISMALL
     C
     C Use IDIM the straightforward way.
     C
           I1 = IDIM (ILARGE, ISMALL) * ITWO + ITOOLG
     C
     C Calculate result for first interpretation.
     C
           I2 = (INT (ILARGE) - INT (ISMALL)) * ITWO + ITOOLG
     C
     C Calculate result for second interpretation.
     C
           ITMP = ILARGE - ISMALL
           I3 = (INT (ITMP)) * ITWO + ITOOLG
     C
     C Calculate result for third interpretation.
     C
           I4 = (ILARGE - ISMALL) * ITWO + ITOOLG
     C
     C Print results.
     C
           PRINT *, 'ILARGE=', ILARGE
           PRINT *, 'ITWO=', ITWO
           PRINT *, 'ITOOLG=', ITOOLG
           PRINT *, 'ISMALL=', ISMALL
           PRINT *, 'I1=', I1
           PRINT *, 'I2=', I2
           PRINT *, 'I3=', I3
           PRINT *, 'I4=', I4
           PRINT *
           L2 = (I1 .EQ. I2)
           L3 = (I1 .EQ. I3)
           L4 = (I1 .EQ. I4)
           IF (L2 .AND. .NOT.L3 .AND. .NOT.L4) THEN
              PRINT *, 'Interp 1: IDIM(I*2,I*2) => IDIM(INT(I*2),INT(I*2))'
              STOP
           END IF
           IF (L3 .AND. .NOT.L2 .AND. .NOT.L4) THEN
              PRINT *, 'Interp 2: IDIM(I*2,I*2) => INT(DIM(I*2,I*2))'
              STOP
           END IF
           IF (L4 .AND. .NOT.L2 .AND. .NOT.L3) THEN
              PRINT *, 'Interp 3: IDIM(I*2,I*2) => DIM(I*2,I*2)'
              STOP
           END IF
           PRINT *, 'Results need careful analysis.'
           END

   No future version of the GNU Fortran language will likely permit
specific intrinsic invocations with wrong-typed arguments (such as
`IDIM' in the above example), since it has been determined that
disagreements exist among many production compilers on the
interpretation of such invocations.  These disagreements strongly
suggest that Fortran programmers, and certainly existing Fortran
programs, disagree about the meaning of such invocations.

   The first version of `JCB002' didn't accommodate some compilers'
treatment of `INT(I1-I2)' where `I1' and `I2' are `INTEGER*2'.  In such
a case, these compilers apparently convert both operands to `INTEGER*4'
and then do an `INTEGER*4' subtraction, instead of doing an `INTEGER*2'
subtraction on the original values in `I1' and `I2'.

   However, the results of the careful analyses done on the outputs of
programs compiled by these various compilers show that they all
implement either `Interp 1' or `Interp 2' above.

   Specifically, it is believed that the new version of `JCB002' above
will confirm that:

   * Digital Semiconductor ("DEC") Alpha OSF/1, HP-UX 10.0.1, AIX 3.2.5
     `f77' compilers all implement `Interp 1'.

   * IRIX 5.3 `f77' compiler implements `Interp 2'.

   * Solaris 2.5, SunOS 4.1.3, DECstation ULTRIX 4.3, and IRIX 6.1
     `f77' compilers all implement `Interp 3'.

   If you get different results than the above for the stated
compilers, or have results for other compilers that might be worth
adding to the above list, please let us know the details (compiler
product, version, machine, results, and so on).

File: g77.info,  Node: REAL() and AIMAG() of Complex,  Next: CMPLX() of DOUBLE PRECISION,  Prev: Generics and Specifics,  Up: Functions and Subroutines

8.11.5 `REAL()' and `AIMAG()' of Complex
----------------------------------------

The GNU Fortran language disallows `REAL(EXPR)' and `AIMAG(EXPR)',
where EXPR is any `COMPLEX' type other than `COMPLEX(KIND=1)', except
when they are used in the following way:

     REAL(REAL(EXPR))
     REAL(AIMAG(EXPR))

The above forms explicitly specify that the desired effect is to
convert the real or imaginary part of EXPR, which might be some `REAL'
type other than `REAL(KIND=1)', to type `REAL(KIND=1)', and have that
serve as the value of the expression.

   The GNU Fortran language offers clearly named intrinsics to extract
the real and imaginary parts of a complex entity without any conversion:

     REALPART(EXPR)
     IMAGPART(EXPR)

   To express the above using typical extended FORTRAN 77, use the
following constructs (when EXPR is `COMPLEX(KIND=2)'):

     DBLE(EXPR)
     DIMAG(EXPR)

   The FORTRAN 77 language offers no way to explicitly specify the real
and imaginary parts of a complex expression of arbitrary type,
apparently as a result of requiring support for only one `COMPLEX' type
(`COMPLEX(KIND=1)').  The concepts of converting an expression to type
`REAL(KIND=1)' and of extracting the real part of a complex expression
were thus "smooshed" by FORTRAN 77 into a single intrinsic, since they
happened to have the exact same effect in that language (due to having
only one `COMPLEX' type).

   _Note:_ When `-ff90' is in effect, `g77' treats `REAL(EXPR)', where
EXPR is of type `COMPLEX', as `REALPART(EXPR)', whereas with
`-fugly-complex -fno-f90' in effect, it is treated as
`REAL(REALPART(EXPR))'.

   *Note Ugly Complex Part Extraction::, for more information.

File: g77.info,  Node: CMPLX() of DOUBLE PRECISION,  Next: MIL-STD 1753,  Prev: REAL() and AIMAG() of Complex,  Up: Functions and Subroutines

8.11.6 `CMPLX()' of `DOUBLE PRECISION'
--------------------------------------

In accordance with Fortran 90 and at least some (perhaps all) other
compilers, the GNU Fortran language defines `CMPLX()' as always
returning a result that is type `COMPLEX(KIND=1)'.

   This means `CMPLX(D1,D2)', where `D1' and `D2' are `REAL(KIND=2)'
(`DOUBLE PRECISION'), is treated as:

     CMPLX(SNGL(D1), SNGL(D2))

   (It was necessary for Fortran 90 to specify this behavior for
`DOUBLE PRECISION' arguments, since that is the behavior mandated by
FORTRAN 77.)

   The GNU Fortran language also provides the `DCMPLX()' intrinsic,
which is provided by some FORTRAN 77 compilers to construct a `DOUBLE
COMPLEX' entity from of `DOUBLE PRECISION' operands.  However, this
solution does not scale well when more `COMPLEX' types (having various
precisions and ranges) are offered by Fortran implementations.

   Fortran 90 extends the `CMPLX()' intrinsic by adding an extra
argument used to specify the desired kind of complex result.  However,
this solution is somewhat awkward to use, and `g77' currently does not
support it.

   The GNU Fortran language provides a simple way to build a complex
value out of two numbers, with the precise type of the value determined
by the types of the two numbers (via the usual type-promotion
mechanism):

     COMPLEX(REAL, IMAG)

   When REAL and IMAG are the same `REAL' types, `COMPLEX()' performs
no conversion other than to put them together to form a complex result
of the same (complex version of real) type.

   *Note Complex Intrinsic::, for more information.

File: g77.info,  Node: MIL-STD 1753,  Next: f77/f2c Intrinsics,  Prev: CMPLX() of DOUBLE PRECISION,  Up: Functions and Subroutines

8.11.7 MIL-STD 1753 Support
---------------------------

The GNU Fortran language includes the MIL-STD 1753 intrinsics `BTEST',
`IAND', `IBCLR', `IBITS', `IBSET', `IEOR', `IOR', `ISHFT', `ISHFTC',
`MVBITS', and `NOT'.

File: g77.info,  Node: f77/f2c Intrinsics,  Next: Table of Intrinsic Functions,  Prev: MIL-STD 1753,  Up: Functions and Subroutines

8.11.8 `f77'/`f2c' Intrinsics
-----------------------------

The bit-manipulation intrinsics supported by traditional `f77' and by
`f2c' are available in the GNU Fortran language.  These include `AND',
`LSHIFT', `OR', `RSHIFT', and `XOR'.

   Also supported are the intrinsics `CDABS', `CDCOS', `CDEXP',
`CDLOG', `CDSIN', `CDSQRT', `DCMPLX', `DCONJG', `DFLOAT', `DIMAG',
`DREAL', and `IMAG', `ZABS', `ZCOS', `ZEXP', `ZLOG', `ZSIN', and
`ZSQRT'.

File: g77.info,  Node: Table of Intrinsic Functions,  Prev: f77/f2c Intrinsics,  Up: Functions and Subroutines

8.11.9 Table of Intrinsic Functions
-----------------------------------

(Corresponds to Section 15.10 of ANSI X3.9-1978 FORTRAN 77.)

   The GNU Fortran language adds various functions, subroutines, types,
and arguments to the set of intrinsic functions in ANSI FORTRAN 77.
The complete set of intrinsics supported by the GNU Fortran language is
described below.

   Note that a name is not treated as that of an intrinsic if it is
specified in an `EXTERNAL' statement in the same program unit; if a
command-line option is used to disable the groups to which the
intrinsic belongs; or if the intrinsic is not named in an `INTRINSIC'
statement and a command-line option is used to hide the groups to which
the intrinsic belongs.

   So, it is recommended that any reference in a program unit to an
intrinsic procedure that is not a standard FORTRAN 77 intrinsic be
accompanied by an appropriate `INTRINSIC' statement in that program
unit.  This sort of defensive programming makes it more likely that an
implementation will issue a diagnostic rather than generate incorrect
code for such a reference.

   The terminology used below is based on that of the Fortran 90
standard, so that the text may be more concise and accurate:

   * `OPTIONAL' means the argument may be omitted.

   * `A-1, A-2, ..., A-n' means more than one argument (generally named
     `A') may be specified.

   * `scalar' means the argument must not be an array (must be a
     variable or array element, or perhaps a constant if expressions
     are permitted).

   * `DIMENSION(4)' means the argument must be an array having 4
     elements.

   * `INTENT(IN)' means the argument must be an expression (such as a
     constant or a variable that is defined upon invocation of the
     intrinsic).

   * `INTENT(OUT)' means the argument must be definable by the
     invocation of the intrinsic (that is, must not be a constant nor
     an expression involving operators other than array reference and
     substring reference).

   * `INTENT(INOUT)' means the argument must be defined prior to, and
     definable by, invocation of the intrinsic (a combination of the
     requirements of `INTENT(IN)' and `INTENT(OUT)'.

   * *Note Kind Notation::, for an explanation of `KIND'.

   (Note that the empty lines appearing in the menu below are not
intentional--they result from a bug in the GNU `makeinfo' program...a
program that, if it did not exist, would leave this document in far
worse shape!)

* Menu:


* Abort Intrinsic::     Abort the program.

* Abs Intrinsic::       Absolute value.

* Access Intrinsic::    Check file accessibility.

* AChar Intrinsic::     ASCII character from code.

* ACos Intrinsic::      Arc cosine.

* AdjustL Intrinsic::   (Reserved for future use.)
* AdjustR Intrinsic::   (Reserved for future use.)

* AImag Intrinsic::     Convert/extract imaginary part of complex.

* AInt Intrinsic::      Truncate to whole number.

* Alarm Intrinsic::     Execute a routine after a given delay.

* All Intrinsic::       (Reserved for future use.)
* Allocated Intrinsic:: (Reserved for future use.)

* ALog Intrinsic::      Natural logarithm (archaic).
* ALog10 Intrinsic::    Common logarithm (archaic).
* AMax0 Intrinsic::     Maximum value (archaic).
* AMax1 Intrinsic::     Maximum value (archaic).
* AMin0 Intrinsic::     Minimum value (archaic).
* AMin1 Intrinsic::     Minimum value (archaic).
* AMod Intrinsic::      Remainder (archaic).

* And Intrinsic::       Boolean AND.

* ANInt Intrinsic::     Round to nearest whole number.

* Any Intrinsic::       (Reserved for future use.)

* ASin Intrinsic::      Arc sine.

* Associated Intrinsic:: (Reserved for future use.)

* ATan Intrinsic::      Arc tangent.
* ATan2 Intrinsic::     Arc tangent.

* BesJ0 Intrinsic::     Bessel function.
* BesJ1 Intrinsic::     Bessel function.
* BesJN Intrinsic::     Bessel function.
* BesY0 Intrinsic::     Bessel function.
* BesY1 Intrinsic::     Bessel function.
* BesYN Intrinsic::     Bessel function.

* Bit_Size Intrinsic::  Number of bits in argument's type.

* BTest Intrinsic::     Test bit.

* CAbs Intrinsic::      Absolute value (archaic).
* CCos Intrinsic::      Cosine (archaic).

* Ceiling Intrinsic::   (Reserved for future use.)

* CExp Intrinsic::      Exponential (archaic).
* Char Intrinsic::      Character from code.

* ChDir Intrinsic (subroutine):: Change directory.

* ChMod Intrinsic (subroutine):: Change file modes.

* CLog Intrinsic::      Natural logarithm (archaic).
* Cmplx Intrinsic::     Construct `COMPLEX(KIND=1)' value.

* Complex Intrinsic::   Build complex value from real and
                         imaginary parts.

* Conjg Intrinsic::     Complex conjugate.
* Cos Intrinsic::       Cosine.

* CosH Intrinsic::      Hyperbolic cosine.

* Count Intrinsic::     (Reserved for future use.)
* CPU_Time Intrinsic::  Get current CPU time.
* CShift Intrinsic::    (Reserved for future use.)

* CSin Intrinsic::      Sine (archaic).
* CSqRt Intrinsic::     Square root (archaic).

* CTime Intrinsic (subroutine):: Convert time to Day Mon dd hh:mm:ss yyyy.
* CTime Intrinsic (function):: Convert time to Day Mon dd hh:mm:ss yyyy.

* DAbs Intrinsic::      Absolute value (archaic).
* DACos Intrinsic::     Arc cosine (archaic).

* DASin Intrinsic::     Arc sine (archaic).

* DATan Intrinsic::     Arc tangent (archaic).
* DATan2 Intrinsic::    Arc tangent (archaic).

* Date_and_Time Intrinsic:: Get the current date and time.

* DbesJ0 Intrinsic::    Bessel function (archaic).
* DbesJ1 Intrinsic::    Bessel function (archaic).
* DbesJN Intrinsic::    Bessel function (archaic).
* DbesY0 Intrinsic::    Bessel function (archaic).
* DbesY1 Intrinsic::    Bessel function (archaic).
* DbesYN Intrinsic::    Bessel function (archaic).

* Dble Intrinsic::      Convert to double precision.

* DCos Intrinsic::      Cosine (archaic).

* DCosH Intrinsic::     Hyperbolic cosine (archaic).
* DDiM Intrinsic::      Difference magnitude (archaic).

* DErF Intrinsic::      Error function (archaic).
* DErFC Intrinsic::     Complementary error function (archaic).

* DExp Intrinsic::      Exponential (archaic).

* Digits Intrinsic::    (Reserved for future use.)

* DiM Intrinsic::       Difference magnitude (non-negative subtract).

* DInt Intrinsic::      Truncate to whole number (archaic).
* DLog Intrinsic::      Natural logarithm (archaic).
* DLog10 Intrinsic::    Common logarithm (archaic).
* DMax1 Intrinsic::     Maximum value (archaic).
* DMin1 Intrinsic::     Minimum value (archaic).
* DMod Intrinsic::      Remainder (archaic).
* DNInt Intrinsic::     Round to nearest whole number (archaic).

* Dot_Product Intrinsic:: (Reserved for future use.)

* DProd Intrinsic::     Double-precision product.

* DSign Intrinsic::     Apply sign to magnitude (archaic).
* DSin Intrinsic::      Sine (archaic).

* DSinH Intrinsic::     Hyperbolic sine (archaic).
* DSqRt Intrinsic::     Square root (archaic).
* DTan Intrinsic::      Tangent (archaic).

* DTanH Intrinsic::     Hyperbolic tangent (archaic).

* DTime Intrinsic (subroutine):: Get elapsed time since last time.

* EOShift Intrinsic::   (Reserved for future use.)
* Epsilon Intrinsic::   (Reserved for future use.)

* ErF Intrinsic::       Error function.
* ErFC Intrinsic::      Complementary error function.
* ETime Intrinsic (subroutine):: Get elapsed time for process.
* ETime Intrinsic (function):: Get elapsed time for process.
* Exit Intrinsic::      Terminate the program.

* Exp Intrinsic::       Exponential.

* Exponent Intrinsic::  (Reserved for future use.)

* FDate Intrinsic (subroutine):: Get current time as Day Mon dd hh:mm:ss yyyy.
* FDate Intrinsic (function):: Get current time as Day Mon dd hh:mm:ss yyyy.
* FGet Intrinsic (subroutine):: Read a character from unit 5 stream-wise.

* FGetC Intrinsic (subroutine):: Read a character stream-wise.

* Float Intrinsic::     Conversion (archaic).

* Floor Intrinsic::     (Reserved for future use.)

* Flush Intrinsic::     Flush buffered output.
* FNum Intrinsic::      Get file descriptor from Fortran unit number.
* FPut Intrinsic (subroutine):: Write a character to unit 6 stream-wise.

* FPutC Intrinsic (subroutine):: Write a character stream-wise.

* Fraction Intrinsic::  (Reserved for future use.)

* FSeek Intrinsic::     Position file (low-level).
* FStat Intrinsic (subroutine):: Get file information.
* FStat Intrinsic (function):: Get file information.
* FTell Intrinsic (subroutine):: Get file position (low-level).
* FTell Intrinsic (function):: Get file position (low-level).
* GError Intrinsic::    Get error message for last error.
* GetArg Intrinsic::    Obtain command-line argument.
* GetCWD Intrinsic (subroutine):: Get current working directory.
* GetCWD Intrinsic (function):: Get current working directory.
* GetEnv Intrinsic::    Get environment variable.
* GetGId Intrinsic::    Get process group id.
* GetLog Intrinsic::    Get login name.
* GetPId Intrinsic::    Get process id.
* GetUId Intrinsic::    Get process user id.
* GMTime Intrinsic::    Convert time to GMT time info.
* HostNm Intrinsic (subroutine):: Get host name.
* HostNm Intrinsic (function):: Get host name.

* Huge Intrinsic::      (Reserved for future use.)

* IAbs Intrinsic::      Absolute value (archaic).

* IAChar Intrinsic::    ASCII code for character.

* IAnd Intrinsic::      Boolean AND.

* IArgC Intrinsic::     Obtain count of command-line arguments.

* IBClr Intrinsic::     Clear a bit.
* IBits Intrinsic::     Extract a bit subfield of a variable.
* IBSet Intrinsic::     Set a bit.

* IChar Intrinsic::     Code for character.

* IDate Intrinsic (UNIX):: Get local time info.

* IDiM Intrinsic::      Difference magnitude (archaic).
* IDInt Intrinsic::     Convert to `INTEGER' value truncated
                         to whole number (archaic).
* IDNInt Intrinsic::    Convert to `INTEGER' value rounded
                         to nearest whole number (archaic).

* IEOr Intrinsic::      Boolean XOR.

* IErrNo Intrinsic::    Get error number for last error.

* IFix Intrinsic::      Conversion (archaic).

* Imag Intrinsic::      Extract imaginary part of complex.

* ImagPart Intrinsic::  Extract imaginary part of complex.

* Index Intrinsic::     Locate a CHARACTER substring.

* Int Intrinsic::       Convert to `INTEGER' value truncated
                         to whole number.

* Int2 Intrinsic::      Convert to `INTEGER(KIND=6)' value
                         truncated to whole number.
* Int8 Intrinsic::      Convert to `INTEGER(KIND=2)' value
                         truncated to whole number.

* IOr Intrinsic::       Boolean OR.

* IRand Intrinsic::     Random number.
* IsaTty Intrinsic::    Is unit connected to a terminal?

* IShft Intrinsic::     Logical bit shift.
* IShftC Intrinsic::    Circular bit shift.

* ISign Intrinsic::     Apply sign to magnitude (archaic).

* ITime Intrinsic::     Get local time of day.

* Kill Intrinsic (subroutine):: Signal a process.

* Kind Intrinsic::      (Reserved for future use.)
* LBound Intrinsic::    (Reserved for future use.)

* Len Intrinsic::       Length of character entity.

* Len_Trim Intrinsic::  Get last non-blank character in string.

* LGe Intrinsic::       Lexically greater than or equal.
* LGt Intrinsic::       Lexically greater than.

* Link Intrinsic (subroutine):: Make hard link in file system.

* LLe Intrinsic::       Lexically less than or equal.
* LLt Intrinsic::       Lexically less than.

* LnBlnk Intrinsic::    Get last non-blank character in string.
* Loc Intrinsic::       Address of entity in core.

* Log Intrinsic::       Natural logarithm.
* Log10 Intrinsic::     Common logarithm.

* Logical Intrinsic::   (Reserved for future use.)

* Long Intrinsic::      Conversion to `INTEGER(KIND=1)' (archaic).

* LShift Intrinsic::    Left-shift bits.

* LStat Intrinsic (subroutine):: Get file information.
* LStat Intrinsic (function):: Get file information.
* LTime Intrinsic::     Convert time to local time info.

* MatMul Intrinsic::    (Reserved for future use.)

* Max Intrinsic::       Maximum value.
* Max0 Intrinsic::      Maximum value (archaic).
* Max1 Intrinsic::      Maximum value (archaic).

* MaxExponent Intrinsic:: (Reserved for future use.)
* MaxLoc Intrinsic::    (Reserved for future use.)
* MaxVal Intrinsic::    (Reserved for future use.)

* MClock Intrinsic::    Get number of clock ticks for process.
* MClock8 Intrinsic::   Get number of clock ticks for process.

* Merge Intrinsic::     (Reserved for future use.)

* Min Intrinsic::       Minimum value.
* Min0 Intrinsic::      Minimum value (archaic).
* Min1 Intrinsic::      Minimum value (archaic).

* MinExponent Intrinsic:: (Reserved for future use.)
* MinLoc Intrinsic::    (Reserved for future use.)
* MinVal Intrinsic::    (Reserved for future use.)

* Mod Intrinsic::       Remainder.

* Modulo Intrinsic::    (Reserved for future use.)

* MvBits Intrinsic::    Moving a bit field.

* Nearest Intrinsic::   (Reserved for future use.)

* NInt Intrinsic::      Convert to `INTEGER' value rounded
                         to nearest whole number.

* Not Intrinsic::       Boolean NOT.

* Or Intrinsic::        Boolean OR.

* Pack Intrinsic::      (Reserved for future use.)

* PError Intrinsic::    Print error message for last error.

* Precision Intrinsic:: (Reserved for future use.)
* Present Intrinsic::   (Reserved for future use.)
* Product Intrinsic::   (Reserved for future use.)

* Radix Intrinsic::     (Reserved for future use.)

* Rand Intrinsic::      Random number.

* Random_Number Intrinsic:: (Reserved for future use.)
* Random_Seed Intrinsic:: (Reserved for future use.)
* Range Intrinsic::     (Reserved for future use.)

* Real Intrinsic::      Convert value to type `REAL(KIND=1)'.

* RealPart Intrinsic::  Extract real part of complex.

* Rename Intrinsic (subroutine):: Rename file.

* Repeat Intrinsic::    (Reserved for future use.)
* Reshape Intrinsic::   (Reserved for future use.)
* RRSpacing Intrinsic:: (Reserved for future use.)

* RShift Intrinsic::    Right-shift bits.

* Scale Intrinsic::     (Reserved for future use.)
* Scan Intrinsic::      (Reserved for future use.)

* Second Intrinsic (function):: Get CPU time for process in seconds.
* Second Intrinsic (subroutine):: Get CPU time for process
                         in seconds.

* Selected_Int_Kind Intrinsic:: (Reserved for future use.)
* Selected_Real_Kind Intrinsic:: (Reserved for future use.)
* Set_Exponent Intrinsic:: (Reserved for future use.)
* Shape Intrinsic::     (Reserved for future use.)

* Short Intrinsic::     Convert to `INTEGER(KIND=6)' value
                         truncated to whole number.

* Sign Intrinsic::      Apply sign to magnitude.

* Signal Intrinsic (subroutine):: Muck with signal handling.

* Sin Intrinsic::       Sine.

* SinH Intrinsic::      Hyperbolic sine.

* Sleep Intrinsic::     Sleep for a specified time.

* Sngl Intrinsic::      Convert (archaic).

* Spacing Intrinsic::   (Reserved for future use.)
* Spread Intrinsic::    (Reserved for future use.)

* SqRt Intrinsic::      Square root.

* SRand Intrinsic::     Random seed.
* Stat Intrinsic (subroutine):: Get file information.
* Stat Intrinsic (function):: Get file information.

* Sum Intrinsic::       (Reserved for future use.)

* SymLnk Intrinsic (subroutine):: Make symbolic link in file system.

* System Intrinsic (subroutine):: Invoke shell (system) command.

* System_Clock Intrinsic:: Get current system clock value.

* Tan Intrinsic::       Tangent.

* TanH Intrinsic::      Hyperbolic tangent.

* Time Intrinsic (UNIX):: Get current time as time value.

* Time8 Intrinsic::     Get current time as time value.

* Tiny Intrinsic::      (Reserved for future use.)
* Transfer Intrinsic::  (Reserved for future use.)
* Transpose Intrinsic:: (Reserved for future use.)
* Trim Intrinsic::      (Reserved for future use.)

* TtyNam Intrinsic (subroutine):: Get name of terminal device for unit.
* TtyNam Intrinsic (function):: Get name of terminal device for unit.

* UBound Intrinsic::    (Reserved for future use.)

* UMask Intrinsic (subroutine):: Set file creation permissions mask.

* Unlink Intrinsic (subroutine):: Unlink file.

* Unpack Intrinsic::    (Reserved for future use.)
* Verify Intrinsic::    (Reserved for future use.)

* XOr Intrinsic::       Boolean XOR.
* ZAbs Intrinsic::      Absolute value (archaic).
* ZCos Intrinsic::      Cosine (archaic).
* ZExp Intrinsic::      Exponential (archaic).

* ZLog Intrinsic::      Natural logarithm (archaic).
* ZSin Intrinsic::      Sine (archaic).
* ZSqRt Intrinsic::     Square root (archaic).

File: g77.info,  Node: Abort Intrinsic,  Next: Abs Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.1 Abort Intrinsic
........................


     CALL Abort()

Intrinsic groups: `unix'.

Description:

   Prints a message and potentially causes a core dump via `abort(3)'.

File: g77.info,  Node: Abs Intrinsic,  Next: Access Intrinsic,  Prev: Abort Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.2 Abs Intrinsic
......................


     Abs(A)

Abs: `INTEGER' or `REAL' function.  The exact type depends on that of
argument A--if A is `COMPLEX', this function's type is `REAL' with the
same `KIND=' value as the type of A.  Otherwise, this function's type
is the same as that of A.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the absolute value of A.

   If A is type `COMPLEX', the absolute value is computed as:

     SQRT(REALPART(A)**2+IMAGPART(A)**2)

Otherwise, it is computed by negating A if it is negative, or returning
A.

   *Note Sign Intrinsic::, for how to explicitly compute the positive
or negative form of the absolute value of an expression.

File: g77.info,  Node: Access Intrinsic,  Next: AChar Intrinsic,  Prev: Abs Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.3 Access Intrinsic
.........................


     Access(NAME, MODE)

Access: `INTEGER(KIND=1)' function.

NAME: `CHARACTER'; scalar; INTENT(IN).

MODE: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Checks file NAME for accessibility in the mode specified by MODE and
returns 0 if the file is accessible in that mode, otherwise an error
code if the file is inaccessible or MODE is invalid.  See `access(2)'.
A null character (`CHAR(0)') marks the end of the name in
NAME--otherwise, trailing blanks in NAME are ignored.  MODE may be a
concatenation of any of the following characters:

`r'
     Read permission

`w'
     Write permission

`x'
     Execute permission

`SPC'
     Existence

File: g77.info,  Node: AChar Intrinsic,  Next: ACos Intrinsic,  Prev: Access Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.4 AChar Intrinsic
........................


     AChar(I)

AChar: `CHARACTER*1' function.

I: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `f90'.

Description:

   Returns the ASCII character corresponding to the code specified by I.

   *Note IAChar Intrinsic::, for the inverse of this function.

   *Note Char Intrinsic::, for the function corresponding to the
system's native character set.

File: g77.info,  Node: ACos Intrinsic,  Next: AdjustL Intrinsic,  Prev: AChar Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.5 ACos Intrinsic
.......................


     ACos(X)

ACos: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the arc-cosine (inverse cosine) of X in radians.

   *Note Cos Intrinsic::, for the inverse of this function.

File: g77.info,  Node: AdjustL Intrinsic,  Next: AdjustR Intrinsic,  Prev: ACos Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.6 AdjustL Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL AdjustL' to use this name for an
external procedure.

File: g77.info,  Node: AdjustR Intrinsic,  Next: AImag Intrinsic,  Prev: AdjustL Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.7 AdjustR Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL AdjustR' to use this name for an
external procedure.

File: g77.info,  Node: AImag Intrinsic,  Next: AInt Intrinsic,  Prev: AdjustR Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.8 AImag Intrinsic
........................


     AImag(Z)

AImag: `REAL' function.  This intrinsic is valid when argument Z is
`COMPLEX(KIND=1)'.  When Z is any other `COMPLEX' type, this intrinsic
is valid only when used as the argument to `REAL()', as explained below.

Z: `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the (possibly converted) imaginary part of Z.

   Use of `AIMAG()' with an argument of a type other than
`COMPLEX(KIND=1)' is restricted to the following case:

     REAL(AIMAG(Z))

This expression converts the imaginary part of Z to `REAL(KIND=1)'.

   *Note REAL() and AIMAG() of Complex::, for more information.

File: g77.info,  Node: AInt Intrinsic,  Next: Alarm Intrinsic,  Prev: AImag Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.9 AInt Intrinsic
.......................


     AInt(A)

AInt: `REAL' function, the `KIND=' value of the type being that of
argument A.

A: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns A with the fractional portion of its magnitude truncated and
its sign preserved.  (Also called "truncation towards zero".)

   *Note ANInt Intrinsic::, for how to round to nearest whole number.

   *Note Int Intrinsic::, for how to truncate and then convert number
to `INTEGER'.

File: g77.info,  Node: Alarm Intrinsic,  Next: All Intrinsic,  Prev: AInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.10 Alarm Intrinsic
.........................


     CALL Alarm(SECONDS, HANDLER, STATUS)

SECONDS: `INTEGER'; scalar; INTENT(IN).

HANDLER: Signal handler (`INTEGER FUNCTION' or `SUBROUTINE') or
dummy/global `INTEGER(KIND=1)' scalar.

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Causes external subroutine HANDLER to be executed after a delay of
SECONDS seconds by using `alarm(1)' to set up a signal and `signal(2)'
to catch it.  If STATUS is supplied, it will be returned with the
number of seconds remaining until any previously scheduled alarm was
due to be delivered, or zero if there was no previously scheduled alarm.
*Note Signal Intrinsic (subroutine)::.

File: g77.info,  Node: All Intrinsic,  Next: Allocated Intrinsic,  Prev: Alarm Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.11 All Intrinsic
.......................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL All' to use this name for an external
procedure.

File: g77.info,  Node: Allocated Intrinsic,  Next: ALog Intrinsic,  Prev: All Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.12 Allocated Intrinsic
.............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Allocated' to use this name for an
external procedure.

File: g77.info,  Node: ALog Intrinsic,  Next: ALog10 Intrinsic,  Prev: Allocated Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.13 ALog Intrinsic
........................


     ALog(X)

ALog: `REAL(KIND=1)' function.

X: `REAL(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `LOG()' that is specific to one type for X.  *Note
Log Intrinsic::.

File: g77.info,  Node: ALog10 Intrinsic,  Next: AMax0 Intrinsic,  Prev: ALog Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.14 ALog10 Intrinsic
..........................


     ALog10(X)

ALog10: `REAL(KIND=1)' function.

X: `REAL(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `LOG10()' that is specific to one type for X.  *Note
Log10 Intrinsic::.

File: g77.info,  Node: AMax0 Intrinsic,  Next: AMax1 Intrinsic,  Prev: ALog10 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.15 AMax0 Intrinsic
.........................


     AMax0(A-1, A-2, ..., A-n)

AMax0: `REAL(KIND=1)' function.

A: `INTEGER(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MAX()' that is specific to one type for A and a
different return type.  *Note Max Intrinsic::.

File: g77.info,  Node: AMax1 Intrinsic,  Next: AMin0 Intrinsic,  Prev: AMax0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.16 AMax1 Intrinsic
.........................


     AMax1(A-1, A-2, ..., A-n)

AMax1: `REAL(KIND=1)' function.

A: `REAL(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MAX()' that is specific to one type for A.  *Note
Max Intrinsic::.

File: g77.info,  Node: AMin0 Intrinsic,  Next: AMin1 Intrinsic,  Prev: AMax1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.17 AMin0 Intrinsic
.........................


     AMin0(A-1, A-2, ..., A-n)

AMin0: `REAL(KIND=1)' function.

A: `INTEGER(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MIN()' that is specific to one type for A and a
different return type.  *Note Min Intrinsic::.

File: g77.info,  Node: AMin1 Intrinsic,  Next: AMod Intrinsic,  Prev: AMin0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.18 AMin1 Intrinsic
.........................


     AMin1(A-1, A-2, ..., A-n)

AMin1: `REAL(KIND=1)' function.

A: `REAL(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MIN()' that is specific to one type for A.  *Note
Min Intrinsic::.

File: g77.info,  Node: AMod Intrinsic,  Next: And Intrinsic,  Prev: AMin1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.19 AMod Intrinsic
........................


     AMod(A, P)

AMod: `REAL(KIND=1)' function.

A: `REAL(KIND=1)'; scalar; INTENT(IN).

P: `REAL(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MOD()' that is specific to one type for A.  *Note
Mod Intrinsic::.

File: g77.info,  Node: And Intrinsic,  Next: ANInt Intrinsic,  Prev: AMod Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.20 And Intrinsic
.......................


     And(I, J)

And: `INTEGER' or `LOGICAL' function, the exact type being the result
of cross-promoting the types of all the arguments.

I: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).

J: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Returns value resulting from boolean AND of pair of bits in each of
I and J.

File: g77.info,  Node: ANInt Intrinsic,  Next: Any Intrinsic,  Prev: And Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.21 ANInt Intrinsic
.........................


     ANInt(A)

ANInt: `REAL' function, the `KIND=' value of the type being that of
argument A.

A: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns A with the fractional portion of its magnitude eliminated by
rounding to the nearest whole number and with its sign preserved.

   A fractional portion exactly equal to `.5' is rounded to the whole
number that is larger in magnitude.  (Also called "Fortran round".)

   *Note AInt Intrinsic::, for how to truncate to whole number.

   *Note NInt Intrinsic::, for how to round and then convert number to
`INTEGER'.

File: g77.info,  Node: Any Intrinsic,  Next: ASin Intrinsic,  Prev: ANInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.22 Any Intrinsic
.......................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Any' to use this name for an external
procedure.

File: g77.info,  Node: ASin Intrinsic,  Next: Associated Intrinsic,  Prev: Any Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.23 ASin Intrinsic
........................


     ASin(X)

ASin: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the arc-sine (inverse sine) of X in radians.

   *Note Sin Intrinsic::, for the inverse of this function.

File: g77.info,  Node: Associated Intrinsic,  Next: ATan Intrinsic,  Prev: ASin Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.24 Associated Intrinsic
..............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Associated' to use this name for an
external procedure.

File: g77.info,  Node: ATan Intrinsic,  Next: ATan2 Intrinsic,  Prev: Associated Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.25 ATan Intrinsic
........................


     ATan(X)

ATan: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the arc-tangent (inverse tangent) of X in radians.

   *Note Tan Intrinsic::, for the inverse of this function.

File: g77.info,  Node: ATan2 Intrinsic,  Next: BesJ0 Intrinsic,  Prev: ATan Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.26 ATan2 Intrinsic
.........................


     ATan2(Y, X)

ATan2: `REAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

Y: `REAL'; scalar; INTENT(IN).

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the arc-tangent (inverse tangent) of the complex number (Y,
X) in radians.

   *Note Tan Intrinsic::, for the inverse of this function.

File: g77.info,  Node: BesJ0 Intrinsic,  Next: BesJ1 Intrinsic,  Prev: ATan2 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.27 BesJ0 Intrinsic
.........................


     BesJ0(X)

BesJ0: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Calculates the Bessel function of the first kind of order 0 of X.
See `bessel(3m)', on whose implementation the function depends.

File: g77.info,  Node: BesJ1 Intrinsic,  Next: BesJN Intrinsic,  Prev: BesJ0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.28 BesJ1 Intrinsic
.........................


     BesJ1(X)

BesJ1: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Calculates the Bessel function of the first kind of order 1 of X.
See `bessel(3m)', on whose implementation the function depends.

File: g77.info,  Node: BesJN Intrinsic,  Next: BesY0 Intrinsic,  Prev: BesJ1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.29 BesJN Intrinsic
.........................


     BesJN(N, X)

BesJN: `REAL' function, the `KIND=' value of the type being that of
argument X.

N: `INTEGER' not wider than the default kind; scalar; INTENT(IN).

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Calculates the Bessel function of the first kind of order N of X.
See `bessel(3m)', on whose implementation the function depends.

File: g77.info,  Node: BesY0 Intrinsic,  Next: BesY1 Intrinsic,  Prev: BesJN Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.30 BesY0 Intrinsic
.........................


     BesY0(X)

BesY0: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Calculates the Bessel function of the second kind of order 0 of X.
See `bessel(3m)', on whose implementation the function depends.

File: g77.info,  Node: BesY1 Intrinsic,  Next: BesYN Intrinsic,  Prev: BesY0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.31 BesY1 Intrinsic
.........................


     BesY1(X)

BesY1: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Calculates the Bessel function of the second kind of order 1 of X.
See `bessel(3m)', on whose implementation the function depends.

File: g77.info,  Node: BesYN Intrinsic,  Next: Bit_Size Intrinsic,  Prev: BesY1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.32 BesYN Intrinsic
.........................


     BesYN(N, X)

BesYN: `REAL' function, the `KIND=' value of the type being that of
argument X.

N: `INTEGER' not wider than the default kind; scalar; INTENT(IN).

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Calculates the Bessel function of the second kind of order N of X.
See `bessel(3m)', on whose implementation the function depends.

File: g77.info,  Node: Bit_Size Intrinsic,  Next: BTest Intrinsic,  Prev: BesYN Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.33 Bit_Size Intrinsic
............................


     Bit_Size(I)

Bit_Size: `INTEGER' function, the `KIND=' value of the type being that
of argument I.

I: `INTEGER'; scalar.

Intrinsic groups: `f90'.

Description:

   Returns the number of bits (integer precision plus sign bit)
represented by the type for I.

   *Note BTest Intrinsic::, for how to test the value of a bit in a
variable or array.

   *Note IBSet Intrinsic::, for how to set a bit in a variable to 1.

   *Note IBClr Intrinsic::, for how to set a bit in a variable to 0.

File: g77.info,  Node: BTest Intrinsic,  Next: CAbs Intrinsic,  Prev: Bit_Size Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.34 BTest Intrinsic
.........................


     BTest(I, POS)

BTest: `LOGICAL(KIND=1)' function.

I: `INTEGER'; scalar; INTENT(IN).

POS: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns `.TRUE.' if bit POS in I is 1, `.FALSE.' otherwise.

   (Bit 0 is the low-order (rightmost) bit, adding the value 2**0, or 1,
to the number if set to 1; bit 1 is the next-higher-order bit, adding
2**1, or 2; bit 2 adds 2**2, or 4; and so on.)

   *Note Bit_Size Intrinsic::, for how to obtain the number of bits in
a type.  The leftmost bit of I is `BIT_SIZE(I-1)'.

File: g77.info,  Node: CAbs Intrinsic,  Next: CCos Intrinsic,  Prev: BTest Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.35 CAbs Intrinsic
........................


     CAbs(A)

CAbs: `REAL(KIND=1)' function.

A: `COMPLEX(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ABS()' that is specific to one type for A.  *Note
Abs Intrinsic::.

File: g77.info,  Node: CCos Intrinsic,  Next: Ceiling Intrinsic,  Prev: CAbs Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.36 CCos Intrinsic
........................


     CCos(X)

CCos: `COMPLEX(KIND=1)' function.

X: `COMPLEX(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `COS()' that is specific to one type for X.  *Note
Cos Intrinsic::.

File: g77.info,  Node: Ceiling Intrinsic,  Next: CExp Intrinsic,  Prev: CCos Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.37 Ceiling Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Ceiling' to use this name for an
external procedure.

File: g77.info,  Node: CExp Intrinsic,  Next: Char Intrinsic,  Prev: Ceiling Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.38 CExp Intrinsic
........................


     CExp(X)

CExp: `COMPLEX(KIND=1)' function.

X: `COMPLEX(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `EXP()' that is specific to one type for X.  *Note
Exp Intrinsic::.

File: g77.info,  Node: Char Intrinsic,  Next: ChDir Intrinsic (subroutine),  Prev: CExp Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.39 Char Intrinsic
........................


     Char(I)

Char: `CHARACTER*1' function.

I: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the character corresponding to the code specified by I,
using the system's native character set.

   Because the system's native character set is used, the
correspondence between character and their codes is not necessarily the
same between GNU Fortran implementations.

   Note that no intrinsic exists to convert a numerical value to a
printable character string.  For example, there is no intrinsic that,
given an `INTEGER' or `REAL' argument with the value `154', returns the
`CHARACTER' result `'154''.

   Instead, you can use internal-file I/O to do this kind of conversion.
For example:

     INTEGER VALUE
     CHARACTER*10 STRING
     VALUE = 154
     WRITE (STRING, '(I10)'), VALUE
     PRINT *, STRING
     END

   The above program, when run, prints:

             154

   *Note IChar Intrinsic::, for the inverse of the `CHAR' function.

   *Note AChar Intrinsic::, for the function corresponding to the ASCII
character set.

File: g77.info,  Node: ChDir Intrinsic (subroutine),  Next: ChMod Intrinsic (subroutine),  Prev: Char Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.40 ChDir Intrinsic (subroutine)
......................................


     CALL ChDir(DIR, STATUS)

DIR: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sets the current working directory to be DIR.  If the STATUS
argument is supplied, it contains 0 on success or a nonzero error code
otherwise upon return.  See `chdir(3)'.

   _Caution:_ Using this routine during I/O to a unit connected with a
non-absolute file name can cause subsequent I/O on such a unit to fail
because the I/O library might reopen files by name.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note ChDir
Intrinsic (function)::.

File: g77.info,  Node: ChMod Intrinsic (subroutine),  Next: CLog Intrinsic,  Prev: ChDir Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.41 ChMod Intrinsic (subroutine)
......................................


     CALL ChMod(NAME, MODE, STATUS)

NAME: `CHARACTER'; scalar; INTENT(IN).

MODE: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Changes the access mode of file NAME according to the specification
MODE, which is given in the format of `chmod(1)'.  A null character
(`CHAR(0)') marks the end of the name in NAME--otherwise, trailing
blanks in NAME are ignored.  Currently, NAME must not contain the
single quote character.

   If the STATUS argument is supplied, it contains 0 on success or a
nonzero error code upon return.

   Note that this currently works by actually invoking `/bin/chmod' (or
the `chmod' found when the library was configured) and so might fail in
some circumstances and will, anyway, be slow.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note ChMod
Intrinsic (function)::.

File: g77.info,  Node: CLog Intrinsic,  Next: Cmplx Intrinsic,  Prev: ChMod Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.42 CLog Intrinsic
........................


     CLog(X)

CLog: `COMPLEX(KIND=1)' function.

X: `COMPLEX(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `LOG()' that is specific to one type for X.  *Note
Log Intrinsic::.

File: g77.info,  Node: Cmplx Intrinsic,  Next: Complex Intrinsic,  Prev: CLog Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.43 Cmplx Intrinsic
.........................


     Cmplx(X, Y)

Cmplx: `COMPLEX(KIND=1)' function.

X: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Y: `INTEGER' or `REAL'; OPTIONAL (must be omitted if X is `COMPLEX');
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   If X is not type `COMPLEX', constructs a value of type
`COMPLEX(KIND=1)' from the real and imaginary values specified by X and
Y, respectively.  If Y is omitted, `0.' is assumed.

   If X is type `COMPLEX', converts it to type `COMPLEX(KIND=1)'.

   *Note Complex Intrinsic::, for information on easily constructing a
`COMPLEX' value of arbitrary precision from `REAL' arguments.

File: g77.info,  Node: Complex Intrinsic,  Next: Conjg Intrinsic,  Prev: Cmplx Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.44 Complex Intrinsic
...........................


     Complex(REAL, IMAG)

Complex: `COMPLEX' function, the exact type being the result of
cross-promoting the types of all the arguments.

REAL: `INTEGER' or `REAL'; scalar; INTENT(IN).

IMAG: `INTEGER' or `REAL'; scalar; INTENT(IN).

Intrinsic groups: `gnu'.

Description:

   Returns a `COMPLEX' value that has `Real' and `Imag' as its real and
imaginary parts, respectively.

   If REAL and IMAG are the same type, and that type is not `INTEGER',
no data conversion is performed, and the type of the resulting value
has the same kind value as the types of REAL and IMAG.

   If REAL and IMAG are not the same type, the usual type-promotion
rules are applied to both, converting either or both to the appropriate
`REAL' type.  The type of the resulting value has the same kind value
as the type to which both REAL and IMAG were converted, in this case.

   If REAL and IMAG are both `INTEGER', they are both converted to
`REAL(KIND=1)', and the result of the `COMPLEX()' invocation is type
`COMPLEX(KIND=1)'.

   _Note:_ The way to do this in standard Fortran 90 is too hairy to
describe here, but it is important to note that `CMPLX(D1,D2)' returns
a `COMPLEX(KIND=1)' result even if `D1' and `D2' are type
`REAL(KIND=2)'.  Hence the availability of `COMPLEX()' in GNU Fortran.

File: g77.info,  Node: Conjg Intrinsic,  Next: Cos Intrinsic,  Prev: Complex Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.45 Conjg Intrinsic
.........................


     Conjg(Z)

Conjg: `COMPLEX' function, the `KIND=' value of the type being that of
argument Z.

Z: `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the complex conjugate:

     COMPLEX(REALPART(Z), -IMAGPART(Z))

File: g77.info,  Node: Cos Intrinsic,  Next: CosH Intrinsic,  Prev: Conjg Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.46 Cos Intrinsic
.......................


     Cos(X)

Cos: `REAL' or `COMPLEX' function, the exact type being that of
argument X.

X: `REAL' or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the cosine of X, an angle measured in radians.

   *Note ACos Intrinsic::, for the inverse of this function.

File: g77.info,  Node: CosH Intrinsic,  Next: Count Intrinsic,  Prev: Cos Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.47 CosH Intrinsic
........................


     CosH(X)

CosH: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the hyperbolic cosine of X.

File: g77.info,  Node: Count Intrinsic,  Next: CPU_Time Intrinsic,  Prev: CosH Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.48 Count Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Count' to use this name for an external
procedure.

File: g77.info,  Node: CPU_Time Intrinsic,  Next: CShift Intrinsic,  Prev: Count Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.49 CPU_Time Intrinsic
............................


     CALL CPU_Time(SECONDS)

SECONDS: `REAL'; scalar; INTENT(OUT).

Intrinsic groups: `f90'.

Description:

   Returns in SECONDS the current value of the system time.  This
implementation of the Fortran 95 intrinsic is just an alias for
`second' *Note Second Intrinsic (subroutine)::.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

File: g77.info,  Node: CShift Intrinsic,  Next: CSin Intrinsic,  Prev: CPU_Time Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.50 CShift Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL CShift' to use this name for an
external procedure.

File: g77.info,  Node: CSin Intrinsic,  Next: CSqRt Intrinsic,  Prev: CShift Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.51 CSin Intrinsic
........................


     CSin(X)

CSin: `COMPLEX(KIND=1)' function.

X: `COMPLEX(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SIN()' that is specific to one type for X.  *Note
Sin Intrinsic::.

File: g77.info,  Node: CSqRt Intrinsic,  Next: CTime Intrinsic (subroutine),  Prev: CSin Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.52 CSqRt Intrinsic
.........................


     CSqRt(X)

CSqRt: `COMPLEX(KIND=1)' function.

X: `COMPLEX(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SQRT()' that is specific to one type for X.  *Note
SqRt Intrinsic::.

File: g77.info,  Node: CTime Intrinsic (subroutine),  Next: CTime Intrinsic (function),  Prev: CSqRt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.53 CTime Intrinsic (subroutine)
......................................


     CALL CTime(STIME, RESULT)

STIME: `INTEGER'; scalar; INTENT(IN).

RESULT: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Converts STIME, a system time value, such as returned by `TIME8()',
to a string of the form `Sat Aug 19 18:13:14 1995', and returns that
string in RESULT.

   *Note Time8 Intrinsic::.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note CTime
Intrinsic (function)::.

File: g77.info,  Node: CTime Intrinsic (function),  Next: DAbs Intrinsic,  Prev: CTime Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.54 CTime Intrinsic (function)
....................................


     CTime(STIME)

CTime: `CHARACTER*(*)' function.

STIME: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Converts STIME, a system time value, such as returned by `TIME8()',
to a string of the form `Sat Aug 19 18:13:14 1995', and returns that
string as the function value.

   *Note Time8 Intrinsic::.

   For information on other intrinsics with the same name: *Note CTime
Intrinsic (subroutine)::.

File: g77.info,  Node: DAbs Intrinsic,  Next: DACos Intrinsic,  Prev: CTime Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.55 DAbs Intrinsic
........................


     DAbs(A)

DAbs: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ABS()' that is specific to one type for A.  *Note
Abs Intrinsic::.

File: g77.info,  Node: DACos Intrinsic,  Next: DASin Intrinsic,  Prev: DAbs Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.56 DACos Intrinsic
.........................


     DACos(X)

DACos: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ACOS()' that is specific to one type for X.  *Note
ACos Intrinsic::.

File: g77.info,  Node: DASin Intrinsic,  Next: DATan Intrinsic,  Prev: DACos Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.57 DASin Intrinsic
.........................


     DASin(X)

DASin: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ASIN()' that is specific to one type for X.  *Note
ASin Intrinsic::.

File: g77.info,  Node: DATan Intrinsic,  Next: DATan2 Intrinsic,  Prev: DASin Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.58 DATan Intrinsic
.........................


     DATan(X)

DATan: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ATAN()' that is specific to one type for X.  *Note
ATan Intrinsic::.

File: g77.info,  Node: DATan2 Intrinsic,  Next: Date_and_Time Intrinsic,  Prev: DATan Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.59 DATan2 Intrinsic
..........................


     DATan2(Y, X)

DATan2: `REAL(KIND=2)' function.

Y: `REAL(KIND=2)'; scalar; INTENT(IN).

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ATAN2()' that is specific to one type for Y and X.
*Note ATan2 Intrinsic::.

File: g77.info,  Node: Date_and_Time Intrinsic,  Next: DbesJ0 Intrinsic,  Prev: DATan2 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.60 Date_and_Time Intrinsic
.................................


     CALL Date_and_Time(DATE, TIME, ZONE, VALUES)

DATE: `CHARACTER'; scalar; INTENT(OUT).

TIME: `CHARACTER'; OPTIONAL; scalar; INTENT(OUT).

ZONE: `CHARACTER'; OPTIONAL; scalar; INTENT(OUT).

VALUES: `INTEGER(KIND=1)'; OPTIONAL; DIMENSION(8); INTENT(OUT).

Intrinsic groups: `f90'.

Description:

   Returns:
DATE
     The date in the form CCYYMMDD: century, year, month and day;

TIME
     The time in the form `HHMMSS.SS': hours, minutes, seconds and
     milliseconds;

ZONE
     The difference between local time and UTC (GMT) in the form SHHMM:
     sign, hours and minutes, e.g. `-0500' (winter in New York);

VALUES
     The year, month of the year, day of the month, time difference in
     minutes from UTC, hour of the day, minutes of the hour, seconds of
     the minute, and milliseconds of the second in successive values of
     the array.

   Programs making use of this intrinsic might not be Year 10000 (Y10K)
compliant.  For example, the date might appear, to such programs, to
wrap around (change from a larger value to a smaller one) as of the
Year 10000.

   On systems where a millisecond timer isn't available, the millisecond
value is returned as zero.

File: g77.info,  Node: DbesJ0 Intrinsic,  Next: DbesJ1 Intrinsic,  Prev: Date_and_Time Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.61 DbesJ0 Intrinsic
..........................


     DbesJ0(X)

DbesJ0: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `BESJ0()' that is specific to one type for X.  *Note
BesJ0 Intrinsic::.

File: g77.info,  Node: DbesJ1 Intrinsic,  Next: DbesJN Intrinsic,  Prev: DbesJ0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.62 DbesJ1 Intrinsic
..........................


     DbesJ1(X)

DbesJ1: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `BESJ1()' that is specific to one type for X.  *Note
BesJ1 Intrinsic::.

File: g77.info,  Node: DbesJN Intrinsic,  Next: DbesY0 Intrinsic,  Prev: DbesJ1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.63 DbesJN Intrinsic
..........................


     DbesJN(N, X)

DbesJN: `REAL(KIND=2)' function.

N: `INTEGER' not wider than the default kind; scalar; INTENT(IN).

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `BESJN()' that is specific to one type for X.  *Note
BesJN Intrinsic::.

File: g77.info,  Node: DbesY0 Intrinsic,  Next: DbesY1 Intrinsic,  Prev: DbesJN Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.64 DbesY0 Intrinsic
..........................


     DbesY0(X)

DbesY0: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `BESY0()' that is specific to one type for X.  *Note
BesY0 Intrinsic::.

File: g77.info,  Node: DbesY1 Intrinsic,  Next: DbesYN Intrinsic,  Prev: DbesY0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.65 DbesY1 Intrinsic
..........................


     DbesY1(X)

DbesY1: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `BESY1()' that is specific to one type for X.  *Note
BesY1 Intrinsic::.

File: g77.info,  Node: DbesYN Intrinsic,  Next: Dble Intrinsic,  Prev: DbesY1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.66 DbesYN Intrinsic
..........................


     DbesYN(N, X)

DbesYN: `REAL(KIND=2)' function.

N: `INTEGER' not wider than the default kind; scalar; INTENT(IN).

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `BESYN()' that is specific to one type for X.  *Note
BesYN Intrinsic::.

File: g77.info,  Node: Dble Intrinsic,  Next: DCos Intrinsic,  Prev: DbesYN Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.67 Dble Intrinsic
........................


     Dble(A)

Dble: `REAL(KIND=2)' function.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns A converted to double precision (`REAL(KIND=2)').  If A is
`COMPLEX', the real part of A is used for the conversion and the
imaginary part disregarded.

   *Note Sngl Intrinsic::, for the function that converts to single
precision.

   *Note Int Intrinsic::, for the function that converts to `INTEGER'.

   *Note Complex Intrinsic::, for the function that converts to
`COMPLEX'.

File: g77.info,  Node: DCos Intrinsic,  Next: DCosH Intrinsic,  Prev: Dble Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.68 DCos Intrinsic
........................


     DCos(X)

DCos: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `COS()' that is specific to one type for X.  *Note
Cos Intrinsic::.

File: g77.info,  Node: DCosH Intrinsic,  Next: DDiM Intrinsic,  Prev: DCos Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.69 DCosH Intrinsic
.........................


     DCosH(X)

DCosH: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `COSH()' that is specific to one type for X.  *Note
CosH Intrinsic::.

File: g77.info,  Node: DDiM Intrinsic,  Next: DErF Intrinsic,  Prev: DCosH Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.70 DDiM Intrinsic
........................


     DDiM(X, Y)

DDiM: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Y: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `DIM()' that is specific to one type for X and Y.
*Note DiM Intrinsic::.

File: g77.info,  Node: DErF Intrinsic,  Next: DErFC Intrinsic,  Prev: DDiM Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.71 DErF Intrinsic
........................


     DErF(X)

DErF: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `ERF()' that is specific to one type for X.  *Note
ErF Intrinsic::.

File: g77.info,  Node: DErFC Intrinsic,  Next: DExp Intrinsic,  Prev: DErF Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.72 DErFC Intrinsic
.........................


     DErFC(X)

DErFC: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `ERFC()' that is specific to one type for X.  *Note
ErFC Intrinsic::.

File: g77.info,  Node: DExp Intrinsic,  Next: Digits Intrinsic,  Prev: DErFC Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.73 DExp Intrinsic
........................


     DExp(X)

DExp: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `EXP()' that is specific to one type for X.  *Note
Exp Intrinsic::.

File: g77.info,  Node: Digits Intrinsic,  Next: DiM Intrinsic,  Prev: DExp Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.74 Digits Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Digits' to use this name for an
external procedure.

File: g77.info,  Node: DiM Intrinsic,  Next: DInt Intrinsic,  Prev: Digits Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.75 DiM Intrinsic
.......................


     DiM(X, Y)

DiM: `INTEGER' or `REAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

X: `INTEGER' or `REAL'; scalar; INTENT(IN).

Y: `INTEGER' or `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `X-Y' if X is greater than Y; otherwise returns zero.

File: g77.info,  Node: DInt Intrinsic,  Next: DLog Intrinsic,  Prev: DiM Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.76 DInt Intrinsic
........................


     DInt(A)

DInt: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `AINT()' that is specific to one type for A.  *Note
AInt Intrinsic::.

File: g77.info,  Node: DLog Intrinsic,  Next: DLog10 Intrinsic,  Prev: DInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.77 DLog Intrinsic
........................


     DLog(X)

DLog: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `LOG()' that is specific to one type for X.  *Note
Log Intrinsic::.

File: g77.info,  Node: DLog10 Intrinsic,  Next: DMax1 Intrinsic,  Prev: DLog Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.78 DLog10 Intrinsic
..........................


     DLog10(X)

DLog10: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `LOG10()' that is specific to one type for X.  *Note
Log10 Intrinsic::.

File: g77.info,  Node: DMax1 Intrinsic,  Next: DMin1 Intrinsic,  Prev: DLog10 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.79 DMax1 Intrinsic
.........................


     DMax1(A-1, A-2, ..., A-n)

DMax1: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MAX()' that is specific to one type for A.  *Note
Max Intrinsic::.

File: g77.info,  Node: DMin1 Intrinsic,  Next: DMod Intrinsic,  Prev: DMax1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.80 DMin1 Intrinsic
.........................


     DMin1(A-1, A-2, ..., A-n)

DMin1: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MIN()' that is specific to one type for A.  *Note
Min Intrinsic::.

File: g77.info,  Node: DMod Intrinsic,  Next: DNInt Intrinsic,  Prev: DMin1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.81 DMod Intrinsic
........................


     DMod(A, P)

DMod: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

P: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MOD()' that is specific to one type for A.  *Note
Mod Intrinsic::.

File: g77.info,  Node: DNInt Intrinsic,  Next: Dot_Product Intrinsic,  Prev: DMod Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.82 DNInt Intrinsic
.........................


     DNInt(A)

DNInt: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ANINT()' that is specific to one type for A.  *Note
ANInt Intrinsic::.

File: g77.info,  Node: Dot_Product Intrinsic,  Next: DProd Intrinsic,  Prev: DNInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.83 Dot_Product Intrinsic
...............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Dot_Product' to use this name for an
external procedure.

File: g77.info,  Node: DProd Intrinsic,  Next: DSign Intrinsic,  Prev: Dot_Product Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.84 DProd Intrinsic
.........................


     DProd(X, Y)

DProd: `REAL(KIND=2)' function.

X: `REAL(KIND=1)'; scalar; INTENT(IN).

Y: `REAL(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `DBLE(X)*DBLE(Y)'.

File: g77.info,  Node: DSign Intrinsic,  Next: DSin Intrinsic,  Prev: DProd Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.85 DSign Intrinsic
.........................


     DSign(A, B)

DSign: `REAL(KIND=2)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

B: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SIGN()' that is specific to one type for A and B.
*Note Sign Intrinsic::.

File: g77.info,  Node: DSin Intrinsic,  Next: DSinH Intrinsic,  Prev: DSign Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.86 DSin Intrinsic
........................


     DSin(X)

DSin: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SIN()' that is specific to one type for X.  *Note
Sin Intrinsic::.

File: g77.info,  Node: DSinH Intrinsic,  Next: DSqRt Intrinsic,  Prev: DSin Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.87 DSinH Intrinsic
.........................


     DSinH(X)

DSinH: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SINH()' that is specific to one type for X.  *Note
SinH Intrinsic::.

File: g77.info,  Node: DSqRt Intrinsic,  Next: DTan Intrinsic,  Prev: DSinH Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.88 DSqRt Intrinsic
.........................


     DSqRt(X)

DSqRt: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SQRT()' that is specific to one type for X.  *Note
SqRt Intrinsic::.

File: g77.info,  Node: DTan Intrinsic,  Next: DTanH Intrinsic,  Prev: DSqRt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.89 DTan Intrinsic
........................


     DTan(X)

DTan: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `TAN()' that is specific to one type for X.  *Note
Tan Intrinsic::.

File: g77.info,  Node: DTanH Intrinsic,  Next: DTime Intrinsic (subroutine),  Prev: DTan Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.90 DTanH Intrinsic
.........................


     DTanH(X)

DTanH: `REAL(KIND=2)' function.

X: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `TANH()' that is specific to one type for X.  *Note
TanH Intrinsic::.

File: g77.info,  Node: DTime Intrinsic (subroutine),  Next: EOShift Intrinsic,  Prev: DTanH Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.91 DTime Intrinsic (subroutine)
......................................


     CALL DTime(TARRAY, RESULT)

TARRAY: `REAL(KIND=1)'; DIMENSION(2); INTENT(OUT).

RESULT: `REAL(KIND=1)'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Initially, return the number of seconds of runtime since the start
of the process's execution in RESULT, and the user and system
components of this in `TARRAY(1)' and `TARRAY(2)' respectively.  The
value of RESULT is equal to `TARRAY(1) + TARRAY(2)'.

   Subsequent invocations of `DTIME()' set values based on accumulations
since the previous invocation.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note DTime
Intrinsic (function)::.

File: g77.info,  Node: EOShift Intrinsic,  Next: Epsilon Intrinsic,  Prev: DTime Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.92 EOShift Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL EOShift' to use this name for an
external procedure.

File: g77.info,  Node: Epsilon Intrinsic,  Next: ErF Intrinsic,  Prev: EOShift Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.93 Epsilon Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Epsilon' to use this name for an
external procedure.

File: g77.info,  Node: ErF Intrinsic,  Next: ErFC Intrinsic,  Prev: Epsilon Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.94 ErF Intrinsic
.......................


     ErF(X)

ErF: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns the error function of X.  See `erf(3m)', which provides the
implementation.

File: g77.info,  Node: ErFC Intrinsic,  Next: ETime Intrinsic (subroutine),  Prev: ErF Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.95 ErFC Intrinsic
........................


     ErFC(X)

ErFC: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns the complementary error function of X: `ERFC(R) = 1 -
ERF(R)' (except that the result might be more accurate than explicitly
evaluating that formulae would give).  See `erfc(3m)', which provides
the implementation.

File: g77.info,  Node: ETime Intrinsic (subroutine),  Next: ETime Intrinsic (function),  Prev: ErFC Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.96 ETime Intrinsic (subroutine)
......................................


     CALL ETime(TARRAY, RESULT)

TARRAY: `REAL(KIND=1)'; DIMENSION(2); INTENT(OUT).

RESULT: `REAL(KIND=1)'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Return the number of seconds of runtime since the start of the
process's execution in RESULT, and the user and system components of
this in `TARRAY(1)' and `TARRAY(2)' respectively.  The value of RESULT
is equal to `TARRAY(1) + TARRAY(2)'.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note ETime
Intrinsic (function)::.

File: g77.info,  Node: ETime Intrinsic (function),  Next: Exit Intrinsic,  Prev: ETime Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.97 ETime Intrinsic (function)
....................................


     ETime(TARRAY)

ETime: `REAL(KIND=1)' function.

TARRAY: `REAL(KIND=1)'; DIMENSION(2); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Return the number of seconds of runtime since the start of the
process's execution as the function value, and the user and system
components of this in `TARRAY(1)' and `TARRAY(2)' respectively.  The
functions' value is equal to `TARRAY(1) + TARRAY(2)'.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

   For information on other intrinsics with the same name: *Note ETime
Intrinsic (subroutine)::.

File: g77.info,  Node: Exit Intrinsic,  Next: Exp Intrinsic,  Prev: ETime Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.98 Exit Intrinsic
........................


     CALL Exit(STATUS)

STATUS: `INTEGER' not wider than the default kind; OPTIONAL; scalar;
INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Exit the program with status STATUS after closing open Fortran I/O
units and otherwise behaving as `exit(2)'.  If STATUS is omitted the
canonical `success' value will be returned to the system.

File: g77.info,  Node: Exp Intrinsic,  Next: Exponent Intrinsic,  Prev: Exit Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.99 Exp Intrinsic
.......................


     Exp(X)

Exp: `REAL' or `COMPLEX' function, the exact type being that of
argument X.

X: `REAL' or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `E**X', where E is approximately 2.7182818.

   *Note Log Intrinsic::, for the inverse of this function.

File: g77.info,  Node: Exponent Intrinsic,  Next: FDate Intrinsic (subroutine),  Prev: Exp Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.100 Exponent Intrinsic
.............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Exponent' to use this name for an
external procedure.

File: g77.info,  Node: FDate Intrinsic (subroutine),  Next: FDate Intrinsic (function),  Prev: Exponent Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.101 FDate Intrinsic (subroutine)
.......................................


     CALL FDate(DATE)

DATE: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Returns the current date (using the same format as `CTIME()') in
DATE.

   Equivalent to:

     CALL CTIME(DATE, TIME8())

   Programs making use of this intrinsic might not be Year 10000 (Y10K)
compliant.  For example, the date might appear, to such programs, to
wrap around (change from a larger value to a smaller one) as of the
Year 10000.

   *Note CTime Intrinsic (subroutine)::.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note FDate
Intrinsic (function)::.

File: g77.info,  Node: FDate Intrinsic (function),  Next: FGet Intrinsic (subroutine),  Prev: FDate Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.102 FDate Intrinsic (function)
.....................................


     FDate()

FDate: `CHARACTER*(*)' function.

Intrinsic groups: `unix'.

Description:

   Returns the current date (using the same format as `CTIME()').

   Equivalent to:

     CTIME(TIME8())

   Programs making use of this intrinsic might not be Year 10000 (Y10K)
compliant.  For example, the date might appear, to such programs, to
wrap around (change from a larger value to a smaller one) as of the
Year 10000.

   *Note CTime Intrinsic (function)::.

   For information on other intrinsics with the same name: *Note FDate
Intrinsic (subroutine)::.

File: g77.info,  Node: FGet Intrinsic (subroutine),  Next: FGetC Intrinsic (subroutine),  Prev: FDate Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.103 FGet Intrinsic (subroutine)
......................................


     CALL FGet(C, STATUS)

C: `CHARACTER'; scalar; INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Reads a single character into C in stream mode from unit 5
(by-passing normal formatted output) using `getc(3)'.  Returns in
STATUS 0 on success, -1 on end-of-file, and the error code from
`ferror(3)' otherwise.

   Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are
unpredictable.

   For information on other intrinsics with the same name: *Note FGet
Intrinsic (function)::.

File: g77.info,  Node: FGetC Intrinsic (subroutine),  Next: Float Intrinsic,  Prev: FGet Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.104 FGetC Intrinsic (subroutine)
.......................................


     CALL FGetC(UNIT, C, STATUS)

UNIT: `INTEGER'; scalar; INTENT(IN).

C: `CHARACTER'; scalar; INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Reads a single character into C in stream mode from unit UNIT
(by-passing normal formatted output) using `getc(3)'.  Returns in
STATUS 0 on success, -1 on end-of-file, and the error code from
`ferror(3)' otherwise.

   Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are
unpredictable.

   For information on other intrinsics with the same name: *Note FGetC
Intrinsic (function)::.

File: g77.info,  Node: Float Intrinsic,  Next: Floor Intrinsic,  Prev: FGetC Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.105 Float Intrinsic
..........................


     Float(A)

Float: `REAL(KIND=1)' function.

A: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `REAL()' that is specific to one type for A.  *Note
Real Intrinsic::.

File: g77.info,  Node: Floor Intrinsic,  Next: Flush Intrinsic,  Prev: Float Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.106 Floor Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Floor' to use this name for an external
procedure.

File: g77.info,  Node: Flush Intrinsic,  Next: FNum Intrinsic,  Prev: Floor Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.107 Flush Intrinsic
..........................


     CALL Flush(UNIT)

UNIT: `INTEGER'; OPTIONAL; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Flushes Fortran unit(s) currently open for output.  Without the
optional argument, all such units are flushed, otherwise just the unit
specified by UNIT.

   Some non-GNU implementations of Fortran provide this intrinsic as a
library procedure that might or might not support the (optional) UNIT
argument.

File: g77.info,  Node: FNum Intrinsic,  Next: FPut Intrinsic (subroutine),  Prev: Flush Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.108 FNum Intrinsic
.........................


     FNum(UNIT)

FNum: `INTEGER(KIND=1)' function.

UNIT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns the Unix file descriptor number corresponding to the open
Fortran I/O unit UNIT.  This could be passed to an interface to C I/O
routines.

File: g77.info,  Node: FPut Intrinsic (subroutine),  Next: FPutC Intrinsic (subroutine),  Prev: FNum Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.109 FPut Intrinsic (subroutine)
......................................


     CALL FPut(C, STATUS)

C: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Writes the single character C in stream mode to unit 6 (by-passing
normal formatted output) using `putc(3)'.  Returns in STATUS 0 on
success, the error code from `ferror(3)' otherwise.

   Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are
unpredictable.

   For information on other intrinsics with the same name: *Note FPut
Intrinsic (function)::.

File: g77.info,  Node: FPutC Intrinsic (subroutine),  Next: Fraction Intrinsic,  Prev: FPut Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.110 FPutC Intrinsic (subroutine)
.......................................


     CALL FPutC(UNIT, C, STATUS)

UNIT: `INTEGER'; scalar; INTENT(IN).

C: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Writes the single character UNIT in stream mode to unit 6
(by-passing normal formatted output) using `putc(3)'.  Returns in C 0
on success, the error code from `ferror(3)' otherwise.

   Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are
unpredictable.

   For information on other intrinsics with the same name: *Note FPutC
Intrinsic (function)::.

File: g77.info,  Node: Fraction Intrinsic,  Next: FSeek Intrinsic,  Prev: FPutC Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.111 Fraction Intrinsic
.............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Fraction' to use this name for an
external procedure.

File: g77.info,  Node: FSeek Intrinsic,  Next: FStat Intrinsic (subroutine),  Prev: Fraction Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.112 FSeek Intrinsic
..........................


     CALL FSeek(UNIT, OFFSET, WHENCE, ERRLAB)

UNIT: `INTEGER'; scalar; INTENT(IN).

OFFSET: `INTEGER'; scalar; INTENT(IN).

WHENCE: `INTEGER'; scalar; INTENT(IN).

ERRLAB: `*LABEL', where LABEL is the label of an executable statement;
OPTIONAL.

Intrinsic groups: `unix'.

Description:

   Attempts to move Fortran unit UNIT to the specified OFFSET: absolute
offset if WHENCE=0; relative to the current offset if WHENCE=1;
relative to the end of the file if WHENCE=2.  It branches to label
ERRLAB if UNIT is not open or if the call otherwise fails.

File: g77.info,  Node: FStat Intrinsic (subroutine),  Next: FStat Intrinsic (function),  Prev: FSeek Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.113 FStat Intrinsic (subroutine)
.......................................


     CALL FStat(UNIT, SARRAY, STATUS)

UNIT: `INTEGER'; scalar; INTENT(IN).

SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Obtains data about the file open on Fortran I/O unit UNIT and places
them in the array SARRAY.  The values in this array are extracted from
the `stat' structure as returned by `fstat(2)' q.v., as follows:

  1. Device ID

  2. Inode number

  3. File mode

  4. Number of links

  5. Owner's uid

  6. Owner's gid

  7. ID of device containing directory entry for file (0 if not
     available)

  8. File size (bytes)

  9. Last access time

 10. Last modification time

 11. Last file status change time

 12. Preferred I/O block size (-1 if not available)

 13. Number of blocks allocated (-1 if not available)

   Not all these elements are relevant on all systems.  If an element
is not relevant, it is returned as 0.

   If the STATUS argument is supplied, it contains 0 on success or a
nonzero error code upon return.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note FStat
Intrinsic (function)::.

File: g77.info,  Node: FStat Intrinsic (function),  Next: FTell Intrinsic (subroutine),  Prev: FStat Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.114 FStat Intrinsic (function)
.....................................


     FStat(UNIT, SARRAY)

FStat: `INTEGER(KIND=1)' function.

UNIT: `INTEGER'; scalar; INTENT(IN).

SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Obtains data about the file open on Fortran I/O unit UNIT and places
them in the array SARRAY.  The values in this array are extracted from
the `stat' structure as returned by `fstat(2)' q.v., as follows:

  1. Device ID

  2. Inode number

  3. File mode

  4. Number of links

  5. Owner's uid

  6. Owner's gid

  7. ID of device containing directory entry for file (0 if not
     available)

  8. File size (bytes)

  9. Last access time

 10. Last modification time

 11. Last file status change time

 12. Preferred I/O block size (-1 if not available)

 13. Number of blocks allocated (-1 if not available)

   Not all these elements are relevant on all systems.  If an element
is not relevant, it is returned as 0.

   Returns 0 on success or a nonzero error code.

   For information on other intrinsics with the same name: *Note FStat
Intrinsic (subroutine)::.

File: g77.info,  Node: FTell Intrinsic (subroutine),  Next: FTell Intrinsic (function),  Prev: FStat Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.115 FTell Intrinsic (subroutine)
.......................................


     CALL FTell(UNIT, OFFSET)

UNIT: `INTEGER'; scalar; INTENT(IN).

OFFSET: `INTEGER(KIND=1)'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sets OFFSET to the current offset of Fortran unit UNIT (or to -1 if
UNIT is not open).

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note FTell
Intrinsic (function)::.

File: g77.info,  Node: FTell Intrinsic (function),  Next: GError Intrinsic,  Prev: FTell Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.116 FTell Intrinsic (function)
.....................................


     FTell(UNIT)

FTell: `INTEGER(KIND=1)' function.

UNIT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns the current offset of Fortran unit UNIT (or -1 if UNIT is
not open).

   For information on other intrinsics with the same name: *Note FTell
Intrinsic (subroutine)::.

File: g77.info,  Node: GError Intrinsic,  Next: GetArg Intrinsic,  Prev: FTell Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.117 GError Intrinsic
...........................


     CALL GError(MESSAGE)

MESSAGE: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Returns the system error message corresponding to the last system
error (C `errno').

File: g77.info,  Node: GetArg Intrinsic,  Next: GetCWD Intrinsic (subroutine),  Prev: GError Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.118 GetArg Intrinsic
...........................


     CALL GetArg(POS, VALUE)

POS: `INTEGER' not wider than the default kind; scalar; INTENT(IN).

VALUE: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sets VALUE to the POS-th command-line argument (or to all blanks if
there are fewer than VALUE command-line arguments); `CALL GETARG(0,
VALUE)' sets VALUE to the name of the program (on systems that support
this feature).

   *Note IArgC Intrinsic::, for information on how to get the number of
arguments.

File: g77.info,  Node: GetCWD Intrinsic (subroutine),  Next: GetCWD Intrinsic (function),  Prev: GetArg Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.119 GetCWD Intrinsic (subroutine)
........................................


     CALL GetCWD(NAME, STATUS)

NAME: `CHARACTER'; scalar; INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Places the current working directory in NAME.  If the STATUS
argument is supplied, it contains 0 success or a nonzero error code
upon return (`ENOSYS' if the system does not provide `getcwd(3)' or
`getwd(3)').

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note GetCWD
Intrinsic (function)::.

File: g77.info,  Node: GetCWD Intrinsic (function),  Next: GetEnv Intrinsic,  Prev: GetCWD Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.120 GetCWD Intrinsic (function)
......................................


     GetCWD(NAME)

GetCWD: `INTEGER(KIND=1)' function.

NAME: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Places the current working directory in NAME.  Returns 0 on success,
otherwise a nonzero error code (`ENOSYS' if the system does not provide
`getcwd(3)' or `getwd(3)').

   For information on other intrinsics with the same name: *Note GetCWD
Intrinsic (subroutine)::.

File: g77.info,  Node: GetEnv Intrinsic,  Next: GetGId Intrinsic,  Prev: GetCWD Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.121 GetEnv Intrinsic
...........................


     CALL GetEnv(NAME, VALUE)

NAME: `CHARACTER'; scalar; INTENT(IN).

VALUE: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sets VALUE to the value of environment variable given by the value
of NAME (`$name' in shell terms) or to blanks if `$name' has not been
set.  A null character (`CHAR(0)') marks the end of the name in
NAME--otherwise, trailing blanks in NAME are ignored.

File: g77.info,  Node: GetGId Intrinsic,  Next: GetLog Intrinsic,  Prev: GetEnv Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.122 GetGId Intrinsic
...........................


     GetGId()

GetGId: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the group id for the current process.

File: g77.info,  Node: GetLog Intrinsic,  Next: GetPId Intrinsic,  Prev: GetGId Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.123 GetLog Intrinsic
...........................


     CALL GetLog(LOGIN)

LOGIN: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Returns the login name for the process in LOGIN.

   _Caution:_ On some systems, the `getlogin(3)' function, which this
intrinsic calls at run time, is either not implemented or returns a
null pointer.  In the latter case, this intrinsic returns blanks in
LOGIN.

File: g77.info,  Node: GetPId Intrinsic,  Next: GetUId Intrinsic,  Prev: GetLog Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.124 GetPId Intrinsic
...........................


     GetPId()

GetPId: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the process id for the current process.

File: g77.info,  Node: GetUId Intrinsic,  Next: GMTime Intrinsic,  Prev: GetPId Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.125 GetUId Intrinsic
...........................


     GetUId()

GetUId: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the user id for the current process.

File: g77.info,  Node: GMTime Intrinsic,  Next: HostNm Intrinsic (subroutine),  Prev: GetUId Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.126 GMTime Intrinsic
...........................


     CALL GMTime(STIME, TARRAY)

STIME: `INTEGER(KIND=1)'; scalar; INTENT(IN).

TARRAY: `INTEGER(KIND=1)'; DIMENSION(9); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Given a system time value STIME, fills TARRAY with values extracted
from it appropriate to the GMT time zone using `gmtime(3)'.

   The array elements are as follows:

  1. Seconds after the minute, range 0-59 or 0-61 to allow for leap
     seconds

  2. Minutes after the hour, range 0-59

  3. Hours past midnight, range 0-23

  4. Day of month, range 0-31

  5. Number of months since January, range 0-12

  6. Years since 1900

  7. Number of days since Sunday, range 0-6

  8. Days since January 1

  9. Daylight savings indicator: positive if daylight savings is in
     effect, zero if not, and negative if the information isn't
     available.

File: g77.info,  Node: HostNm Intrinsic (subroutine),  Next: HostNm Intrinsic (function),  Prev: GMTime Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.127 HostNm Intrinsic (subroutine)
........................................


     CALL HostNm(NAME, STATUS)

NAME: `CHARACTER'; scalar; INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Fills NAME with the system's host name returned by `gethostname(2)'.
If the STATUS argument is supplied, it contains 0 on success or a
nonzero error code upon return (`ENOSYS' if the system does not provide
`gethostname(2)').

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   On some systems (specifically SCO) it might be necessary to link the
"socket" library if you call this routine.  Typically this means adding
`-lg2c -lsocket -lm' to the `g77' command line when linking the program.

   For information on other intrinsics with the same name: *Note HostNm
Intrinsic (function)::.

File: g77.info,  Node: HostNm Intrinsic (function),  Next: Huge Intrinsic,  Prev: HostNm Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.128 HostNm Intrinsic (function)
......................................


     HostNm(NAME)

HostNm: `INTEGER(KIND=1)' function.

NAME: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Fills NAME with the system's host name returned by `gethostname(2)',
returning 0 on success or a nonzero error code (`ENOSYS' if the system
does not provide `gethostname(2)').

   On some systems (specifically SCO) it might be necessary to link the
"socket" library if you call this routine.  Typically this means adding
`-lg2c -lsocket -lm' to the `g77' command line when linking the program.

   For information on other intrinsics with the same name: *Note HostNm
Intrinsic (subroutine)::.

File: g77.info,  Node: Huge Intrinsic,  Next: IAbs Intrinsic,  Prev: HostNm Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.129 Huge Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Huge' to use this name for an external
procedure.

File: g77.info,  Node: IAbs Intrinsic,  Next: IAChar Intrinsic,  Prev: Huge Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.130 IAbs Intrinsic
.........................


     IAbs(A)

IAbs: `INTEGER(KIND=1)' function.

A: `INTEGER(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `ABS()' that is specific to one type for A.  *Note
Abs Intrinsic::.

File: g77.info,  Node: IAChar Intrinsic,  Next: IAnd Intrinsic,  Prev: IAbs Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.131 IAChar Intrinsic
...........................


     IAChar(C)

IAChar: `INTEGER(KIND=1)' function.

C: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `f90'.

Description:

   Returns the code for the ASCII character in the first character
position of C.

   *Note AChar Intrinsic::, for the inverse of this function.

   *Note IChar Intrinsic::, for the function corresponding to the
system's native character set.

File: g77.info,  Node: IAnd Intrinsic,  Next: IArgC Intrinsic,  Prev: IAChar Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.132 IAnd Intrinsic
.........................


     IAnd(I, J)

IAnd: `INTEGER' function, the exact type being the result of
cross-promoting the types of all the arguments.

I: `INTEGER'; scalar; INTENT(IN).

J: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns value resulting from boolean AND of pair of bits in each of
I and J.

File: g77.info,  Node: IArgC Intrinsic,  Next: IBClr Intrinsic,  Prev: IAnd Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.133 IArgC Intrinsic
..........................


     IArgC()

IArgC: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the number of command-line arguments.

   This count does not include the specification of the program name
itself.

File: g77.info,  Node: IBClr Intrinsic,  Next: IBits Intrinsic,  Prev: IArgC Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.134 IBClr Intrinsic
..........................


     IBClr(I, POS)

IBClr: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

POS: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns the value of I with bit POS cleared (set to zero).  *Note
BTest Intrinsic::, for information on bit positions.

File: g77.info,  Node: IBits Intrinsic,  Next: IBSet Intrinsic,  Prev: IBClr Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.135 IBits Intrinsic
..........................


     IBits(I, POS, LEN)

IBits: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

POS: `INTEGER'; scalar; INTENT(IN).

LEN: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Extracts a subfield of length LEN from I, starting from bit position
POS and extending left for LEN bits.  The result is right-justified and
the remaining bits are zeroed.  The value of `POS+LEN' must be less
than or equal to the value `BIT_SIZE(I)'.  *Note Bit_Size Intrinsic::.

File: g77.info,  Node: IBSet Intrinsic,  Next: IChar Intrinsic,  Prev: IBits Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.136 IBSet Intrinsic
..........................


     IBSet(I, POS)

IBSet: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

POS: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns the value of I with bit POS set (to one).  *Note BTest
Intrinsic::, for information on bit positions.

File: g77.info,  Node: IChar Intrinsic,  Next: IDate Intrinsic (UNIX),  Prev: IBSet Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.137 IChar Intrinsic
..........................


     IChar(C)

IChar: `INTEGER(KIND=1)' function.

C: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the code for the character in the first character position
of C.

   Because the system's native character set is used, the
correspondence between character and their codes is not necessarily the
same between GNU Fortran implementations.

   Note that no intrinsic exists to convert a printable character
string to a numerical value.  For example, there is no intrinsic that,
given the `CHARACTER' value `'154'', returns an `INTEGER' or `REAL'
value with the value `154'.

   Instead, you can use internal-file I/O to do this kind of conversion.
For example:

     INTEGER VALUE
     CHARACTER*10 STRING
     STRING = '154'
     READ (STRING, '(I10)'), VALUE
     PRINT *, VALUE
     END

   The above program, when run, prints:

      154

   *Note Char Intrinsic::, for the inverse of the `ICHAR' function.

   *Note IAChar Intrinsic::, for the function corresponding to the
ASCII character set.

File: g77.info,  Node: IDate Intrinsic (UNIX),  Next: IDiM Intrinsic,  Prev: IChar Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.138 IDate Intrinsic (UNIX)
.................................


     CALL IDate(TARRAY)

TARRAY: `INTEGER(KIND=1)'; DIMENSION(3); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Fills TARRAY with the numerical values at the current local time.
The day (in the range 1-31), month (in the range 1-12), and year appear
in elements 1, 2, and 3 of TARRAY, respectively.  The year has four
significant digits.

   Programs making use of this intrinsic might not be Year 10000 (Y10K)
compliant.  For example, the date might appear, to such programs, to
wrap around (change from a larger value to a smaller one) as of the
Year 10000.

   For information on other intrinsics with the same name: *Note IDate
Intrinsic (VXT)::.

File: g77.info,  Node: IDiM Intrinsic,  Next: IDInt Intrinsic,  Prev: IDate Intrinsic (UNIX),  Up: Table of Intrinsic Functions

8.11.9.139 IDiM Intrinsic
.........................


     IDiM(X, Y)

IDiM: `INTEGER(KIND=1)' function.

X: `INTEGER(KIND=1)'; scalar; INTENT(IN).

Y: `INTEGER(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `DIM()' that is specific to one type for X and Y.
*Note DiM Intrinsic::.

File: g77.info,  Node: IDInt Intrinsic,  Next: IDNInt Intrinsic,  Prev: IDiM Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.140 IDInt Intrinsic
..........................


     IDInt(A)

IDInt: `INTEGER(KIND=1)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `INT()' that is specific to one type for A.  *Note
Int Intrinsic::.

File: g77.info,  Node: IDNInt Intrinsic,  Next: IEOr Intrinsic,  Prev: IDInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.141 IDNInt Intrinsic
...........................


     IDNInt(A)

IDNInt: `INTEGER(KIND=1)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `NINT()' that is specific to one type for A.  *Note
NInt Intrinsic::.

File: g77.info,  Node: IEOr Intrinsic,  Next: IErrNo Intrinsic,  Prev: IDNInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.142 IEOr Intrinsic
.........................


     IEOr(I, J)

IEOr: `INTEGER' function, the exact type being the result of
cross-promoting the types of all the arguments.

I: `INTEGER'; scalar; INTENT(IN).

J: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns value resulting from boolean exclusive-OR of pair of bits in
each of I and J.

File: g77.info,  Node: IErrNo Intrinsic,  Next: IFix Intrinsic,  Prev: IEOr Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.143 IErrNo Intrinsic
...........................


     IErrNo()

IErrNo: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the last system error number (corresponding to the C
`errno').

File: g77.info,  Node: IFix Intrinsic,  Next: Imag Intrinsic,  Prev: IErrNo Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.144 IFix Intrinsic
.........................


     IFix(A)

IFix: `INTEGER(KIND=1)' function.

A: `REAL(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `INT()' that is specific to one type for A.  *Note
Int Intrinsic::.

File: g77.info,  Node: Imag Intrinsic,  Next: ImagPart Intrinsic,  Prev: IFix Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.145 Imag Intrinsic
.........................


     Imag(Z)

Imag: `REAL' function, the `KIND=' value of the type being that of
argument Z.

Z: `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   The imaginary part of Z is returned, without conversion.

   _Note:_ The way to do this in standard Fortran 90 is `AIMAG(Z)'.
However, when, for example, Z is `DOUBLE COMPLEX', `AIMAG(Z)' means
something different for some compilers that are not true Fortran 90
compilers but offer some extensions standardized by Fortran 90 (such as
the `DOUBLE COMPLEX' type, also known as `COMPLEX(KIND=2)').

   The advantage of `IMAG()' is that, while not necessarily more or
less portable than `AIMAG()', it is more likely to cause a compiler
that doesn't support it to produce a diagnostic than generate incorrect
code.

   *Note REAL() and AIMAG() of Complex::, for more information.

File: g77.info,  Node: ImagPart Intrinsic,  Next: Index Intrinsic,  Prev: Imag Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.146 ImagPart Intrinsic
.............................


     ImagPart(Z)

ImagPart: `REAL' function, the `KIND=' value of the type being that of
argument Z.

Z: `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: `gnu'.

Description:

   The imaginary part of Z is returned, without conversion.

   _Note:_ The way to do this in standard Fortran 90 is `AIMAG(Z)'.
However, when, for example, Z is `DOUBLE COMPLEX', `AIMAG(Z)' means
something different for some compilers that are not true Fortran 90
compilers but offer some extensions standardized by Fortran 90 (such as
the `DOUBLE COMPLEX' type, also known as `COMPLEX(KIND=2)').

   The advantage of `IMAGPART()' is that, while not necessarily more or
less portable than `AIMAG()', it is more likely to cause a compiler
that doesn't support it to produce a diagnostic than generate incorrect
code.

   *Note REAL() and AIMAG() of Complex::, for more information.

File: g77.info,  Node: Index Intrinsic,  Next: Int Intrinsic,  Prev: ImagPart Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.147 Index Intrinsic
..........................


     Index(STRING, SUBSTRING)

Index: `INTEGER(KIND=1)' function.

STRING: `CHARACTER'; scalar; INTENT(IN).

SUBSTRING: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the position of the start of the first occurrence of string
SUBSTRING as a substring in STRING, counting from one.  If SUBSTRING
doesn't occur in STRING, zero is returned.

File: g77.info,  Node: Int Intrinsic,  Next: Int2 Intrinsic,  Prev: Index Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.148 Int Intrinsic
........................


     Int(A)

Int: `INTEGER(KIND=1)' function.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns A with the fractional portion of its magnitude truncated and
its sign preserved, converted to type `INTEGER(KIND=1)'.

   If A is type `COMPLEX', its real part is truncated and converted,
and its imaginary part is disregarded.

   *Note NInt Intrinsic::, for how to convert, rounded to nearest whole
number.

   *Note AInt Intrinsic::, for how to truncate to whole number without
converting.

File: g77.info,  Node: Int2 Intrinsic,  Next: Int8 Intrinsic,  Prev: Int Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.149 Int2 Intrinsic
.........................


     Int2(A)

Int2: `INTEGER(KIND=6)' function.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: `gnu'.

Description:

   Returns A with the fractional portion of its magnitude truncated and
its sign preserved, converted to type `INTEGER(KIND=6)'.

   If A is type `COMPLEX', its real part is truncated and converted,
and its imaginary part is disregarded.

   *Note Int Intrinsic::.

   The precise meaning of this intrinsic might change in a future
version of the GNU Fortran language, as more is learned about how it is
used.

File: g77.info,  Node: Int8 Intrinsic,  Next: IOr Intrinsic,  Prev: Int2 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.150 Int8 Intrinsic
.........................


     Int8(A)

Int8: `INTEGER(KIND=2)' function.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: `gnu'.

Description:

   Returns A with the fractional portion of its magnitude truncated and
its sign preserved, converted to type `INTEGER(KIND=2)'.

   If A is type `COMPLEX', its real part is truncated and converted,
and its imaginary part is disregarded.

   *Note Int Intrinsic::.

   The precise meaning of this intrinsic might change in a future
version of the GNU Fortran language, as more is learned about how it is
used.

File: g77.info,  Node: IOr Intrinsic,  Next: IRand Intrinsic,  Prev: Int8 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.151 IOr Intrinsic
........................


     IOr(I, J)

IOr: `INTEGER' function, the exact type being the result of
cross-promoting the types of all the arguments.

I: `INTEGER'; scalar; INTENT(IN).

J: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns value resulting from boolean OR of pair of bits in each of I
and J.

File: g77.info,  Node: IRand Intrinsic,  Next: IsaTty Intrinsic,  Prev: IOr Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.152 IRand Intrinsic
..........................


     IRand(FLAG)

IRand: `INTEGER(KIND=1)' function.

FLAG: `INTEGER'; OPTIONAL; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns a uniform quasi-random number up to a system-dependent limit.
If FLAG is 0, the next number in sequence is returned; if FLAG is 1,
the generator is restarted by calling the UNIX function `srand(0)'; if
FLAG has any other value, it is used as a new seed with `srand()'.

   *Note SRand Intrinsic::.

   _Note:_ As typically implemented (by the routine of the same name in
the C library), this random number generator is a very poor one, though
the BSD and GNU libraries provide a much better implementation than the
`traditional' one.  On a different system you almost certainly want to
use something better.

File: g77.info,  Node: IsaTty Intrinsic,  Next: IShft Intrinsic,  Prev: IRand Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.153 IsaTty Intrinsic
...........................


     IsaTty(UNIT)

IsaTty: `LOGICAL(KIND=1)' function.

UNIT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns `.TRUE.' if and only if the Fortran I/O unit specified by
UNIT is connected to a terminal device.  See `isatty(3)'.

File: g77.info,  Node: IShft Intrinsic,  Next: IShftC Intrinsic,  Prev: IsaTty Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.154 IShft Intrinsic
..........................


     IShft(I, SHIFT)

IShft: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

SHIFT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   All bits representing I are shifted SHIFT places.  `SHIFT.GT.0'
indicates a left shift, `SHIFT.EQ.0' indicates no shift and
`SHIFT.LT.0' indicates a right shift.  If the absolute value of the
shift count is greater than `BIT_SIZE(I)', the result is undefined.
Bits shifted out from the left end or the right end are lost.  Zeros
are shifted in from the opposite end.

   *Note IShftC Intrinsic::, for the circular-shift equivalent.

File: g77.info,  Node: IShftC Intrinsic,  Next: ISign Intrinsic,  Prev: IShft Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.155 IShftC Intrinsic
...........................


     IShftC(I, SHIFT, SIZE)

IShftC: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

SHIFT: `INTEGER'; scalar; INTENT(IN).

SIZE: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   The rightmost SIZE bits of the argument I are shifted circularly
SHIFT places, i.e. the bits shifted out of one end are shifted into the
opposite end.  No bits are lost.  The unshifted bits of the result are
the same as the unshifted bits of I.  The  absolute value of the
argument SHIFT must be less than or equal to SIZE.  The value of SIZE
must be greater than or equal to one and less than or equal to
`BIT_SIZE(I)'.

   *Note IShft Intrinsic::, for the logical shift equivalent.

File: g77.info,  Node: ISign Intrinsic,  Next: ITime Intrinsic,  Prev: IShftC Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.156 ISign Intrinsic
..........................


     ISign(A, B)

ISign: `INTEGER(KIND=1)' function.

A: `INTEGER(KIND=1)'; scalar; INTENT(IN).

B: `INTEGER(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `SIGN()' that is specific to one type for A and B.
*Note Sign Intrinsic::.

File: g77.info,  Node: ITime Intrinsic,  Next: Kill Intrinsic (subroutine),  Prev: ISign Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.157 ITime Intrinsic
..........................


     CALL ITime(TARRAY)

TARRAY: `INTEGER(KIND=1)'; DIMENSION(3); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Returns the current local time hour, minutes, and seconds in elements
1, 2, and 3 of TARRAY, respectively.

File: g77.info,  Node: Kill Intrinsic (subroutine),  Next: Kind Intrinsic,  Prev: ITime Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.158 Kill Intrinsic (subroutine)
......................................


     CALL Kill(PID, SIGNAL, STATUS)

PID: `INTEGER'; scalar; INTENT(IN).

SIGNAL: `INTEGER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sends the signal specified by SIGNAL to the process PID.  If the
STATUS argument is supplied, it contains 0 on success or a nonzero
error code upon return.  See `kill(2)'.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note Kill
Intrinsic (function)::.

File: g77.info,  Node: Kind Intrinsic,  Next: LBound Intrinsic,  Prev: Kill Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.159 Kind Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Kind' to use this name for an external
procedure.

File: g77.info,  Node: LBound Intrinsic,  Next: Len Intrinsic,  Prev: Kind Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.160 LBound Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL LBound' to use this name for an
external procedure.

File: g77.info,  Node: Len Intrinsic,  Next: Len_Trim Intrinsic,  Prev: LBound Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.161 Len Intrinsic
........................


     Len(STRING)

Len: `INTEGER(KIND=1)' function.

STRING: `CHARACTER'; scalar.

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the length of STRING.

   If STRING is an array, the length of an element of STRING is
returned.

   Note that STRING need not be defined when this intrinsic is invoked,
since only the length, not the content, of STRING is needed.

   *Note Bit_Size Intrinsic::, for the function that determines the
size of its argument in bits.

File: g77.info,  Node: Len_Trim Intrinsic,  Next: LGe Intrinsic,  Prev: Len Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.162 Len_Trim Intrinsic
.............................


     Len_Trim(STRING)

Len_Trim: `INTEGER(KIND=1)' function.

STRING: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `f90'.

Description:

   Returns the index of the last non-blank character in STRING.
`LNBLNK' and `LEN_TRIM' are equivalent.

File: g77.info,  Node: LGe Intrinsic,  Next: LGt Intrinsic,  Prev: Len_Trim Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.163 LGe Intrinsic
........................


     LGe(STRING_A, STRING_B)

LGe: `LOGICAL(KIND=1)' function.

STRING_A: `CHARACTER'; scalar; INTENT(IN).

STRING_B: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `.TRUE.' if `STRING_A.GE.STRING_B', `.FALSE.' otherwise.
STRING_A and STRING_B are interpreted as containing ASCII character
codes.  If either value contains a character not in the ASCII character
set, the result is processor dependent.

   If the STRING_A and STRING_B are not the same length, the shorter is
compared as if spaces were appended to it to form a value that has the
same length as the longer.

   The lexical comparison intrinsics `LGe', `LGt', `LLe', and `LLt'
differ from the corresponding intrinsic operators `.GE.', `.GT.',
`.LE.', `.LT.'.  Because the ASCII collating sequence is assumed, the
following expressions always return `.TRUE.':

     LGE ('0', ' ')
     LGE ('A', '0')
     LGE ('a', 'A')

   The following related expressions do _not_ always return `.TRUE.',
as they are not necessarily evaluated assuming the arguments use ASCII
encoding:

     '0' .GE. ' '
     'A' .GE. '0'
     'a' .GE. 'A'

   The same difference exists between `LGt' and `.GT.'; between `LLe'
and `.LE.'; and between `LLt' and `.LT.'.

File: g77.info,  Node: LGt Intrinsic,  Next: Link Intrinsic (subroutine),  Prev: LGe Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.164 LGt Intrinsic
........................


     LGt(STRING_A, STRING_B)

LGt: `LOGICAL(KIND=1)' function.

STRING_A: `CHARACTER'; scalar; INTENT(IN).

STRING_B: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `.TRUE.' if `STRING_A.GT.STRING_B', `.FALSE.' otherwise.
STRING_A and STRING_B are interpreted as containing ASCII character
codes.  If either value contains a character not in the ASCII character
set, the result is processor dependent.

   If the STRING_A and STRING_B are not the same length, the shorter is
compared as if spaces were appended to it to form a value that has the
same length as the longer.

   *Note LGe Intrinsic::, for information on the distinction between
the `LGT' intrinsic and the `.GT.' operator.

File: g77.info,  Node: Link Intrinsic (subroutine),  Next: LLe Intrinsic,  Prev: LGt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.165 Link Intrinsic (subroutine)
......................................


     CALL Link(PATH1, PATH2, STATUS)

PATH1: `CHARACTER'; scalar; INTENT(IN).

PATH2: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Makes a (hard) link from file PATH1 to PATH2.  A null character
(`CHAR(0)') marks the end of the names in PATH1 and PATH2--otherwise,
trailing blanks in PATH1 and PATH2 are ignored.  If the STATUS argument
is supplied, it contains 0 on success or a nonzero error code upon
return.  See `link(2)'.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note Link
Intrinsic (function)::.

File: g77.info,  Node: LLe Intrinsic,  Next: LLt Intrinsic,  Prev: Link Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.166 LLe Intrinsic
........................


     LLe(STRING_A, STRING_B)

LLe: `LOGICAL(KIND=1)' function.

STRING_A: `CHARACTER'; scalar; INTENT(IN).

STRING_B: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `.TRUE.' if `STRING_A.LE.STRING_B', `.FALSE.' otherwise.
STRING_A and STRING_B are interpreted as containing ASCII character
codes.  If either value contains a character not in the ASCII character
set, the result is processor dependent.

   If the STRING_A and STRING_B are not the same length, the shorter is
compared as if spaces were appended to it to form a value that has the
same length as the longer.

   *Note LGe Intrinsic::, for information on the distinction between
the `LLE' intrinsic and the `.LE.' operator.

File: g77.info,  Node: LLt Intrinsic,  Next: LnBlnk Intrinsic,  Prev: LLe Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.167 LLt Intrinsic
........................


     LLt(STRING_A, STRING_B)

LLt: `LOGICAL(KIND=1)' function.

STRING_A: `CHARACTER'; scalar; INTENT(IN).

STRING_B: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `.TRUE.' if `STRING_A.LT.STRING_B', `.FALSE.' otherwise.
STRING_A and STRING_B are interpreted as containing ASCII character
codes.  If either value contains a character not in the ASCII character
set, the result is processor dependent.

   If the STRING_A and STRING_B are not the same length, the shorter is
compared as if spaces were appended to it to form a value that has the
same length as the longer.

   *Note LGe Intrinsic::, for information on the distinction between
the `LLT' intrinsic and the `.LT.' operator.

File: g77.info,  Node: LnBlnk Intrinsic,  Next: Loc Intrinsic,  Prev: LLt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.168 LnBlnk Intrinsic
...........................


     LnBlnk(STRING)

LnBlnk: `INTEGER(KIND=1)' function.

STRING: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns the index of the last non-blank character in STRING.
`LNBLNK' and `LEN_TRIM' are equivalent.

File: g77.info,  Node: Loc Intrinsic,  Next: Log Intrinsic,  Prev: LnBlnk Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.169 Loc Intrinsic
........................


     Loc(ENTITY)

Loc: `INTEGER(KIND=7)' function.

ENTITY: Any type; cannot be a constant or expression.

Intrinsic groups: `unix'.

Description:

   The `LOC()' intrinsic works the same way as the `%LOC()' construct.
*Note The `%LOC()' Construct: %LOC(), for more information.

File: g77.info,  Node: Log Intrinsic,  Next: Log10 Intrinsic,  Prev: Loc Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.170 Log Intrinsic
........................


     Log(X)

Log: `REAL' or `COMPLEX' function, the exact type being that of
argument X.

X: `REAL' or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the natural logarithm of X, which must be greater than zero
or, if type `COMPLEX', must not be zero.

   *Note Exp Intrinsic::, for the inverse of this function.

   *Note Log10 Intrinsic::, for the `common' (base-10) logarithm
function.

File: g77.info,  Node: Log10 Intrinsic,  Next: Logical Intrinsic,  Prev: Log Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.171 Log10 Intrinsic
..........................


     Log10(X)

Log10: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the common logarithm (base 10) of X, which must be greater
than zero.

   The inverse of this function is `10. ** LOG10(X)'.

   *Note Log Intrinsic::, for the natural logarithm function.

File: g77.info,  Node: Logical Intrinsic,  Next: Long Intrinsic,  Prev: Log10 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.172 Logical Intrinsic
............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Logical' to use this name for an
external procedure.

File: g77.info,  Node: Long Intrinsic,  Next: LShift Intrinsic,  Prev: Logical Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.173 Long Intrinsic
.........................


     Long(A)

Long: `INTEGER(KIND=1)' function.

A: `INTEGER(KIND=6)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Archaic form of `INT()' that is specific to one type for A.  *Note
Int Intrinsic::.

   The precise meaning of this intrinsic might change in a future
version of the GNU Fortran language, as more is learned about how it is
used.

File: g77.info,  Node: LShift Intrinsic,  Next: LStat Intrinsic (subroutine),  Prev: Long Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.174 LShift Intrinsic
...........................


     LShift(I, SHIFT)

LShift: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

SHIFT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Returns I shifted to the left SHIFT bits.

   Although similar to the expression `I*(2**SHIFT)', there are
important differences.  For example, the sign of the result is not
necessarily the same as the sign of I.

   Currently this intrinsic is defined assuming the underlying
representation of I is as a two's-complement integer.  It is unclear at
this point whether that definition will apply when a different
representation is involved.

   *Note LShift Intrinsic::, for the inverse of this function.

   *Note IShft Intrinsic::, for information on a more widely available
left-shifting intrinsic that is also more precisely defined.

File: g77.info,  Node: LStat Intrinsic (subroutine),  Next: LStat Intrinsic (function),  Prev: LShift Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.175 LStat Intrinsic (subroutine)
.......................................


     CALL LStat(FILE, SARRAY, STATUS)

FILE: `CHARACTER'; scalar; INTENT(IN).

SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Obtains data about the given file FILE and places them in the array
SARRAY.  A null character (`CHAR(0)') marks the end of the name in
FILE--otherwise, trailing blanks in FILE are ignored.  If FILE is a
symbolic link it returns data on the link itself, so the routine is
available only on systems that support symbolic links.  The values in
this array are extracted from the `stat' structure as returned by
`fstat(2)' q.v., as follows:

  1. Device ID

  2. Inode number

  3. File mode

  4. Number of links

  5. Owner's uid

  6. Owner's gid

  7. ID of device containing directory entry for file (0 if not
     available)

  8. File size (bytes)

  9. Last access time

 10. Last modification time

 11. Last file status change time

 12. Preferred I/O block size (-1 if not available)

 13. Number of blocks allocated (-1 if not available)

   Not all these elements are relevant on all systems.  If an element
is not relevant, it is returned as 0.

   If the STATUS argument is supplied, it contains 0 on success or a
nonzero error code upon return (`ENOSYS' if the system does not provide
`lstat(2)').

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note LStat
Intrinsic (function)::.

File: g77.info,  Node: LStat Intrinsic (function),  Next: LTime Intrinsic,  Prev: LStat Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.176 LStat Intrinsic (function)
.....................................


     LStat(FILE, SARRAY)

LStat: `INTEGER(KIND=1)' function.

FILE: `CHARACTER'; scalar; INTENT(IN).

SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Obtains data about the given file FILE and places them in the array
SARRAY.  A null character (`CHAR(0)') marks the end of the name in
FILE--otherwise, trailing blanks in FILE are ignored.  If FILE is a
symbolic link it returns data on the link itself, so the routine is
available only on systems that support symbolic links.  The values in
this array are extracted from the `stat' structure as returned by
`fstat(2)' q.v., as follows:

  1. Device ID

  2. Inode number

  3. File mode

  4. Number of links

  5. Owner's uid

  6. Owner's gid

  7. ID of device containing directory entry for file (0 if not
     available)

  8. File size (bytes)

  9. Last access time

 10. Last modification time

 11. Last file status change time

 12. Preferred I/O block size (-1 if not available)

 13. Number of blocks allocated (-1 if not available)

   Not all these elements are relevant on all systems.  If an element
is not relevant, it is returned as 0.

   Returns 0 on success or a nonzero error code (`ENOSYS' if the system
does not provide `lstat(2)').

   For information on other intrinsics with the same name: *Note LStat
Intrinsic (subroutine)::.

File: g77.info,  Node: LTime Intrinsic,  Next: MatMul Intrinsic,  Prev: LStat Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.177 LTime Intrinsic
..........................


     CALL LTime(STIME, TARRAY)

STIME: `INTEGER(KIND=1)'; scalar; INTENT(IN).

TARRAY: `INTEGER(KIND=1)'; DIMENSION(9); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Given a system time value STIME, fills TARRAY with values extracted
from it appropriate to the GMT time zone using `localtime(3)'.

   The array elements are as follows:

  1. Seconds after the minute, range 0-59 or 0-61 to allow for leap
     seconds

  2. Minutes after the hour, range 0-59

  3. Hours past midnight, range 0-23

  4. Day of month, range 0-31

  5. Number of months since January, range 0-12

  6. Years since 1900

  7. Number of days since Sunday, range 0-6

  8. Days since January 1

  9. Daylight savings indicator: positive if daylight savings is in
     effect, zero if not, and negative if the information isn't
     available.

File: g77.info,  Node: MatMul Intrinsic,  Next: Max Intrinsic,  Prev: LTime Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.178 MatMul Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MatMul' to use this name for an
external procedure.

File: g77.info,  Node: Max Intrinsic,  Next: Max0 Intrinsic,  Prev: MatMul Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.179 Max Intrinsic
........................


     Max(A-1, A-2, ..., A-n)

Max: `INTEGER' or `REAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

A: `INTEGER' or `REAL'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the argument with the largest value.

   *Note Min Intrinsic::, for the opposite function.

File: g77.info,  Node: Max0 Intrinsic,  Next: Max1 Intrinsic,  Prev: Max Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.180 Max0 Intrinsic
.........................


     Max0(A-1, A-2, ..., A-n)

Max0: `INTEGER(KIND=1)' function.

A: `INTEGER(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MAX()' that is specific to one type for A.  *Note
Max Intrinsic::.

File: g77.info,  Node: Max1 Intrinsic,  Next: MaxExponent Intrinsic,  Prev: Max0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.181 Max1 Intrinsic
.........................


     Max1(A-1, A-2, ..., A-n)

Max1: `INTEGER(KIND=1)' function.

A: `REAL(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MAX()' that is specific to one type for A and a
different return type.  *Note Max Intrinsic::.

File: g77.info,  Node: MaxExponent Intrinsic,  Next: MaxLoc Intrinsic,  Prev: Max1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.182 MaxExponent Intrinsic
................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MaxExponent' to use this name for an
external procedure.

File: g77.info,  Node: MaxLoc Intrinsic,  Next: MaxVal Intrinsic,  Prev: MaxExponent Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.183 MaxLoc Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MaxLoc' to use this name for an
external procedure.

File: g77.info,  Node: MaxVal Intrinsic,  Next: MClock Intrinsic,  Prev: MaxLoc Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.184 MaxVal Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MaxVal' to use this name for an
external procedure.

File: g77.info,  Node: MClock Intrinsic,  Next: MClock8 Intrinsic,  Prev: MaxVal Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.185 MClock Intrinsic
...........................


     MClock()

MClock: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the number of clock ticks since the start of the process.
Supported on systems with `clock(3)' (q.v.).

   This intrinsic is not fully portable, such as to systems with 32-bit
`INTEGER' types but supporting times wider than 32 bits.  Therefore,
the values returned by this intrinsic might be, or become, negative, or
numerically less than previous values, during a single run of the
compiled program.

   *Note MClock8 Intrinsic::, for information on a similar intrinsic
that might be portable to more GNU Fortran implementations, though to
fewer Fortran compilers.

   If the system does not support `clock(3)', -1 is returned.

File: g77.info,  Node: MClock8 Intrinsic,  Next: Merge Intrinsic,  Prev: MClock Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.186 MClock8 Intrinsic
............................


     MClock8()

MClock8: `INTEGER(KIND=2)' function.

Intrinsic groups: `unix'.

Description:

   Returns the number of clock ticks since the start of the process.
Supported on systems with `clock(3)' (q.v.).

   _Warning:_ this intrinsic does not increase the range of the timing
values over that returned by `clock(3)'.  On a system with a 32-bit
`clock(3)', `MCLOCK8' will return a 32-bit value, even though converted
to an `INTEGER(KIND=2)' value.  That means overflows of the 32-bit
value can still occur.  Therefore, the values returned by this intrinsic
might be, or become, negative, or numerically less than previous values,
during a single run of the compiled program.

   No Fortran implementations other than GNU Fortran are known to
support this intrinsic at the time of this writing.  *Note MClock
Intrinsic::, for information on a similar intrinsic that might be
portable to more Fortran compilers, though to fewer GNU Fortran
implementations.

   If the system does not support `clock(3)', -1 is returned.

File: g77.info,  Node: Merge Intrinsic,  Next: Min Intrinsic,  Prev: MClock8 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.187 Merge Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Merge' to use this name for an external
procedure.

File: g77.info,  Node: Min Intrinsic,  Next: Min0 Intrinsic,  Prev: Merge Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.188 Min Intrinsic
........................


     Min(A-1, A-2, ..., A-n)

Min: `INTEGER' or `REAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

A: `INTEGER' or `REAL'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the argument with the smallest value.

   *Note Max Intrinsic::, for the opposite function.

File: g77.info,  Node: Min0 Intrinsic,  Next: Min1 Intrinsic,  Prev: Min Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.189 Min0 Intrinsic
.........................


     Min0(A-1, A-2, ..., A-n)

Min0: `INTEGER(KIND=1)' function.

A: `INTEGER(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MIN()' that is specific to one type for A.  *Note
Min Intrinsic::.

File: g77.info,  Node: Min1 Intrinsic,  Next: MinExponent Intrinsic,  Prev: Min0 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.190 Min1 Intrinsic
.........................


     Min1(A-1, A-2, ..., A-n)

Min1: `INTEGER(KIND=1)' function.

A: `REAL(KIND=1)'; at least two such arguments must be provided;
scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `MIN()' that is specific to one type for A and a
different return type.  *Note Min Intrinsic::.

File: g77.info,  Node: MinExponent Intrinsic,  Next: MinLoc Intrinsic,  Prev: Min1 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.191 MinExponent Intrinsic
................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MinExponent' to use this name for an
external procedure.

File: g77.info,  Node: MinLoc Intrinsic,  Next: MinVal Intrinsic,  Prev: MinExponent Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.192 MinLoc Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MinLoc' to use this name for an
external procedure.

File: g77.info,  Node: MinVal Intrinsic,  Next: Mod Intrinsic,  Prev: MinLoc Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.193 MinVal Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL MinVal' to use this name for an
external procedure.

File: g77.info,  Node: Mod Intrinsic,  Next: Modulo Intrinsic,  Prev: MinVal Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.194 Mod Intrinsic
........................


     Mod(A, P)

Mod: `INTEGER' or `REAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

A: `INTEGER' or `REAL'; scalar; INTENT(IN).

P: `INTEGER' or `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns remainder calculated as:

     A - (INT(A / P) * P)

   P must not be zero.

File: g77.info,  Node: Modulo Intrinsic,  Next: MvBits Intrinsic,  Prev: Mod Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.195 Modulo Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Modulo' to use this name for an
external procedure.

File: g77.info,  Node: MvBits Intrinsic,  Next: Nearest Intrinsic,  Prev: Modulo Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.196 MvBits Intrinsic
...........................


     CALL MvBits(FROM, FROMPOS, LEN, TO, TOPOS)

FROM: `INTEGER'; scalar; INTENT(IN).

FROMPOS: `INTEGER'; scalar; INTENT(IN).

LEN: `INTEGER'; scalar; INTENT(IN).

TO: `INTEGER' with same `KIND=' value as for FROM; scalar;
INTENT(INOUT).

TOPOS: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Moves LEN bits from positions FROMPOS through `FROMPOS+LEN-1' of
FROM to positions TOPOS through `FROMPOS+LEN-1' of TO.  The portion of
argument TO not affected by the movement of bits is unchanged.
Arguments FROM and TO are permitted to be the same numeric storage
unit.  The values of `FROMPOS+LEN' and `TOPOS+LEN' must be less than or
equal to `BIT_SIZE(FROM)'.

File: g77.info,  Node: Nearest Intrinsic,  Next: NInt Intrinsic,  Prev: MvBits Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.197 Nearest Intrinsic
............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Nearest' to use this name for an
external procedure.

File: g77.info,  Node: NInt Intrinsic,  Next: Not Intrinsic,  Prev: Nearest Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.198 NInt Intrinsic
.........................


     NInt(A)

NInt: `INTEGER(KIND=1)' function.

A: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns A with the fractional portion of its magnitude eliminated by
rounding to the nearest whole number and with its sign preserved,
converted to type `INTEGER(KIND=1)'.

   If A is type `COMPLEX', its real part is rounded and converted.

   A fractional portion exactly equal to `.5' is rounded to the whole
number that is larger in magnitude.  (Also called "Fortran round".)

   *Note Int Intrinsic::, for how to convert, truncate to whole number.

   *Note ANInt Intrinsic::, for how to round to nearest whole number
without converting.

File: g77.info,  Node: Not Intrinsic,  Next: Or Intrinsic,  Prev: NInt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.199 Not Intrinsic
........................


     Not(I)

Not: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `mil', `f90', `vxt'.

Description:

   Returns value resulting from boolean NOT of each bit in I.

File: g77.info,  Node: Or Intrinsic,  Next: Pack Intrinsic,  Prev: Not Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.200 Or Intrinsic
.......................


     Or(I, J)

Or: `INTEGER' or `LOGICAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

I: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).

J: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Returns value resulting from boolean OR of pair of bits in each of I
and J.

File: g77.info,  Node: Pack Intrinsic,  Next: PError Intrinsic,  Prev: Or Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.201 Pack Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Pack' to use this name for an external
procedure.

File: g77.info,  Node: PError Intrinsic,  Next: Precision Intrinsic,  Prev: Pack Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.202 PError Intrinsic
...........................


     CALL PError(STRING)

STRING: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Prints (on the C `stderr' stream) a newline-terminated error message
corresponding to the last system error.  This is prefixed by STRING, a
colon and a space.  See `perror(3)'.

File: g77.info,  Node: Precision Intrinsic,  Next: Present Intrinsic,  Prev: PError Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.203 Precision Intrinsic
..............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Precision' to use this name for an
external procedure.

File: g77.info,  Node: Present Intrinsic,  Next: Product Intrinsic,  Prev: Precision Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.204 Present Intrinsic
............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Present' to use this name for an
external procedure.

File: g77.info,  Node: Product Intrinsic,  Next: Radix Intrinsic,  Prev: Present Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.205 Product Intrinsic
............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Product' to use this name for an
external procedure.

File: g77.info,  Node: Radix Intrinsic,  Next: Rand Intrinsic,  Prev: Product Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.206 Radix Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Radix' to use this name for an external
procedure.

File: g77.info,  Node: Rand Intrinsic,  Next: Random_Number Intrinsic,  Prev: Radix Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.207 Rand Intrinsic
.........................


     Rand(FLAG)

Rand: `REAL(KIND=1)' function.

FLAG: `INTEGER'; OPTIONAL; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns a uniform quasi-random number between 0 and 1.  If FLAG is
0, the next number in sequence is returned; if FLAG is 1, the generator
is restarted by calling `srand(0)'; if FLAG has any other value, it is
used as a new seed with `srand'.

   *Note SRand Intrinsic::.

   _Note:_ As typically implemented (by the routine of the same name in
the C library), this random number generator is a very poor one, though
the BSD and GNU libraries provide a much better implementation than the
`traditional' one.  On a different system you almost certainly want to
use something better.

File: g77.info,  Node: Random_Number Intrinsic,  Next: Random_Seed Intrinsic,  Prev: Rand Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.208 Random_Number Intrinsic
..................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Random_Number' to use this name for an
external procedure.

File: g77.info,  Node: Random_Seed Intrinsic,  Next: Range Intrinsic,  Prev: Random_Number Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.209 Random_Seed Intrinsic
................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Random_Seed' to use this name for an
external procedure.

File: g77.info,  Node: Range Intrinsic,  Next: Real Intrinsic,  Prev: Random_Seed Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.210 Range Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Range' to use this name for an external
procedure.

File: g77.info,  Node: Real Intrinsic,  Next: RealPart Intrinsic,  Prev: Range Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.211 Real Intrinsic
.........................


     Real(A)

Real: `REAL' function.  The exact type is `REAL(KIND=1)' when argument
A is any type other than `COMPLEX', or when it is `COMPLEX(KIND=1)'.
When A is any `COMPLEX' type other than `COMPLEX(KIND=1)', this
intrinsic is valid only when used as the argument to `REAL()', as
explained below.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Converts A to `REAL(KIND=1)'.

   Use of `REAL()' with a `COMPLEX' argument (other than
`COMPLEX(KIND=1)') is restricted to the following case:

     REAL(REAL(A))

This expression converts the real part of A to `REAL(KIND=1)'.

   *Note RealPart Intrinsic::, for information on a GNU Fortran
intrinsic that extracts the real part of an arbitrary `COMPLEX' value.

   *Note REAL() and AIMAG() of Complex::, for more information.

File: g77.info,  Node: RealPart Intrinsic,  Next: Rename Intrinsic (subroutine),  Prev: Real Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.212 RealPart Intrinsic
.............................


     RealPart(Z)

RealPart: `REAL' function, the `KIND=' value of the type being that of
argument Z.

Z: `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: `gnu'.

Description:

   The real part of Z is returned, without conversion.

   _Note:_ The way to do this in standard Fortran 90 is `REAL(Z)'.
However, when, for example, Z is `COMPLEX(KIND=2)', `REAL(Z)' means
something different for some compilers that are not true Fortran 90
compilers but offer some extensions standardized by Fortran 90 (such as
the `DOUBLE COMPLEX' type, also known as `COMPLEX(KIND=2)').

   The advantage of `REALPART()' is that, while not necessarily more or
less portable than `REAL()', it is more likely to cause a compiler that
doesn't support it to produce a diagnostic than generate incorrect code.

   *Note REAL() and AIMAG() of Complex::, for more information.

File: g77.info,  Node: Rename Intrinsic (subroutine),  Next: Repeat Intrinsic,  Prev: RealPart Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.213 Rename Intrinsic (subroutine)
........................................


     CALL Rename(PATH1, PATH2, STATUS)

PATH1: `CHARACTER'; scalar; INTENT(IN).

PATH2: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Renames the file PATH1 to PATH2.  A null character (`CHAR(0)') marks
the end of the names in PATH1 and PATH2--otherwise, trailing blanks in
PATH1 and PATH2 are ignored.  See `rename(2)'.  If the STATUS argument
is supplied, it contains 0 on success or a nonzero error code upon
return.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note Rename
Intrinsic (function)::.

File: g77.info,  Node: Repeat Intrinsic,  Next: Reshape Intrinsic,  Prev: Rename Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.214 Repeat Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Repeat' to use this name for an
external procedure.

File: g77.info,  Node: Reshape Intrinsic,  Next: RRSpacing Intrinsic,  Prev: Repeat Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.215 Reshape Intrinsic
............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Reshape' to use this name for an
external procedure.

File: g77.info,  Node: RRSpacing Intrinsic,  Next: RShift Intrinsic,  Prev: Reshape Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.216 RRSpacing Intrinsic
..............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL RRSpacing' to use this name for an
external procedure.

File: g77.info,  Node: RShift Intrinsic,  Next: Scale Intrinsic,  Prev: RRSpacing Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.217 RShift Intrinsic
...........................


     RShift(I, SHIFT)

RShift: `INTEGER' function, the `KIND=' value of the type being that of
argument I.

I: `INTEGER'; scalar; INTENT(IN).

SHIFT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Returns I shifted to the right SHIFT bits.

   Although similar to the expression `I/(2**SHIFT)', there are
important differences.  For example, the sign of the result is
undefined.

   Currently this intrinsic is defined assuming the underlying
representation of I is as a two's-complement integer.  It is unclear at
this point whether that definition will apply when a different
representation is involved.

   *Note RShift Intrinsic::, for the inverse of this function.

   *Note IShft Intrinsic::, for information on a more widely available
right-shifting intrinsic that is also more precisely defined.

File: g77.info,  Node: Scale Intrinsic,  Next: Scan Intrinsic,  Prev: RShift Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.218 Scale Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Scale' to use this name for an external
procedure.

File: g77.info,  Node: Scan Intrinsic,  Next: Second Intrinsic (function),  Prev: Scale Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.219 Scan Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Scan' to use this name for an external
procedure.

File: g77.info,  Node: Second Intrinsic (function),  Next: Second Intrinsic (subroutine),  Prev: Scan Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.220 Second Intrinsic (function)
......................................


     Second()

Second: `REAL(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the process's runtime in seconds--the same value as the UNIX
function `etime' returns.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

   For information on other intrinsics with the same name: *Note Second
Intrinsic (subroutine)::.

File: g77.info,  Node: Second Intrinsic (subroutine),  Next: Selected_Int_Kind Intrinsic,  Prev: Second Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.221 Second Intrinsic (subroutine)
........................................


     CALL Second(SECONDS)

SECONDS: `REAL'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Returns the process's runtime in seconds in SECONDS--the same value
as the UNIX function `etime' returns.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

   This routine is known from Cray Fortran.  *Note CPU_Time Intrinsic::,
for a standard equivalent.

   For information on other intrinsics with the same name: *Note Second
Intrinsic (function)::.

File: g77.info,  Node: Selected_Int_Kind Intrinsic,  Next: Selected_Real_Kind Intrinsic,  Prev: Second Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.222 Selected_Int_Kind Intrinsic
......................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Selected_Int_Kind' to use this name for
an external procedure.

File: g77.info,  Node: Selected_Real_Kind Intrinsic,  Next: Set_Exponent Intrinsic,  Prev: Selected_Int_Kind Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.223 Selected_Real_Kind Intrinsic
.......................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Selected_Real_Kind' to use this name
for an external procedure.

File: g77.info,  Node: Set_Exponent Intrinsic,  Next: Shape Intrinsic,  Prev: Selected_Real_Kind Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.224 Set_Exponent Intrinsic
.................................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Set_Exponent' to use this name for an
external procedure.

File: g77.info,  Node: Shape Intrinsic,  Next: Short Intrinsic,  Prev: Set_Exponent Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.225 Shape Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Shape' to use this name for an external
procedure.

File: g77.info,  Node: Short Intrinsic,  Next: Sign Intrinsic,  Prev: Shape Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.226 Short Intrinsic
..........................


     Short(A)

Short: `INTEGER(KIND=6)' function.

A: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns A with the fractional portion of its magnitude truncated and
its sign preserved, converted to type `INTEGER(KIND=6)'.

   If A is type `COMPLEX', its real part is truncated and converted,
and its imaginary part is disregarded.

   *Note Int Intrinsic::.

   The precise meaning of this intrinsic might change in a future
version of the GNU Fortran language, as more is learned about how it is
used.

File: g77.info,  Node: Sign Intrinsic,  Next: Signal Intrinsic (subroutine),  Prev: Short Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.227 Sign Intrinsic
.........................


     Sign(A, B)

Sign: `INTEGER' or `REAL' function, the exact type being the result of
cross-promoting the types of all the arguments.

A: `INTEGER' or `REAL'; scalar; INTENT(IN).

B: `INTEGER' or `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns `ABS(A)*S', where S is +1 if `B.GE.0', -1 otherwise.

   *Note Abs Intrinsic::, for the function that returns the magnitude
of a value.

File: g77.info,  Node: Signal Intrinsic (subroutine),  Next: Sin Intrinsic,  Prev: Sign Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.228 Signal Intrinsic (subroutine)
........................................


     CALL Signal(NUMBER, HANDLER, STATUS)

NUMBER: `INTEGER'; scalar; INTENT(IN).

HANDLER: Signal handler (`INTEGER FUNCTION' or `SUBROUTINE') or
dummy/global `INTEGER(KIND=1)' scalar.

STATUS: `INTEGER(KIND=7)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   If HANDLER is a an `EXTERNAL' routine, arranges for it to be invoked
with a single integer argument (of system-dependent length) when signal
NUMBER occurs.  If HANDLER is an integer, it can be used to turn off
handling of signal NUMBER or revert to its default action.  See
`signal(2)'.

   Note that HANDLER will be called using C conventions, so the value
of its argument in Fortran terms Fortran terms is obtained by applying
`%LOC()' (or `LOC()') to it.

   The value returned by `signal(2)' is written to STATUS, if that
argument is supplied.  Otherwise the return value is ignored.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   _Warning:_ Use of the `libf2c' run-time library function `signal_'
directly (such as via `EXTERNAL SIGNAL') requires use of the `%VAL()'
construct to pass an `INTEGER' value (such as `SIG_IGN' or `SIG_DFL')
for the HANDLER argument.

   However, while `CALL SIGNAL(SIGNUM, %VAL(SIG_IGN))' works when
`SIGNAL' is treated as an external procedure (and resolves, at link
time, to `libf2c''s `signal_' routine), this construct is not valid
when `SIGNAL' is recognized as the intrinsic of that name.

   Therefore, for maximum portability and reliability, code such
references to the `SIGNAL' facility as follows:

     INTRINSIC SIGNAL
     ...
     CALL SIGNAL(SIGNUM, SIG_IGN)

   `g77' will compile such a call correctly, while other compilers will
generally either do so as well or reject the `INTRINSIC SIGNAL'
statement via a diagnostic, allowing you to take appropriate action.

   For information on other intrinsics with the same name: *Note Signal
Intrinsic (function)::.

File: g77.info,  Node: Sin Intrinsic,  Next: SinH Intrinsic,  Prev: Signal Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.229 Sin Intrinsic
........................


     Sin(X)

Sin: `REAL' or `COMPLEX' function, the exact type being that of
argument X.

X: `REAL' or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the sine of X, an angle measured in radians.

   *Note ASin Intrinsic::, for the inverse of this function.

File: g77.info,  Node: SinH Intrinsic,  Next: Sleep Intrinsic,  Prev: Sin Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.230 SinH Intrinsic
.........................


     SinH(X)

SinH: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the hyperbolic sine of X.

File: g77.info,  Node: Sleep Intrinsic,  Next: Sngl Intrinsic,  Prev: SinH Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.231 Sleep Intrinsic
..........................


     CALL Sleep(SECONDS)

SECONDS: `INTEGER(KIND=1)'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Causes the process to pause for SECONDS seconds.  See `sleep(2)'.

File: g77.info,  Node: Sngl Intrinsic,  Next: Spacing Intrinsic,  Prev: Sleep Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.232 Sngl Intrinsic
.........................


     Sngl(A)

Sngl: `REAL(KIND=1)' function.

A: `REAL(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Archaic form of `REAL()' that is specific to one type for A.  *Note
Real Intrinsic::.

File: g77.info,  Node: Spacing Intrinsic,  Next: Spread Intrinsic,  Prev: Sngl Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.233 Spacing Intrinsic
............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Spacing' to use this name for an
external procedure.

File: g77.info,  Node: Spread Intrinsic,  Next: SqRt Intrinsic,  Prev: Spacing Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.234 Spread Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Spread' to use this name for an
external procedure.

File: g77.info,  Node: SqRt Intrinsic,  Next: SRand Intrinsic,  Prev: Spread Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.235 SqRt Intrinsic
.........................


     SqRt(X)

SqRt: `REAL' or `COMPLEX' function, the exact type being that of
argument X.

X: `REAL' or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the square root of X, which must not be negative.

   To calculate and represent the square root of a negative number,
complex arithmetic must be used.  For example, `SQRT(COMPLEX(X))'.

   The inverse of this function is `SQRT(X) * SQRT(X)'.

File: g77.info,  Node: SRand Intrinsic,  Next: Stat Intrinsic (subroutine),  Prev: SqRt Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.236 SRand Intrinsic
..........................


     CALL SRand(SEED)

SEED: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Reinitializes the generator with the seed in SEED.  *Note IRand
Intrinsic::.  *Note Rand Intrinsic::.

File: g77.info,  Node: Stat Intrinsic (subroutine),  Next: Stat Intrinsic (function),  Prev: SRand Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.237 Stat Intrinsic (subroutine)
......................................


     CALL Stat(FILE, SARRAY, STATUS)

FILE: `CHARACTER'; scalar; INTENT(IN).

SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Obtains data about the given file FILE and places them in the array
SARRAY.  A null character (`CHAR(0)') marks the end of the name in
FILE--otherwise, trailing blanks in FILE are ignored.  The values in
this array are extracted from the `stat' structure as returned by
`fstat(2)' q.v., as follows:

  1. Device ID

  2. Inode number

  3. File mode

  4. Number of links

  5. Owner's uid

  6. Owner's gid

  7. ID of device containing directory entry for file (0 if not
     available)

  8. File size (bytes)

  9. Last access time

 10. Last modification time

 11. Last file status change time

 12. Preferred I/O block size (-1 if not available)

 13. Number of blocks allocated (-1 if not available)

   Not all these elements are relevant on all systems.  If an element
is not relevant, it is returned as 0.

   If the STATUS argument is supplied, it contains 0 on success or a
nonzero error code upon return.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note Stat
Intrinsic (function)::.

File: g77.info,  Node: Stat Intrinsic (function),  Next: Sum Intrinsic,  Prev: Stat Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.238 Stat Intrinsic (function)
....................................


     Stat(FILE, SARRAY)

Stat: `INTEGER(KIND=1)' function.

FILE: `CHARACTER'; scalar; INTENT(IN).

SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Obtains data about the given file FILE and places them in the array
SARRAY.  A null character (`CHAR(0)') marks the end of the name in
FILE--otherwise, trailing blanks in FILE are ignored.  The values in
this array are extracted from the `stat' structure as returned by
`fstat(2)' q.v., as follows:

  1. Device ID

  2. Inode number

  3. File mode

  4. Number of links

  5. Owner's uid

  6. Owner's gid

  7. ID of device containing directory entry for file (0 if not
     available)

  8. File size (bytes)

  9. Last access time

 10. Last modification time

 11. Last file status change time

 12. Preferred I/O block size (-1 if not available)

 13. Number of blocks allocated (-1 if not available)

   Not all these elements are relevant on all systems.  If an element
is not relevant, it is returned as 0.

   Returns 0 on success or a nonzero error code.

   For information on other intrinsics with the same name: *Note Stat
Intrinsic (subroutine)::.

File: g77.info,  Node: Sum Intrinsic,  Next: SymLnk Intrinsic (subroutine),  Prev: Stat Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.239 Sum Intrinsic
........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Sum' to use this name for an external
procedure.

File: g77.info,  Node: SymLnk Intrinsic (subroutine),  Next: System Intrinsic (subroutine),  Prev: Sum Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.240 SymLnk Intrinsic (subroutine)
........................................


     CALL SymLnk(PATH1, PATH2, STATUS)

PATH1: `CHARACTER'; scalar; INTENT(IN).

PATH2: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Makes a symbolic link from file PATH1 to PATH2.  A null character
(`CHAR(0)') marks the end of the names in PATH1 and PATH2--otherwise,
trailing blanks in PATH1 and PATH2 are ignored.  If the STATUS argument
is supplied, it contains 0 on success or a nonzero error code upon
return (`ENOSYS' if the system does not provide `symlink(2)').

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note SymLnk
Intrinsic (function)::.

File: g77.info,  Node: System Intrinsic (subroutine),  Next: System_Clock Intrinsic,  Prev: SymLnk Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.241 System Intrinsic (subroutine)
........................................


     CALL System(COMMAND, STATUS)

COMMAND: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Passes the command COMMAND to a shell (see `system(3)').  If
argument STATUS is present, it contains the value returned by
`system(3)', presumably 0 if the shell command succeeded.  Note that
which shell is used to invoke the command is system-dependent and
environment-dependent.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note System
Intrinsic (function)::.

File: g77.info,  Node: System_Clock Intrinsic,  Next: Tan Intrinsic,  Prev: System Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.242 System_Clock Intrinsic
.................................


     CALL System_Clock(COUNT, RATE, MAX)

COUNT: `INTEGER(KIND=1)'; scalar; INTENT(OUT).

RATE: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

MAX: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `f90'.

Description:

   Returns in COUNT the current value of the system clock; this is the
value returned by the UNIX function `times(2)' in this implementation,
but isn't in general.  RATE is the number of clock ticks per second and
MAX is the maximum value this can take, which isn't very useful in this
implementation since it's just the maximum C `unsigned int' value.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

File: g77.info,  Node: Tan Intrinsic,  Next: TanH Intrinsic,  Prev: System_Clock Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.243 Tan Intrinsic
........................


     Tan(X)

Tan: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the tangent of X, an angle measured in radians.

   *Note ATan Intrinsic::, for the inverse of this function.

File: g77.info,  Node: TanH Intrinsic,  Next: Time Intrinsic (UNIX),  Prev: Tan Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.244 TanH Intrinsic
.........................


     TanH(X)

TanH: `REAL' function, the `KIND=' value of the type being that of
argument X.

X: `REAL'; scalar; INTENT(IN).

Intrinsic groups: (standard FORTRAN 77).

Description:

   Returns the hyperbolic tangent of X.

File: g77.info,  Node: Time Intrinsic (UNIX),  Next: Time8 Intrinsic,  Prev: TanH Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.245 Time Intrinsic (UNIX)
................................


     Time()

Time: `INTEGER(KIND=1)' function.

Intrinsic groups: `unix'.

Description:

   Returns the current time encoded as an integer (in the manner of the
UNIX function `time(3)').  This value is suitable for passing to
`CTIME', `GMTIME', and `LTIME'.

   This intrinsic is not fully portable, such as to systems with 32-bit
`INTEGER' types but supporting times wider than 32 bits.  Therefore,
the values returned by this intrinsic might be, or become, negative, or
numerically less than previous values, during a single run of the
compiled program.

   *Note Time8 Intrinsic::, for information on a similar intrinsic that
might be portable to more GNU Fortran implementations, though to fewer
Fortran compilers.

   For information on other intrinsics with the same name: *Note Time
Intrinsic (VXT)::.

File: g77.info,  Node: Time8 Intrinsic,  Next: Tiny Intrinsic,  Prev: Time Intrinsic (UNIX),  Up: Table of Intrinsic Functions

8.11.9.246 Time8 Intrinsic
..........................


     Time8()

Time8: `INTEGER(KIND=2)' function.

Intrinsic groups: `unix'.

Description:

   Returns the current time encoded as a long integer (in the manner of
the UNIX function `time(3)').  This value is suitable for passing to
`CTIME', `GMTIME', and `LTIME'.

   _Warning:_ this intrinsic does not increase the range of the timing
values over that returned by `time(3)'.  On a system with a 32-bit
`time(3)', `TIME8' will return a 32-bit value, even though converted to
an `INTEGER(KIND=2)' value.  That means overflows of the 32-bit value
can still occur.  Therefore, the values returned by this intrinsic
might be, or become, negative, or numerically less than previous values,
during a single run of the compiled program.

   No Fortran implementations other than GNU Fortran are known to
support this intrinsic at the time of this writing.  *Note Time
Intrinsic (UNIX)::, for information on a similar intrinsic that might
be portable to more Fortran compilers, though to fewer GNU Fortran
implementations.

File: g77.info,  Node: Tiny Intrinsic,  Next: Transfer Intrinsic,  Prev: Time8 Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.247 Tiny Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Tiny' to use this name for an external
procedure.

File: g77.info,  Node: Transfer Intrinsic,  Next: Transpose Intrinsic,  Prev: Tiny Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.248 Transfer Intrinsic
.............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Transfer' to use this name for an
external procedure.

File: g77.info,  Node: Transpose Intrinsic,  Next: Trim Intrinsic,  Prev: Transfer Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.249 Transpose Intrinsic
..............................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Transpose' to use this name for an
external procedure.

File: g77.info,  Node: Trim Intrinsic,  Next: TtyNam Intrinsic (subroutine),  Prev: Transpose Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.250 Trim Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Trim' to use this name for an external
procedure.

File: g77.info,  Node: TtyNam Intrinsic (subroutine),  Next: TtyNam Intrinsic (function),  Prev: Trim Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.251 TtyNam Intrinsic (subroutine)
........................................


     CALL TtyNam(UNIT, NAME)

UNIT: `INTEGER'; scalar; INTENT(IN).

NAME: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sets NAME to the name of the terminal device open on logical unit
UNIT or to a blank string if UNIT is not connected to a terminal.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note TtyNam
Intrinsic (function)::.

File: g77.info,  Node: TtyNam Intrinsic (function),  Next: UBound Intrinsic,  Prev: TtyNam Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.252 TtyNam Intrinsic (function)
......................................


     TtyNam(UNIT)

TtyNam: `CHARACTER*(*)' function.

UNIT: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `unix'.

Description:

   Returns the name of the terminal device open on logical unit UNIT or
a blank string if UNIT is not connected to a terminal.

   For information on other intrinsics with the same name: *Note TtyNam
Intrinsic (subroutine)::.

File: g77.info,  Node: UBound Intrinsic,  Next: UMask Intrinsic (subroutine),  Prev: TtyNam Intrinsic (function),  Up: Table of Intrinsic Functions

8.11.9.253 UBound Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL UBound' to use this name for an
external procedure.

File: g77.info,  Node: UMask Intrinsic (subroutine),  Next: Unlink Intrinsic (subroutine),  Prev: UBound Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.254 UMask Intrinsic (subroutine)
.......................................


     CALL UMask(MASK, OLD)

MASK: `INTEGER'; scalar; INTENT(IN).

OLD: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Sets the file creation mask to MASK and returns the old value in
argument OLD if it is supplied.  See `umask(2)'.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.

   For information on other intrinsics with the same name: *Note UMask
Intrinsic (function)::.

File: g77.info,  Node: Unlink Intrinsic (subroutine),  Next: Unpack Intrinsic,  Prev: UMask Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.255 Unlink Intrinsic (subroutine)
........................................


     CALL Unlink(FILE, STATUS)

FILE: `CHARACTER'; scalar; INTENT(IN).

STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).

Intrinsic groups: `unix'.

Description:

   Unlink the file FILE.  A null character (`CHAR(0)') marks the end of
the name in FILE--otherwise, trailing blanks in FILE are ignored.  If
the STATUS argument is supplied, it contains 0 on success or a nonzero
error code upon return.  See `unlink(2)'.

   Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the (optional)
STATUS argument.

   For information on other intrinsics with the same name: *Note Unlink
Intrinsic (function)::.

File: g77.info,  Node: Unpack Intrinsic,  Next: Verify Intrinsic,  Prev: Unlink Intrinsic (subroutine),  Up: Table of Intrinsic Functions

8.11.9.256 Unpack Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Unpack' to use this name for an
external procedure.

File: g77.info,  Node: Verify Intrinsic,  Next: XOr Intrinsic,  Prev: Unpack Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.257 Verify Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL Verify' to use this name for an
external procedure.

File: g77.info,  Node: XOr Intrinsic,  Next: ZAbs Intrinsic,  Prev: Verify Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.258 XOr Intrinsic
........................


     XOr(I, J)

XOr: `INTEGER' or `LOGICAL' function, the exact type being the result
of cross-promoting the types of all the arguments.

I: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).

J: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Returns value resulting from boolean exclusive-OR of pair of bits in
each of I and J.

File: g77.info,  Node: ZAbs Intrinsic,  Next: ZCos Intrinsic,  Prev: XOr Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.259 ZAbs Intrinsic
.........................


     ZAbs(A)

ZAbs: `REAL(KIND=2)' function.

A: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Archaic form of `ABS()' that is specific to one type for A.  *Note
Abs Intrinsic::.

File: g77.info,  Node: ZCos Intrinsic,  Next: ZExp Intrinsic,  Prev: ZAbs Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.260 ZCos Intrinsic
.........................


     ZCos(X)

ZCos: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Archaic form of `COS()' that is specific to one type for X.  *Note
Cos Intrinsic::.

File: g77.info,  Node: ZExp Intrinsic,  Next: ZLog Intrinsic,  Prev: ZCos Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.261 ZExp Intrinsic
.........................


     ZExp(X)

ZExp: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Archaic form of `EXP()' that is specific to one type for X.  *Note
Exp Intrinsic::.

File: g77.info,  Node: ZLog Intrinsic,  Next: ZSin Intrinsic,  Prev: ZExp Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.262 ZLog Intrinsic
.........................


     ZLog(X)

ZLog: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Archaic form of `LOG()' that is specific to one type for X.  *Note
Log Intrinsic::.

File: g77.info,  Node: ZSin Intrinsic,  Next: ZSqRt Intrinsic,  Prev: ZLog Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.263 ZSin Intrinsic
.........................


     ZSin(X)

ZSin: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Archaic form of `SIN()' that is specific to one type for X.  *Note
Sin Intrinsic::.

File: g77.info,  Node: ZSqRt Intrinsic,  Prev: ZSin Intrinsic,  Up: Table of Intrinsic Functions

8.11.9.264 ZSqRt Intrinsic
..........................


     ZSqRt(X)

ZSqRt: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c'.

Description:

   Archaic form of `SQRT()' that is specific to one type for X.  *Note
SqRt Intrinsic::.

File: g77.info,  Node: Scope and Classes of Names,  Next: I/O,  Prev: Functions and Subroutines,  Up: Language

8.12 Scope and Classes of Symbolic Names
========================================

(The following information augments or overrides the information in
Chapter 18 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
language.  Chapter 18 of that document otherwise serves as the basis
for the relevant aspects of GNU Fortran.)

* Menu:

* Underscores in Symbol Names::

File: g77.info,  Node: Underscores in Symbol Names,  Up: Scope and Classes of Names

8.12.1 Underscores in Symbol Names
----------------------------------

Underscores (`_') are accepted in symbol names after the first
character (which must be a letter).

File: g77.info,  Node: I/O,  Next: Fortran 90 Features,  Prev: Scope and Classes of Names,  Up: Language

8.13 I/O
========

A dollar sign at the end of an output format specification suppresses
the newline at the end of the output.

   Edit descriptors in `FORMAT' statements may contain compile-time
`INTEGER' constant expressions in angle brackets, such as
     10    FORMAT (I<WIDTH>)

   The `OPEN' specifier `NAME=' is equivalent to `FILE='.

   These Fortran 90 features are supported:
   * The `O' and `Z' edit descriptors are supported for I/O of integers
     in octal and hexadecimal formats, respectively.

   * The `FILE=' specifier may be omitted in an `OPEN' statement if
     `STATUS='SCRATCH'' is supplied.  The `STATUS='REPLACE'' specifier
     is supported.

File: g77.info,  Node: Fortran 90 Features,  Prev: I/O,  Up: Language

8.14 Fortran 90 Features
========================

For convenience this section collects a list (probably incomplete) of
the Fortran 90 features supported by the GNU Fortran language, even if
they are documented elsewhere.  *Note Characters, Lines, and Execution
Sequence: Characters Lines Sequence, for information on additional
fixed source form lexical issues.  Further, the free source form is
supported through the `-ffree-form' option.  Other Fortran 90 features
can be turned on by the `-ff90' option; see *Note Fortran 90::.  For
information on the Fortran 90 intrinsics available, see *Note Table of
Intrinsic Functions::.

Automatic arrays in procedures

Character assignments
     In character assignments, the variable being assigned may occur on
     the right hand side of the assignment.

Character strings
     Strings may have zero length and substrings of character constants
     are permitted.  Character constants may be enclosed in double
     quotes (`"') as well as single quotes.  *Note Character Type::.

Construct names
     (Symbolic tags on blocks.)  *Note Construct Names::.

`CYCLE' and `EXIT'
     *Note The `CYCLE' and `EXIT' Statements: CYCLE and EXIT.

`DOUBLE COMPLEX'
     *Note `DOUBLE COMPLEX' Statement: DOUBLE COMPLEX.

`DO WHILE'
     *Note DO WHILE::.

`END' decoration
     *Note Statements::.

`END DO'
     *Note END DO::.

`KIND'

`IMPLICIT NONE'

`INCLUDE' statements
     *Note INCLUDE::.

List-directed and namelist I/O on internal files

Binary, octal and hexadecimal constants
     These are supported more generally than required by Fortran 90.
     *Note Integer Type::.

`O' and `Z' edit descriptors

`NAMELIST'
     *Note NAMELIST::.

`OPEN' specifiers
     `STATUS='REPLACE'' is supported.  The `FILE=' specifier may be
     omitted in an `OPEN' statement if `STATUS='SCRATCH'' is supplied.

`FORMAT' edit descriptors
     The `Z' edit descriptor is supported.

Relational operators
     The operators `<', `<=', `==', `/=', `>' and `>=' may be used
     instead of `.LT.', `.LE.', `.EQ.', `.NE.', `.GT.' and `.GE.'
     respectively.

`SELECT CASE'
     Not fully implemented.  *Note `SELECT CASE' on `CHARACTER' Type:
     SELECT CASE on CHARACTER Type.

Specification statements
     A limited subset of the Fortran 90 syntax and semantics for
     variable declarations is supported, including `KIND'.  *Note Kind
     Notation::.  (`KIND' is of limited usefulness in the absence of the
     `KIND'-related intrinsics, since these intrinsics permit writing
     more widely portable code.)  An example of supported `KIND' usage
     is:
          INTEGER (KIND=1) :: FOO=1, BAR=2
          CHARACTER (LEN=3) FOO
     `PARAMETER' and `DIMENSION' attributes aren't supported.

File: g77.info,  Node: Compiler,  Next: Other Dialects,  Prev: Language,  Up: Top

10 The GNU Fortran Compiler
***************************

The GNU Fortran compiler, `g77', supports programs written in the GNU
Fortran language and in some other dialects of Fortran.

   Some aspects of how `g77' works are universal regardless of dialect,
and yet are not properly part of the GNU Fortran language itself.
These are described below.

   _Note: This portion of the documentation definitely needs a lot of
work!_

* Menu:

* Compiler Limits::
* Run-time Environment Limits::
* Compiler Types::
* Compiler Constants::
* Compiler Intrinsics::

File: g77.info,  Node: Compiler Limits,  Next: Run-time Environment Limits,  Up: Compiler

10.1 Compiler Limits
====================

`g77', as with GNU tools in general, imposes few arbitrary restrictions
on lengths of identifiers, number of continuation lines, number of
external symbols in a program, and so on.

   For example, some other Fortran compiler have an option (such as
`-NlX') to increase the limit on the number of continuation lines.
Also, some Fortran compilation systems have an option (such as `-NxX')
to increase the limit on the number of external symbols.

   `g77', `gcc', and GNU `ld' (the GNU linker) have no equivalent
options, since they do not impose arbitrary limits in these areas.

   `g77' does currently limit the number of dimensions in an array to
the same degree as do the Fortran standards--seven (7).  This
restriction might be lifted in a future version.

File: g77.info,  Node: Run-time Environment Limits,  Next: Compiler Types,  Prev: Compiler Limits,  Up: Compiler

10.2 Run-time Environment Limits
================================

As a portable Fortran implementation, `g77' offers its users direct
access to, and otherwise depends upon, the underlying facilities of the
system used to build `g77', the system on which `g77' itself is used to
compile programs, and the system on which the `g77'-compiled program is
actually run.  (For most users, the three systems are of the same
type--combination of operating environment and hardware--often the same
physical system.)

   The run-time environment for a particular system inevitably imposes
some limits on a program's use of various system facilities.  These
limits vary from system to system.

   Even when such limits might be well beyond the possibility of being
encountered on a particular system, the `g77' run-time environment has
certain built-in limits, usually, but not always, stemming from
intrinsics with inherently limited interfaces.

   Currently, the `g77' run-time environment does not generally offer a
less-limiting environment by augmenting the underlying system's own
environment.

   Therefore, code written in the GNU Fortran language, while
syntactically and semantically portable, might nevertheless make
non-portable assumptions about the run-time environment--assumptions
that prove to be false for some particular environments.

   The GNU Fortran language, the `g77' compiler and run-time
environment, and the `g77' documentation do not yet offer comprehensive
portable work-arounds for such limits, though programmers should be
able to find their own in specific instances.

   Not all of the limitations are described in this document.  Some of
the known limitations include:

* Menu:

* Timer Wraparounds::
* Year 2000 (Y2K) Problems::
* Array Size::
* Character-variable Length::
* Year 10000 (Y10K) Problems::

File: g77.info,  Node: Timer Wraparounds,  Next: Year 2000 (Y2K) Problems,  Up: Run-time Environment Limits

10.2.1 Timer Wraparounds
------------------------

Intrinsics that return values computed from system timers, whether
elapsed (wall-clock) timers, process CPU timers, or other kinds of
timers, are prone to experiencing wrap-around errors (or returning
wrapped-around values from successive calls) due to insufficient ranges
offered by the underlying system's timers.

   Some of the symptoms of such behaviors include apparently negative
time being computed for a duration, an extremely short amount of time
being computed for a long duration, and an extremely long amount of
time being computed for a short duration.

   See the following for intrinsics known to have potential problems in
these areas on at least some systems: *Note CPU_Time Intrinsic::, *Note
DTime Intrinsic (function)::, *Note DTime Intrinsic (subroutine)::,
*Note ETime Intrinsic (function)::, *Note ETime Intrinsic
(subroutine)::, *Note MClock Intrinsic::, *Note MClock8 Intrinsic::,
*Note Secnds Intrinsic::, *Note Second Intrinsic (function)::, *Note
Second Intrinsic (subroutine)::, *Note System_Clock Intrinsic::, *Note
Time Intrinsic (UNIX)::, *Note Time Intrinsic (VXT)::, *Note Time8
Intrinsic::.

File: g77.info,  Node: Year 2000 (Y2K) Problems,  Next: Array Size,  Prev: Timer Wraparounds,  Up: Run-time Environment Limits

10.2.2 Year 2000 (Y2K) Problems
-------------------------------

While the `g77' compiler itself is believed to be Year-2000 (Y2K)
compliant, some intrinsics are not, and, potentially, some underlying
systems are not, perhaps rendering some Y2K-compliant intrinsics
non-compliant when used on those particular systems.

   Fortran code that uses non-Y2K-compliant intrinsics (listed below)
is, itself, almost certainly not compliant, and should be modified to
use Y2K-compliant intrinsics instead.

   Fortran code that uses no non-Y2K-compliant intrinsics, but which
currently is running on a non-Y2K-compliant system, can be made more
Y2K compliant by compiling and linking it for use on a new
Y2K-compliant system, such as a new version of an old,
non-Y2K-compliant, system.

   Currently, information on Y2K and related issues is being maintained
at `http://www.gnu.org/software/year2000-list.html'.

   See the following for intrinsics known to have potential problems in
these areas on at least some systems: *Note Date Intrinsic::, *Note
IDate Intrinsic (VXT)::.

   The `libg2c' library shipped with any `g77' that warns about
invocation of a non-Y2K-compliant intrinsic has renamed the `EXTERNAL'
procedure names of those intrinsics.  This is done so that the `libg2c'
implementations of these intrinsics cannot be directly linked to as
`EXTERNAL' names (which normally would avoid the non-Y2K-intrinsic
warning).

   The renamed forms of the `EXTERNAL' names of these renamed procedures
may be linked to by appending the string `_y2kbug' to the name of the
procedure in the source code.  For example:

     CHARACTER*20 STR
     INTEGER YY, MM, DD
     EXTERNAL DATE_Y2KBUG, VXTIDATE_Y2KBUG
     CALL DATE_Y2KBUG (STR)
     CALL VXTIDATE_Y2KBUG (MM, DD, YY)

   (Note that the `EXTERNAL' statement is not actually required, since
the modified names are not recognized as intrinsics by the current
version of `g77'.  But it is shown in this specific case, for purposes
of illustration.)

   The renaming of `EXTERNAL' procedure names of these intrinsics
causes unresolved references at link time.  For example, `EXTERNAL
DATE; CALL DATE(STR)' is normally compiled by `g77' as, in C,
`date_(&str, 20);'.  This, in turn, links to the `date_' procedure in
the `libE77' portion of `libg2c', which purposely calls a nonexistent
procedure named `G77_date_y2kbuggy_0'.  The resulting link-time error
is designed, via this name, to encourage the programmer to look up the
index entries to this portion of the `g77' documentation.

   Generally, we recommend that the `EXTERNAL' method of invoking
procedures in `libg2c' _not_ be used.  When used, some of the
correctness checking normally performed by `g77' is skipped.

   In particular, it is probably better to use the `INTRINSIC' method
of invoking non-Y2K-compliant procedures, so anyone compiling the code
can quickly notice the potential Y2K problems (via the warnings
printing by `g77') without having to even look at the code itself.

   If there are problems linking `libg2c' to code compiled by `g77'
that involve the string `y2kbug', and these are not explained above,
that probably indicates that a version of `libg2c' older than `g77' is
being linked to, or that the new library is being linked to code
compiled by an older version of `g77'.

   That's because, as of the version that warns about non-Y2K-compliant
intrinsic invocation, `g77' references the `libg2c' implementations of
those intrinsics using new names, containing the string `y2kbug'.

   So, linking newly-compiled code (invoking one of the intrinsics in
question) to an old library might yield an unresolved reference to
`G77_date_y2kbug_0'.  (The old library calls it `G77_date_0'.)

   Similarly, linking previously-compiled code to a new library might
yield an unresolved reference to `G77_vxtidate_0'.  (The new library
calls it `G77_vxtidate_y2kbug_0'.)

   The proper fix for the above problems is to obtain the latest
release of `g77' and related products (including `libg2c') and install
them on all systems, then recompile, relink, and install (as
appropriate) all existing Fortran programs.

   (Normally, this sort of renaming is steadfastly avoided.  In this
case, however, it seems more important to highlight potential Y2K
problems than to ease the transition of potentially non-Y2K-compliant
code to new versions of `g77' and `libg2c'.)

File: g77.info,  Node: Array Size,  Next: Character-variable Length,  Prev: Year 2000 (Y2K) Problems,  Up: Run-time Environment Limits

10.2.3 Array Size
-----------------

Currently, `g77' uses the default `INTEGER' type for array indexes,
which limits the sizes of single-dimension arrays on systems offering a
larger address space than can be addressed by that type.  (That `g77'
puts all arrays in memory could be considered another limitation--it
could use large temporary files--but that decision is left to the
programmer as an implementation choice by most Fortran implementations.)

   It is not yet clear whether this limitation never, sometimes, or
always applies to the sizes of multiple-dimension arrays as a whole.

   For example, on a system with 64-bit addresses and 32-bit default
`INTEGER', an array with a size greater than can be addressed by a
32-bit offset can be declared using multiple dimensions.  Such an array
is therefore larger than a single-dimension array can be, on the same
system.

   Whether large multiple-dimension arrays are reliably supported
depends mostly on the `gcc' back end (code generator) used by `g77',
and has not yet been fully investigated.

File: g77.info,  Node: Character-variable Length,  Next: Year 10000 (Y10K) Problems,  Prev: Array Size,  Up: Run-time Environment Limits

10.2.4 Character-variable Length
--------------------------------

Currently, `g77' uses the default `INTEGER' type for the lengths of
`CHARACTER' variables and array elements.

   This means that, for example, a system with a 64-bit address space
and a 32-bit default `INTEGER' type does not, under `g77', support a
`CHARACTER*N' declaration where N is greater than 2147483647.

File: g77.info,  Node: Year 10000 (Y10K) Problems,  Prev: Character-variable Length,  Up: Run-time Environment Limits

10.2.5 Year 10000 (Y10K) Problems
---------------------------------

Most intrinsics returning, or computing values based on, date
information are prone to Year-10000 (Y10K) problems, due to supporting
only 4 digits for the year.

   See the following for examples: *Note FDate Intrinsic (function)::,
*Note FDate Intrinsic (subroutine)::, *Note IDate Intrinsic (UNIX)::,
*Note Time Intrinsic (VXT)::, *Note Date_and_Time Intrinsic::.

File: g77.info,  Node: Compiler Types,  Next: Compiler Constants,  Prev: Run-time Environment Limits,  Up: Compiler

10.3 Compiler Types
===================

Fortran implementations have a fair amount of freedom given them by the
standard as far as how much storage space is used and how much precision
and range is offered by the various types such as `LOGICAL(KIND=1)',
`INTEGER(KIND=1)', `REAL(KIND=1)', `REAL(KIND=2)', `COMPLEX(KIND=1)',
and `CHARACTER'.  Further, many compilers offer so-called `*N'
notation, but the interpretation of N varies across compilers and
target architectures.

   The standard requires that `LOGICAL(KIND=1)', `INTEGER(KIND=1)', and
`REAL(KIND=1)' occupy the same amount of storage space, and that
`COMPLEX(KIND=1)' and `REAL(KIND=2)' take twice as much storage space
as `REAL(KIND=1)'.  Further, it requires that `COMPLEX(KIND=1)'
entities be ordered such that when a `COMPLEX(KIND=1)' variable is
storage-associated (such as via `EQUIVALENCE') with a two-element
`REAL(KIND=1)' array named `R', `R(1)' corresponds to the real element
and `R(2)' to the imaginary element of the `COMPLEX(KIND=1)' variable.

   (Few requirements as to precision or ranges of any of these are
placed on the implementation, nor is the relationship of storage sizes
of these types to the `CHARACTER' type specified, by the standard.)

   `g77' follows the above requirements, warning when compiling a
program requires placement of items in memory that contradict the
requirements of the target architecture.  (For example, a program can
require placement of a `REAL(KIND=2)' on a boundary that is not an even
multiple of its size, but still an even multiple of the size of a
`REAL(KIND=1)' variable.  On some target architectures, using the
canonical mapping of Fortran types to underlying architectural types,
such placement is prohibited by the machine definition or the
Application Binary Interface (ABI) in force for the configuration
defined for building `gcc' and `g77'.  `g77' warns about such
situations when it encounters them.)

   `g77' follows consistent rules for configuring the mapping between
Fortran types, including the `*N' notation, and the underlying
architectural types as accessed by a similarly-configured applicable
version of the `gcc' compiler.  These rules offer a widely portable,
consistent Fortran/C environment, although they might well conflict
with the expectations of users of Fortran compilers designed and
written for particular architectures.

   These rules are based on the configuration that is in force for the
version of `gcc' built in the same release as `g77' (and which was
therefore used to build both the `g77' compiler components and the
`libg2c' run-time library):

`REAL(KIND=1)'
     Same as `float' type.

`REAL(KIND=2)'
     Same as whatever floating-point type that is twice the size of a
     `float'--usually, this is a `double'.

`INTEGER(KIND=1)'
     Same as an integral type that is occupies the same amount of
     memory storage as `float'--usually, this is either an `int' or a
     `long int'.

`LOGICAL(KIND=1)'
     Same `gcc' type as `INTEGER(KIND=1)'.

`INTEGER(KIND=2)'
     Twice the size, and usually nearly twice the range, as
     `INTEGER(KIND=1)'--usually, this is either a `long int' or a `long
     long int'.

`LOGICAL(KIND=2)'
     Same `gcc' type as `INTEGER(KIND=2)'.

`INTEGER(KIND=3)'
     Same `gcc' type as signed `char'.

`LOGICAL(KIND=3)'
     Same `gcc' type as `INTEGER(KIND=3)'.

`INTEGER(KIND=6)'
     Twice the size, and usually nearly twice the range, as
     `INTEGER(KIND=3)'--usually, this is a `short'.

`LOGICAL(KIND=6)'
     Same `gcc' type as `INTEGER(KIND=6)'.

`COMPLEX(KIND=1)'
     Two `REAL(KIND=1)' scalars (one for the real part followed by one
     for the imaginary part).

`COMPLEX(KIND=2)'
     Two `REAL(KIND=2)' scalars.

`NUMERIC-TYPE*N'
     (Where NUMERIC-TYPE is any type other than `CHARACTER'.)  Same as
     whatever `gcc' type occupies N times the storage space of a `gcc'
     `char' item.

`DOUBLE PRECISION'
     Same as `REAL(KIND=2)'.

`DOUBLE COMPLEX'
     Same as `COMPLEX(KIND=2)'.

   Note that the above are proposed correspondences and might change in
future versions of `g77'--avoid writing code depending on them.

   Other types supported by `g77' are derived from gcc types such as
`char', `short', `int', `long int', `long long int', `long double', and
so on.  That is, whatever types `gcc' already supports, `g77' supports
now or probably will support in a future version.  The rules for the
`NUMERIC-TYPE*N' notation apply to these types, and new values for
`NUMERIC-TYPE(KIND=N)' will be assigned in a way that encourages
clarity, consistency, and portability.

File: g77.info,  Node: Compiler Constants,  Next: Compiler Intrinsics,  Prev: Compiler Types,  Up: Compiler

10.4 Compiler Constants
=======================

`g77' strictly assigns types to _all_ constants not documented as
"typeless" (typeless constants including `'1'Z', for example).  Many
other Fortran compilers attempt to assign types to typed constants
based on their context.  This results in hard-to-find bugs, nonportable
code, and is not in the spirit (though it strictly follows the letter)
of the 77 and 90 standards.

   `g77' might offer, in a future release, explicit constructs by which
a wider variety of typeless constants may be specified, and/or
user-requested warnings indicating places where `g77' might differ from
how other compilers assign types to constants.

   *Note Context-Sensitive Constants::, for more information on this
issue.

File: g77.info,  Node: Compiler Intrinsics,  Prev: Compiler Constants,  Up: Compiler

10.5 Compiler Intrinsics
========================

`g77' offers an ever-widening set of intrinsics.  Currently these all
are procedures (functions and subroutines).

   Some of these intrinsics are unimplemented, but their names reserved
to reduce future problems with existing code as they are implemented.
Others are implemented as part of the GNU Fortran language, while yet
others are provided for compatibility with other dialects of Fortran
but are not part of the GNU Fortran language.

   To manage these distinctions, `g77' provides intrinsic _groups_, a
facility that is simply an extension of the intrinsic groups provided
by the GNU Fortran language.

* Menu:

* Intrinsic Groups::  How intrinsics are grouped for easy management.
* Other Intrinsics::  Intrinsics other than those in the GNU
                       Fortran language.

File: g77.info,  Node: Intrinsic Groups,  Next: Other Intrinsics,  Up: Compiler Intrinsics

10.5.1 Intrinsic Groups
-----------------------

A given specific intrinsic belongs in one or more groups.  Each group
is deleted, disabled, hidden, or enabled by default or a command-line
option.  The meaning of each term follows.

Deleted
     No intrinsics are recognized as belonging to that group.

Disabled
     Intrinsics are recognized as belonging to the group, but
     references to them (other than via the `INTRINSIC' statement) are
     disallowed through that group.

Hidden
     Intrinsics in that group are recognized and enabled (if
     implemented) _only_ if the first mention of the actual name of an
     intrinsic in a program unit is in an `INTRINSIC' statement.

Enabled
     Intrinsics in that group are recognized and enabled (if
     implemented).

   The distinction between deleting and disabling a group is illustrated
by the following example.  Assume intrinsic `FOO' belongs only to group
`FGR'.  If group `FGR' is deleted, the following program unit will
successfully compile, because `FOO()' will be seen as a reference to an
external function named `FOO':

     PRINT *, FOO()
     END

If group `FGR' is disabled, compiling the above program will produce
diagnostics, either because the `FOO' intrinsic is improperly invoked
or, if properly invoked, it is not enabled.  To change the above
program so it references an external function `FOO' instead of the
disabled `FOO' intrinsic, add the following line to the top:

     EXTERNAL FOO

So, deleting a group tells `g77' to pretend as though the intrinsics in
that group do not exist at all, whereas disabling it tells `g77' to
recognize them as (disabled) intrinsics in intrinsic-like contexts.

   Hiding a group is like enabling it, but the intrinsic must be first
named in an `INTRINSIC' statement to be considered a reference to the
intrinsic rather than to an external procedure.  This might be the
"safest" way to treat a new group of intrinsics when compiling old
code, because it allows the old code to be generally written as if
those new intrinsics never existed, but to be changed to use them by
inserting `INTRINSIC' statements in the appropriate places.  However,
it should be the goal of development to use `EXTERNAL' for all names of
external procedures that might be intrinsic names.

   If an intrinsic is in more than one group, it is enabled if any of
its containing groups are enabled; if not so enabled, it is hidden if
any of its containing groups are hidden; if not so hidden, it is
disabled if any of its containing groups are disabled; if not so
disabled, it is deleted.  This extra complication is necessary because
some intrinsics, such as `IBITS', belong to more than one group, and
hence should be enabled if any of the groups to which they belong are
enabled, and so on.

   The groups are:

`badu77'
     UNIX intrinsics having inappropriate forms (usually functions that
     have intended side effects).

`gnu'
     Intrinsics the GNU Fortran language supports that are extensions to
     the Fortran standards (77 and 90).

`f2c'
     Intrinsics supported by AT&T's `f2c' converter and/or `libf2c'.

`f90'
     Fortran 90 intrinsics.

`mil'
     MIL-STD 1753 intrinsics (`MVBITS', `IAND', `BTEST', and so on).

`unix'
     UNIX intrinsics (`IARGC', `EXIT', `ERF', and so on).

`vxt'
     VAX/VMS FORTRAN (current as of v4) intrinsics.

File: g77.info,  Node: Other Intrinsics,  Prev: Intrinsic Groups,  Up: Compiler Intrinsics

10.5.2 Other Intrinsics
-----------------------

`g77' supports intrinsics other than those in the GNU Fortran language
proper.  This set of intrinsics is described below.

   (Note that the empty lines appearing in the menu below are not
intentional--they result from a bug in the `makeinfo' program.)

* Menu:


* ACosD Intrinsic::     (Reserved for future use.)

* AIMax0 Intrinsic::    (Reserved for future use.)
* AIMin0 Intrinsic::    (Reserved for future use.)

* AJMax0 Intrinsic::    (Reserved for future use.)
* AJMin0 Intrinsic::    (Reserved for future use.)

* ASinD Intrinsic::     (Reserved for future use.)

* ATan2D Intrinsic::    (Reserved for future use.)
* ATanD Intrinsic::     (Reserved for future use.)

* BITest Intrinsic::    (Reserved for future use.)

* BJTest Intrinsic::    (Reserved for future use.)

* CDAbs Intrinsic::     Absolute value (archaic).
* CDCos Intrinsic::     Cosine (archaic).
* CDExp Intrinsic::     Exponential (archaic).
* CDLog Intrinsic::     Natural logarithm (archaic).
* CDSin Intrinsic::     Sine (archaic).
* CDSqRt Intrinsic::    Square root (archaic).

* ChDir Intrinsic (function):: Change directory.

* ChMod Intrinsic (function):: Change file modes.

* CosD Intrinsic::      (Reserved for future use.)

* DACosD Intrinsic::    (Reserved for future use.)

* DASinD Intrinsic::    (Reserved for future use.)

* DATan2D Intrinsic::   (Reserved for future use.)
* DATanD Intrinsic::    (Reserved for future use.)
* Date Intrinsic::      Get current date as dd-Mon-yy.

* DbleQ Intrinsic::     (Reserved for future use.)

* DCmplx Intrinsic::    Construct `COMPLEX(KIND=2)' value.
* DConjg Intrinsic::    Complex conjugate (archaic).

* DCosD Intrinsic::     (Reserved for future use.)

* DFloat Intrinsic::    Conversion (archaic).

* DFlotI Intrinsic::    (Reserved for future use.)
* DFlotJ Intrinsic::    (Reserved for future use.)

* DImag Intrinsic::     Convert/extract imaginary part of complex (archaic).

* DReal Intrinsic::     Convert value to type `REAL(KIND=2)'.

* DSinD Intrinsic::     (Reserved for future use.)

* DTanD Intrinsic::     (Reserved for future use.)

* DTime Intrinsic (function):: Get elapsed time since last time.

* FGet Intrinsic (function):: Read a character from unit 5 stream-wise.

* FGetC Intrinsic (function):: Read a character stream-wise.

* FloatI Intrinsic::    (Reserved for future use.)
* FloatJ Intrinsic::    (Reserved for future use.)

* FPut Intrinsic (function):: Write a character to unit 6 stream-wise.

* FPutC Intrinsic (function):: Write a character stream-wise.

* IDate Intrinsic (VXT):: Get local time info (VAX/VMS).

* IIAbs Intrinsic::     (Reserved for future use.)
* IIAnd Intrinsic::     (Reserved for future use.)
* IIBClr Intrinsic::    (Reserved for future use.)
* IIBits Intrinsic::    (Reserved for future use.)
* IIBSet Intrinsic::    (Reserved for future use.)
* IIDiM Intrinsic::     (Reserved for future use.)
* IIDInt Intrinsic::    (Reserved for future use.)
* IIDNnt Intrinsic::    (Reserved for future use.)
* IIEOr Intrinsic::     (Reserved for future use.)
* IIFix Intrinsic::     (Reserved for future use.)
* IInt Intrinsic::      (Reserved for future use.)
* IIOr Intrinsic::      (Reserved for future use.)
* IIQint Intrinsic::    (Reserved for future use.)
* IIQNnt Intrinsic::    (Reserved for future use.)
* IIShftC Intrinsic::   (Reserved for future use.)
* IISign Intrinsic::    (Reserved for future use.)

* IMax0 Intrinsic::     (Reserved for future use.)
* IMax1 Intrinsic::     (Reserved for future use.)
* IMin0 Intrinsic::     (Reserved for future use.)
* IMin1 Intrinsic::     (Reserved for future use.)
* IMod Intrinsic::      (Reserved for future use.)

* INInt Intrinsic::     (Reserved for future use.)
* INot Intrinsic::      (Reserved for future use.)

* IZExt Intrinsic::     (Reserved for future use.)
* JIAbs Intrinsic::     (Reserved for future use.)
* JIAnd Intrinsic::     (Reserved for future use.)
* JIBClr Intrinsic::    (Reserved for future use.)
* JIBits Intrinsic::    (Reserved for future use.)
* JIBSet Intrinsic::    (Reserved for future use.)
* JIDiM Intrinsic::     (Reserved for future use.)
* JIDInt Intrinsic::    (Reserved for future use.)
* JIDNnt Intrinsic::    (Reserved for future use.)
* JIEOr Intrinsic::     (Reserved for future use.)
* JIFix Intrinsic::     (Reserved for future use.)
* JInt Intrinsic::      (Reserved for future use.)
* JIOr Intrinsic::      (Reserved for future use.)
* JIQint Intrinsic::    (Reserved for future use.)
* JIQNnt Intrinsic::    (Reserved for future use.)
* JIShft Intrinsic::    (Reserved for future use.)
* JIShftC Intrinsic::   (Reserved for future use.)
* JISign Intrinsic::    (Reserved for future use.)
* JMax0 Intrinsic::     (Reserved for future use.)
* JMax1 Intrinsic::     (Reserved for future use.)
* JMin0 Intrinsic::     (Reserved for future use.)
* JMin1 Intrinsic::     (Reserved for future use.)
* JMod Intrinsic::      (Reserved for future use.)
* JNInt Intrinsic::     (Reserved for future use.)
* JNot Intrinsic::      (Reserved for future use.)
* JZExt Intrinsic::     (Reserved for future use.)

* Kill Intrinsic (function):: Signal a process.

* Link Intrinsic (function):: Make hard link in file system.

* QAbs Intrinsic::      (Reserved for future use.)
* QACos Intrinsic::     (Reserved for future use.)
* QACosD Intrinsic::    (Reserved for future use.)
* QASin Intrinsic::     (Reserved for future use.)
* QASinD Intrinsic::    (Reserved for future use.)
* QATan Intrinsic::     (Reserved for future use.)
* QATan2 Intrinsic::    (Reserved for future use.)
* QATan2D Intrinsic::   (Reserved for future use.)
* QATanD Intrinsic::    (Reserved for future use.)
* QCos Intrinsic::      (Reserved for future use.)
* QCosD Intrinsic::     (Reserved for future use.)
* QCosH Intrinsic::     (Reserved for future use.)
* QDiM Intrinsic::      (Reserved for future use.)
* QExp Intrinsic::      (Reserved for future use.)
* QExt Intrinsic::      (Reserved for future use.)
* QExtD Intrinsic::     (Reserved for future use.)
* QFloat Intrinsic::    (Reserved for future use.)
* QInt Intrinsic::      (Reserved for future use.)
* QLog Intrinsic::      (Reserved for future use.)
* QLog10 Intrinsic::    (Reserved for future use.)
* QMax1 Intrinsic::     (Reserved for future use.)
* QMin1 Intrinsic::     (Reserved for future use.)
* QMod Intrinsic::      (Reserved for future use.)
* QNInt Intrinsic::     (Reserved for future use.)
* QSin Intrinsic::      (Reserved for future use.)
* QSinD Intrinsic::     (Reserved for future use.)
* QSinH Intrinsic::     (Reserved for future use.)
* QSqRt Intrinsic::     (Reserved for future use.)
* QTan Intrinsic::      (Reserved for future use.)
* QTanD Intrinsic::     (Reserved for future use.)
* QTanH Intrinsic::     (Reserved for future use.)

* Rename Intrinsic (function):: Rename file.

* Secnds Intrinsic::    Get local time offset since midnight.

* Signal Intrinsic (function):: Muck with signal handling.

* SinD Intrinsic::      (Reserved for future use.)

* SnglQ Intrinsic::     (Reserved for future use.)

* SymLnk Intrinsic (function):: Make symbolic link in file system.

* System Intrinsic (function):: Invoke shell (system) command.

* TanD Intrinsic::      (Reserved for future use.)

* Time Intrinsic (VXT):: Get the time as a character value.

* UMask Intrinsic (function):: Set file creation permissions mask.

* Unlink Intrinsic (function):: Unlink file.

* ZExt Intrinsic::      (Reserved for future use.)

File: g77.info,  Node: ACosD Intrinsic,  Next: AIMax0 Intrinsic,  Up: Other Intrinsics

10.5.2.1 ACosD Intrinsic
........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL ACosD' to use this name for an external
procedure.

File: g77.info,  Node: AIMax0 Intrinsic,  Next: AIMin0 Intrinsic,  Prev: ACosD Intrinsic,  Up: Other Intrinsics

10.5.2.2 AIMax0 Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL AIMax0' to use this name for an
external procedure.

File: g77.info,  Node: AIMin0 Intrinsic,  Next: AJMax0 Intrinsic,  Prev: AIMax0 Intrinsic,  Up: Other Intrinsics

10.5.2.3 AIMin0 Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL AIMin0' to use this name for an
external procedure.

File: g77.info,  Node: AJMax0 Intrinsic,  Next: AJMin0 Intrinsic,  Prev: AIMin0 Intrinsic,  Up: Other Intrinsics

10.5.2.4 AJMax0 Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL AJMax0' to use this name for an
external procedure.

File: g77.info,  Node: AJMin0 Intrinsic,  Next: ASinD Intrinsic,  Prev: AJMax0 Intrinsic,  Up: Other Intrinsics

10.5.2.5 AJMin0 Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL AJMin0' to use this name for an
external procedure.

File: g77.info,  Node: ASinD Intrinsic,  Next: ATan2D Intrinsic,  Prev: AJMin0 Intrinsic,  Up: Other Intrinsics

10.5.2.6 ASinD Intrinsic
........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL ASinD' to use this name for an external
procedure.

File: g77.info,  Node: ATan2D Intrinsic,  Next: ATanD Intrinsic,  Prev: ASinD Intrinsic,  Up: Other Intrinsics

10.5.2.7 ATan2D Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL ATan2D' to use this name for an
external procedure.

File: g77.info,  Node: ATanD Intrinsic,  Next: BITest Intrinsic,  Prev: ATan2D Intrinsic,  Up: Other Intrinsics

10.5.2.8 ATanD Intrinsic
........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL ATanD' to use this name for an external
procedure.

File: g77.info,  Node: BITest Intrinsic,  Next: BJTest Intrinsic,  Prev: ATanD Intrinsic,  Up: Other Intrinsics

10.5.2.9 BITest Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL BITest' to use this name for an
external procedure.

File: g77.info,  Node: BJTest Intrinsic,  Next: CDAbs Intrinsic,  Prev: BITest Intrinsic,  Up: Other Intrinsics

10.5.2.10 BJTest Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL BJTest' to use this name for an
external procedure.

File: g77.info,  Node: CDAbs Intrinsic,  Next: CDCos Intrinsic,  Prev: BJTest Intrinsic,  Up: Other Intrinsics

10.5.2.11 CDAbs Intrinsic
.........................


     CDAbs(A)

CDAbs: `REAL(KIND=2)' function.

A: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `ABS()' that is specific to one type for A.  *Note
Abs Intrinsic::.

File: g77.info,  Node: CDCos Intrinsic,  Next: CDExp Intrinsic,  Prev: CDAbs Intrinsic,  Up: Other Intrinsics

10.5.2.12 CDCos Intrinsic
.........................


     CDCos(X)

CDCos: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `COS()' that is specific to one type for X.  *Note
Cos Intrinsic::.

File: g77.info,  Node: CDExp Intrinsic,  Next: CDLog Intrinsic,  Prev: CDCos Intrinsic,  Up: Other Intrinsics

10.5.2.13 CDExp Intrinsic
.........................


     CDExp(X)

CDExp: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `EXP()' that is specific to one type for X.  *Note
Exp Intrinsic::.

File: g77.info,  Node: CDLog Intrinsic,  Next: CDSin Intrinsic,  Prev: CDExp Intrinsic,  Up: Other Intrinsics

10.5.2.14 CDLog Intrinsic
.........................


     CDLog(X)

CDLog: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `LOG()' that is specific to one type for X.  *Note
Log Intrinsic::.

File: g77.info,  Node: CDSin Intrinsic,  Next: CDSqRt Intrinsic,  Prev: CDLog Intrinsic,  Up: Other Intrinsics

10.5.2.15 CDSin Intrinsic
.........................


     CDSin(X)

CDSin: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `SIN()' that is specific to one type for X.  *Note
Sin Intrinsic::.

File: g77.info,  Node: CDSqRt Intrinsic,  Next: ChDir Intrinsic (function),  Prev: CDSin Intrinsic,  Up: Other Intrinsics

10.5.2.16 CDSqRt Intrinsic
..........................


     CDSqRt(X)

CDSqRt: `COMPLEX(KIND=2)' function.

X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `SQRT()' that is specific to one type for X.  *Note
SqRt Intrinsic::.

File: g77.info,  Node: ChDir Intrinsic (function),  Next: ChMod Intrinsic (function),  Prev: CDSqRt Intrinsic,  Up: Other Intrinsics

10.5.2.17 ChDir Intrinsic (function)
....................................


     ChDir(DIR)

ChDir: `INTEGER(KIND=1)' function.

DIR: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `badu77'.

Description:

   Sets the current working directory to be DIR.  Returns 0 on success
or a nonzero error code.  See `chdir(3)'.

   _Caution:_ Using this routine during I/O to a unit connected with a
non-absolute file name can cause subsequent I/O on such a unit to fail
because the I/O library might reopen files by name.

   Due to the side effects performed by this intrinsic, the function
form is not recommended.

   For information on other intrinsics with the same name: *Note ChDir
Intrinsic (subroutine)::.

File: g77.info,  Node: ChMod Intrinsic (function),  Next: CosD Intrinsic,  Prev: ChDir Intrinsic (function),  Up: Other Intrinsics

10.5.2.18 ChMod Intrinsic (function)
....................................


     ChMod(NAME, MODE)

ChMod: `INTEGER(KIND=1)' function.

NAME: `CHARACTER'; scalar; INTENT(IN).

MODE: `CHARACTER'; scalar; INTENT(IN).

Intrinsic groups: `badu77'.

Description:

   Changes the access mode of file NAME according to the specification
MODE, which is given in the format of `chmod(1)'.  A null character
(`CHAR(0)') marks the end of the name in NAME--otherwise, trailing
blanks in NAME are ignored.  Currently, NAME must not contain the
single quote character.

   Returns 0 on success or a nonzero error code otherwise.

   Note that this currently works by actually invoking `/bin/chmod' (or
the `chmod' found when the library was configured) and so might fail in
some circumstances and will, anyway, be slow.

   Due to the side effects performed by this intrinsic, the function
form is not recommended.

   For information on other intrinsics with the same name: *Note ChMod
Intrinsic (subroutine)::.

File: g77.info,  Node: CosD Intrinsic,  Next: DACosD Intrinsic,  Prev: ChMod Intrinsic (function),  Up: Other Intrinsics

10.5.2.19 CosD Intrinsic
........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL CosD' to use this name for an external
procedure.

File: g77.info,  Node: DACosD Intrinsic,  Next: DASinD Intrinsic,  Prev: CosD Intrinsic,  Up: Other Intrinsics

10.5.2.20 DACosD Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DACosD' to use this name for an
external procedure.

File: g77.info,  Node: DASinD Intrinsic,  Next: DATan2D Intrinsic,  Prev: DACosD Intrinsic,  Up: Other Intrinsics

10.5.2.21 DASinD Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DASinD' to use this name for an
external procedure.

File: g77.info,  Node: DATan2D Intrinsic,  Next: DATanD Intrinsic,  Prev: DASinD Intrinsic,  Up: Other Intrinsics

10.5.2.22 DATan2D Intrinsic
...........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DATan2D' to use this name for an
external procedure.

File: g77.info,  Node: DATanD Intrinsic,  Next: Date Intrinsic,  Prev: DATan2D Intrinsic,  Up: Other Intrinsics

10.5.2.23 DATanD Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DATanD' to use this name for an
external procedure.

File: g77.info,  Node: Date Intrinsic,  Next: DbleQ Intrinsic,  Prev: DATanD Intrinsic,  Up: Other Intrinsics

10.5.2.24 Date Intrinsic
........................


     CALL Date(DATE)

DATE: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `vxt'.

Description:

   Returns DATE in the form `DD-MMM-YY', representing the numeric day
of the month DD, a three-character abbreviation of the month name MMM
and the last two digits of the year YY, e.g. `25-Nov-96'.

   This intrinsic is not recommended, due to the year 2000 approaching.
Therefore, programs making use of this intrinsic might not be Year 2000
(Y2K) compliant.  *Note CTime Intrinsic (subroutine)::, for information
on obtaining more digits for the current (or any) date.

File: g77.info,  Node: DbleQ Intrinsic,  Next: DCmplx Intrinsic,  Prev: Date Intrinsic,  Up: Other Intrinsics

10.5.2.25 DbleQ Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DbleQ' to use this name for an external
procedure.

File: g77.info,  Node: DCmplx Intrinsic,  Next: DConjg Intrinsic,  Prev: DbleQ Intrinsic,  Up: Other Intrinsics

10.5.2.26 DCmplx Intrinsic
..........................


     DCmplx(X, Y)

DCmplx: `COMPLEX(KIND=2)' function.

X: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Y: `INTEGER' or `REAL'; OPTIONAL (must be omitted if X is `COMPLEX');
scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   If X is not type `COMPLEX', constructs a value of type
`COMPLEX(KIND=2)' from the real and imaginary values specified by X and
Y, respectively.  If Y is omitted, `0D0' is assumed.

   If X is type `COMPLEX', converts it to type `COMPLEX(KIND=2)'.

   Although this intrinsic is not standard Fortran, it is a popular
extension offered by many compilers that support `DOUBLE COMPLEX',
since it offers the easiest way to convert to `DOUBLE COMPLEX' without
using Fortran 90 features (such as the `KIND=' argument to the
`CMPLX()' intrinsic).

   (`CMPLX(0D0, 0D0)' returns a single-precision `COMPLEX' result, as
required by standard FORTRAN 77.  That's why so many compilers provide
`DCMPLX()', since `DCMPLX(0D0, 0D0)' returns a `DOUBLE COMPLEX' result.
Still, `DCMPLX()' converts even `REAL*16' arguments to their `REAL*8'
equivalents in most dialects of Fortran, so neither it nor `CMPLX()'
allow easy construction of arbitrary-precision values without
potentially forcing a conversion involving extending or reducing
precision.  GNU Fortran provides such an intrinsic, called `COMPLEX()'.)

   *Note Complex Intrinsic::, for information on easily constructing a
`COMPLEX' value of arbitrary precision from `REAL' arguments.

File: g77.info,  Node: DConjg Intrinsic,  Next: DCosD Intrinsic,  Prev: DCmplx Intrinsic,  Up: Other Intrinsics

10.5.2.27 DConjg Intrinsic
..........................


     DConjg(Z)

DConjg: `COMPLEX(KIND=2)' function.

Z: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `CONJG()' that is specific to one type for Z.  *Note
Conjg Intrinsic::.

File: g77.info,  Node: DCosD Intrinsic,  Next: DFloat Intrinsic,  Prev: DConjg Intrinsic,  Up: Other Intrinsics

10.5.2.28 DCosD Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DCosD' to use this name for an external
procedure.

File: g77.info,  Node: DFloat Intrinsic,  Next: DFlotI Intrinsic,  Prev: DCosD Intrinsic,  Up: Other Intrinsics

10.5.2.29 DFloat Intrinsic
..........................


     DFloat(A)

DFloat: `REAL(KIND=2)' function.

A: `INTEGER'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `REAL()' that is specific to one type for A.  *Note
Real Intrinsic::.

File: g77.info,  Node: DFlotI Intrinsic,  Next: DFlotJ Intrinsic,  Prev: DFloat Intrinsic,  Up: Other Intrinsics

10.5.2.30 DFlotI Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DFlotI' to use this name for an
external procedure.

File: g77.info,  Node: DFlotJ Intrinsic,  Next: DImag Intrinsic,  Prev: DFlotI Intrinsic,  Up: Other Intrinsics

10.5.2.31 DFlotJ Intrinsic
..........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DFlotJ' to use this name for an
external procedure.

File: g77.info,  Node: DImag Intrinsic,  Next: DReal Intrinsic,  Prev: DFlotJ Intrinsic,  Up: Other Intrinsics

10.5.2.32 DImag Intrinsic
.........................


     DImag(Z)

DImag: `REAL(KIND=2)' function.

Z: `COMPLEX(KIND=2)'; scalar; INTENT(IN).

Intrinsic groups: `f2c', `vxt'.

Description:

   Archaic form of `AIMAG()' that is specific to one type for Z.  *Note
AImag Intrinsic::.

File: g77.info,  Node: DReal Intrinsic,  Next: DSinD Intrinsic,  Prev: DImag Intrinsic,  Up: Other Intrinsics

10.5.2.33 DReal Intrinsic
.........................


     DReal(A)

DReal: `REAL(KIND=2)' function.

A: `INTEGER', `REAL', or `COMPLEX'; scalar; INTENT(IN).

Intrinsic groups: `vxt'.

Description:

   Converts A to `REAL(KIND=2)'.

   If A is type `COMPLEX', its real part is converted (if necessary) to
`REAL(KIND=2)', and its imaginary part is disregarded.

   Although this intrinsic is not standard Fortran, it is a popular
extension offered by many compilers that support `DOUBLE COMPLEX',
since it offers the easiest way to extract the real part of a `DOUBLE
COMPLEX' value without using the Fortran 90 `REAL()' intrinsic in a way
that produces a return value inconsistent with the way many FORTRAN 77
compilers handle `REAL()' of a `DOUBLE COMPLEX' value.

   *Note RealPart Intrinsic::, for information on a GNU Fortran
intrinsic that avoids these areas of confusion.

   *Note Dble Intrinsic::, for information on the standard FORTRAN 77
replacement for `DREAL()'.

   *Note REAL() and AIMAG() of Complex::, for more information on this
issue.

File: g77.info,  Node: DSinD Intrinsic,  Next: DTanD Intrinsic,  Prev: DReal Intrinsic,  Up: Other Intrinsics

10.5.2.34 DSinD Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DSinD' to use this name for an external
procedure.

File: g77.info,  Node: DTanD Intrinsic,  Next: DTime Intrinsic (function),  Prev: DSinD Intrinsic,  Up: Other Intrinsics

10.5.2.35 DTanD Intrinsic
.........................

This intrinsic is not yet implemented.  The name is, however, reserved
as an intrinsic.  Use `EXTERNAL DTanD' to use this name for an external
procedure.

File: g77.info,  Node: DTime Intrinsic (function),  Next: FGet Intrinsic (function),  Prev: DTanD Intrinsic,  Up: Other Intrinsics

10.5.2.36 DTime Intrinsic (function)
....................................


     DTime(TARRAY)

DTime: `REAL(KIND=1)' function.

TARRAY: `REAL(KIND=1)'; DIMENSION(2); INTENT(OUT).

Intrinsic groups: `badu77'.

Description:

   Initially, return the number of seconds of runtime since the start
of the process's execution as the function value, and the user and
system components of this in `TARRAY(1)' and `TARRAY(2)' respectively.
The functions' value is equal to `TARRAY(1) + TARRAY(2)'.

   Subsequent invocations of `DTIME()' return values accumulated since
the previous invocation.

   On some systems, the underlying timings are represented using types
with sufficiently small limits that overflows (wraparounds) are
possible, such as 32-bit types.  Therefore, the values returned by this
intrinsic might be, or become, negative, or numerically less than
previous values, during a single run of the compiled program.

   Due to the side effects performed by this intrinsic, the function
form is not recommended.

   For information on other intrinsics with the same name: *Note DTime
Intrinsic (subroutine)::.

File: g77.info,  Node: FGet Intrinsic (function),  Next: FGetC Intrinsic (function),  Prev: DTime Intrinsic (function),  Up: Other Intrinsics

10.5.2.37 FGet Intrinsic (function)
...................................


     FGet(C)

FGet: `INTEGER(KIND=1)' function.

C: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `badu77'.

Description:

   Reads a single character into C in stream mode from unit 5
(by-passing normal formatted input) using `getc(3)'.  Returns 0 on
success, -1 on end-of-file, and the error code from `ferror(3)'
otherwise.

   Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are
unpredictable.

   For information on other intrinsics with the same name: *Note FGet
Intrinsic (subroutine)::.

File: g77.info,  Node: FGetC Intrinsic (function),  Next: FloatI Intrinsic,  Prev: FGet Intrinsic (function),  Up: Other Intrinsics

10.5.2.38 FGetC Intrinsic (function)
....................................


     FGetC(UNIT, C)

FGetC: `INTEGER(KIND=1)' function.

UNIT: `INTEGER'; scalar; INTENT(IN).

C: `CHARACTER'; scalar; INTENT(OUT).

Intrinsic groups: `badu77'.

Description:

   Reads a single character into C in stream mode from unit UNIT
(by-passing normal formatted output) using `getc(3)'.  Returns 0 on
success, -1 on end-of-file, and the error code from `ferror(3)'
otherwise.

   Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are
unpredictable.

   For information on other intrinsics with the same name: *Note FGetC
Intrinsic (subroutine)::.

File: g77.info,  Node: FloatI Intrinsic,  Next: FloatJ Intrinsic,  Prev: FGetC Intrinsic (function),  Up: Other Intrinsics

10.5.2.39 FloatI Intrinsic
............