OSDN Git Service

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