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-25
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://egcs.cygnus.com/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 Input to a @code{NAMELIST} read involving a repeat count,
102 such as @samp{K(5)=10*3},
103 is not properly handled by @code{libf2c}.
104 The first item is written to @samp{K(5)},
105 but the remaining nine are written elsewhere (still within the array),
106 not necessarily starting at @samp{K(6)}.
108 A fix is pending, certainly for @code{gcc} 3.0,
109 perhaps for 2.96 if such a release is made.
112 @code{g77} fails to warn about
113 use of a ``live'' iterative-DO variable
114 as an implied-DO variable
115 in a @code{WRITE} or @code{PRINT} statement
116 (although it does warn about this in a @code{READ} statement).
119 Something about @code{g77}'s straightforward handling of
120 label references and definitions sometimes prevents the GBE
121 from unrolling loops.
122 Until this is solved, try inserting or removing @code{CONTINUE}
123 statements as the terminal statement, using the @code{END DO}
124 form instead, and so on.
127 Some confusion in diagnostics concerning failing @code{INCLUDE}
128 statements from within @code{INCLUDE}'d or @code{#include}'d files.
130 @cindex integer constants
131 @cindex constants, integer
133 @code{g77} assumes that @code{INTEGER(KIND=1)} constants range
134 from @samp{-2**31} to @samp{2**31-1} (the range for
135 two's-complement 32-bit values),
136 instead of determining their range from the actual range of the
137 type for the configuration (and, someday, for the constant).
139 Further, it generally doesn't implement the handling
140 of constants very well in that it makes assumptions about the
141 configuration that it no longer makes regarding variables (types).
143 Included with this item is the fact that @code{g77} doesn't recognize
144 that, on IEEE-754/854-compliant systems, @samp{0./0.} should produce a NaN
145 and no warning instead of the value @samp{0.} and a warning.
146 This is to be fixed in version 0.6, when @code{g77} will use the
147 @code{gcc} back end's constant-handling mechanisms to replace its own.
149 @cindex compiler speed
150 @cindex speed, of compiler
151 @cindex compiler memory usage
152 @cindex memory usage, of compiler
153 @cindex large aggregate areas
154 @cindex initialization, bug
155 @cindex DATA statement
156 @cindex statements, DATA
158 @code{g77} uses way too much memory and CPU time to process large aggregate
159 areas having any initialized elements.
161 For example, @samp{REAL A(1000000)} followed by @samp{DATA A(1)/1/}
162 takes up way too much time and space, including
163 the size of the generated assembler file.
164 This is to be mitigated somewhat in version 0.6.
166 Version 0.5.18 improves cases like this---specifically,
167 cases of @emph{sparse} initialization that leave large, contiguous
168 areas uninitialized---significantly.
169 However, even with the improvements, these cases still
170 require too much memory and CPU time.
172 (Version 0.5.18 also improves cases where the initial values are
173 zero to a much greater degree, so if the above example
174 ends with @samp{DATA A(1)/0/}, the compile-time performance
175 will be about as good as it will ever get, aside from unrelated
176 improvements to the compiler.)
178 Note that @code{g77} does display a warning message to
179 notify the user before the compiler appears to hang.
181 @xref{Large Initialization,,Initialization of Large Aggregate Areas},
182 for information on how to change the point at which
183 @code{g77} decides to issue this warning.
187 @cindex common blocks
188 @cindex equivalence areas
189 @cindex local equivalence areas
191 @code{g77} doesn't emit variable and array members of common blocks for use
192 with a debugger (the @samp{-g} command-line option).
193 The code is present to do this, but doesn't work with at least
194 one debug format---perhaps it works with others.
195 And it turns out there's a similar bug for
196 local equivalence areas, so that has been disabled as well.
198 As of Version 0.5.19, a temporary kludge solution is provided whereby
199 some rudimentary information on a member is written as a string that
200 is the member's value as a character string.
203 @xref{Code Gen Options,,Options for Code Generation Conventions},
204 for information on the @samp{-fdebug-kludge} option.
207 @cindex code, displaying main source
208 @cindex displaying main source code
209 @cindex debugging main source code
210 @cindex printing main source
212 When debugging, after starting up the debugger but before being able
213 to see the source code for the main program unit, the user must currently
214 set a breakpoint at @code{MAIN__} (or @code{MAIN___} or @code{MAIN_} if
215 @code{MAIN__} doesn't exist)
216 and run the program until it hits the breakpoint.
218 main program unit is activated and about to execute its first
219 executable statement, but that's the state in which the debugger should
220 start up, as is the case for languages like C.
224 Debugging @code{g77}-compiled code using debuggers other than
225 @code{gdb} is likely not to work.
227 Getting @code{g77} and @code{gdb} to work together is a known
228 problem---getting @code{g77} to work properly with other
229 debuggers, for which source code often is unavailable to @code{g77}
230 developers, seems like a much larger, unknown problem,
231 and is a lower priority than making @code{g77} and @code{gdb}
232 work together properly.
234 On the other hand, information about problems other debuggers
235 have with @code{g77} output might make it easier to properly
236 fix @code{g77}, and perhaps even improve @code{gdb}, so it
237 is definitely welcome.
238 Such information might even lead to all relevant products
239 working together properly sooner.
241 @cindex Alpha, support
242 @cindex support, Alpha
244 @code{g77} doesn't work perfectly on 64-bit configurations
245 such as the Digital Semiconductor (``DEC'') Alpha.
247 This problem is largely resolved as of version 0.5.23.
248 Version 0.6 should solve most or all remaining problems
249 (such as cross-compiling involving 64-bit machines).
253 @cindex common blocks
254 @cindex equivalence areas
256 @code{g77} currently inserts needless padding for things like
257 @samp{COMMON A,IPAD} where @samp{A} is @code{CHARACTER*1} and @samp{IPAD}
258 is @code{INTEGER(KIND=1)} on machines like x86,
259 because the back end insists that @samp{IPAD}
260 be aligned to a 4-byte boundary,
261 but the processor has no such requirement
262 (though it is usually good for performance).
264 The @code{gcc} back end needs to provide a wider array
265 of specifications of alignment requirements and preferences for targets,
266 and front ends like @code{g77} should take advantage of this
267 when it becomes available.
269 @cindex complex performance
272 The @code{libf2c} routines that perform some run-time
273 arithmetic on @code{COMPLEX} operands
274 were modified circa version 0.5.20 of @code{g77}
275 to work properly even in the presence of aliased operands.
277 While the @code{g77} and @code{netlib} versions of @code{libf2c}
278 differ on how this is accomplished,
279 the main differences are that we believe
280 the @code{g77} version works properly
281 even in the presence of @emph{partially} aliased operands.
283 However, these modifications have reduced performance
284 on targets such as x86,
285 due to the extra copies of operands involved.