72918d8287c54eda784c399914a4eaed1f6a0a70
[gcc.git] / gcc / fortran / ChangeLog
1 2008-02-05 Tobias Burnus <burnus@net-b.de>
2
3 PR fortran/35093
4 * data.c (gfc_assign_data_value): Only free "size" if
5 it has not already been freed.
6
7 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
8
9 PR fortran/34945
10 * array.c (match_array_element_spec): Remove check for negative
11 array size.
12 (gfc_resolve_array_spec): Add check for negative size.
13
14 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
15
16 PR fortran/32315
17 * data.c (gfc_assign_data_value): Add bounds check for array
18 references.
19
20 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
21
22 * resolve.c (resolve_where): Fix typo.
23 (gfc_resolve_where_code_in_forall): Likewise.
24
25 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
26
27 PR fortran/32760
28 * resolve.c (resolve_allocate_deallocate): New function.
29 (resolve_code): Call it for allocate and deallocate.
30 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
31 the checking of the STAT tag and put in above new function.
32 * primary,c (match_variable): Do not fix flavor of host
33 associated symbols yet if the type is not known.
34
35 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
36
37 PR fortran/34910
38 * expr.c (gfc_check_assign): It is an error to assign
39 to a sibling procedure.
40
41 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
42
43 PR fortran/34975
44 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
45 delete_symtree to gfc_delete_symtree.
46 * gfortran.h : Add prototype for gfc_delete_symtree.
47 * module.c (load_generic_interfaces): Transfer symbol to a
48 unique symtree and delete old symtree, instead of renaming.
49 (read_module): The rsym and the found symbol are the same, so
50 the found symtree can be deleted.
51
52 PR fortran/34429
53 * decl.c (match_char_spec): Remove the constraint on deferred
54 matching of functions and free the length expression.
55 delete_symtree to gfc_delete_symtree.
56 (gfc_match_type_spec): Whitespace.
57 (gfc_match_function_decl): Defer characteristic association for
58 all types except BT_UNKNOWN.
59 * parse.c (decode_specification_statement): Only derived type
60 function matching is delayed to the end of specification.
61
62 2008-01-28 Tobias Burnus <burnus@net-b.de>
63
64 PR libfortran/34980
65 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
66
67 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
68
69 PR fortran/34990
70 * array.c (gfc_check_constructor_type): Revert clearing the expression.
71
72 2008-01-26 Tobias Burnus <burnus@net-b.de>
73
74 PR fortran/34848
75 * trans-expr.c (gfc_conv_function_call): Don't call
76 gfc_add_interface_mapping if the expression is NULL.
77
78 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
79
80 PR fortran/31610
81 * trans-array.c (gfc_trans_create_temp_array): Remove call to
82 gcc_assert (integer_zerop (loop->from[n])).
83
84 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
85
86 PR fortran/34661
87 * resolve.c (resolve_where): Added check if user-defined assignment
88 operator is an elemental subroutine.
89 (gfc_resolve_where_code_in_forall): Likewise.
90
91 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
92
93 PR fortran/33375
94 PR fortran/34858
95 * gfortran.h: Revert changes from 2008-01-17.
96 * match.c: Likewise.
97 * symbol.c: Likewise.
98 (gfc_undo_symbols): Undo namespace changes related to common blocks.
99
100 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
101
102 PR fortran/34202
103 * data.c (formalize_structure_cons): Skip formalization on
104 empty structures.
105
106 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
107
108 * gfortran.texi (OpenMP): Extended existing documentation.
109 (contributors): Added major contributors of 2008 that were
110 not listed yet.
111 (proposed extensions): Removed implemented items.
112
113 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
114
115 PR fortran/34872
116 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
117 seen, check for a statement label and, if present, delete it
118 and set the locus to the start of the statement.
119
120 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
121
122 PR fortran/34875
123 * trans-io.c (gfc_trans_transfer): If the array reference in a
124 read has a vector subscript, use gfc_conv_subref_array_arg to
125 copy back the temporary.
126
127 2008-01-22 Tobias Burnus <burnus@net-b.de>
128
129 PR fortran/34848
130 * interface.c (compare_actual_formal): Fix adding type
131 to missing_arg_type for absent optional arguments.
132
133 2008-01-22 Tobias Burnus <burnus@net-b.de>
134
135 PR fortran/34907
136 * parse.c (parse_spec): Change = into ==.
137
138 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
139
140 PR fortran/34915
141 * expr.c (check_elemental): Fix check for valid data types.
142
143 2008-01-22 Tobias Burnus <burnus@net-b.de>
144
145 PR fortran/34899
146 * scanner.c (load_line): Support <tab><digit> continuation lines.
147 * invoke.texi (-Wtabs): Document this.
148
149 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
150
151 PR fortran/34896
152 * module.c (read_module): Set use_rename attribute.
153
154 2007-01-21 Tobias Burnus <burnus@net-b.de>
155
156 PR fortran/34901
157 * interface.c (compare_parameter): Improved error message
158 for arguments of same type and mismatched kinds.
159
160 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
161
162 PR fortran/34861
163 * resolve.c (resolve_entries): Do not do an array bounds check
164 if the result symbols are the same.
165
166 PR fortran/34854
167 * module.c (read_module) : Hide the symtree of the previous
168 version of the symbol if this symbol is renamed.
169
170 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
171
172 PR fortran/34784
173 * array.c (gfc_check_constructor_type): Clear the expression ts
174 so that the checking starts from the deepest level of array
175 constructor.
176 * primary.c (match_varspec): If an unknown type is changed to
177 default character and the attempt to match a substring fails,
178 change it back to unknown.
179
180 PR fortran/34785
181 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
182 NULL for an array constructor, use the cl.length expression to
183 build it.
184 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
185 a tree assignment.
186
187 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
188
189 PR fortran/34817
190 PR fortran/34838
191 * iresolve.c (gfc_resolve_all): Remove conversion of mask
192 argument to kind=1 by removing call to resolve_mask_arg().
193 (gfc_resolve_any): Likewise.
194
195 2008-01-19 Tobias Burnus <burnus@net-b.de>
196
197 PR fortran/34760
198 * primary.c (match_variable): Handle FL_UNKNOWN without
199 uneducated guessing.
200 (match_variable): Improve error message.
201
202 2008-01-18 Tobias Burnus <burnus@net-b.de>
203
204 PR fortran/32616
205 * interface.c (get_expr_storage_size): Return storage size
206 for array element designators.
207 (compare_actual_formal): Reject unequal string sizes for
208 assumed-shape dummy arguments. And fix error message for
209 array-sections with vector subscripts.
210
211 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
212
213 PR fortran/34556
214 * simplify.c (is_constant_array_expr): New static function that returns
215 true if the given expression is an array and is constant.
216 (gfc_simplify_reshape): Use new function.
217
218 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
219
220 PR fortran/33375
221 * symbol.c (free_common_tree): Renamed to ...
222 (gfc_free_common_tree): This. Remove static.
223 (gfc_free_namespace): Updated.
224
225 * gfortran.h (gfc_free_common_tree): New.
226
227 * match.c (gfc_match_common): Call gfc_free_common_tree () with
228 gfc_current_ns->common_root and set gfc_current_ns->common_root
229 to NULL on syntax error.
230
231 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
232
233 PR fortran/34686
234 * trans-expr.c (gfc_conv_function_call): Use proper
235 type for returned character pointers.
236
237 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
238
239 PR fortran/34429
240 PR fortran/34431
241 PR fortran/34471
242 * decl.c : Remove gfc_function_kind_locus and
243 gfc_function_type_locus. Add gfc_matching_function.
244 (match_char_length): If matching a function and the length
245 does not match, return MATCH_YES and try again later.
246 (gfc_match_kind_spec): The same.
247 (match_char_kind): The same.
248 (gfc_match_type_spec): The same for numeric and derived types.
249 (match_prefix): Rename as gfc_match_prefix.
250 (gfc_match_function_decl): Except for function valued character
251 lengths, defer applying kind, type and charlen info until the
252 end of specification block.
253 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
254 parse.c (decode_specification_statement): New function.
255 (decode_statement): Call it when a function has kind = -1. Set
256 and reset gfc_matching function, as function statement is being
257 matched.
258 (match_deferred_characteristics): Simplify with a single call
259 to gfc_match_prefix. Do appropriate error handling. In any
260 case, make sure that kind = -1 is reset or corrected.
261 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
262 Throw an error if kind = -1 after last specification statement.
263 parse.h : Prototype for gfc_match_prefix.
264
265 2008-01-16 Tobias Burnus <burnus@net-b.de>
266
267 PR fortran/34796
268 * interface.c (compare_parameter): Allow AS_DEFERRED array
269 elements and reject attr.pointer array elemenents.
270 (get_expr_storage_size): Return storage size of elements of
271 assumed-shape and pointer arrays.
272
273 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
274
275 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
276 for flag_tree_parallelize_loops.
277
278 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
279
280 PR libfortran/34671
281 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
282 (gfc_resolve_any): Likewise.
283 (gfc_resolve_count): Likewise. Don't append kind of
284 argument to function name.
285
286 2008-01-13 Tobias Burnus <burnus@net-b.de>
287
288 PR fortran/34665
289 * resolve.c (resolve_actual_arglist): For expressions,
290 also check for assume-sized arrays.
291 * interface.c (compare_parameter): Move F2003 character checks
292 here, print error messages here, reject elements of
293 assumed-shape array as argument to dummy arrays.
294 (compare_actual_formal): Update for the changes above.
295
296 2008-01-13 Tobias Burnus <burnus@net-b.de>
297
298 PR fortran/34763
299 * decl.c (contained_procedure): Only check directly preceeding state.
300
301 2008-01-13 Tobias Burnus <burnus@net-b.de>
302
303 PR fortran/34759
304 * check.c (gfc_check_shape): Accept array ranges of
305 assumed-size arrays.
306
307 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
308
309 PR fortran/34432
310 * match.c (gfc_match_name): Don't error if leading character is a '(',
311 just return MATCH_NO.
312
313 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
314
315 PR fortran/34722
316 * trans-io.c (create_dummy_iostat): Commit the symbol.
317
318 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
319
320 PR fortran/34537
321 * simplify.c (gfc_simplify_transfer): Return NULL if the size
322 of the element is unavailable and only assign character length
323 to the result, if 'mold' is constant.
324
325 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
326
327 PR fortran/34396
328 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
329 to assign strings and perform bounds checks on the string length.
330 (get_array_ctor_strlen): Remove bounds checking.
331 (gfc_trans_array_constructor): Initialize string length checking.
332 * trans-array.h : Add prototype for gfc_trans_string_copy.
333
334 2008-01-08 Richard Guenther <rguenther@suse.de>
335
336 PR fortran/34706
337 PR tree-optimization/34683
338 * trans-types.c (gfc_get_array_type_bounds): Use an array type
339 with known size for accesses if that is known.
340
341 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
342
343 PR fortran/34476
344 * expr.c (find_array_element): Check that the array bounds are
345 constant before using them. Use lower, as well as upper bound.
346 (check_restricted): Allow implied index variable.
347
348 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
349
350 PR fortran/34681
351 * trans_array.c (gfc_trans_deferred_array): Do not null the
352 data pointer on entering scope, nor deallocate it on leaving
353 scope, if the symbol has the 'save' attribute.
354
355 PR fortran/34704
356 * trans_decl.c (gfc_finish_var_decl): Derived types with
357 allocatable components and an initializer must be TREE_STATIC.
358
359 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
360
361 PR fortran/34672
362 * module.c (write_generic): Rewrite completely.
363 (write_module): Change call to write_generic.
364
365 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
366
367 PR fortran/34659
368 * scanner.c (load_line): Do not count ' ' as printable when checking for
369 continuations.
370
371 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
372
373 PR fortran/34545
374 * module.c (load_needed): If the namespace has no proc_name
375 give it the module symbol.
376
377 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
378
379 PR fortran/34387
380 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
381 the dummy variable expression, test for NULL, and pass the variable
382 address to the called function.
383
384 2007-01-06 Tobias Burnus <burnus@net-b.de>
385
386 PR fortran/34658
387 * match.c (gfc_match_common): Remove blank common in
388 DATA BLOCK warning.
389 * resolve.c (resolve_common_vars): New function.
390 (resolve_common_blocks): Move checks to resolve_common_vars
391 and invoke that function.
392 (resolve_types): Call resolve_common_vars for blank commons.
393
394 2008-01-06 Tobias Burnus <burnus@net-b.de>
395
396 PR fortran/34655
397 * resolve.c (resolve_equivalence_derived): Reject derived types with
398 default initialization if equivalenced with COMMON variable.
399
400 2008-01-06 Tobias Burnus <burnus@net-b.de>
401
402 PR fortran/34654
403 * io.c (check_io_constraints): Disallow unformatted I/O for
404 internal units.
405
406 2008-01-06 Tobias Burnus <burnus@net-b.de>
407
408 PR fortran/34660
409 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
410 ELEMENTAL functions.
411
412 2008-01-06 Tobias Burnus <burnus@net-b.de>
413
414 PR fortran/34662
415 * interface.c (compare_actual_formal): Reject parameter
416 actual to intent(out) dummy.
417
418 2008-01-04 Tobias Burnus <burnus@net-b.de>
419
420 PR fortran/34557
421 * primary.c (match_varspec): Gobble whitespace before
422 checking for '('.