OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2008-03-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2
3         * invoke.texi (Error and Warning Options): Document
4         -Wline-truncation.
5
6 2008-03-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7
8         PR fortran/34956
9         * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
10         checking bounds of absent optional arguments.
11
12 2008-03-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
13
14         PR fortran/33197
15         * intrinsic.c (add_functions): Add simplification routines for
16         ERF, DERF, ERFC and DERFC.
17         * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
18         extensions into Fortran 2008 features.
19         * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
20         prototypes.
21         * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
22
23 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
24
25         PR fortran/33197
26         * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
27         ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
28         ERFC_SCALED, LOG_GAMMA and HYPOT.
29         * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
30         gfc_resolve_hypot): New prototypes.
31         * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
32         ACOSH, ASINH and ATANH available.
33         * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
34         * lang.opt: Add -std=f2008 option.
35         * libgfortran.h: Define GFC_STD_F2008.
36         * lang-specs.h: Add .f08 and .F08 file suffixes.
37         * iresolve.c (gfc_resolve_hypot): New function.
38         * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
39         * check.c (gfc_check_hypot): New function.
40         * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
41         * options.c (set_default_std_flags): Allow Fortran 2008 by default.
42         (form_from_filename): Add .f08 suffix.
43         (gfc_handle_option): Handle -std=f2008 option.
44         * simplify.c (gfc_simplify_hypot): New function.
45         * gfortran.texi: Document Fortran 2008 status and file extensions.
46         * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
47         as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
48         ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
49         * invoke.texi: Document the new -std=f2008 option.
50
51 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
52
53         * gfortranspec.c (lang_specific_driver): Update copyright notice
54         dates.
55
56 2008-02-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
57
58         PR fortran/35059
59         * expr.c (find_array_element): Modify traversing the constructor to
60         avoid trying to access NULL memory pointed to by next for the
61         last element. (find_array_section): Exit while loop if cons->next is
62         NULL.
63         * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
64         (gfc_conv_function_call): Same.
65         * decl.c (gfc_match_implicit): Same.
66         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
67
68 2008-02-28  Daniel Franke  <franke.daniel@gmail.com>
69
70         PR fortran/31463
71         PR fortran/33950
72         PR fortran/34296
73         * lang.opt: Added -Wreturn-type.
74         * options.c (gfc_handle_option): Recognize -Wreturn-type.
75         * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
76         where the result value is not set.
77         (gfc_generate_function_code): Likewise.
78         (generate_local_decl): Emit warnings for funtions whose RESULT
79         variable is not set.
80
81 2008-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
82
83         PR fortran/34868
84         * trans-expr.c (gfc_conv_variable): Don't build indirect
85         references when explicit interface is mandated.
86         * resolve.c (resolve_formal_arglist): Set attr.always_explicit
87         on the result symbol as well as the procedure symbol.
88
89 2008-02-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
90
91         PR fortran/33387
92         * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
93         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
94         gfor_fndecl_math_exponent16.
95         * f95-lang.c (build_builtin_fntypes): Add new function types.
96         (gfc_init_builtin_functions): Add new builtins for nextafter,
97         frexp, ldexp, fabs, scalbn and inf.
98         * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
99         (gfc_resolve_scale): Don't convert type of second argument.
100         (gfc_resolve_set_exponent): Likewise.
101         (gfc_resolve_size): Don't add hidden arguments.
102         * trans-decl.c: Remove gfor_fndecl_math_exponent4,
103         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
104         gfor_fndecl_math_exponent16.
105         * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
106         for scalbn, fraction, nearest, rrspacing, set_exponent and
107         spacing.
108         (gfc_conv_intrinsic_exponent): Directly call frexp.
109         (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
110         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
111         gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
112         functions.
113         (gfc_conv_intrinsic_function): Use the new functions above.
114
115 2008-02-26  Tobias Burnus  <burnus@net-b.de>
116
117         PR fortran/35033
118         * interface.c (check_operator_interface): Show better line for error
119         messages; fix constrains for user-defined assignment operators.
120         (gfc_extend_assign): Fix constrains for user-defined assignment
121         operators.
122
123 2008-02-26  Tom Tromey  <tromey@redhat.com>
124
125         * trans-io.c (set_error_locus): Remove old location code.
126         * trans-decl.c (gfc_set_decl_location): Remove old location code.
127         * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
128         * scanner.c (gfc_gobble_whitespace): Remove old location code.
129         (get_file): Likewise.
130         (preprocessor_line): Likewise.
131         (load_file): Likewise.
132         (gfc_new_file): Likewise.
133         * trans.c (gfc_trans_runtime_check): Remove old location code.
134         (gfc_get_backend_locus): Likewise.
135         (gfc_set_backend_locus): Likewise.
136         * data.c (gfc_assign_data_value): Remove old location code.
137         * error.c (show_locus): Remove old location code.
138         * gfortran.h (gfc_linebuf): Remove old location code.
139         (gfc_linebuf_linenum): Remove old-location variant.
140
141 2008-02-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
142
143         PR fortran/34729
144         * trans-const.c (gfc_build_string_const): Don't call gettext.
145         (gfc_build_localized_string_const): New function.
146         * trans-const.h (gfc_build_localized_string_const): New prototype.
147         * trans.c (gfc_trans_runtime_check): Use
148         gfc_build_localized_string_const instead of gfc_build_string_const.
149         (gfc_call_malloc): Likewise.
150         (gfc_allocate_with_status): Likewise.
151         (gfc_allocate_array_with_status): Likewise.
152         (gfc_deallocate_with_status): Likewise.
153         (gfc_call_realloc): Likewise.
154         * trans-io.c (gfc_trans_io_runtime_check): Likewise.
155
156 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
157
158         * arith.c: Update copyright years.
159         * arith.h: Likewise.
160         * array.c: Likewise.
161         * bbt.c: Likewise.
162         * check.c: Likewise.
163         * data.c: Likewise.
164         * data.h: Likewise.
165         * decl.c: Likewise.
166         * dependency.c: Likewise.
167         * dependency.h: Likewise.
168         * dump-parse-tree.c: Likewise.
169         * error.c: Likewise.
170         * expr.c: Likewise.
171         * gfc-internals.texi: Likewise.
172         * gfortran.h: Likewise.
173         * gfortran.texi: Likewise.
174         * gfortranspec.c: Likewise.
175         * interface.c: Likewise.
176         * intrinsic.c: Likewise.
177         * intrinsic.h: Likewise.
178         * intrinsic.texi: Likewise.
179         * invoke.texi: Likewise.
180         * io.c: Likewise.
181         * iresolve.c: Likewise.
182         * iso-c-binding.def: Likewise.
183         * iso-fortran-env.def: Likewise.
184         * lang-specs.h: Likewise.
185         * lang.opt: Likewise.
186         * libgfortran.h: Likewise.
187         * match.c: Likewise.
188         * match.h: Likewise.
189         * matchexp.c: Likewise.
190         * misc.c: Likewise.
191         * module.c: Likewise.
192         * openmp.c: Likewise.
193         * options.c: Likewise.
194         * parse.c: Likewise.
195         * parse.h: Likewise.
196         * primary.c: Likewise.
197         * resolve.c: Likewise.
198         * scanner.c: Likewise.
199         * simplify.c: Likewise.
200         * st.c: Likewise.
201         * symbol.c: Likewise.
202         * target-memory.c: Likewise.
203         * target-memory.h: Likewise.
204         * trans-array.h: Likewise.
205         * trans-const.h: Likewise.
206         * trans-stmt.h: Likewise.
207         * trans-types.c: Likewise.
208         * trans-types.h: Likewise.
209         * types.def: Likewise.
210
211 2008-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
212
213         PR fortran/35223
214         * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
215         (gfc_simplify_ibset): Remove call to range_check.
216         (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
217         (gfc_simplify_real): Add call gfc_clear_ts to initialize the
218         temporary gfc_typspec variable.
219
220 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
221
222         * trans-array.c (gfc_conv_descriptor_data_get,
223         gfc_conv_descriptor_data_set_internal,
224         gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
225         gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
226         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
227         gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
228         gfc_conv_array_transpose, gfc_grow_array,
229         gfc_trans_array_constructor_subarray,
230         gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
231         gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
232         gfc_conv_array_initializer, gfc_trans_array_bounds,
233         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
234         gfc_get_dataptr_offset, gfc_conv_array_parameter,
235         gfc_trans_dealloc_allocated, get_full_array_size,
236         gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
237         instead of buildN.
238         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
239         gfc_conv_component_ref, gfc_conv_cst_int_power,
240         gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
241         * trans-common.c (create_common): Likewise.
242         * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
243         Likewise.
244         * trans-const.c (gfc_conv_constant_to_tree): Likewise.
245         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
246         gfc_trans_integer_select, gfc_trans_character_select,
247         gfc_trans_forall_loop, compute_overall_iter_number,
248         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
249         gfc_trans_deallocate): Likewise.
250         * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
251         gfc_allocate_with_status, gfc_allocate_array_with_status,
252         gfc_deallocate_with_status): Likewise.
253         * f95-lang.c (gfc_truthvalue_conversion): Likewise.
254         * trans-io.c (set_parameter_const, set_parameter_value,
255         set_parameter_ref, set_string, set_internal_unit, io_result,
256         set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
257         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
258         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
259         gfc_generate_function_code): Likewise.
260         * convert.c (convert): Likewise.
261         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
262         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
263         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
264         gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
265         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
266         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
267         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
268         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
269         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
270         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
271         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
272         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
273         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
274         gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
275         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
276         gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
277         gfc_conv_intrinsic_repeat): Likewise.
278
279 2008-02-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
280
281         PR target/25477
282         * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
283         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
284         * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
285         gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
286         * trans-decl.c: Likewise.
287
288 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
289
290         PR fortran/35059
291         * expr.c (find_array_element): Modify traversing the constructor to
292         avoid trying to access NULL memory pointed to by next for the
293         last element. (find_array_section): Exit while loop if cons->next is
294         NULL.
295
296 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
297
298         PR fortran/34907
299         * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
300         structure.
301         (gfc_resolve_aint): Likewise.
302         (gfc_resolve_anint): Likewise.
303         (gfc_resolve_besn): Likewise.
304         (gfc_resolve_cshift): Likewise.
305         (gfc_resolve_ctime): Likewise.
306         (gfc_resolve_eoshift): Likewise.
307         (gfc_resolve_index_func): Likewise.
308         (gfc_resolve_isatty): Likewise.
309         (gfc_resolve_malloc): Likewise.
310         (gfc_resolve_rrspacing): Likewise.
311         (gfc_resolve_scale): Likewise.
312         (gfc_resolve_set_exponent): Likewise.
313         (gfc_resolve_spacing): Likewise.
314         (gfc_resolve_spacing): Likewise.
315         (gfc_resolve_fgetc): Likewise.
316         (gfc_resolve_fputc): Likewise.
317         (gfc_resolve_ftell): Likewise.
318         (gfc_resolve_ttynam): Likewise.
319         (gfc_resolve_alarm_sub): Likewise.
320         (gfc_resolve_mvbits): Likewise.
321         (gfc_resolve_getarg): Likewise.
322         (gfc_resolve_signal_sub): Likewise.
323         (gfc_resolve_exit): Likewise.
324         (gfc_resolve_flush): Likewise.
325         (gfc_resolve_free): Likewise.
326         (gfc_resolve_ctime_sub): Likewise.
327         (gfc_resolve_fgetc_sub): Likewise.
328         (gfc_resolve_fputc_sub): Likewise.
329         (gfc_resolve_fseek_sub): Likewise.
330         (gfc_resolve_ftell_sub): Likewise.
331         (gfc_resolve_ttynam_sub): Likewise.
332
333 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
334
335         * gfc-internals.texi: Fix typos and markup nits.
336         * gfortran.texi: Likewise.
337         * intrinsic.texi: Likewise.
338
339 2008-02-21  Richard Guenther  <rguenther@suse.de>
340
341         * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
342         as unary PAREN_EXPR for real and complex typed expressions.
343         (gfc_conv_unary_op): Fold the built tree.
344
345 2008-02-20  Tobias Burnus  <burnus@net-b.de>
346
347         PR fortran/34997
348         * match.c (gfc_match_name): Improve error message for '$'.
349
350 2008-02-19  Daniel Franke  <franke.daniel@gmail.com>
351
352         PR fortran/35030
353         * expr.c (gfc_check_pointer_assign): Add type and kind information
354         to type-mismatch message.
355         (gfc_check_assign): Unify error messages.
356
357 2008-02-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
358
359         PR fortran/34952
360         * gfortran.texi: Create new section for unimplemented extensions.
361         Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
362         Remove "smaller projects" list. Fix a few typos.
363
364 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
365
366         * intrinsic.texi: Rename INDEX node to avoid clashing with
367         index.html on case-insensitive systems.
368
369 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
370
371         PR fortran/35150
372         * trans-expr.c (gfc_conv_function_call): Force evaluation of
373         se->expr.
374
375 2008-02-10  Daniel Franke  <franke.daniel@gmail.com>
376
377         PR fortran/35019
378         * lang.opt: Allow '-J<dir>' next to '-J <dir>', 
379         likewise '-I <dir>' and '-I<dir>'.
380
381 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
382
383         PR other/35107
384         * Make-lang.in (f951): Add $(GMPLIBS).
385
386 2008-02-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
387
388         PR fortran/35037
389         * trans-common.c (build_field): Mark fields as volatile when needed.
390
391 2008-02-05  Tobias Burnus  <burnus@net-b.de>
392
393         PR fortran/35093
394         * data.c (gfc_assign_data_value): Only free "size" if
395         it has not already been freed.
396
397 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
398
399         PR fortran/34945
400         * array.c (match_array_element_spec): Remove check for negative
401         array size.
402         (gfc_resolve_array_spec): Add check for negative size.
403
404 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
405
406         PR fortran/32315
407         * data.c (gfc_assign_data_value): Add bounds check for array
408         references.
409
410 2008-02-04  Daniel Franke  <franke.daniel@gmail.com>
411
412         * resolve.c (resolve_where): Fix typo.
413         (gfc_resolve_where_code_in_forall): Likewise.
414
415 2008-02-03  Paul Thomas  <pault@gcc.gnu.org>
416
417         PR fortran/32760
418         * resolve.c (resolve_allocate_deallocate): New function.
419         (resolve_code): Call it for allocate and deallocate.
420         * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
421         the checking of the STAT tag and put in above new function.
422         * primary,c (match_variable): Do not fix flavor of host
423         associated symbols yet if the type is not known.
424
425 2008-01-31  Paul Thomas  <pault@gcc.gnu.org>
426
427         PR fortran/34910
428         * expr.c (gfc_check_assign): It is an error to assign
429         to a sibling procedure.
430
431 2008-01-30  Paul Thomas  <pault@gcc.gnu.org>
432
433         PR fortran/34975
434         * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
435         delete_symtree to gfc_delete_symtree.
436         * gfortran.h : Add prototype for gfc_delete_symtree.
437         * module.c (load_generic_interfaces): Transfer symbol to a
438         unique symtree and delete old symtree, instead of renaming.
439         (read_module): The rsym and the found symbol are the same, so
440         the found symtree can be deleted.
441
442         PR fortran/34429
443         * decl.c (match_char_spec): Remove the constraint on deferred
444         matching of functions and free the length expression.
445         delete_symtree to gfc_delete_symtree.
446         (gfc_match_type_spec): Whitespace.
447         (gfc_match_function_decl): Defer characteristic association for
448         all types except BT_UNKNOWN.
449         * parse.c (decode_specification_statement): Only derived type
450         function matching is delayed to the end of specification.
451
452 2008-01-28  Tobias Burnus  <burnus@net-b.de>
453
454         PR libfortran/34980
455         * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
456
457 2008-01-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
458
459         PR fortran/34990
460         * array.c (gfc_check_constructor_type): Revert clearing the expression.
461
462 2008-01-26  Tobias Burnus  <burnus@net-b.de>
463
464         PR fortran/34848
465         * trans-expr.c (gfc_conv_function_call): Don't call
466         gfc_add_interface_mapping if the expression is NULL.
467
468 2008-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
469
470         PR fortran/31610
471         * trans-array.c (gfc_trans_create_temp_array): Remove call to
472         gcc_assert (integer_zerop (loop->from[n])).
473
474 2008-01-25  Daniel Franke  <franke.daniel@gmail.com>
475
476         PR fortran/34661
477         * resolve.c (resolve_where): Added check if user-defined assignment 
478         operator is an elemental subroutine.
479         (gfc_resolve_where_code_in_forall): Likewise.
480
481 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
482
483         PR fortran/33375
484         PR fortran/34858
485         * gfortran.h: Revert changes from 2008-01-17.
486         * match.c: Likewise.
487         * symbol.c: Likewise.
488         (gfc_undo_symbols): Undo namespace changes related to common blocks.
489
490 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
491
492         PR fortran/34202
493         * data.c (formalize_structure_cons): Skip formalization on
494         empty structures.
495
496 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
497
498         * gfortran.texi (OpenMP): Extended existing documentation.
499         (contributors): Added major contributors of 2008 that were
500         not listed yet.
501         (proposed extensions): Removed implemented items.
502
503 2008-01-24  Paul Thomas  <pault@gcc.gnu.org>
504
505         PR fortran/34872
506         * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS  is
507         seen, check for a statement label and, if present, delete it
508         and set the locus to the start of the statement.
509
510 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
511
512         PR fortran/34875
513         * trans-io.c (gfc_trans_transfer): If the array reference in a
514         read has a vector subscript, use gfc_conv_subref_array_arg to
515         copy back the temporary.
516
517 2008-01-22  Tobias Burnus  <burnus@net-b.de>
518
519         PR fortran/34848
520         * interface.c (compare_actual_formal): Fix adding type
521         to missing_arg_type for absent optional arguments.
522
523 2008-01-22  Tobias Burnus  <burnus@net-b.de>
524
525         PR fortran/34907
526         * parse.c (parse_spec): Change = into ==.
527
528 2008-01-22  Daniel Franke  <franke.daniel@gmail.com>
529
530         PR fortran/34915
531         * expr.c (check_elemental): Fix check for valid data types.
532
533 2008-01-22  Tobias Burnus  <burnus@net-b.de>
534
535         PR fortran/34899
536         * scanner.c (load_line): Support <tab><digit> continuation lines.
537         * invoke.texi (-Wtabs): Document this.
538
539 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
540
541         PR fortran/34896
542         * module.c (read_module): Set use_rename attribute.
543
544 2007-01-21  Tobias Burnus  <burnus@net-b.de>
545
546         PR fortran/34901
547         * interface.c (compare_parameter): Improved error message
548         for arguments of same type and mismatched kinds.
549
550 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
551
552         PR fortran/34861
553         * resolve.c (resolve_entries): Do not do an array bounds check
554         if the result symbols are the same.
555
556         PR fortran/34854
557         * module.c (read_module) : Hide the symtree of the previous
558         version of the symbol if this symbol is renamed.
559
560 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
561
562         PR fortran/34784
563         * array.c (gfc_check_constructor_type): Clear the expression ts
564         so that the checking starts from the deepest level of array
565         constructor.
566         * primary.c (match_varspec): If an unknown type is changed to
567         default character and the attempt to match a substring fails,
568         change it back to unknown.
569
570         PR fortran/34785
571         * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
572         NULL for an array constructor, use the cl.length expression to
573         build it.
574         (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
575         a tree assignment.
576
577 2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
578
579         PR fortran/34817
580         PR fortran/34838
581         * iresolve.c (gfc_resolve_all):  Remove conversion of mask
582         argument to kind=1 by removing call to resolve_mask_arg().
583         (gfc_resolve_any):  Likewise.
584
585 2008-01-19  Tobias Burnus  <burnus@net-b.de>
586
587         PR fortran/34760
588         * primary.c (match_variable): Handle FL_UNKNOWN without
589         uneducated guessing.
590         (match_variable): Improve error message.
591
592 2008-01-18  Tobias Burnus  <burnus@net-b.de>
593
594         PR fortran/32616
595         * interface.c (get_expr_storage_size): Return storage size
596         for array element designators.
597         (compare_actual_formal): Reject unequal string sizes for
598         assumed-shape dummy arguments. And fix error message for
599         array-sections with vector subscripts.
600
601 2008-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
602
603         PR fortran/34556
604         * simplify.c (is_constant_array_expr): New static function that returns
605         true if the given expression is an array and is constant.
606         (gfc_simplify_reshape): Use new function.
607
608 2008-01-17  H.J. Lu  <hongjiu.lu@intel.com>
609
610         PR fortran/33375
611         * symbol.c (free_common_tree): Renamed to ...
612         (gfc_free_common_tree): This.  Remove static.
613         (gfc_free_namespace): Updated.
614
615         * gfortran.h (gfc_free_common_tree): New.
616
617         * match.c (gfc_match_common): Call gfc_free_common_tree () with
618         gfc_current_ns->common_root and set gfc_current_ns->common_root
619         to NULL on syntax error.
620
621 2008-01-18  Richard Sandiford  <rsandifo@nildram.co.uk>
622
623         PR fortran/34686
624         * trans-expr.c (gfc_conv_function_call): Use proper
625         type for returned character pointers.
626
627 2008-01-17  Paul Thomas  <pault@gcc.gnu.org>
628
629         PR fortran/34429
630         PR fortran/34431
631         PR fortran/34471
632         * decl.c : Remove gfc_function_kind_locus and
633         gfc_function_type_locus. Add gfc_matching_function.
634         (match_char_length): If matching a function and the length
635         does not match, return MATCH_YES and try again later.
636         (gfc_match_kind_spec): The same.
637         (match_char_kind): The same.
638         (gfc_match_type_spec): The same for numeric and derived types.
639         (match_prefix): Rename as gfc_match_prefix.
640         (gfc_match_function_decl): Except for function valued character
641         lengths, defer applying kind, type and charlen info until the
642         end of specification block.
643         gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
644         parse.c (decode_specification_statement): New function.
645         (decode_statement): Call it when a function has kind = -1. Set
646         and reset gfc_matching function, as function statement is being
647         matched.
648         (match_deferred_characteristics): Simplify with a single call
649         to gfc_match_prefix. Do appropriate error handling. In any
650         case, make sure that kind = -1 is reset or corrected.
651         (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
652         Throw an error if kind = -1 after last specification statement.
653         parse.h : Prototype for gfc_match_prefix.
654
655 2008-01-16  Tobias Burnus  <burnus@net-b.de>
656
657         PR fortran/34796
658         * interface.c (compare_parameter): Allow AS_DEFERRED array
659         elements and reject attr.pointer array elemenents.
660         (get_expr_storage_size): Return storage size of elements of
661         assumed-shape and pointer arrays.
662
663 2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>
664
665         * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
666         for flag_tree_parallelize_loops.
667
668 2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
669
670         PR libfortran/34671
671         * iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
672         (gfc_resolve_any):  Likewise.
673         (gfc_resolve_count):  Likewise.  Don't append kind of
674         argument to function name.
675
676 2008-01-13  Tobias Burnus  <burnus@net-b.de>
677
678         PR fortran/34665
679         * resolve.c (resolve_actual_arglist): For expressions,
680         also check for assume-sized arrays.
681         * interface.c (compare_parameter): Move F2003 character checks
682         here, print error messages here, reject elements of
683         assumed-shape array as argument to dummy arrays.
684         (compare_actual_formal): Update for the changes above.
685
686 2008-01-13  Tobias Burnus  <burnus@net-b.de>
687
688         PR fortran/34763
689         * decl.c (contained_procedure): Only check directly preceeding state.
690
691 2008-01-13  Tobias Burnus  <burnus@net-b.de>
692
693         PR fortran/34759
694         * check.c (gfc_check_shape): Accept array ranges of
695         assumed-size arrays.
696
697 2008-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
698
699         PR fortran/34432
700         * match.c (gfc_match_name): Don't error if leading character is a '(',
701         just return MATCH_NO.
702
703 2008-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
704
705         PR fortran/34722
706         * trans-io.c (create_dummy_iostat): Commit the symbol.
707
708 2008-01-11  Paul Thomas  <pault@gcc.gnu.org>
709
710         PR fortran/34537
711         * simplify.c (gfc_simplify_transfer): Return NULL if the size
712         of the element is unavailable and only assign character length
713         to the result, if 'mold' is constant.
714
715 2008-01-10  Paul Thomas  <pault@gcc.gnu.org>
716
717         PR fortran/34396
718         * trans-array.c (gfc_trans_array_ctor_element):  Use gfc_trans_string_copy
719         to assign strings and perform bounds checks on the string length.
720         (get_array_ctor_strlen): Remove bounds checking.
721         (gfc_trans_array_constructor): Initialize string length checking.
722         * trans-array.h : Add prototype for gfc_trans_string_copy.
723
724 2008-01-08  Richard Guenther  <rguenther@suse.de>
725
726         PR fortran/34706
727         PR tree-optimization/34683
728         * trans-types.c (gfc_get_array_type_bounds): Use an array type
729         with known size for accesses if that is known.
730
731 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
732
733         PR fortran/34476
734         * expr.c (find_array_element): Check that the array bounds are
735         constant before using them.  Use lower, as well as upper bound.
736         (check_restricted): Allow implied index variable.
737
738 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
739
740         PR fortran/34681
741         * trans_array.c (gfc_trans_deferred_array): Do not null the
742         data pointer on entering scope, nor deallocate it on leaving
743         scope, if the symbol has the 'save' attribute.
744
745         PR fortran/34704
746         * trans_decl.c (gfc_finish_var_decl): Derived types with
747         allocatable components and an initializer must be TREE_STATIC.
748
749 2008-01-07  Paul Thomas  <pault@gcc.gnu.org>
750
751         PR fortran/34672
752         * module.c (write_generic): Rewrite completely.
753         (write_module): Change call to write_generic.
754
755 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
756
757         PR fortran/34659
758         * scanner.c (load_line): Do not count ' ' as printable when checking for
759         continuations.
760
761 2008-01-06  Paul Thomas  <pault@gcc.gnu.org>
762
763         PR fortran/34545
764         * module.c (load_needed): If the namespace has no proc_name
765         give it the module symbol.
766
767 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
768
769         PR fortran/34387
770         * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
771         the dummy variable expression, test for NULL, and pass the variable
772         address to the called function.
773
774 2007-01-06  Tobias Burnus  <burnus@net-b.de>
775
776         PR fortran/34658
777         * match.c (gfc_match_common): Remove blank common in
778         DATA BLOCK warning.
779         * resolve.c (resolve_common_vars): New function.
780         (resolve_common_blocks): Move checks to resolve_common_vars
781         and invoke that function.
782         (resolve_types): Call resolve_common_vars for blank commons.
783
784 2008-01-06  Tobias Burnus  <burnus@net-b.de>
785
786         PR fortran/34655
787         * resolve.c (resolve_equivalence_derived): Reject derived types with
788         default initialization if equivalenced with COMMON variable.
789
790 2008-01-06  Tobias Burnus  <burnus@net-b.de>
791
792         PR fortran/34654
793         * io.c (check_io_constraints): Disallow unformatted I/O for
794         internal units.
795
796 2008-01-06  Tobias Burnus  <burnus@net-b.de>
797
798         PR fortran/34660
799         * resolve.c (resolve_formal_arglist): Reject dummy procedure in
800         ELEMENTAL functions.
801
802 2008-01-06  Tobias Burnus  <burnus@net-b.de>
803
804         PR fortran/34662
805         * interface.c (compare_actual_formal): Reject parameter
806         actual to intent(out) dummy.
807
808 2008-01-04  Tobias Burnus  <burnus@net-b.de>
809
810         PR fortran/34557
811         * primary.c (match_varspec): Gobble whitespace before
812         checking for '('.