1 @c Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 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,1996,1997,1998,1999,2000
12 @set last-update-bugs 2000-11-05
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{gcc})
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 Previous versions of @code{g77} didn't emit information on
181 variable and array members of common blocks and equivalences
182 for use with a debugger (the @samp{-g} command-line option).
183 As of the version of @code{g77} shipped with version 3.0 of
184 @code{GCC}, this is corrected.
186 As of Version 0.5.19, a temporary kludge solution is provided whereby
187 some rudimentary information on a member is written as a string that
188 is the member's value as a character string.
191 @xref{Code Gen Options,,Options for Code Generation Conventions},
192 for information on the @samp{-fdebug-kludge} option.
195 @cindex code, displaying main source
196 @cindex displaying main source code
197 @cindex debugging main source code
198 @cindex printing main source
200 When debugging, after starting up the debugger but before being able
201 to see the source code for the main program unit, the user must currently
202 set a breakpoint at @code{MAIN__} (or @code{MAIN___} or @code{MAIN_} if
203 @code{MAIN__} doesn't exist)
204 and run the program until it hits the breakpoint.
206 main program unit is activated and about to execute its first
207 executable statement, but that's the state in which the debugger should
208 start up, as is the case for languages like C.
212 Debugging @code{g77}-compiled code using debuggers other than
213 @code{gdb} is likely not to work.
215 Getting @code{g77} and @code{gdb} to work together is a known
216 problem---getting @code{g77} to work properly with other
217 debuggers, for which source code often is unavailable to @code{g77}
218 developers, seems like a much larger, unknown problem,
219 and is a lower priority than making @code{g77} and @code{gdb}
220 work together properly.
222 On the other hand, information about problems other debuggers
223 have with @code{g77} output might make it easier to properly
224 fix @code{g77}, and perhaps even improve @code{gdb}, so it
225 is definitely welcome.
226 Such information might even lead to all relevant products
227 working together properly sooner.
229 @cindex Alpha, support
230 @cindex support, Alpha
232 @code{g77} doesn't work perfectly on 64-bit configurations
233 such as the Digital Semiconductor (``DEC'') Alpha.
235 This problem is largely resolved as of version 0.5.23.
236 Version 0.6 should solve most or all remaining problems
237 (such as cross-compiling involving 64-bit machines).
241 @cindex common blocks
242 @cindex equivalence areas
244 @code{g77} currently inserts needless padding for things like
245 @samp{COMMON A,IPAD} where @samp{A} is @code{CHARACTER*1} and @samp{IPAD}
246 is @code{INTEGER(KIND=1)} on machines like x86,
247 because the back end insists that @samp{IPAD}
248 be aligned to a 4-byte boundary,
249 but the processor has no such requirement
250 (though it is usually good for performance).
252 The @code{gcc} back end needs to provide a wider array
253 of specifications of alignment requirements and preferences for targets,
254 and front ends like @code{g77} should take advantage of this
255 when it becomes available.
257 @cindex complex performance
260 The @code{libf2c} routines that perform some run-time
261 arithmetic on @code{COMPLEX} operands
262 were modified circa version 0.5.20 of @code{g77}
263 to work properly even in the presence of aliased operands.
265 While the @code{g77} and @code{netlib} versions of @code{libf2c}
266 differ on how this is accomplished,
267 the main differences are that we believe
268 the @code{g77} version works properly
269 even in the presence of @emph{partially} aliased operands.
271 However, these modifications have reduced performance
272 on targets such as x86,
273 due to the extra copies of operands involved.