OSDN Git Service

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