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