libf2c:
[official-gcc.git] / gcc / f / BUGS
blobfdcb9320f2a155f815c7cc342fa096f8e56abd1a
1 _Note:_ This file is automatically generated from the files
2 `bugs0.texi' and `bugs.texi'.  `BUGS' is _not_ a source file, although
3 it is normally included within source distributions.
5    This file lists known bugs in the GCC-3.1 version of the GNU Fortran
6 compiler.  Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software
7 Foundation, Inc.  You may copy, distribute, and modify it freely as
8 long as you preserve this copyright notice and permission notice.
10 Known Bugs In GNU Fortran
11 *************************
13    This section identifies bugs that `g77' _users_ might run into in
14 the GCC-3.1 version of `g77'.  This includes bugs that are actually in
15 the `gcc' back end (GBE) or in `libf2c', because those sets of code are
16 at least somewhat under the control of (and necessarily intertwined
17 with) `g77', so it isn't worth separating them out.
19    For information on bugs in _other_ versions of `g77', see
20 `gcc/gcc/f/NEWS'.  There, lists of bugs fixed in various versions of
21 `g77' can help determine what bugs existed in prior versions.
23    _Warning:_ The information below is still under development, and
24 might not accurately reflect the `g77' code base of which it is a part.
25 Efforts are made to keep it somewhat up-to-date, but they are
26 particularly concentrated on any version of this information that is
27 distributed as part of a _released_ `g77'.
29    In particular, while this information is intended to apply to the
30 GCC-3.1 version of `g77', only an official _release_ of that version is
31 expected to contain documentation that is most consistent with the
32 `g77' product in that version.
34    An online, "live" version of this document (derived directly from
35 the mainline, development version of `g77' within `gcc') is available
36 via `http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html'.  Follow
37 the "Known Bugs" link.
39    For information on bugs that might afflict people who configure,
40 port, build, and install `g77', see "Problems Installing" in
41 `gcc/gcc/f/INSTALL'.
43    The following information was last updated on 2000-11-05:
45    * `g77' fails to warn about use of a "live" iterative-DO variable as
46      an implied-DO variable in a `WRITE' or `PRINT' statement (although
47      it does warn about this in a `READ' statement).
49    * Something about `g77''s straightforward handling of label
50      references and definitions sometimes prevents the GBE from
51      unrolling loops.  Until this is solved, try inserting or removing
52      `CONTINUE' statements as the terminal statement, using the `END DO'
53      form instead, and so on.
55    * Some confusion in diagnostics concerning failing `INCLUDE'
56      statements from within `INCLUDE''d or `#include''d files.
58    * `g77' assumes that `INTEGER(KIND=1)' constants range from `-2**31'
59      to `2**31-1' (the range for two's-complement 32-bit values),
60      instead of determining their range from the actual range of the
61      type for the configuration (and, someday, for the constant).
63      Further, it generally doesn't implement the handling of constants
64      very well in that it makes assumptions about the configuration
65      that it no longer makes regarding variables (types).
67      Included with this item is the fact that `g77' doesn't recognize
68      that, on IEEE-754/854-compliant systems, `0./0.' should produce a
69      NaN and no warning instead of the value `0.' and a warning.  This
70      is to be fixed in version 0.6, when `g77' will use the `gcc' back
71      end's constant-handling mechanisms to replace its own.
73    * `g77' uses way too much memory and CPU time to process large
74      aggregate areas having any initialized elements.
76      For example, `REAL A(1000000)' followed by `DATA A(1)/1/' takes up
77      way too much time and space, including the size of the generated
78      assembler file.  This is to be mitigated somewhat in version 0.6.
80      Version 0.5.18 improves cases like this--specifically, cases of
81      _sparse_ initialization that leave large, contiguous areas
82      uninitialized--significantly.  However, even with the
83      improvements, these cases still require too much memory and CPU
84      time.
86      (Version 0.5.18 also improves cases where the initial values are
87      zero to a much greater degree, so if the above example ends with
88      `DATA A(1)/0/', the compile-time performance will be about as good
89      as it will ever get, aside from unrelated improvements to the
90      compiler.)
92      Note that `g77' does display a warning message to notify the user
93      before the compiler appears to hang.
95    * Previous versions of `g77' didn't emit information on variable and
96      array members of common blocks and equivalences for use with a
97      debugger (the `-g' command-line option).  As of the version of
98      `g77' shipped with version 3.0 of `GCC', this is corrected.
100      As of Version 0.5.19, a temporary kludge solution is provided
101      whereby some rudimentary information on a member is written as a
102      string that is the member's value as a character string.
104    * When debugging, after starting up the debugger but before being
105      able to see the source code for the main program unit, the user
106      must currently set a breakpoint at `MAIN__' (or `MAIN___' or
107      `MAIN_' if `MAIN__' doesn't exist) and run the program until it
108      hits the breakpoint.  At that point, the main program unit is
109      activated and about to execute its first executable statement, but
110      that's the state in which the debugger should start up, as is the
111      case for languages like C.
113    * Debugging `g77'-compiled code using debuggers other than `gdb' is
114      likely not to work.
116      Getting `g77' and `gdb' to work together is a known
117      problem--getting `g77' to work properly with other debuggers, for
118      which source code often is unavailable to `g77' developers, seems
119      like a much larger, unknown problem, and is a lower priority than
120      making `g77' and `gdb' work together properly.
122      On the other hand, information about problems other debuggers have
123      with `g77' output might make it easier to properly fix `g77', and
124      perhaps even improve `gdb', so it is definitely welcome.  Such
125      information might even lead to all relevant products working
126      together properly sooner.
128    * `g77' doesn't work perfectly on 64-bit configurations such as the
129      Digital Semiconductor ("DEC") Alpha.
131      This problem is largely resolved as of version 0.5.23.  Version
132      0.6 should solve most or all remaining problems (such as
133      cross-compiling involving 64-bit machines).
135    * `g77' currently inserts needless padding for things like `COMMON
136      A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER(KIND=1)'
137      on machines like x86, because the back end insists that `IPAD' be
138      aligned to a 4-byte boundary, but the processor has no such
139      requirement (though it is usually good for performance).
141      The `gcc' back end needs to provide a wider array of
142      specifications of alignment requirements and preferences for
143      targets, and front ends like `g77' should take advantage of this
144      when it becomes available.
146    * The `libf2c' routines that perform some run-time arithmetic on
147      `COMPLEX' operands were modified circa version 0.5.20 of `g77' to
148      work properly even in the presence of aliased operands.
150      While the `g77' and `netlib' versions of `libf2c' differ on how
151      this is accomplished, the main differences are that we believe the
152      `g77' version works properly even in the presence of _partially_
153      aliased operands.
155      However, these modifications have reduced performance on targets
156      such as x86, due to the extra copies of operands involved.
157