OSDN Git Service

2001-05-22 Toon Moene <toon@moene.indiv.nluug.nl>
[pf3gnuchains/gcc-fork.git] / gcc / f / bugs.texi
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.
4
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.
7
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,2001
11
12 @set last-update-bugs 2001-05-22
13
14 @include root.texi
15
16 @ifset DOC-BUGS
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.
23
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.
29
30 @node Top,,, (dir)
31 @chapter Known Bugs In GNU Fortran
32 @end ifset
33
34 @ifset DOC-G77
35 @node Known Bugs
36 @section Known Bugs In GNU Fortran
37 @end ifset
38
39 This section identifies bugs that @code{g77} @emph{users}
40 might run into in the @value{which-g77} version
41 of @code{g77}.
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.
47
48 @ifset DOC-G77
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.
53 @end ifset
54
55 @ifset DOC-BUGS
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.
60 @end ifset
61
62 @ifset DEVELOPMENT
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}.
70
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.
76 @end ifset
77
78 An online, ``live'' version of this document
79 (derived directly from the mainline, development version
80 of @code{g77} within @code{gcc})
81 is available via
82 @uref{http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html}.
83 Follow the ``Known Bugs'' link.
84
85 @ifset DOC-G77
86 For information on bugs that might afflict people who
87 configure, port, build, and install @code{g77},
88 see @ref{Problems Installing}.
89 @end ifset
90
91 @ifset DOC-BUGS
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}.
95 @end ifset
96
97 The following information was last updated on @value{last-update-bugs}:
98
99 @itemize @bullet
100 @item
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).
106
107 @item
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.
114
115 @item
116 Some confusion in diagnostics concerning failing @code{INCLUDE}
117 statements from within @code{INCLUDE}'d or @code{#include}'d files.
118
119 @cindex integer constants
120 @cindex constants, integer
121 @item
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).
127
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).
131
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.
137
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
146 @item
147 @code{g77} uses way too much memory and CPU time to process large aggregate
148 areas having any initialized elements.
149
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.
154
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.
160
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.)
166
167 Note that @code{g77} does display a warning message to
168 notify the user before the compiler appears to hang.
169 @ifset DOC-G77
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.
173 @end ifset
174
175 @cindex code, displaying main source
176 @cindex displaying main source code
177 @cindex debugging main source code
178 @cindex printing main source
179 @item
180 When debugging, after starting up the debugger but before being able
181 to see the source code for the main program unit, the user must currently
182 set a breakpoint at @code{MAIN__} (or @code{MAIN___} or @code{MAIN_} if
183 @code{MAIN__} doesn't exist)
184 and run the program until it hits the breakpoint.
185 At that point, the
186 main program unit is activated and about to execute its first
187 executable statement, but that's the state in which the debugger should
188 start up, as is the case for languages like C.
189
190 @cindex debugger
191 @item
192 Debugging @code{g77}-compiled code using debuggers other than
193 @code{gdb} is likely not to work.
194
195 Getting @code{g77} and @code{gdb} to work together is a known
196 problem---getting @code{g77} to work properly with other
197 debuggers, for which source code often is unavailable to @code{g77}
198 developers, seems like a much larger, unknown problem,
199 and is a lower priority than making @code{g77} and @code{gdb}
200 work together properly.
201
202 On the other hand, information about problems other debuggers
203 have with @code{g77} output might make it easier to properly
204 fix @code{g77}, and perhaps even improve @code{gdb}, so it
205 is definitely welcome.
206 Such information might even lead to all relevant products
207 working together properly sooner.
208
209 @cindex Alpha, support
210 @cindex support, Alpha
211 @item
212 @code{g77} doesn't work perfectly on 64-bit configurations
213 such as the Digital Semiconductor (``DEC'') Alpha.
214
215 This problem is largely resolved as of version 0.5.23.
216 Version 0.6 should solve most or all remaining problems
217 (such as cross-compiling involving 64-bit machines).
218
219 @cindex padding
220 @cindex structures
221 @cindex common blocks
222 @cindex equivalence areas
223 @item
224 @code{g77} currently inserts needless padding for things like
225 @samp{COMMON A,IPAD} where @samp{A} is @code{CHARACTER*1} and @samp{IPAD}
226 is @code{INTEGER(KIND=1)} on machines like x86,
227 because the back end insists that @samp{IPAD}
228 be aligned to a 4-byte boundary,
229 but the processor has no such requirement
230 (though it is usually good for performance).
231
232 The @code{gcc} back end needs to provide a wider array
233 of specifications of alignment requirements and preferences for targets,
234 and front ends like @code{g77} should take advantage of this
235 when it becomes available.
236
237 @cindex complex performance
238 @cindex aliasing
239 @item
240 The @code{libf2c} routines that perform some run-time
241 arithmetic on @code{COMPLEX} operands
242 were modified circa version 0.5.20 of @code{g77}
243 to work properly even in the presence of aliased operands.
244
245 While the @code{g77} and @code{netlib} versions of @code{libf2c}
246 differ on how this is accomplished,
247 the main differences are that we believe
248 the @code{g77} version works properly
249 even in the presence of @emph{partially} aliased operands.
250
251 However, these modifications have reduced performance
252 on targets such as x86,
253 due to the extra copies of operands involved.
254 @end itemize