1 @c Copyright (C) 1995-1999 Free Software Foundation, Inc.
2 @c This is part of the G77 manual.
3 @c For copying conditions, see the file g77.texi.
5 @c The text of this file appears in the file BUGS
6 @c in the G77 distribution, as well as in the G77 manual.
8 @c Keep this the same as the dates above, since it's used
9 @c in the standalone derivations of this file (e.g. BUGS).
10 @set copyrights-bugs 1995-1999
12 @set last-update-bugs 1999-06-28
17 @c The immediately following lines apply to the BUGS file
18 @c which is derived from this file.
19 @emph{Note:} This file is automatically generated from the files
20 @file{bugs0.texi} and @file{bugs.texi}.
21 @file{BUGS} is @emph{not} a source file,
22 although it is normally included within source distributions.
24 This file lists known bugs in the @value{which-g77} version
25 of the GNU Fortran compiler.
26 Copyright (C) @value{copyrights-bugs} Free Software Foundation, Inc.
27 You may copy, distribute, and modify it freely as long as you preserve
28 this copyright notice and permission notice.
31 @chapter Known Bugs In GNU Fortran
36 @section Known Bugs In GNU Fortran
39 This section identifies bugs that @code{g77} @emph{users}
40 might run into in the @value{which-g77} version
42 This includes bugs that are actually in the @code{gcc}
43 back end (GBE) or in @code{libf2c}, because those
44 sets of code are at least somewhat under the control
45 of (and necessarily intertwined with) @code{g77},
46 so it isn't worth separating them out.
49 For information on bugs in @emph{other} versions of @code{g77},
50 see @ref{News,,News About GNU Fortran}.
51 There, lists of bugs fixed in various versions of @code{g77}
52 can help determine what bugs existed in prior versions.
56 For information on bugs in @emph{other} versions of @code{g77},
57 see @file{@value{path-g77}/NEWS}.
58 There, lists of bugs fixed in various versions of @code{g77}
59 can help determine what bugs existed in prior versions.
63 @emph{Warning:} The information below is still under development,
64 and might not accurately reflect the @code{g77} code base
65 of which it is a part.
66 Efforts are made to keep it somewhat up-to-date,
67 but they are particularly concentrated
68 on any version of this information
69 that is distributed as part of a @emph{released} @code{g77}.
71 In particular, while this information is intended to apply to
72 the @value{which-g77} version of @code{g77},
73 only an official @emph{release} of that version
74 is expected to contain documentation that is
75 most consistent with the @code{g77} product in that version.
78 An online, ``live'' version of this document
79 (derived directly from the mainline, development version
80 of @code{g77} within @code{egcs})
82 @uref{http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html}.
83 Follow the ``Known Bugs'' link.
86 For information on bugs that might afflict people who
87 configure, port, build, and install @code{g77},
88 see @ref{Problems Installing}.
92 For information on bugs that might afflict people who
93 configure, port, build, and install @code{g77},
94 see "Problems Installing" in @file{@value{path-g77}/INSTALL}.
97 The following information was last updated on @value{last-update-bugs}:
101 @code{g77} fails to warn about
102 use of a ``live'' iterative-DO variable
103 as an implied-DO variable
104 in a @code{WRITE} or @code{PRINT} statement
105 (although it does warn about this in a @code{READ} statement).
108 Something about @code{g77}'s straightforward handling of
109 label references and definitions sometimes prevents the GBE
110 from unrolling loops.
111 Until this is solved, try inserting or removing @code{CONTINUE}
112 statements as the terminal statement, using the @code{END DO}
113 form instead, and so on.
116 Some confusion in diagnostics concerning failing @code{INCLUDE}
117 statements from within @code{INCLUDE}'d or @code{#include}'d files.
119 @cindex integer constants
120 @cindex constants, integer
122 @code{g77} assumes that @code{INTEGER(KIND=1)} constants range
123 from @samp{-2**31} to @samp{2**31-1} (the range for
124 two's-complement 32-bit values),
125 instead of determining their range from the actual range of the
126 type for the configuration (and, someday, for the constant).
128 Further, it generally doesn't implement the handling
129 of constants very well in that it makes assumptions about the
130 configuration that it no longer makes regarding variables (types).
132 Included with this item is the fact that @code{g77} doesn't recognize
133 that, on IEEE-754/854-compliant systems, @samp{0./0.} should produce a NaN
134 and no warning instead of the value @samp{0.} and a warning.
135 This is to be fixed in version 0.6, when @code{g77} will use the
136 @code{gcc} back end's constant-handling mechanisms to replace its own.
138 @cindex compiler speed
139 @cindex speed, of compiler
140 @cindex compiler memory usage
141 @cindex memory usage, of compiler
142 @cindex large aggregate areas
143 @cindex initialization, bug
144 @cindex DATA statement
145 @cindex statements, DATA
147 @code{g77} uses way too much memory and CPU time to process large aggregate
148 areas having any initialized elements.
150 For example, @samp{REAL A(1000000)} followed by @samp{DATA A(1)/1/}
151 takes up way too much time and space, including
152 the size of the generated assembler file.
153 This is to be mitigated somewhat in version 0.6.
155 Version 0.5.18 improves cases like this---specifically,
156 cases of @emph{sparse} initialization that leave large, contiguous
157 areas uninitialized---significantly.
158 However, even with the improvements, these cases still
159 require too much memory and CPU time.
161 (Version 0.5.18 also improves cases where the initial values are
162 zero to a much greater degree, so if the above example
163 ends with @samp{DATA A(1)/0/}, the compile-time performance
164 will be about as good as it will ever get, aside from unrelated
165 improvements to the compiler.)
167 Note that @code{g77} does display a warning message to
168 notify the user before the compiler appears to hang.
170 @xref{Large Initialization,,Initialization of Large Aggregate Areas},
171 for information on how to change the point at which
172 @code{g77} decides to issue this warning.
176 @cindex common blocks
177 @cindex equivalence areas
178 @cindex local equivalence areas
180 @code{g77} doesn't emit variable and array members of common blocks for use
181 with a debugger (the @samp{-g} command-line option).
182 The code is present to do this, but doesn't work with at least
183 one debug format---perhaps it works with others.
184 And it turns out there's a similar bug for
185 local equivalence areas, so that has been disabled as well.
187 As of Version 0.5.19, a temporary kludge solution is provided whereby
188 some rudimentary information on a member is written as a string that
189 is the member's value as a character string.
192 @xref{Code Gen Options,,Options for Code Generation Conventions},
193 for information on the @samp{-fdebug-kludge} option.
196 @cindex code, displaying main source
197 @cindex displaying main source code
198 @cindex debugging main source code
199 @cindex printing main source
201 When debugging, after starting up the debugger but before being able
202 to see the source code for the main program unit, the user must currently
203 set a breakpoint at @code{MAIN__} (or @code{MAIN___} or @code{MAIN_} if
204 @code{MAIN__} doesn't exist)
205 and run the program until it hits the breakpoint.
207 main program unit is activated and about to execute its first
208 executable statement, but that's the state in which the debugger should
209 start up, as is the case for languages like C.
213 Debugging @code{g77}-compiled code using debuggers other than
214 @code{gdb} is likely not to work.
216 Getting @code{g77} and @code{gdb} to work together is a known
217 problem---getting @code{g77} to work properly with other
218 debuggers, for which source code often is unavailable to @code{g77}
219 developers, seems like a much larger, unknown problem,
220 and is a lower priority than making @code{g77} and @code{gdb}
221 work together properly.
223 On the other hand, information about problems other debuggers
224 have with @code{g77} output might make it easier to properly
225 fix @code{g77}, and perhaps even improve @code{gdb}, so it
226 is definitely welcome.
227 Such information might even lead to all relevant products
228 working together properly sooner.
230 @cindex Alpha, support
231 @cindex support, Alpha
233 @code{g77} doesn't work perfectly on 64-bit configurations
234 such as the Digital Semiconductor (``DEC'') Alpha.
236 This problem is largely resolved as of version 0.5.23.
237 Version 0.6 should solve most or all remaining problems
238 (such as cross-compiling involving 64-bit machines).
242 @cindex common blocks
243 @cindex equivalence areas
245 @code{g77} currently inserts needless padding for things like
246 @samp{COMMON A,IPAD} where @samp{A} is @code{CHARACTER*1} and @samp{IPAD}
247 is @code{INTEGER(KIND=1)} on machines like x86,
248 because the back end insists that @samp{IPAD}
249 be aligned to a 4-byte boundary,
250 but the processor has no such requirement
251 (though it is usually good for performance).
253 The @code{gcc} back end needs to provide a wider array
254 of specifications of alignment requirements and preferences for targets,
255 and front ends like @code{g77} should take advantage of this
256 when it becomes available.
258 @cindex complex performance
261 The @code{libf2c} routines that perform some run-time
262 arithmetic on @code{COMPLEX} operands
263 were modified circa version 0.5.20 of @code{g77}
264 to work properly even in the presence of aliased operands.
266 While the @code{g77} and @code{netlib} versions of @code{libf2c}
267 differ on how this is accomplished,
268 the main differences are that we believe
269 the @code{g77} version works properly
270 even in the presence of @emph{partially} aliased operands.
272 However, these modifications have reduced performance
273 on targets such as x86,
274 due to the extra copies of operands involved.