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