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