]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/ChangeLog
Correct error in PR number
[gcc.git] / gcc / fortran / ChangeLog
CommitLineData
98cb5a54
PT
12006-03-19 Paul Thomas <pault@gcc.gnu.org>
2
79a495f1 3 PR fortran/26741
98cb5a54
PT
4 *expr.c (external_spec_function): Permit elemental functions.
5
6 PR fortran/26716
7 *interface.c (compare_actual_formal): Detect call for procedure
8 usage and require rank checking, in this case, for assumed shape
9 and deferred shape arrays.
10 (gfc_procedure_use): Revert to pre-PR25070 call to
11 compare_actual_formal that does not require rank checking..
12
37311e71
RS
132006-03-16 Roger Sayle <roger@eyesopen.com>
14
15 * gfortran.h (gfc_equiv_info): Add length field.
16 * trans-common.c (copy_equiv_list_to_ns): Set the length field.
17 * dependency.c (gfc_are_equivalenced_arrays): Use both the offset
18 and length fields to determine whether the two equivalenced symbols
19 overlap in memory.
20
3fbab549
JD
212006-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
22
23 PR fortran/19101
24 * gfortran.h: Add warn_ampersand.
25 * invoke.texi: Add documentation for new option.
26 * lang.opt: Add Wampersand.
27 * options.c (gfc_init_options): Initialize warn_ampersand.
28 (gfc_post_options): Set the warn if pedantic.
29 (set_Wall): Set warn_ampersand.
30 (gfc_handle_option: Add Wampersand for itself, -std=f95, and -std=f2003.
31 * scanner.c (gfc_next_char_literal): Add test for missing '&' in
32 continued character constant and give warning if missing.
33
840bd9f7
SK
342006-03-14 Steven G. Kargl <kargls@comcast.net>
35
36 PR 18537
37 * gfortran.h: Wrap Copyright line.
38 (gfc_option_t): add warn_tabs member.
39 * lang.opt: Update Coyright year. Add the Wtabs.
40 * invoke.texi: Document -Wtabs.
41 * scanner.c (gfc_gobble_whitespace): Use warn_tabs. Add linenum to
42 suppress multiple warnings.
43 (load_line): Use warn_tabs. Add linenum, current_line, seen_comment
44 to suppress multiple warnings.
45 * options.c (gfc_init_options): Initialize warn_tabs.
46 (set_Wall): set warn_tabs for -Wall.
47 (gfc_post_options): Adjust flag_tabs depending on -pedantic.
48 (gfc_handle_option): Process command-line option -W[no-]tabs
49
a4b9e93e
PT
502006-03-13 Paul Thomas <pault@gcc.gnu.org>
51
52 PR fortran/25378
53 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
54 modify the condition for updating it, to implement the F2003 requirement for all(mask)
55 is false.
56
4b8ae4db
JJ
572006-03-13 Jakub Jelinek <jakub@redhat.com>
58
11a5f608
JJ
59 * trans-openmp.c (gfc_trans_omp_variable): Handle references
60 to parent result.
61 * trans-expr.c (gfc_conv_variable): Remove useless setting
62 of parent_flag, formatting.
63
4b8ae4db
JJ
64 * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
65 GFC_DECL_RESULT flag.
66
37ad72f2
RS
672003-03-11 Roger Sayle <roger@eyesopen.com>
68
69 * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
70 binary operators to compare equal if their operands are equal.
71 <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
72 to compare equal, if their operands are equal.
73
8e119f1b
EE
742006-03-11 Erik Edelmann <eedelman@gcc.gnu.org>
75
76 * symbol.c (check_conflict): Allow allocatable function results,
37ad72f2 77 except for elemental functions.
8e119f1b 78 * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
37ad72f2
RS
79 (gfc_trans_create_temp_array): ... this, and add new argument
80 callee_alloc.
81 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
82 to gfc_trans_allocate_temp_array.
8e119f1b
EE
83 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
84 * trans-expr.c (gfc_conv_function_call): Use new arg of
37ad72f2
RS
85 gfc_trans_create_temp_array avoid pre-allocation of temporary
86 result variables of pointer AND allocatable functions.
87 (gfc_trans_arrayfunc_assign): Return NULL for allocatable
88 functions.
8e119f1b 89 * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
37ad72f2 90 from sym->result to sym.
8e119f1b 91
17029ac2
EE
922006-03-09 Erik Edelmann <eedelman@gcc.gnu.org>
93
94 * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
95 attribute from sym to new_sym. Call build_fold_indirect_ref()
96 for allocatable arguments.
97
ad5dd90d
PT
982006-03-09 Paul Thomas <pault@gcc.gnu.org>
99
100 PR fortran/26257
101 * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
102 the offset and data when se->data_not_needed is set.
103 * trans.h: Include the data_not_need bit in gfc_se.
104 * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
105
06af4f5d 1062006-03-06 Paul Thomas <pault@gcc.gnu.org>
42a0e16c
PT
107 Erik Edelmann <eedelman@gcc.gnu.org>
108
109 * trans-array.c (gfc_trans_dealloc_allocated): New function.
110 (gfc_trans_deferred_array): Use it, instead of inline code.
111 * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
112 * trans-expr.c (gfc_conv_function_call): Deallocate allocated
113 ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
114
5f20c93a
PT
1152006-03-06 Paul Thomas <pault@gcc.gnu.org>
116
117 PR fortran/26107
118 * resolve.c (resolve_function): Add name after test for pureness.
119
120 PR fortran/19546
121 * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
122 store current_function_decl, replace with parent, whilst calls are
123 made to gfc_get_fake_result_decl, and restore afterwards. Signal this
124 to gfc_get_fake_result_decl with a new argument, parent_flag.
125 * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
126 is set to zero.
127 * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
128 * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
129 add decl to parent function. Replace refs to current_fake_result_decl
130 with refs to this_result_decl.
131 (gfc_generate_function_code): Null parent_fake_result_decl before the
132 translation of code for contained procedures. Set parent_flag to zero
133 in call to gfc_get_fake_result_decl.
134 * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
135
9202989a
SK
1362006-03-05 Steven G. Kargl <kargls@comcast.net>
137
138 * simplify.c (gfc_simplify_verify): Fix return when SET=''.
139
5f20c93a 1402006-03-05 Erik Edelmann <eedelman@gcc.gnu.org>
aa08038d
EE
141
142 PR fortran/16136
143 * symbol.c (conf_std): New macro.
144 (check_conflict): Use it to allow ALLOCATABLE dummy
145 arguments for F2003.
146 * trans-expr.c (gfc_conv_function_call): Pass the
147 address of the array descriptor when dummy argument is
148 ALLOCATABLE.
149 * interface.c (compare_allocatable): New function.
150 (compare_actual_formal): Use it.
151 * resolve.c (resolve_deallocate_expr,
152 resolve_allocate_expr): Check that INTENT(IN) variables
153 aren't (de)allocated.
154 * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
155 dummy arguments as supported.
156
636ffc57
RS
1572006-03-03 Roger Sayle <roger@eyesopen.com>
158
159 * dependency.c (gfc_check_element_vs_element): Revert last change.
160
12de6bc6
RS
1612006-03-03 Roger Sayle <roger@eyesopen.com>
162
163 * dependency.c (gfc_check_element_vs_element): Consider two
164 unordered scalar subscripts as (potentially) equal.
165
0b8f2ce4
RS
1662006-03-03 Roger Sayle <roger@eyesopen.com>
167
168 * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
169 check whether two array references have a dependency.
170 (gfc_check_element_vs_element): Assume lref and rref must be
171 REF_ARRAYs. If gfc_dep_compare_expr returns -2, assume these
172 references could potentially overlap.
173 (gfc_dep_resolver): Whitespace and comment tweaks. Assume a
174 dependency if the references have different depths. Rewrite
175 final term to clarrify we only have a dependency for overlaps.
176
5b725b8d
TK
1772006-03-03 Thomas Koenig <Thomas.Koenig@online.de>
178
179 PR fortran/25031
180 * trans-array.h: Adjust gfc_array_allocate prototype.
181 * trans-array.c (gfc_array_allocate): Change type of
182 gfc_array_allocatate to bool. Function returns true if
183 it operates on an array. Change second argument to gfc_expr.
184 Find last reference in chain.
185 If the function operates on an allocatable array, emit call to
186 allocate_array() or allocate64_array().
187 * trans-stmt.c (gfc_trans_allocate): Code to follow to last
188 reference has been moved to gfc_array_allocate.
189 * trans.h: Add declaration for gfor_fndecl_allocate_array and
190 gfor_fndecl_allocate64_array.
191 (gfc_build_builtin_function_decls): Add gfor_fndecl_allocate_array
192 and gfor_fndecl_allocate64_array.
193
011daa76
RS
1942006-03-01 Roger Sayle <roger@eyesopen.com>
195
196 * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
197 INVERT argument to invert the sense of the WHEREMASK argument.
198 Remove unneeded code to AND together a list of masks.
199 (generate_loop_for_rhs_to_temp): Likewise.
200 (gfc_trans_assign_need_temp): Likewise.
201 (gfc_trans_forall_1): Likewise.
202 (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
203 to specify the sense of the MASK argument.
204 (gfc_trans_where_assign): Likewise.
205 (gfc_trans_where_2): Likewise. Restructure code that decides
206 whether we need to allocate zero, one or two temporary masks.
0b8f2ce4 207 If this is a top-level WHERE (i.e. the incoming MASK is NULL),
011daa76
RS
208 we only need to allocate at most one temporary mask, and can
209 invert it's sense to provide the complementary pending execution
210 mask. Only calculate the size of the required temporary arrays
211 if we need any.
212 (gfc_trans_where): Update call to gfc_trans_where_2.
213
61321991
PT
2142006-03-01 Paul Thomas <pault@gcc.gnu.org>
215
216 * iresolve.c (gfc_resolve_dot_product): Remove any difference in
217 treatment of logical types.
218 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): New function.
219
220 PR fortran/26393
221 * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
222 must be referenced to include unreferenced symbols in an interface
223 body.
224
225 PR fortran/20938
226 * trans-array.c (gfc_conv_resolve_dependencies): Add call to
227 gfc_are_equivalenced_arrays.
228 * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
229 functions. (gfc_free_namespace): Call them.
230 * trans-common.c (copy_equiv_list_to_ns): New function.
231 (add_equivalences): Call it.
232 * gfortran.h: Add equiv_lists to gfc_namespace and define
233 gfc_equiv_list and gfc_equiv_info.
234 * dependency.c (gfc_are_equivalenced_arrays): New function.
235 (gfc_check_dependency): Call it.
236 * dependency.h: Prototype for gfc_are_equivalenced_arrays.
237
c10bc6e9
RS
2382006-03-01 Roger Sayle <roger@eyesopen.com>
239
240 * dependency.c (gfc_is_same_range): Compare the stride, lower and
241 upper bounds when testing array reference ranges for equality.
242 (gfc_check_dependency): Fix indentation whitespace.
243 (gfc_check_element_vs_element): Likewise.
244 (gfc_dep_resolver): Likewise.
245
8cd25827
TK
2462006-02-28 Thomas Koenig <Thomas.Koenig@online.de>
247
248 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
249 If the mask expression exists and has rank 0, enclose the
250 generated loop in an "if (mask)". Put the default
251 initialization into the else branch.
252
eaf618e3
TK
2532006-02-25 Thomas Koenig <Thomas.Koenig@online.de>
254
255 PR fortran/23092
256 * trans-intrinsic.c (gfc_conv_intrinsic_arith): If the
257 mask expression exists and has rank 0, enclose the generated
258 loop in an "if (mask)".
259 * (gfc_conv_intrinsic_minmaxloc): Likewise.
260
0f3162e3
PT
2612006-02-24 Paul Thomas <pault@gcc.gnu.org>
262
263 PR fortran/26409
264 * resolve.c (resolve_contained_functions, resolve_types,
265 gfc_resolve): Revert patch of 2006-02-19.
266
8a0b57b3
PT
2672006-02-24 Paul Thomas <pault@gcc.gnu.org>
268
269 PR fortran/24519
270 * dependency.c (gfc_is_same_range): Correct typo.
271 (gfc_check_section_vs_section): Call gfc_is_same_range.
272
273 PR fortran/25395
274 * trans-common.c (add_equivalences): Add a new flag that is set when
275 an equivalence is seen that prevents more from being reset until the
276 start of a new traversal of the list, thus ensuring completion of
277 all the equivalences.
278
10c5bc6c
EE
2792006-02-23 Erik Edelmann <eedelman@gcc.gnu.org>
280
281 * module.c (read_module): Remove redundant code lines.
282
9d29a5b7
RE
283