OSDN Git Service

2008-08-31 Daniel Kraft <d@domob.eu>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2008-08-31  Daniel Kraft  <d@domob.eu>
2
3         * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
4         (struct gfc_tbp_generic): New type.
5         (struct gfc_typebound_proc): Removed `target' and added union with
6         `specific' and `generic' members; new members `overridden',
7         `subroutine', `function' and `is_generic'.
8         (struct gfc_expr): New members `derived' and `name' in compcall union
9         member and changed type of `tbp' to gfc_typebound_proc.
10         (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
11         * match.h (gfc_typebound_default_access): New global.
12         (gfc_match_generic): New method.
13         * decl.c (gfc_match_generic): New method.
14         (match_binding_attributes): New argument `generic' and handle it.
15         (match_procedure_in_type): Mark matched binding as non-generic.
16         * interface.c (gfc_compare_interfaces): Made public.
17         (gfc_compare_actual_formal): Ditto.
18         (check_interface_1), (compare_parameter): Use new public names.
19         (gfc_procedure_use), (gfc_search_interface): Ditto.
20         * match.c (match_typebound_call): Set base-symbol referenced.
21         * module.c (binding_generic): New global array.
22         (current_f2k_derived): New global.
23         (mio_typebound_proc): Handle IO of GENERIC bindings.
24         (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
25         * parse.c (decode_statement): Handle GENERIC statement.
26         (gfc_ascii_statement): Ditto.
27         (typebound_default_access), (set_typebound_default_access): Removed.
28         (gfc_typebound_default_access): New global.
29         (parse_derived_contains): New default-access implementation and handle
30         GENERIC statements encountered.
31         * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
32         structure and removed check for SUBROUTINE/FUNCTION from here.
33         * resolve.c (extract_compcall_passed_object): New method.
34         (update_compcall_arglist): Use it.
35         (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
36         (resolve_typebound_generic_call): New method.
37         (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
38         to GENERIC bindings.
39         (resolve_compcall): Ditto (check for target being FUNCTION).
40         (check_typebound_override): Handle GENERIC bindings.
41         (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
42         (resolve_typebound_procedure): Handle GENERIC bindings and set new
43         attributes subroutine, function and overridden in gfc_typebound_proc.
44         (resolve_fl_derived): Ensure extended type is resolved before the
45         extending one is.
46         * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
47         * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
48
49 2008-08-29  Jan Hubicka  <jh@suse.cz>
50         
51         * parse.c (parse_interface): Silence uninitialized var warning.
52
53 2008-08-29  Jakub Jelinek  <jakub@redhat.com>
54
55         * trans.h (struct lang_type): Add span.
56         (GFC_TYPE_ARRAY_SPAN): Define.
57         * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
58         copy TREE_STATIC from decl to span instead of setting it
59         unconditionally, set DECL_ARTIFICIAL, fix type of initializer
60         and set GFC_TYPE_ARRAY_SPAN on decl's type.
61         * trans-types.c (gfc_get_array_descr_info): If
62         GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
63
64         * trans-decl.c (check_constant_initializer,
65         gfc_emit_parameter_debug_info): New functions.
66         (gfc_generate_module_vars, gfc_generate_function_code): Emit
67         PARAMETERs and unreferenced variables with initializers into
68         debug info.
69
70         * gfortran.h (gfc_use_list): Add where field.
71         * module.c (use_locus): New static variable.
72         (gfc_match_use): Set it.
73         (gfc_use_module): Copy it to gfc_use_list's where field.
74         * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
75         (gfc_trans_use_stmts): Set backend locus before calling the debug
76         hook.  Allow non-VAR_DECLs to be created even for non-external
77         module.  Don't emit anything so far for renames from different
78         modules.
79
80         PR fortran/24790
81         * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
82         PARM_DECLs with pointer or reference type.
83
84         * trans-decl.c (gfc_build_qualified_array): Build non-flat
85         array type for debug info purposes.
86
87         PR fortran/29635
88         PR fortran/23057
89         * f95-lang.c (gfc_init_ts): New function.
90         (LANG_HOOKS_INIT_TS): Define.
91         * gfortran.h (gfc_use_rename): New type, moved from module.c.
92         (gfc_get_use_rename): New macro, moved from module.c.
93         (gfc_use_list): New type.
94         (gfc_get_use_list): New macro.
95         (gfc_namespace): Add use_stmts field.
96         (gfc_free_use_stmts): New prototype.
97         * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
98         * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
99         gfortran.h.
100         (gfc_use_module): Chain the USE statement info to
101         ns->use_stmts.
102         (gfc_free_use_stmts): New function.
103         * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
104         * trans.h (struct module_htab_entry): New type.
105         (gfc_find_module, gfc_module_add_decl): New functions.
106         * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
107         the module, adjust DECL_CONTEXTs of module procedures and
108         call gfc_module_add_decl for them.
109         * trans-common.c (build_common_decl): Set DECL_IGNORED_P
110         on the common variable.
111         (create_common): Set DECL_IGNORED_P for use associated vars.
112         * trans-decl.c: Include debug.h.
113         (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
114         modules.
115         (build_function_decl): Allow current_function_decl's context
116         to be a NAMESPACE_DECL.
117         (module_htab, cur_module): New variables.
118         (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
119         module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
120         functions.
121         (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
122         variables and types and call gfc_module_add_decl for them.
123         (gfc_generate_module_vars): Temporarily set cur_module.
124         (gfc_trans_use_stmts): New function.
125         (gfc_generate_function_code): Call it.
126         (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
127         * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
128         and TYPE_CONTEXT of module derived types.
129
130 2008-08-28  Daniel Kraft  <d@domob.eu>
131
132         * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
133         (gfc_get_typebound_proc): New macro.
134         (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
135         (enum gfc_exec_op): New value `EXEC_COMPCALL'.
136         (gfc_find_typebound_proc): New argument.
137         (gfc_copy_ref), (gfc_match_varspec): Made public.
138         * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
139         * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
140         (gfc_copy_ref): Made public and use new name.
141         (simplify_const_ref): Use new name of gfc_copy_ref.
142         (simplify_parameter_variable): Ditto.
143         (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
144         * match.c (match_typebound_call): New method.
145         (gfc_match_call): Allow for CALL's to typebound procedures.
146         * module.c (binding_passing), (binding_overriding): New variables.
147         (expr_types): Add EXPR_COMPCALL.
148         (mio_expr): gcc_unreachable for EXPR_COMPCALL.
149         (mio_typebound_proc), (mio_typebound_symtree): New methods.
150         (mio_f2k_derived): Handle type-bound procedures.
151         * primary.c (gfc_match_varspec): Made public and parse trailing
152         references to type-bound procedures; new argument `sub_flag'.
153         (gfc_match_rvalue): New name and argument of gfc_match_varspec.
154         (match_variable): Ditto.
155         * resolve.c (update_arglist_pass): New method.
156         (update_compcall_arglist), (resolve_typebound_static): New methods.
157         (resolve_typebound_call), (resolve_compcall): New methods.
158         (gfc_resolve_expr): Handle EXPR_COMPCALL.
159         (resolve_code): Handle EXEC_COMPCALL.
160         (resolve_fl_derived): New argument to gfc_find_typebound_proc.
161         (resolve_typebound_procedure): Ditto and removed not-implemented error.
162         * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
163         * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
164         implement access-checking.
165         * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
166         on EXPR_COMPCALL.
167         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
168         * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
169         intialization of ref->type.
170
171 2008-08-28  Janus Weil  <janus@gcc.gnu.org>
172
173         PR fortran/37253
174         * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
175         saving attr.procedure and attr.proc_ptr to the module file.
176
177 2008-08-25  Daniel Kraft  <d@domob.eu>
178
179         * gfortran.h (gfc_find_component): Add new arguments.
180         * parse.c (parse_derived_contains): Check if the derived-type containing
181         the CONTAINS section is SEQUENCE/BIND(C).
182         * resolve.c (resolve_typebound_procedure): Check for name collision with
183         components.
184         (resolve_fl_derived): Check for name collision with inherited
185         type-bound procedures.
186         * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
187         (gfc_add_component): Adapt for new arguments.
188         * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
189
190 2008-08-24  Tobias Burnus  <burnus@net-b.de>
191
192         PR fortran/37201
193         * decl.c (verify_bind_c_sym): Reject array/string returning
194         functions.
195
196 2008-08-24  Tobias Burnus  <burnus@net-b.de>
197
198         PR fortran/37201
199         * trans-expr.c (gfc_conv_function_call): Add string_length
200         for character-returning bind(C) functions.
201
202 2008-08-24  Daniel Kraft  <d@domob.eu>
203
204         * gfortran.h (gfc_typebound_proc):  New struct.
205         (gfc_symtree):  New member typebound.
206         (gfc_find_typebound_proc):  Prototype for new method.
207         (gfc_get_derived_super_type):  Prototype for new method.
208         * parse.h (gfc_compile_state):  New state COMP_DERIVED_CONTAINS.
209         * decl.c (gfc_match_procedure):  Handle PROCEDURE inside derived-type
210         CONTAINS section.
211         (gfc_match_end):  Handle new context COMP_DERIVED_CONTAINS.
212         (gfc_match_private):  Ditto.
213         (match_binding_attributes), (match_procedure_in_type):  New methods.
214         (gfc_match_final_decl):  Rewrote to make use of new
215         COMP_DERIVED_CONTAINS parser state.
216         * parse.c (typebound_default_access):  New global helper variable.
217         (set_typebound_default_access):  New callback method.
218         (parse_derived_contains):  New method.
219         (parse_derived):  Extracted handling of CONTAINS to new parser state
220         and parse_derived_contains.
221         * resolve.c (resolve_bindings_derived), (resolve_bindings_result):  New.
222         (check_typebound_override), (resolve_typebound_procedure):  New methods.
223         (resolve_typebound_procedures):  New method.
224         (resolve_fl_derived):  Call new resolving method for typebound procs.
225         * symbol.c (gfc_new_symtree):  Initialize new member typebound to NULL.
226         (gfc_find_typebound_proc):  New method.
227         (gfc_get_derived_super_type):  New method.
228
229 2008-08-23  Janus Weil  <janus@gcc.gnu.org>
230
231         * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
232         fields "pointer", "allocatable", "dimension", "access".
233         Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
234         * interface.c (gfc_compare_derived_types): Ditto.
235         * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
236         * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
237         gfc_conv_structure): Ditto.
238         * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
239         gfc_get_component_attr,verify_bind_c_derived_type,
240         generate_isocbinding_symbol): Ditto.
241         * decl.c (build_struct): Ditto.
242         * dump-parse-tree.c (show_components): Ditto.
243         * trans-stmt.c (gfc_trans_deallocate): Ditto.
244         * expr.c (gfc_check_assign,gfc_check_pointer_assign,
245         gfc_default_initializer): Ditto.
246         * module.c (mio_component): Ditto.
247         * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
248         * resolve.c (has_default_initializer,resolve_structure_cons,
249         gfc_iso_c_func_interface,find_array_spec,resolve_ref,
250         resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
251         resolve_equivalence_derived): Ditto.
252         * trans-io.c (transfer_expr): Ditto.
253         * parse.c (parse_derived): Ditto.
254         * dependency.c (gfc_check_dependency): Ditto.
255         * primary.c (gfc_variable_attr): Ditto.
256
257 2008-08-23  Tobias Burnus  <burnus@net-b.de>
258
259         PR fortran/37076
260         * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
261
262 2008-08-23  Tobias Burnus  <burnus@net-b.de>
263
264         PR fortran/37025
265         * target-memory.c (gfc_interpret_character): Support
266         kind=4 characters.
267
268 2008-08-22  Daniel Kraft  <d@domob.eu>
269
270         PR fortran/30239
271         * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
272         type is re-declared but neither -pedantic nor -std=f* is given and so
273         this is no error.
274         * invoke.texi (-Wsurprising): Document this new behaviour.
275
276 2008-08-22  Daniel Kraft  <d@domob.eu>
277
278         * gfortran.h (in_prefix): Removed from this header.
279         * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
280         * decl.c (in_prefix): Removed from here.
281         (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
282         * symbol.c (gfc_check_symbol_typed): Ditto.
283         * expr.c (check_typed_ns): New helper variable.
284         (expr_check_typed_help): New helper method.
285         (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
286         work, fixing a minor problem.
287         * match.c (gfc_matching_prefix): New variable.
288
289 2008-08-22  Daniel Kraft  <d@domob.eu>
290
291         PR fortran/32095
292         PR fortran/34228
293         * gfortran.h (in_prefix): New global.
294         (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
295         * array.c (match_array_element_spec): Check that bounds-expressions
296         don't have symbols not-yet-typed in them.
297         * decl.c (var_element): Check that variable used is already typed.
298         (char_len_param_value): Check that expression does not contain
299         not-yet-typed symbols.
300         (in_prefix): New global.
301         (gfc_match_prefix): Record using `in_prefix' if we're at the moment
302         parsing a prefix or not.
303         * expr.c (gfc_expr_check_typed): New method.
304         * parse.c (verify_st_order): New argument to disable error output.
305         (check_function_result_typed): New helper method.
306         (parse_spec): Check that the function-result declaration, if given in
307         a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
308         parsed.
309         * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
310         a type associated to it, otherwise use the IMPLICIT rules or signal
311         an error.
312
313 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
314
315         * f95-lang.c: Update all calls to pedwarn.
316
317 2008-08-18  Daniel Franke  <franke.daniel@gmail.com>
318
319         PR fortran/37032
320         * gfortran.texi: Document decision on include file handling in
321         preprocessed files.
322
323 2008-08-16  Tobias Burnus  <burnus@net-b.de>
324
325         PR fortran/36825
326         * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
327
328 2008-08-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
329
330         PR fortran/35863
331         * io.c (gfc_match_open): Enable UTF-8 in checks.
332         * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
333
334 2008-08-14  Janus Weil  <janus@gcc.gnu.org>
335
336         PR fortran/36705
337         * symbol.c (check_conflict): Move conflict checks for (procedure,save)
338         and (procedure,intent) to resolve_fl_procedure.
339         * resolve.c (resolve_fl_procedure): Ditto.
340
341 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
342
343         PR 36901
344         * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
345         'pedwarn0'.
346
347 2008-08-09  Paul Thomas  <pault@gcc.gnu.org>
348
349         PR fortran/37011
350         * symbol.c (gfc_add_extension): New function.
351         * decl.c (gfc_get_type_attr_spec): Call it.
352         (gfc_match_derived_decl): Set symbol extension attribute from
353         attr.extension.
354         * gfortran.h : Add prototype for gfc_add_extension.
355
356 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
357
358         PR 28875
359         * options.c (set_Wall): Replace set_Wunused by warn_unused.
360
361 2008-08-08  Daniel Kraft  <d@domob.eu>
362
363         * gfortran.h (gfc_finalizer):  Replaced member `procedure' by two
364         new members `proc_sym' and `proc_tree' to store the symtree after
365         resolution.
366         (gfc_find_sym_in_symtree):  Made public.
367         * decl.c (gfc_match_final_decl):  Adapted for new member name.
368         * interface.c (gfc_find_sym_in_symtree):  Made public.
369         (gfc_extend_expr), (gfc_extend_assign):  Changed call accordingly.
370         * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
371         New methods for module-file IO of f2k_derived.
372         (mio_symbol):  Do IO of f2k_derived namespace.
373         * resolve.c (gfc_resolve_finalizers):  Adapted for new member name and
374         finding the symtree for the symbol here.
375         * symbol.c (gfc_free_finalizer):  Adapted for new members.
376
377 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
378
379         * gfc-internals.texi: Update to GFDL 1.2.  Do not list GPL as
380         Invariant Section.
381         * gfortran.texi: Likewise.
382         * intrinsic.texi: Do not list GPL as Invariant Section.
383         * invoke.texi: Likewise.  Update copyright years.
384
385 2008-07-29  Paul Thomas  <pault@gcc.gnu.org>
386
387         * trans-expr.c (conv_parent_component_references): New function
388         to build missing parent references.
389         (gfc_conv_variable): Call it
390         * symbol.c (gfc_add_component): Check that component name in a
391         derived type extension does not appear in parent.
392         (gfc_find_component): For a derived type extension, check if
393         the component appears in the parent derived type by calling
394         self. Separate errors for private components and private types.
395         * decl.c (match_data_constant): Add extra arg to call to
396         gfc_match_structure_constructor.
397         (check_extended_derived_type): New function to check that a
398         parent derived type exists and that it is OK for exension.
399         (gfc_get_type_attr_spec): Add extra argument 'name' and return
400         it if extends is specified.
401         (gfc_match_derived_decl): Match derived type extension and
402         build a first component of the parent derived type if OK. Add
403         the f2k namespace if not present.
404         * gfortran.h : Add the extension attribute.
405         * module.c : Handle attribute 'extension'.
406         * match.h : Modify prototypes for gfc_get_type_attr_spec and
407         gfc_match_structure_constructor.
408         * primary.c (build_actual_constructor): New function extracted
409         from gfc_match_structure_constructor and modified to call self
410         iteratively to build derived type extensions, when f2k named
411         components are used.
412         (gfc_match_structure_constructor): Do not throw error for too
413         many components if a parent type is being handled. Use
414         gfc_find_component to generate errors for non-existent or
415         private components.  Iteratively call self for derived type
416         extensions so that parent constructor is built.  If extension
417         and components left over, throw error.
418         (gfc_match_rvalue): Add extra arg to call to
419         gfc_match_structure_constructor.
420
421         * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
422         are the same symbol, aliassing does not matter.
423
424 2008-07-29  Jan Hubicka  <jh@suse.cz>
425
426         * options.c (gfc_post_options): Do not set flag_no_inline.
427
428 2008-07-29  Daniel Kraft  <d@domob.eu>
429
430         PR fortran/36403
431         * trans-intrinsic.c (conv_generic_with_optional_char_arg):  New method
432         to append a string-length even if the string argument is missing, e.g.
433         for EOSHIFT.
434         (gfc_conv_intrinsic_function):  Call the new method for EOSHIFT, PACK
435         and RESHAPE.
436
437 2008-07-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
438
439         * gfortran.h (try): Remove macro.  Replace try with gfc_try
440         throughout.
441         * array.c: Likewise.
442         * check.c: Likewise.
443         * cpp.c: Likewise.
444         * cpp.h: Likewise.
445         * data.c: Likewise.
446         * data.h: Likewise.
447         * decl.c: Likewise.
448         * error.c: Likewise.
449         * expr.c: Likewise.
450         * interface.c: Likewise.
451         * intrinsic.c: Likewise.
452         * intrinsic.h: Likewise.
453         * io.c: Likewise.
454         * match.h: Likewise.
455         * parse.c: Likewise.
456         * parse.h: Likewise.
457         * resolve.c: Likewise.
458         * scanner.c: Likewise.
459         * simplify.c: Likewise.
460         * symbol.c: Likewise.
461         * trans-openmp.c: Likewise.
462         * trans-types.c: Likewise.
463
464 2008-07-28  Tobias Burnus  <burnus@net-b.de>
465
466         * Make-lang.in: Remove -Wno-* from fortran-warn.
467
468 2008-07-28  Richard Guenther  <rguenther@suse.de>
469
470         Merge from gimple-tuples-branch.
471
472         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
473
474         * trans-expr.c: Include gimple.h instead of tree-gimple.h.
475         * trans-array.c: Same.
476         * trans-openmp.c: Same.
477         * trans-stmt.c: Same.
478         * f95-lang.c: Same.
479         * trans-io.c: Same.
480         * trans-decl.c: Same.
481         * trans-intrinsic.c: Same.
482         * trans.c: Same.  Include tree-iterator.h.
483         * Make-lang.in (trans.o): Depend on tree-iterator.h
484
485         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
486
487         * trans-array.h (gfc_conv_descriptor_data_set_internal):
488         Rename to gfc_conv_descriptor_data_set.
489         (gfc_conv_descriptor_data_set_tuples): Remove.
490         * trans-array.c (gfc_conv_descriptor_data_get): Rename
491         from gfc_conv_descriptor_data_set_internal.
492         Remove last argument to gfc_add_modify.
493         (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
494         gfc_add_modify.
495         (gfc_trans_create_temp_array): Same.
496         (gfc_conv_array_transpose): Same.
497         (gfc_grow_array): Same.
498         (gfc_put_offset_into_var): Same.
499         (gfc_trans_array_ctor_element): Same.
500         (gfc_trans_array_constructor_subarray): Same.
501         (gfc_trans_array_constructor_value): Same.
502         (gfc_trans_scalarized_loop_end): Same.
503         (gfc_array_init_size): Same.
504         (gfc_array_allocate): Same.
505         (gfc_trans_array_bounds): Same.
506         (gfc_trans_auto_array_allocation): Same.
507         (gfc_trans_g77_array): Same.
508         (gfc_trans_dummy_array_bias): Same.
509         (gfc_conv_expr_descriptor): Same.
510         (structure_alloc_comps): Same.
511         * trans-expr.c: Same.
512         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
513         Rename gfc_conv_descriptor_data_set_tuples to
514         gfc_conv_descriptor_data_set.
515         (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
516         build2_v.
517         (gfc_omp_clause_assign_op): Same.
518         (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
519         gfc_add_modify.
520         (gfc_trans_omp_atomic): Same.
521         (gfc_trans_omp_do): Same.  Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
522         Rename gfc_add_modify_stmt to gfc_add_modify.
523         * trans-stmt.c: Rename gfc_add_modify_expr to
524         gfc_add_modify.
525         * trans.c: Rename gfc_add_modify_expr to
526         gfc_add_modify.
527         (gfc_add_modify): Remove last argument.
528         Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
529         * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
530         Add prototype for gfc_add_modify.
531         * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
532         * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
533         * trans-io.c: Same.
534         * trans-intrinsic.c: Same.
535
536         2008-02-25  Aldy Hernandez  <aldyh@redhat.com>
537
538         * Make-lang.in (fortran-warn): Add -Wno-format.
539
540         2008-02-19  Diego Novillo  <dnovillo@google.com>
541
542         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
543
544         * fortran/Make-lang.in (fortran-warn): Remove.
545
546         2007-11-22  Aldy Hernandez  <aldyh@redhat.com>
547
548         * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
549         memset.
550
551         2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
552
553         * Make-lang.in (fortran-warn): Set to -Wno-format.
554         * trans.c (gfc_trans_code): Update comment to say GENERIC.
555         Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
556
557 2008-07-27  Tobias Burnus  <burnus@net-b.de>
558
559         PR fortran/36132
560         PR fortran/29952
561         PR fortran/36909
562         * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
563         run-time error.
564         * trans.h (gfc_trans_runtime_check): Update declaration.
565         * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
566         gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
567         Updated gfc_trans_runtime_check calls.
568         (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
569         fix packing/unpacking for nonpresent optional actuals to optional
570         formals.
571         * trans-array.h (gfc_conv_array_parameter): Update declaration.
572         * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
573         gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
574         (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
575         * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
576         calls.
577         * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
578         (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
579         gfc_conv_array_parameter.
580         * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
581         * trans-decl.c (gfc_build_builtin_function_decls): Add
582         gfor_fndecl_runtime_warning_at.
583         * lang.opt: New option fcheck-array-temporaries.
584         * gfortran.h (gfc_options): New flag_check_array_temporaries.
585         * options.c (gfc_init_options, gfc_handle_option): Handle flag.
586         * invoke.texi: New option fcheck-array-temporaries.
587
588 2008-07-24  Jan Hubicka  <jh@suse.cz>
589
590         * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
591
592 2008-07-24  Daniel Kraft  <d@domob.eu>
593
594         PR fortran/33141
595         * lang.opt (Wnonstd-intrinsics):  Removed option.
596         (Wintrinsics-std), (Wintrinsic-shadow):  New options.
597         * invoke.texi (Option Summary):  Removed -Wnonstd-intrinsics
598         from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
599         (Error and Warning Options):  Documented the new options and removed
600         the documentation for -Wnonstd-intrinsics.
601         * gfortran.h (gfc_option_t):  New members warn_intrinsic_shadow and
602         warn_intrinsics_std, removed warn_nonstd_intrinsics.
603         (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name.
604         (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard):  New.
605         * decl.c (match_procedure_decl):  Replaced gfc_intrinsic_name by
606         the new name gfc_is_intrinsic.
607         (warn_intrinsic_shadow):  New helper method.
608         (gfc_match_function_decl), (gfc_match_subroutine):  Call the new method
609         warn_intrinsic_shadow to check the just-parsed procedure.
610         * expr.c (check_init_expr):  Call new gfc_is_intrinsic to check whether
611         the function called is really an intrinsic in the selected standard.
612         * intrinsic.c (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name and
613         extended to take into account the selected standard settings when trying
614         to find out whether a symbol is an intrinsic or not.
615         (gfc_check_intrinsic_standard):  Made public and extended.
616         (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface):  Removed
617         the calls to check_intrinsic_standard, this check now happens inside
618         gfc_is_intrinsic.
619         (gfc_warn_intrinsic_shadow):  New method defined.
620         * options.c (gfc_init_options):  Initialize new warning flags to false
621         and removed intialization of Wnonstd-intrinsics flag.
622         (gfc_post_options):  Removed logic for Wnonstd-intrinsics flag.
623         (set_Wall):  Set new warning flags and removed Wnonstd-intrinsics flag.
624         (gfc_handle_option):  Handle the new flags and removed handling of the
625         old Wnonstd-intrinsics flag.
626         * primary.c (gfc_match_rvalue):  Replaced call to gfc_intrinsic_name by
627         the new name gfc_is_intrinsic.
628         * resolve.c (resolve_actual_arglist):  Ditto.
629         (resolve_generic_f), (resolve_unknown_f):  Ditto.
630         (is_external_proc):  Ditto.
631         (resolve_generic_s), (resolve_unknown_s):  Ditto.
632         (resolve_symbol):  Ditto and ensure for symbols declared INTRINSIC that
633         they are really available in the selected standard setting.
634
635 2008-07-24  Daniel Kraft  <d@domob.eu>
636
637         * match.c (gfc_match):  Add assertion to catch wrong calls trying to
638         match upper-case characters.
639
640 2008-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
641
642         PR fortran/29952
643         * gfortran.h:  Add "warn_array_temp" to gfc_option_t.
644         * lang.opt:  Add -Warray-temporaries.
645         * invoke.texi:  Document -Warray-temporaries
646         * trans-array.h (gfc_trans_create_temp_array):  Add argument of
647         type *locus.
648         (gfc_conv_loop_setup):  Likewise.
649         * trans-array.c (gfc_trans_create_temp_array):  If
650         -Warray-temporaries is given and locus is present, warn about
651         creation of array temporaries.
652         (gfc_trans_array_constructor_subarray):  Add locus to call
653         of gfc_conv_loop_setup.
654         (gfc_trans_array_constructor):  Add where argument.  Pass where
655         argument to call of gfc_trans_create_temp_array.
656         (gfc_add_loop_ss_code):  Add where argument.  Pass where argument
657         to recursive call of gfc_add_loop_ss_code and to call of
658         gfc_trans_array_constructor.
659         (gfc_conv_loop_setup):  Add where argument.  Pass where argument
660         to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
661         (gfc_conv_expr_descriptor):  Pass location to call of
662         gfc_conv_loop_setup.
663         (gfc_conv_array_parameter):  If -Warray-temporaries is given,
664         warn about creation of temporary arrays.
665         * trans-expr.c (gfc_conv_subref_array_arg):  Add where argument
666         to call to gfc_conv_loop_setup.
667         (gfc_conv_function_call):  Add where argument to call to
668         gfc_trans_creat_temp_array.
669         (gfc_trans_subarray_assign):  Likewise.
670         (gfc_trans_assignment_1):  Add where argument to call to
671         gfc_conv_loop_setup.
672         * trans-stmt.c (gfc_conv_elemental_dependencies):  Add where
673         argument to call to gfc_trans_create_temp_array.
674         (gfc_trans_call):  Add where argument to call to gfc_conv_loop_setup.
675         (generate_loop_for_temp_to_lhs):  Likewise.
676         (generate_loop_for_rhs_to_temp):  Likewise.
677         (compute_inner_temp_size):  Likewise.
678         (gfc_trans-pointer_assign_need_temp):  Likewise.
679         (gfc_evaluate_where_mask):  Likewise.
680         (gfc_trans_where_assign):  Likewise.
681         (gfc_trans_where_3):  Likewise.
682         * trans-io.c (transfer_srray_component):  Add where argument
683         to function. Add where argument to call to gfc_conv_loop_setup.
684         (transfer_expr):  Add where argument to call to
685         transfer_array_component.
686         (gfc_trans_transfer):  Add where expression to call to
687         gfc_conv_loop_setup.
688         * trans-intrinsic.c (gfc_conv_intrinsic_anyall):  Add
689         where argument to call to gfc_conv_loop_setup.
690         (gfc_conv_intrinsic_count):  Likewise.
691         (gfc_conv_intrinsic_arith):  Likewise.
692         (gfc_conv_intrinsic_dot_product):  Likewise.
693         (gfc_conv_intrinsic_minmaxloc):  Likewise.
694         (gfc_conv_intrinsic_minmaxval):  Likewise.
695         (gfc_conv_intrinsic_array_transfer):  Warn about
696         creation of temporary array.
697         Add where argument to call to gfc_trans_create_temp_array.
698         * options.c (gfc_init_options):  Initialize gfc_option.warn_array_temp.
699         (gfc_handle_option):  Set gfc_option.warn_array_temp.
700
701 2008-07-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
702
703         PR 35058
704         * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
705
706 2008-07-22  Daniel Kraft  <d@domob.eu>
707
708         PR fortran/29835
709         * io.c (error_element), (format_locus):  New static globals.
710         (unexpected_element):  Spelled out this message fully.
711         (next_char):  Keep track of locus when not MODE_STRING.
712         (next_char_not_space):  Remember last parsed element in error_element.
713         (format_lex):  Fix two indentation errors.
714         (check_format):  Use format_locus and possibly error_element for a
715         slightly better error message on invalid format.
716         (check_format_string):  Set format_locus to start of the string
717         expression used as format.
718
719 2008-07-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
720
721         * expr.c (gfc_check_pointer_assign): Fix typo in string.
722         * io.c (check_format): Fix typo in string.  Fix comment typos.
723         * parse.c (gfc_global_used): Likewise.
724         * resolve.c (resolve_allocate_expr): Likewise.
725         * symbol.c (gfc_set_default_type): Likewise.
726         * arith.c: Fix typos in comments.
727         * array.c: Likewise.
728         * data.c: Likewise.
729         * decl.c: Likewise.
730         * dependency.c: Likewise.
731         * f95-lang.c: Likewise.
732         * gfortran.h: Likewise.
733         * matchexp.c: Likewise.
734         * module.c: Likewise.
735         * primary.c: Likewise.
736         * scanner.c: Likewise.
737         * trans-array.c: Likewise.
738         * trans-common.c: Likewise.
739         * trans-decl.c: Likewise.
740         * trans-expr.c: Likewise.
741         * trans-intrinsic.c: Likewise.
742         * trans-types.c: Likewise.
743         * trans.c: Likewise.
744         * trans.h: Likewise.
745
746 2008-07-19  Tobias Burnus  <burnus@net-b.de>
747
748         PR fortran/36795
749         * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
750         which caused the generation of wrong code.
751
752 2008-07-19  Tobias Burnus  <burnus@net-b.de>
753
754         PR fortran/36342
755         * scanner.c (load_file): Add argument to destinguish between
756         true filename and displayed filename.
757         (include_line,gfc_new_file): Adapt accordingly.
758
759 2008-07-19  Tobias Burnus  <burnus@net-b.de>
760
761         * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
762         checks for cshift's shift and eoshift's shift and boundary args.
763         (gfc_check_unpack): Add rank and shape tests for unpack.
764
765 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
766
767         * gfortran.h (new): Remove macro.
768         * array.c (gfc_append_constructor, match_array_list,
769         gfc_match_array_constructor): Likewise.
770         * bbt.c (insert, gfc_insert_bbt): Likewise.
771         * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
772         get_proc_name): Likewise.
773         * expr.c (gfc_copy_actual_arglist): Likewise.
774         * interface.c (compare_actual_formal, check_new_interface,
775         gfc_add_interface): Likewise.
776         * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
777         Likewise.
778         * io.c (match_io_iterator, match_io_list): Likewise.
779         * match.c (match_forall_header): Likewise.
780         * matchexp.c (build_node): Likewise.
781         * module.c (gfc_match_use): Likewise.
782         * scanner.c (load_file): Likewise.
783         * st.c (gfc_append_code): Likewise.
784         * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
785         gfc_commit_symbols): Likewise.
786         * trans-common.c (build_field): Likewise.
787         * trans-decl.c (gfc_finish_var_decl): Likewise.
788         * trans-expr.c (gfc_free_interface_mapping,
789         gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
790         gfc_finish_interface_mapping,
791         gfc_apply_interface_mapping_to_expr): Likewise.
792         * trans.h (gfc_interface_sym_mapping): Likewise.
793
794 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
795
796         * gfortran.h (operator): Remove macro.
797         (gfc_namespace, gfc_expr): Avoid C++ keywords.
798         * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
799         Likewise.
800         * decl.c (access_attr_decl): Likewise.
801         * dependency.c (gfc_dep_compare_expr): Likewise.
802         * dump-parse-tree.c (show_expr, show_uop, show_namespace):
803         Likewise.
804         * expr.c (gfc_copy_expr, gfc_type_convert_binary,
805         simplify_intrinsic_op, check_intrinsic_op): Likewise.
806         * interface.c (fold_unary, gfc_match_generic_spec,
807         gfc_match_interface, gfc_match_end_interface,
808         check_operator_interface, check_uop_interfaces,
809         gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
810         gfc_add_interface, gfc_current_interface_head,
811         gfc_set_current_interface_head): Likewise.
812         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
813         Likewise.
814         * matchexp.c (gfc_get_parentheses, build_node): Likewise.
815         * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
816         number_use_names, mio_expr, load_operator_interfaces, read_module,
817         write_operator, write_module): Likewise.
818         * openmp.c (resolve_omp_atomic): Likewise.
819         * resolve.c (resolve_operator, gfc_resolve_character_operator,
820         gfc_resolve_uops): Likewise.
821         * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
822         * trans-expr.c (gfc_conv_expr_op): Likewise.
823         * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
824
825 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
826
827         * gfortran.h (protected): Remove macro.
828         * dump-parse-tree.c (show_attr): Avoid C++ keywords.
829         * expr.c (gfc_check_pointer_assign): Likewise.
830         * interface.c (compare_parameter_protected): Likewise.
831         * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
832         add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
833         add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
834         add_sym_5s): Likewise.
835         * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
836         Likewise.
837         * module.c (mio_symbol_attribute): Likewise.
838         * primary.c (match_variable): Likewise.
839         * resolve.c (resolve_equivalence): Likewise.
840         * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
841         Likewise.
842         * trans-types.c (gfc_get_array_type_bounds): Likewise.
843
844 2008-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
845
846         * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
847         * gfortran.h (try, protected, operator, new): Likewise.
848
849 2008-07-17  Tobias Burnus  <burnus@net-b.de>
850
851         PR fortran/36825
852         PR fortran/36824
853         * array.c (gfc_match_array_spec): Fix array-rank check.
854         * resolve.c (resolve_fl_derived): Fix constentness check
855         for the array dimensions.
856
857 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
858
859         * Make-lang.in (gfortranspec.o): Fix dependencies.
860
861 2008-07-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
862
863         PR fortran/36725
864         * io.c: Add error check for g0 edit descriptor followed by '.'.
865
866 2008-07-12  Daniel Kraft  <d@domob.eu>
867
868         * resolve.c (resolve_fl_derived):  Allow pointer components to empty
869         derived types fixing a missing part of PR fortran/33221.
870
871 2008-07-10  Daniel Kraft  <d@domob.eu>
872
873         * gfc-internals.texi (section gfc_expr):  Created documentation about
874         the gfc_expr internal data structure.
875
876 2008-07-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
877
878         PR fortran/36670
879         * iresolve.c (gfc_resolve_product):  Set shape of return
880         value from array.
881         (gfc_resolve_sum):  Likewise.
882
883 2008-07-07  Jakub Jelinek  <jakub@redhat.com>
884
885         PR middle-end/36726
886         * f95-lang.c (poplevel): Don't ever add subblocks to
887         global_binding_level.
888
889 2008-07-02  Janus Weil  <janus@gcc.gnu.org>
890             Tobias Burnus  <burnus@net-b.de>
891             Paul Thomas  <pault@gcc.gnu.org>
892
893         PR fortran/32580
894         * gfortran.h (struct gfc_symbol): New member "proc_pointer".
895         * check.c (gfc_check_associated,gfc_check_null): Implement
896         procedure pointers.
897         * decl.c (match_procedure_decl): Ditto.
898         * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
899         * interface.c (compare_actual_formal): Ditto.
900         * match.h: Ditto.
901         * match.c (gfc_match_pointer_assignment): Ditto.
902         * parse.c (parse_interface): Ditto.
903         * primary.c (gfc_match_rvalue,match_variable): Ditto.
904         * resolve.c (resolve_fl_procedure): Ditto.
905         * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
906         gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
907         * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
908         create_function_arglist): Ditto.
909         * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
910         gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
911
912 2008-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
913
914         PR fortran/36590
915         PR fortran/36681
916         * iresolve.c (resolve_mask_arg):  Don't convert mask to
917         kind=1 logical if it is of that type already.
918
919 2008-06-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
920
921         PR fortran/36341
922         * iresolve.c (gfc_resolve_matmul): Copy shapes
923         from arguments.
924
925 2008-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
926
927         * invoke.texi: Add documentation for runtime behavior of
928         -fno-range-check.
929
930 2008-06-28  Daniel Kraft  <d@domob.eu>
931
932         * gfc-internals.texi (section gfc_code):  Extended documentation about
933         gfc_code in the internal datastructures chapter including details about
934         how IF, DO and SELECT blocks look like and an example for how the
935         block-chaining works.
936
937 2008-06-25  Paul Thomas  <pault@gcc.gnu.org>
938
939         PR fortran/36526
940         * interface.c (check_intents):  Correct error where the actual
941         arg was checked for a pointer argument, rather than the formal.
942
943 2008-06-24  Paul Thomas  <pault@gcc.gnu.org>
944
945         PR fortran/34371
946         * expr.c (gfc_check_assign):  Change message and locus for
947         error when conform == 0.
948
949 2008-06-23  Jakub Jelinek  <jakub@redhat.com>
950
951         PR fortran/36597
952         * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
953
954 2008-06-20  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
955             Tobias Burnus  <burnus@net-b.de>
956
957         PR fortran/34908
958         PR fortran/36276
959         * scanner.c (preprocessor_line): do not call gfc_free for
960         current_file->filename if it differs from filename.
961
962 2008-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
963
964         * arith.c (hollerith2representation): Fix for -Wc++-compat.
965         * array.c (gfc_get_constructor): Likewise.
966         * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
967         create_enum_history, gfc_match_final_decl): Likewise.
968         * error.c (error_char): Likewise.
969         * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
970         * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
971         gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
972         gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
973         gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
974         gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
975         gfc_get_alloc, gfc_get_wide_string): Likewise.
976         * interface.c (count_types_test): Likewise.
977         * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
978         Likewise.
979         * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
980         gfc_match_inquire, gfc_match_wait): Likewise.
981         * match.c (gfc_match, match_forall_iterator): Likewise.
982         * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
983         add_true_name, parse_string, write_atom, quote_string,
984         mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
985         * options.c (gfc_post_options): Likewise.
986         * primary.c (match_integer_constant, match_hollerith_constant,
987         match_boz_constant, match_real_constant,
988         gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
989         * scanner.c (gfc_widechar_to_char, add_path_to_list,
990         add_file_change, load_line, get_file, preprocessor_line,
991         load_file, unescape_filename, gfc_read_orig_filename): Likewise.
992         * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
993         gfc_simplify_ishftc): Likewise.
994         * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
995         gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
996         Likewise.
997         * target-memory.c (gfc_target_interpret_expr): Likewise.
998         * trans-const.c (gfc_build_wide_string_const): Likewise.
999         * trans-expr.c (gfc_add_interface_mapping): Likewise.
1000         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1001         gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1002         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1003         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1004         gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1005         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1006         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1007         * trans.c (gfc_get_backend_locus): Likewise.
1008         * trans.h (gfc_get_ss): Likewise.
1009
1010 2008-06-18  Daniel Kraft  <d@domob.eu>
1011
1012         PR fortran/36517, fortran/36492
1013         * array.c (gfc_resolve_character_array_constructor):  Call
1014         gfc_set_constant_character_len with changed length-chec argument.
1015         * decl.c (gfc_set_constant_character_len):  Changed array argument to
1016         be a generic length-checking argument that can be used for correct
1017         checking with typespec and in special cases where the should-be length
1018         is different from the target length.
1019         (build_struct):  Call gfc_set_constant_character_len with changed length
1020         checking argument and introduced additional checks for exceptional
1021         conditions on invalid code.
1022         (add_init_expr_to_sym), (do_parm):  Call gfc_set_constant_character_len
1023         with changed argument.
1024         * match.h (gfc_set_constant_character_len):  Changed third argument to
1025         int for the should-be length rather than bool.
1026
1027 2008-06-17  Daniel Kraft  <d@domob.eu>
1028
1029         PR fortran/36112
1030         * array.c (gfc_resolve_character_array_constructor):  Check that all
1031         elements with constant character length have the same one rather than
1032         fixing it if no typespec is given, emit an error if they don't.  Changed
1033         return type to "try" and return FAILURE for the case above.
1034         (gfc_resolve_array_constructor):  Removed unneeded call to
1035         gfc_resolve_character_array_constructor in this function.
1036         * gfortran.h (gfc_resolve_character_array_constructor):  Returns try.
1037         * trans-array.c (get_array_ctor_strlen):  Return length of first element
1038         rather than last element.
1039         * resolve.c (gfc_resolve_expr):  Handle FAILURE return from
1040         gfc_resolve_character_array_constructor.
1041
1042 2008-06-17  Paul Thomas  <pault@gcc.gnu.org>
1043
1044         PR fortran/34396
1045         * resolve.c (add_dt_to_dt_list):  New function.
1046         (resolve_fl_derived): Call new function for pointer components
1047         and when derived type resolved.
1048
1049 2008-06-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1050
1051         PR fortran/36515
1052         * trans-decl.c (gfc_generate_function_code): Add range_check to options
1053         array.
1054
1055 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1056
1057         * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1058         * gfortran.texi: Likewise.
1059         * intrinsic.texi: Likewise.
1060         * invoke.texi: Likewise.
1061
1062 2008-06-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1063
1064         PR fortran/35863
1065         * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1066         transfer_character_wide which includes passing in the character kind to
1067         support wide character IO. (transfer_expr): If the kind == 4, create the
1068         argument and build the call.
1069         * gfortran.texi: Fix typo.
1070
1071 2008-06-13  Tobias Burnus  <burnus@net-b.de>
1072
1073         PR fortran/36476
1074         * decl.c (do_parm): Handle init expression for len=*.
1075
1076 2008-06-12  Tobias Burnus  <burnus@net-b.de>
1077
1078         PR fortran/36462
1079         * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1080         Fix passing of the BACK= argument.
1081
1082 2008-06-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1083
1084         * cpp.c: Add copyright notice.
1085         * cpp.h: Add copyright notice.
1086
1087 2008-06-08  Janus Weil  <janus@gcc.gnu.org>
1088
1089         PR fortran/36459
1090         * decl.c (match_procedure_decl): Correctly recognize if the interface
1091         is an intrinsic procedure.
1092
1093 2008-06-08  Tobias Burnus  <burnus@net-b.de>
1094
1095         PR fortran/35830
1096         * resolve.c (resolve_symbol): Copy more attributes for
1097         PROCEDUREs with interfaces.
1098
1099 2008-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1100
1101         PR fortran/36420
1102         PR fortran/36422
1103         * io.c (check_format): Add new error message for zero width.
1104         Use new error message for FMT_A and with READ, FMT_G.  Allow
1105         FMT_G with WRITE except when -std=F95 and -std=F2003.
1106
1107 2008-06-07  Tobias Burnus  <burnus@net-b.de>
1108
1109         PR fortran/36437
1110         * intrinsic.c (add_functions): Implement c_sizeof.
1111         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1112         create unneeded variable in the scalar case.
1113         * intrinsic.texi: Add C_SIZEOF documentation.
1114
1115 2008-06-06  Tobias Burnus  <burnus@net-b.de>
1116
1117         * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1118
1119 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
1120
1121         * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1122         * parse.c (next_free): Allow tab after !$omp.
1123         (decode_omp_directive): Handle !$omp task, !$omp taskwait
1124         and !$omp end task.
1125         (case_executable): Add ST_OMP_TASKWAIT.
1126         (case_exec_markers): Add ST_OMP_TASK.
1127         (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1128         ST_OMP_TASKWAIT.
1129         (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1130         * gfortran.h (gfc_find_sym_in_expr): New prototype.
1131         (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1132         (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1133         OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
1134         untied fields.
1135         (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1136         * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1137         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1138         LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1139         * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1140         (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1141         gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1142         * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1143         BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1144         BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1145         BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1146         BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1147         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1148         (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1149         than boolean_type_node.
1150         * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1151         EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1152         untied and collapse clauses.
1153         (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1154         * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1155         EXEC_OMP_TASKWAIT.
1156         * st.c (gfc_free_statement): Likewise.
1157         * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1158         (find_sym_in_expr): Rename to...
1159         (gfc_find_sym_in_expr): ... this.  No longer static.
1160         (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1161         * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1162         prototypes.
1163         * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1164         firstprivate, lastprivate, reduction, copyprivate and copyin
1165         clauses.
1166         (omp_current_do_code): Made static.
1167         (omp_current_do_collapse): New variable.
1168         (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1169         clear omp_current_do_code and omp_current_do_collapse on return.
1170         (gfc_resolve_do_iterator): Handle collapsed do loops.
1171         (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1172         (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1173         (gfc_match_omp_clauses): Handle default (firstprivate),
1174         schedule (auto), untied and collapse (n) clauses.
1175         (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1176         (OMP_TASK_CLAUSES): Define.
1177         (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1178         * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1179         (gfc_omp_clause_default_ctor): Add outer argument.  For allocatable
1180         arrays allocate them with the bounds of the outer var if outer
1181         var is allocated.
1182         (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1183         gfc_omp_clause_dtor): New functions.
1184         (gfc_trans_omp_array_reduction): If decl is allocatable array,
1185         allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1186         and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1187         (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1188         for assumed-size arrays.
1189         (gfc_trans_omp_do): Add par_clauses argument.  If dovar is
1190         present in lastprivate clause and do loop isn't simple,
1191         set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
1192         parallel's lastprivate clause, change it to shared and add
1193         lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
1194         (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1195         (gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
1196         OMP_FOR from OMP_PARALLEL.
1197         (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1198         OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1199         (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1200         (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1201         EXEC_OMP_TASKWAIT.
1202
1203 2008-06-04  Janus Weil  <janus@gcc.gnu.org>
1204
1205         PR fortran/36322
1206         PR fortran/36275
1207         * resolve.c (resolve_symbol): Correctly copy the interface for a
1208         PROCEDURE declaration.
1209
1210 2008-06-02  Janus Weil  <janus@gcc.gnu.org>
1211
1212         PR fortran/36361
1213         * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1214         gfc_add_explicit_interface): Added checks.
1215         * decl.c (attr_decl1): Added missing "var_locus".
1216         * parse.c (parse_interface): Checking for errors.
1217
1218 2008-06-02  Daniel Kraft  <d@domob.eu>
1219
1220         * gfortran.h:  New statement-type ST_FINAL for FINAL declarations.
1221         (struct gfc_symbol):  New member f2k_derived.
1222         (struct gfc_namespace):  New member finalizers, for use in the above
1223         mentioned f2k_derived namespace.
1224         (struct gfc_finalizer):  New type defined for finalizers linked list.
1225         * match.h (gfc_match_final_decl):  New function header.
1226         * decl.c (gfc_match_derived_decl):  Create f2k_derived namespace on
1227         constructed symbol node.
1228         (gfc_match_final_decl):  New function to match a FINAL declaration line.
1229         * parse.c (decode_statement):  match-call for keyword FINAL.
1230         (parse_derived):  Parse CONTAINS section and accept FINAL statements.
1231         * resolve.c (gfc_resolve_finalizers):  New function to resolve (that is
1232         in this case, check) a list of finalizer procedures.
1233         (resolve_fl_derived):  Call gfc_resolve_finalizers here.
1234         * symbol.c (gfc_get_namespace):  Initialize new finalizers to NULL.
1235         (gfc_free_namespace):  Free finalizers list.
1236         (gfc_new_symbol):  Initialize new f2k_derived to NULL.
1237         (gfc_free_symbol):  Free f2k_derived namespace.
1238         (gfc_free_finalizer):  New function to free a single gfc_finalizer node.
1239         (gfc_free_finalizer_list):  New function to free a linked list of
1240         gfc_finalizer nodes.
1241
1242 2008-06-02  Daniel Franke  <franke.daniel@gmail.com>
1243
1244         PR fortran/36375
1245         PR fortran/36377
1246         * cpp.c (gfc_cpp_init): Do not initialize builtins if
1247         processing already preprocessed input.
1248         (gfc_cpp_preprocess): Finalize output with newline.
1249
1250 2008-05-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1251
1252         * intrinsic.texi: Revert wrong commit.
1253
1254 2008-05-31  Steven G. Kargl  <kargls@comcast.net>
1255
1256         * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1257         Cleanup numerical inquiry function initialization.
1258         (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1259         a single mpfr_clears().
1260         (gfc_check_real_range): Re-arrange logic to eliminate multiple
1261         unnecessary branching and assignments.
1262         (gfc_arith_times): Use mpfr_clears() in preference to multiple
1263         mpfr_clear().
1264         (gfc_arith_divide): Ditto.
1265         (complex_reciprocal): Eliminate now unused variables a, re, im.
1266         Cleanup the mpfr abuse.  Use mpfr_clears() in preference to
1267         multiple mpfr_clear().
1268         (complex_pow): Fix comment whitespace.  Use mpfr_clears() in
1269         preference to multiple mpfr_clear().
1270         * simplify.c (gfc_simplify_and): Remove blank line.
1271         (gfc_simplify_atan2): Move error checking earlier to eliminate
1272         a now unnecessay gfc_free_expr().
1273         (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1274         (gfc_simplify_bessel_j1): Ditto.
1275         (gfc_simplify_bessel_jn): Ditto.
1276         (gfc_simplify_bessel_y0): Ditto.
1277         (gfc_simplify_bessel_y1): Ditto.
1278         (gfc_simplify_bessel_yn): Ditto. 
1279         (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1280         combine nested if statement rational expressions.
1281         (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1282         mpfr_clear().
1283         (gfc_simplify_exp): Ditto.
1284         (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1285         special case of 0.  Use mpfr_clears() in preference to multiple
1286         mpfr_clear().
1287         (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1288         (gfc_simplify_lgamma): Ditto.
1289         (gfc_simplify_log10): Ditto.
1290         (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1291         statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1292         (gfc_simplify_mod):  Eliminate now unused variables quot, iquot,
1293         and term.  Simplify the mpfr magic.
1294         (gfc_simplify_modulo): Ditto.
1295         (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1296         (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1297         mpfr_clear().
1298         (gfc_simplify_sin): Ditto
1299         (gfc_simplify_sqrt): Ditto
1300         (gfc_simplify_set_exponent):  Move gfc_set_model_kind() to after the
1301         special case of 0.  Use mpfr_clears() in preference to multiple
1302         mpfr_clear().
1303
1304 2008-05-29  Daniel Franke  <franke.daniel@gmail.com>
1305
1306         PR target/36348
1307         * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1308
1309 2008-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1310
1311         * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1312         (gfc_read_orig_filename): Adjust call to load_line. Don't call
1313         ungetc.
1314         (load_file): Adjust call to load_line.
1315
1316 2008-05-28  Janus Weil  <janus@gcc.gnu.org>
1317
1318         PR fortran/36325
1319         PR fortran/35830
1320         * interface.c (gfc_procedure_use): Enable argument checking for
1321         external procedures with explicit interface.
1322         * symbol.c (check_conflict): Fix conflict checking for externals.
1323         (copy_formal_args): Fix handling of arrays.
1324         * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1325         of intrinsics.
1326         * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1327         EXTERNAL attribute.
1328
1329 2008-05-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1330
1331         PR fortran/36319
1332         * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1333         function as pure.
1334         * trans-array.c (gfc_trans_array_ctor_element): Divide element
1335         size by the size of one character to obtain length.
1336         * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1337         appropriate.
1338         (gfc_resolve_eoshift): Likewise.
1339         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1340         (gfc_conv_intrinsic_fdate): Minor beautification.
1341         (gfc_conv_intrinsic_ttynam): Minor beautification.
1342         (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1343         (size_of_string_in_bytes): New function.
1344         (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1345         character expressions.
1346         (gfc_conv_intrinsic_sizeof): Likewise.
1347         (gfc_conv_intrinsic_array_transfer): Likewise.
1348         (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1349         beautification.
1350         (gfc_conv_intrinsic_repeat): Fix comment typo.
1351         * simplify.c (gfc_convert_char_constant): Take care of conversion
1352         of array constructors.
1353
1354 2008-05-27  Tobias Burnus  <burnus@net-b.de>
1355
1356         PR fortran/36316
1357         * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1358         Add missing fold_convert.
1359
1360 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
1361
1362         * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1363         added FIXME instead.
1364
1365 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
1366
1367         PR fortran/18428
1368         * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1369         imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1370         o, undef, v): New options.
1371         * options.c (gfc_init_options): Also initialize preprocessor
1372         options.
1373         (gfc_post_options): Also handle post-initialization of preprocessor
1374         options.
1375         (gfc_handle_option): Check if option is a preprocessor option.
1376         If yes, let gfc_cpp_handle_option() handle the option.
1377         * lang-specs.h: Reorganized to handle new options.
1378         * scanner.c (gfc_new_file): Read temporary file instead of
1379         input source if preprocessing is enabled.
1380         * f95-lang.c (gfc_init): Initialize preprocessor.
1381         (gfc_finish): Clean up preprocessor.
1382         * cpp.c: New.
1383         * cpp.h: New.
1384         * Make-lang.in: Added new objects and dependencies.
1385         * gfortran.texi: Updated section "Preprocessing and
1386         conditional compilation".
1387         * invoke.texi: Added new section "Preprocessing Options",
1388         listed and documented the preprocessing options handled
1389         by gfortran.
1390
1391 2008-05-25  Tobias Burnus  <burnus@net-b.de>
1392
1393         PR fortran/32600
1394         * trans-expr.c (gfc_conv_function_call): Remove library
1395         call for c_f_pointer with scalar Fortran pointers and for
1396         c_f_procpointer.
1397
1398 2008-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1399
1400         PR fortran/36257
1401         * iresolve.c (check_charlen_present): Don't force the rank to 1.
1402
1403 2008-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1404
1405         PR fortran/36265
1406         * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1407         the temporary variable.
1408
1409 2008-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1410
1411         * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1412         result variable to avoid warnings.
1413
1414 2008-05-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1415
1416         * intrinsic.c (char_conversions, ncharconv): New static variables.
1417         (find_char_conv): New function.
1418         (add_functions): Add simplification functions for ADJUSTL and
1419         ADJUSTR. Don't check the kind of their argument. Add checking for
1420         LGE, LLE, LGT and LLT.
1421         (add_subroutines): Fix argument type for SLEEP. Fix argument name
1422         for SYSTEM.
1423         (add_char_conversions): New function.
1424         (gfc_intrinsic_init_1): Call add_char_conversions.
1425         (gfc_intrinsic_done_1): Free char_conversions.
1426         (check_arglist): Use kind == 0 as a signal that we don't want
1427         the kind value to be checked.
1428         (do_simplify): Also simplify character functions.
1429         (gfc_convert_chartype): New function
1430         * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1431         use of default character type.
1432         (gfc_trans_array_constructor_value): Likewise.
1433         (get_array_ctor_var_strlen): Use integer kind to build an integer
1434         instead of a character kind!
1435         (gfc_build_constant_array_constructor): Don't force the use of
1436         default character type.
1437         (gfc_conv_loop_setup): Likewise.
1438         * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1439         default character type. Allocate enough memory for wide strings.
1440         (gfc_conv_concat_op): Make sure operand kind are the same.
1441         (string_to_single_character): Remove gfc_ prefix. Reindent.
1442         Don't force the use of default character type.
1443         (gfc_conv_scalar_char_value): Likewise.
1444         (gfc_build_compare_string): Call string_to_single_character.
1445         (fill_with_spaces): New function
1446         (gfc_trans_string_copy): Add kind arguments. Use them to deal
1447         with wide character kinds.
1448         (gfc_conv_statement_function): Whitespace fix. Call
1449         gfc_trans_string_copy with new kind arguments.
1450         (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1451         instead of using gfc_widechar_to_char.
1452         (gfc_conv_string_parameter): Don't force the use of default
1453         character type.
1454         (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1455         * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1456         gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1457         * decl.c (gfc_set_constant_character_len): Don't assert the
1458         existence of a single character kind.
1459         * trans-array.h (gfc_trans_string_copy): New prototype.
1460         * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1461         New prototypes.
1462         * error.c (print_wide_char_into_buffer): New function lifting
1463         code from gfc_print_wide_char. Fix order to output '\x??' instead
1464         of 'x\??'.
1465         (gfc_print_wide_char): Call print_wide_char_into_buffer.
1466         (show_locus): Call print_wide_char_into_buffer with buffer local
1467         to this function.
1468         * trans-const.c (gfc_build_wide_string_const): New function.
1469         (gfc_conv_string_init): Deal with wide characters strings
1470         constructors.
1471         (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1472         * trans-stmt.c (gfc_trans_label_assign): Likewise.
1473         (gfc_trans_character_select): Deal with wide strings.
1474         * expr.c (gfc_check_assign): Allow conversion between character
1475         kinds on assignment.
1476         * trans-const.h (gfc_build_wide_string_const): New prototype.
1477         * trans-types.c (gfc_get_character_type_len_for_eltype,
1478         gfc_get_character_type_len): Create too variants of the old
1479         gfc_get_character_type_len, one getting kind argument and the
1480         other one directly taking a type tree.
1481         * trans.h (gfor_fndecl_select_string_char4,
1482         gfor_fndecl_convert_char1_to_char4,
1483         gfor_fndecl_convert_char4_to_char1): New prototypes.
1484         * trans-types.h (gfc_get_character_type_len_for_eltype): New
1485         prototype.
1486         * resolve.c (resolve_operator): Exit early when kind mismatches
1487         are detected, because that makes us issue an error message later.
1488         (validate_case_label_expr): Fix wording of error message.
1489         * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1490         functions.
1491         (gfc_resolve_pack): Call _char4 variants of library function
1492         when dealing with wide characters.
1493         (gfc_resolve_reshape): Likewise.
1494         (gfc_resolve_spread): Likewise.
1495         (gfc_resolve_transpose): Likewise.
1496         (gfc_resolve_unpack): Likewise.
1497         * target-memory.c (size_character): Take character kind bit size
1498         correctly into account (not that it changes anything for now, but
1499         it's more generic).
1500         (gfc_encode_character): Added gfc_ prefix. Encoding each
1501         character of a string by calling native_encode_expr for the
1502         corresponding unsigned integer.
1503         (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1504         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1505         gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1506         and gfor_fndecl_convert_char4_to_char1.
1507         * target-memory.h (gfc_encode_character): New prototype.
1508         * arith.c (gfc_check_character_range): New function.
1509         (eval_intrinsic): Allow non-default character kinds.
1510         * check.c (gfc_check_access_func): Only allow default
1511         character kind arguments.
1512         (gfc_check_chdir): Likewise.
1513         (gfc_check_chdir_sub): Likewise.
1514         (gfc_check_chmod): Likewise.
1515         (gfc_check_chmod_sub): Likewise.
1516         (gfc_check_lge_lgt_lle_llt): New function.
1517         (gfc_check_link): Likewise.
1518         (gfc_check_link_sub): Likewise.
1519         (gfc_check_symlnk): Likewise.
1520         (gfc_check_symlnk_sub): Likewise.
1521         (gfc_check_rename): Likewise.
1522         (gfc_check_rename_sub): Likewise.
1523         (gfc_check_fgetputc_sub): Likewise.
1524         (gfc_check_fgetput_sub): Likewise.
1525         (gfc_check_stat): Likewise.
1526         (gfc_check_stat_sub): Likewise.
1527         (gfc_check_date_and_time): Likewise.
1528         (gfc_check_ctime_sub): Likewise.
1529         (gfc_check_fdate_sub): Likewise.
1530         (gfc_check_gerror): Likewise.
1531         (gfc_check_getcwd_sub): Likewise.
1532         (gfc_check_getarg): Likewise.
1533         (gfc_check_getlog): Likewise.
1534         (gfc_check_hostnm): Likewise.
1535         (gfc_check_hostnm_sub): Likewise.
1536         (gfc_check_ttynam_sub): Likewise.
1537         (gfc_check_perror): Likewise.
1538         (gfc_check_unlink): Likewise.
1539         (gfc_check_unlink_sub): Likewise.
1540         (gfc_check_system_sub): Likewise.
1541         * primary.c (got_delim): Perform correct character range checking
1542         for all kinds.
1543         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1544         calls to library functions convert_char4_to_char1 and
1545         convert_char1_to_char4 for character conversions.
1546         (gfc_conv_intrinsic_char): Allow all character kings.
1547         (gfc_conv_intrinsic_strcmp): Fix whitespace.
1548         (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1549         * intrinsic.texi: For all GNU intrinsics accepting character
1550         arguments, mention that they're restricted to the default kind.
1551         * simplify.c (simplify_achar_char): New function.
1552         (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1553         gfc_simplify_ichar): Don't error out for wide characters.
1554         (gfc_convert_char_constant): New function.
1555
1556 2008-05-18  Steven G. Kargl  <kargls@comcast.net>
1557
1558         PR fortran/36251
1559         * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1560         and BIND(C).
1561         * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1562
1563 2008-05-17  Tobias Burnus  <burnus@net-b.de>
1564
1565         * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1566         and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1567         GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1568         Move LOG_GAMMA after LOG10.
1569
1570 2008-05-17  Tobias Burnus  <burnus@net-b.de>
1571
1572         * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1573         * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1574         ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1575         CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1576
1577 2008-05-16  Paul Thomas  <pault@gcc.gnu.org>
1578
1579         PR fortran/35756
1580         PR fortran/35759
1581         * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1582         check for calling gfc_trans_where_3.
1583
1584         PR fortran/35743
1585         * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1586         if it is calculated to be negative.
1587
1588         PR fortran/35745
1589         * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1590         ss->where for scalar right hand sides.
1591         * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1592         not evaluate scalars outside the loop.  Clean up whitespace.
1593         * trans.h : Add a bitfield 'where' to gfc_ss.
1594
1595 2008-05-16  Tobias Burnus  <burnus@net-b.de>
1596
1597         * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1598         * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1599
1600 2008-04-16  Daniel Kraft  <d@domob.eu>
1601
1602         PR fortran/27997
1603         * gfortran.h:  Added field "length_from_typespec" to gfc_charlength.
1604         * aray.c (gfc_match_array_constructor):  Added code to parse typespec.
1605         (check_element_type, check_constructor_type, gfc_check_constructor_type):
1606         Extended to support explicit typespec on constructor.
1607         (gfc_resolve_character_array_constructor):  Pad strings correctly for
1608         explicit, constant character length.
1609         * trans-array.c:  New static global variable "typespec_chararray_ctor"
1610         (gfc_trans_array_constructor):  New code to support explicit but dynamic
1611         character lengths.
1612
1613 2008-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1614
1615         PR fortran/34325
1616         * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1617         * expr.c (gfc_specification_expr): Supplement the error message with the
1618         type that was found.
1619         * resolve.c (gfc_resolve_index): Likewise.
1620         * match.c (gfc_match_parens): Clarify error message with "at or before".
1621         (gfc_match_do): Check for matching pairs of parenthesis.
1622
1623 2008-05-16  Tobias Burnus  <burnus@net-b.de
1624
1625         * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1626         add missing KIND argument to ACHAR and NINT; and state that
1627         the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1628         ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1629
1630 2008-05-16  Daniel Kraft  <d@domob.eu>
1631
1632         * primary.c:  New private structure "gfc_structure_ctor_component".
1633         (gfc_free_structure_ctor_component):  New helper function.
1634         (gfc_match_structure_constructor):  Extended largely to support named
1635         arguments and default initialization for structure constructors.
1636
1637 2008-05-15  Steven G. Kargl  <kargls@comcast.net>
1638
1639         * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1640         simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1641         possible memory leaks.
1642         (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1643         of NULL pointers.
1644
1645 2008-05-15  Steven G. Kargl  <kargls@comcast.net>
1646
1647         PR fortran/36239
1648         * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1649         rolled integer conversion with gfc_int2int, gfc_real2int, and
1650         gfc_complex2int.
1651         (gfc_simplify_intconv): Renamed to simplify_intconv.
1652         
1653 2008-05-15  Steven G. Kargl,   <kargl@comcast.net>
1654         * gfortran.dg/and_or_xor.f90: New test
1655
1656         * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1657         gfc_simplify_xor): Don't range check logical results.
1658
1659 2008-05-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1660
1661         * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1662         character kinds.
1663         (gfc_build_compare_string): Add kind argument and use it.
1664         (gfc_conv_statement_function): Fix indentation.
1665         * gfortran.h (gfc_character_info): New structure.
1666         (gfc_character_kinds): New array.
1667         * trans-types.c (gfc_character_kinds, gfc_character_types,
1668         gfc_pcharacter_types): New array.
1669         (gfc_init_kinds): Fill character kinds array.
1670         (validate_character): Take care of nondefault character kinds.
1671         (gfc_build_uint_type): New function.
1672         (gfc_init_types): Take care of nondefault character kinds.
1673         (gfc_get_char_type, gfc_get_pchar_type): New functions.
1674         (gfc_get_character_type_len): Use gfc_get_char_type.
1675         * trans.h (gfc_build_compare_string): Adjust prototype.
1676         (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1677         gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1678         gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1679         gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1680         gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1681         prototypes.
1682         * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1683         prototypes.
1684         * trans-decl.c (gfor_fndecl_compare_string_char4,
1685         gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1686         gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1687         gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1688         gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1689         gfor_fndecl_concat_string_char4): New function decls.
1690         (gfc_build_intrinsic_function_decls): Define new *_char4 function
1691         decls.
1692         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1693         gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1694         gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1695         gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1696
1697 2008-05-15  Sa Liu  <saliu@de.ibm.com>
1698
1699         * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1700         All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1701         c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1702         GNU extensions.
1703         * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1704         to macro NAMED_INTCST.
1705         * symbol.c (std_for_isocbinding_symbol): New helper function to 
1706         return the standard that supports this isocbinding symbol.
1707         (generate_isocbinding_symbol): Do not generate GNU extension symbols
1708         if std=f2003. Add new parameter to NAMED_INTCST.
1709         * module.c (use_iso_fortran_env_module): Add new parameter to
1710         NAMED_INTCST and new field standard to struct intmod_sym.
1711         * gfortran.h: Add new parameter to NAMED_INTCST.
1712         * trans-types.c (init_c_interop_kinds): Add new parameter to 
1713         NAMED_INTCST.
1714         * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1715         and C_INT_FAST128_T.
1716
1717 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1718
1719         PR fortran/36059
1720         * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1721         arrays that have the TARGET attribute.
1722
1723 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1724
1725         PR fortran/36186
1726         * simplify.c (only_convert_cmplx_boz): New function.
1727         (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1728         Call only_convert_cmplx_boz.
1729
1730 2008-05-14  Paul Thomas  <pault@gcc.gnu.org>
1731
1732         PR fortran/36233
1733         * interface.c (compare_actual_formal): Do not check sizes if the
1734         actual is BT_PROCEDURE.
1735
1736 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1737
1738         PR fortran/35682
1739         * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1740         the same as zero size.
1741         (gfc_conv_loop_setup): Fix size calculation.
1742
1743 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1744
1745         PR fortran/35685
1746         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1747         handle zero-size sections.
1748
1749 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1750
1751         PR fortran/36215
1752         * scanner.c (preprocessor_line): Allocate enough memory for a
1753         wide string.
1754
1755 2008-05-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1756
1757         PR fortran/36176
1758         * target-memory.c (gfc_target_expr_size): Correctly treat
1759         substrings.
1760         (gfc_target_encode_expr): Likewise.
1761         (gfc_interpret_complex): Whitespace change.
1762
1763 2008-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1764
1765         PR fortran/35719
1766         * trans.c (gfc_call_malloc): If size equals zero, allocate one
1767         byte; don't return a null pointer.
1768
1769 2008-05-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1770
1771         PR fortran/36197
1772         * module.c (quote_string): Fix sprintf format.
1773
1774 2008-05-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1775
1776         PR fortran/36162
1777         * module.c (quote_string, unquote_string,
1778         mio_allocated_wide_string): New functions.
1779         (mio_expr): Call mio_allocated_wide_string where needed.
1780
1781 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1782
1783          * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1784          Rename DECL_IS_PURE to DECL_PURE_P.
1785
1786 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1787
1788         * arith.c: (gfc_arith_concat, gfc_compare_string,
1789         gfc_compare_with_Cstring, hollerith2representation,
1790         gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1791         gfc_hollerith2character, gfc_hollerith2logical): Use wide
1792         characters for character constants.
1793         * data.c (create_character_intializer): Likewise.
1794         * decl.c (gfc_set_constant_character_len): Likewise.
1795         * dump-parse-tree.c (show_char_const): Correctly dump wide
1796         character strings.
1797         error.c (print_wide_char): Rename into gfc_print_wide_char.
1798         (show_locus): Adapt to new prototype of gfc_print_wide_char.
1799         expr.c (free_expr0): Representation is now disjunct from
1800         character string value, so we always free it.
1801         (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1802         to wide character strings.
1803         * gfortran.h (gfc_expr): Make value.character.string a wide string.
1804         (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1805         gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1806         (gfc_get_wide_string): New macro.
1807         (gfc_print_wide_char): New prototype.
1808         * io.c (format_string): Make a wide string.
1809         (next_char, gfc_match_format, compare_to_allowed_values, 
1810         gfc_match_open): Deal with wide strings.
1811         * module.c (mio_expr): Convert between wide strings and ASCII ones.
1812         * primary.c (match_hollerith_constant, match_charkind_name): 
1813         Handle wide strings.
1814         * resolve.c (build_default_init_expr): Likewise.
1815         * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1816         gfc_char_to_widechar): New functions.
1817         (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1818         Changes in prototypes.
1819         (gfc_define_undef_line, load_line, preprocessor_line,
1820         include_line, load_file, gfc_read_orig_filename): Handle wide
1821         strings.
1822         * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1823         gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1824         gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1825         gfc_simplify_repeat): Handle wide strings.
1826         (wide_strspn, wide_strcspn): New helper functions.
1827         (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1828         Handle wide strings.
1829         * symbol.c (generate_isocbinding_symbol): Likewise.
1830         * target-memory.c (size_character, gfc_target_expr_size,
1831         encode_character, gfc_target_encode_expr, gfc_interpret_character,
1832         gfc_target_interpret_expr): Handle wide strings.
1833         * trans-const.c (gfc_conv_string_init): Lower wide strings to
1834         narrow ones.
1835         (gfc_conv_constant_to_tree): Likewise.
1836         * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1837         * trans-io.c (gfc_new_nml_name_expr): Likewise.
1838         * trans-stmt.c (gfc_trans_label_assign): Likewise.
1839
1840 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1841
1842         * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1843         gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1844         gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1845         with ATTRIBUTE_UNUSED.
1846
1847 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1848
1849         * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1850         * simplify.c (gfc_simplify_lgamma): Likewise.
1851
1852 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1853
1854         * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1855         gfc_peek_ascii_char.
1856         * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1857         gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1858         match_string_p, match_attr_spec, gfc_match_suffix,
1859         match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1860         Likewise.
1861         * gfortran.h (gfc_char_t): New type.
1862         (gfc_linebuf): Make line member a gfc_char_t.
1863         (locus): Make nextc member a gfc_char_t.
1864         (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1865         gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1866         gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1867         * error.c (print_wide_char): New function.
1868         (show_locus): Use print_wide_char and gfc_wide_strlen.
1869         * io.c (next_char): Use gfc_char_t type.
1870         (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1871         * match.c (gfc_match_parens, gfc_match_eos,
1872         gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1873         gfc_match_intrinsic_op, gfc_match_char,  gfc_match_return,
1874         gfc_match_common): Likewise.
1875         * match.h (gfc_match_special_char): Change prototype.
1876         * parse.c (decode_specification_statement, decode_statement,
1877         decode_omp_directive, next_free, next_fixed): Use
1878         gfc_peek_ascii_char and gfc_next_ascii_char.
1879         * primary.c (gfc_check_digit): Change name.
1880         (match_digits, match_hollerith_constant, match_boz_constant,
1881         match_real_constant, next_string_char, match_charkind_name,
1882         match_string_constant, match_logical_constant_string,
1883         match_complex_constant, match_actual_arg, match_varspec,
1884         gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1885         gfc_next_ascii_char.
1886         * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1887         gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1888         gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1889         wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1890         gfc_next_ascii_char, gfc_peek_ascii_char):
1891         New functions.
1892         (next_char, gfc_define_undef_line, skip_free_comments,
1893         gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1894         gfc_error_recovery, load_line, preprocessor_line, include_line,
1895         load_file, gfc_read_orig_filename): Use gfc_char_t for source
1896         characters and the {gfc_,}wide_* functions to manipulate wide
1897         strings.
1898
1899 2008-05-06  Tobias Burnus  <burnus@net-b.de>
1900
1901         PR fortran/36117
1902         * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1903         * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1904         * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1905         gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1906         gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1907
1908 2008-05-03  Janus Weil  <jaydub66@gmail.com>
1909
1910         * misc.c (gfc_clear_ts): Set interface to NULL.
1911
1912 2008-05-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1913
1914         PR fortran/33268
1915         * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1916         gfc_expr value union. Add io_kind enum to here from io.c.
1917         * io.c (gfc_free_dt): Free extra_comma.
1918         (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1919         BT_CHARACTER, resolve to format_expr and set default unit.  Error if
1920         io_kind is M_WRITE. (match_io):  Match the extra comma and set new
1921         pointer, extra_comma.
1922
1923 2008-05-01  Bud Davis  <bdavis9659@sbcglobal.net>
1924
1925         PR35940/Fortran
1926         * simplify.c (gfc_simplify_index): Check for direction argument 
1927         being a constant.
1928
1929 2008-05-01  Janus Weil  <jaydub66@gmail.com>
1930
1931         * gfortran.h (struct gfc_symbol): Moving "interface" member to
1932         gfc_typespec (plus fixing a small docu error).
1933         * interface.c (gfc_procedure_use): Ditto.
1934         * decl.c (match_procedure_decl): Ditto.
1935         * resolve.c (resolve_specific_f0,
1936         resolve_specific_f0, resolve_symbol): Ditto.
1937
1938 2008-04-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1939
1940         * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1941         * intrinsic.h (gfc_check_selected_char_kind,
1942         gfc_simplify_selected_char_kind): New prototypes.
1943         * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1944         * trans.h (gfor_fndecl_sc_kind): New function decl.
1945         * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1946         * arith.c (gfc_compare_with_Cstring): New function.
1947         * arith.h (gfc_compare_with_Cstring): New prototype.
1948         * check.c (gfc_check_selected_char_kind): New function.
1949         * primary.c (match_string_constant, match_kind_param): Mark
1950         symbols used as literal constant kind param as referenced.
1951         * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1952         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1953         * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1954         * simplify.c (gfc_simplify_selected_char_kind): New function.
1955
1956 2008-04-28  Paul Thomas  <pault@gcc.gnu.org>
1957
1958         PR fortran/35997
1959         * module.c (find_symbol): Do not return a result for a symbol
1960         that has been renamed in another module.
1961
1962 2008-04-26  George Helffrich <george@gcc.gnu.org>
1963
1964         PR fortran/35892
1965         PR fortran/35154
1966         * trans-common.c (create_common):  Add decl to function
1967         chain (if inside one) to preserve identifier scope in debug output.
1968
1969 2008-04-25  Jan Hubicka  <jh@suse.cz>
1970
1971         * trans-decl.c (trans_function_start): Update.
1972
1973 2008-04-25  Tobias Burnus  <burnus@net-b.de>
1974             Daniel Franke <franke.daniel@gmail.com>
1975
1976         PR fortran/35156
1977         * gfortranspec.c (lang_specific_driver): Deprecate
1978         -M option; fix ICE when "-M" is last argument and
1979         make "-M<dir>" work.
1980         * options.c (gfc_handle_module_path_options): 
1981         Use -J instead of -M in error messages.
1982         * invoke.texi: Mark -M as depecated.
1983
1984 2008-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1985             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1986
1987         PR fortran/35994
1988         * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1989         loop counter offset.
1990
1991 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1992
1993         * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1994         * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1995         (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1996         (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1997         (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1998         * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1999         (create_common): Don't set TREE_INVARIANT.
2000         * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2001         * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2002
2003 2008-04-21  Steve Ellcey  <sje@cup.hp.com>
2004
2005         * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2006
2007 2008-04-21  Daniel Franke  <franke.daniel@gmail.com>
2008
2009         PR fortran/35019
2010         * gfortranspec.c (lookup_option): Properly handle separated arguments
2011         in -J option, print missing argument message when necessary.
2012
2013 2008-04-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2014
2015         PR fortran/35882
2016         * scanner.c (skip_fixed_comments): Update continue_line when comment is
2017         detected. (gfc_next_char_literal): Likewise.
2018
2019 2008-04-19  Paul Thomas  <pault@gcc.gnu.org>
2020
2021         PR fortran/35944
2022         PR fortran/35946
2023         PR fortran/35947
2024         * trans_array.c (gfc_trans_array_constructor): Temporarily
2025         realign loop, if loop->from is not zero, before creating
2026         the temporary array and provide an offset.
2027
2028         PR fortran/35959
2029         * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2030         and allow for NULL body.  Change all references from
2031         init_default_dt to gfc_init_default_dt.
2032         * trans.h : Add prototype for gfc_init_default_dt.
2033         * trans-array.c (gfc_trans_deferred_vars): After nullification
2034         call gfc_init_default_dt for derived types with allocatable
2035         components.
2036
2037 2008-04-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2038
2039         PR fortran/35892
2040         * trans-common.c (create_common): Revert patch causing regression.
2041
2042 2008-04-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2043
2044         PR fortran/35724
2045         * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2046         optional argument attribute.
2047         
2048 2008-04-16  Paul Thomas  <pault@gcc.gnu.org>
2049
2050         PR fortran/35932
2051         * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2052         is not used, the argument must be converted.
2053
2054 2008-04-16  Jakub Jelinek  <jakub@redhat.com>
2055
2056         PR target/35662
2057         * f95-lang.c (gfc_init_builtin_functions): Make sure
2058         BUILT_IN_SINCOS{,F,L} types aren't varargs.
2059
2060 2008-04-15  Paul Thomas  <pault@gcc.gnu.org>
2061
2062         PR fortran/35864
2063         * expr.c (scalarize_intrinsic_call): Reorder identification of
2064         array argument so that if one is not found a segfault does not
2065         occur.  Return FAILURE if all scalar arguments.
2066
2067 2008-04-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2068             Tobias Burnus  <burnus@net-b.de>
2069
2070         PR fortran/35882
2071         * options.c (gfc_init_options): Set the default maximum continuation
2072         lines to 255 for both free and fixed form source for warnings.
2073         (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2074         the -std=f95 free form max continuations to 39 for warnings.
2075         * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2076         if it is less than the current locus.
2077
2078 2008-04-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2079
2080         PR fortran/25829 28655
2081         * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2082         round, sign, and id. (match_open_element): Match new tags.
2083         (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2084         for DEFAULT only. Update error messages. (match_dt_element): Fix match
2085         tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2086         new expressions. (match_inquire_element): Match new tags.
2087         (gfc_match_inquire): Add constraint for ID and PENDING.
2088         (gfc_resolve_inquire): Resolve new tags.
2089         * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2090         mask for ID parameter.
2091         * ioparm.def: Fix order of parameters for pending, round, and sign.
2092         NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2093         things don't work.
2094
2095 2008-04-06  Paul Thomas  <pault@gcc.gnu.org>
2096
2097         PR fortran/35780
2098         * expr.c (scalarize_intrinsic_call): Identify which argument is
2099         an array and use that as the template.
2100         (check_init_expr): Remove tests that first argument is an array
2101         in the call to scalarize_intrinsic_call.
2102
2103 2008-04-06  Tobias Schlüter  <tobi@gcc.gnu.org>
2104
2105         PR fortran/35832
2106         * io.c (io_tag): Add field 'value'.  Split 'spec' field in
2107         existing io_tags.
2108         (match_etag, match_vtag, match_ltag): Split parsing in two steps
2109         to give better error messages.
2110
2111 2008-04-06  Tobias Burnus  <burnus@net-b.de>
2112
2113         * io.c (check_io_constraints): Add constrains. ID= requires
2114         asynchronous= and asynchronous= must be init expression.
2115
2116 2008-04-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2117
2118         * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2119
2120 2008-04-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2121
2122         * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2123         gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2124         functions and make them static. Add new gfc_dump_parse_tree
2125         function.
2126         * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2127         (gfc_status, gfc_status_char): Delete prototypes.
2128         * error.c (gfc_status, gfc_status_char): Remove functions.
2129         * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2130         * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2131         (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2132         gfc_status and exit.
2133         (gfc_handle_option): Rename verbose into dump_parse_tree.
2134         * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2135
2136 2008-04-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2137             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2138
2139         PR fortran/25829 28655
2140         * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2141         * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2142         (gfc_open): Add pointers for decimal, encoding, round, sign,
2143         asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2144         encoding, pending, round, sign, size, id.
2145         (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2146         asynchronous, blank, decimal, delim, pad, round, sign.
2147         (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2148         wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2149         * trans-stmt.h (gfc_trans_wait): New function prototype.
2150         * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2151         * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2152         ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2153         (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2154         tags. (gfc_resolve_open): Remove comment around check for allowed
2155         values and ASYNCHRONOUS, update it.  Likewise for DECIMAL, ENCODING,
2156         ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2157         (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2158         (match_wait_element): New function. (gfc_match_wait): New function.
2159         * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2160         (resolve_code): Add case for EXEC_WAIT. 
2161         * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2162         * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2163         Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2164         (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2165         (gfc_trans_open): Add mask bits for new I/O tags.
2166         (gfc_trans_inquire): Add mask bits for new I/O tags.
2167         (gfc_trans_wait): New translation function.
2168         (build_dt): Add mask bits for new I/O tags.
2169         * match.c (gfc_match_if) Add matcher for "wait".
2170         * match.h (gfc_match_wait): Prototype for new function.
2171         * ioparm.def: Add new I/O parameter definitions.
2172         * parse.c (decode_statement): Add match for "wait" statement.
2173         (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2174
2175 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
2176
2177         PR fortran/35786
2178         * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2179         isn't a variable.
2180
2181 2008-04-03  Tom Tromey  <tromey@redhat.com>
2182
2183         * Make-lang.in (fortran_OBJS): New variable.
2184
2185 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
2186
2187         * f95-lang.c (insert_block): Kill.
2188
2189 2008-04-01  George Helffrich <george@gcc.gnu.org>
2190
2191         PR fortran/35154, fortran/23057
2192         * trans-common.c (create_common):  Add decl to function
2193         chain to preserve identifier scope in debug output.
2194
2195 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
2196
2197         * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2198         * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2199         gpl.texi.
2200
2201 2008-03-30  Paul Thomas  <pault@gcc.gnu.org>
2202
2203         PR fortran/35740
2204         * resolve.c (resolve_function, resolve_call): If the procedure
2205         is elemental do not look for noncopying intrinsics.
2206
2207 2008-03-29  Paul Thomas  <pault@gcc.gnu.org>
2208
2209         PR fortran/35698
2210         * trans-array.c (gfc_array_init_size): Set 'size' zero if
2211         negative in one dimension.
2212
2213         PR fortran/35702
2214         * trans-expr.c (gfc_trans_string_copy): Only assign a char
2215         directly if the lhs and rhs types are the same.
2216
2217 2008-03-28  Daniel Franke  <franke.daniel@gmail.com>
2218             Paul Richard Thomas <paul.richard.thomas@gmail.com>
2219
2220         PR fortran/34714
2221         * primary.c (match_variable): Improved matching of function 
2222         result variables.
2223         * resolve.c (resolve_allocate_deallocate): Removed checks if
2224         the actual argument for STAT is a variable.
2225
2226 2008-03-28  Tobias Burnus  <burnus@net-b.de>
2227
2228         * symbol.c (gfc_get_default_type): Fix error message; option
2229         -fallow_leading_underscore should be -fallow-leading-underscore
2230
2231 2008-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2232
2233         PR fortran/35724
2234         * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2235         optional argument attribute.
2236
2237 2008-03-27  Tom Tromey  <tromey@redhat.com>
2238
2239         * Make-lang.in: Revert automatic dependency patch.
2240
2241 2008-03-25  Tom Tromey  <tromey@redhat.com>
2242
2243         * Make-lang.in: Remove .o targets.
2244         (fortran_OBJS): New variable.
2245         (fortran/gfortranspec.o): Move to fortran/.  Reduce to variable
2246         setting.
2247         (GFORTRAN_D_OBJS): Update.
2248         (GFORTRAN_TRANS_DEPS): Remove.
2249
2250 2008-03-24  Paul Thomas  <pault@gcc.gnu.org>
2251
2252         PR fortran/34813
2253         * resolve.c (resolve_structure_cons): It is an error to assign
2254         NULL to anything other than a pointer or allocatable component.
2255
2256         PR fortran/33295
2257         * resolve.c (resolve_symbol): If the symbol is a derived type,
2258         resolve the derived type.  If the symbol is a derived type
2259         function, ensure that the derived type is visible in the same
2260         namespace as the function.
2261
2262 2008-03-23  Tobias Schlüter  <tobi@gcc.gnu.org>
2263
2264         * trans.h: Use fold_build in build1_v, build2_v and build3_v
2265         macros.
2266         * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2267         Don't use build2_v macro.
2268
2269 2008-03-19  Daniel Franke  <franke.daniel@gmail.com>
2270
2271         PR fortran/35152
2272         * interface.c (gfc_procedure_use): Check for keyworded arguments in
2273         procedures without explicit interfaces.
2274
2275 2008-03-16  Paul Thomas  <pault@gcc.gnu.org>
2276
2277         PR fortran/35470
2278         * resolve.c (check_assumed_size_reference):  Only visit the
2279         first reference and look directly at the highest dimension.
2280
2281 2008-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2282
2283         PR fortran/35184
2284         * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2285         assert.
2286
2287 2008-03-15  Daniel Franke  <franke.daniel@gmail.com>
2288
2289         PR fortran/35584
2290         * resolve.c (resolve_branch): Less strict and pessimistic warning
2291         message.
2292
2293 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
2294
2295         * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2296         (gfc_be_parse_file): Call clear_binding_stack from here.
2297         (gfc_clear_binding_stack): Rename to clear_binding_stack.
2298                 
2299 2008-03-09  Paul Thomas  <pault@gcc.gnu.org>
2300
2301         PR fortran/35474
2302         * module.c (mio_symtree_ref): After providing a symbol for a
2303         missing equivalence member, resolve and NULL the fixups.
2304
2305 2008-03-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2306
2307         * invoke.texi (Error and Warning Options): Document
2308         -Wline-truncation.
2309
2310 2008-03-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2311
2312         PR fortran/34956
2313         * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2314         checking bounds of absent optional arguments.
2315
2316 2008-03-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2317
2318         PR fortran/33197
2319         * intrinsic.c (add_functions): Add simplification routines for
2320         ERF, DERF, ERFC and DERFC.
2321         * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2322         extensions into Fortran 2008 features.
2323         * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2324         prototypes.
2325         * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2326
2327 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2328
2329         PR fortran/33197
2330         * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2331         ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2332         ERFC_SCALED, LOG_GAMMA and HYPOT.
2333         * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2334         gfc_resolve_hypot): New prototypes.
2335         * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2336         ACOSH, ASINH and ATANH available.
2337         * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2338         * lang.opt: Add -std=f2008 option.
2339         * libgfortran.h: Define GFC_STD_F2008.
2340         * lang-specs.h: Add .f08 and .F08 file suffixes.
2341         * iresolve.c (gfc_resolve_hypot): New function.
2342         * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2343         * check.c (gfc_check_hypot): New function.
2344         * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2345         * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2346         (form_from_filename): Add .f08 suffix.
2347         (gfc_handle_option): Handle -std=f2008 option.
2348         * simplify.c (gfc_simplify_hypot): New function.
2349         * gfortran.texi: Document Fortran 2008 status and file extensions.
2350         * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2351         as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2352         ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2353         * invoke.texi: Document the new -std=f2008 option.
2354
2355 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
2356
2357         * gfortranspec.c (lang_specific_driver): Update copyright notice
2358         dates.
2359
2360 2008-02-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2361
2362         PR fortran/35059
2363         * expr.c (find_array_element): Modify traversing the constructor to
2364         avoid trying to access NULL memory pointed to by next for the
2365         last element. (find_array_section): Exit while loop if cons->next is
2366         NULL.
2367         * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2368         (gfc_conv_function_call): Same.
2369         * decl.c (gfc_match_implicit): Same.
2370         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2371
2372 2008-02-28  Daniel Franke  <franke.daniel@gmail.com>
2373
2374         PR fortran/31463
2375         PR fortran/33950
2376         PR fortran/34296
2377         * lang.opt: Added -Wreturn-type.
2378         * options.c (gfc_handle_option): Recognize -Wreturn-type.
2379         * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2380         where the result value is not set.
2381         (gfc_generate_function_code): Likewise.
2382         (generate_local_decl): Emit warnings for funtions whose RESULT
2383         variable is not set.
2384
2385 2008-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2386
2387         PR fortran/34868
2388         * trans-expr.c (gfc_conv_variable): Don't build indirect
2389         references when explicit interface is mandated.
2390         * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2391         on the result symbol as well as the procedure symbol.
2392
2393 2008-02-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2394
2395         PR fortran/33387
2396         * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2397         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2398         gfor_fndecl_math_exponent16.
2399         * f95-lang.c (build_builtin_fntypes): Add new function types.
2400         (gfc_init_builtin_functions): Add new builtins for nextafter,
2401         frexp, ldexp, fabs, scalbn and inf.
2402         * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2403         (gfc_resolve_scale): Don't convert type of second argument.
2404         (gfc_resolve_set_exponent): Likewise.
2405         (gfc_resolve_size): Don't add hidden arguments.
2406         * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2407         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2408         gfor_fndecl_math_exponent16.
2409         * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2410         for scalbn, fraction, nearest, rrspacing, set_exponent and
2411         spacing.
2412         (gfc_conv_intrinsic_exponent): Directly call frexp.
2413         (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2414         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2415         gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2416         functions.
2417         (gfc_conv_intrinsic_function): Use the new functions above.
2418
2419 2008-02-26  Tobias Burnus  <burnus@net-b.de>
2420
2421         PR fortran/35033
2422         * interface.c (check_operator_interface): Show better line for error
2423         messages; fix constrains for user-defined assignment operators.
2424         (gfc_extend_assign): Fix constrains for user-defined assignment
2425         operators.
2426
2427 2008-02-26  Tom Tromey  <tromey@redhat.com>
2428
2429         * trans-io.c (set_error_locus): Remove old location code.
2430         * trans-decl.c (gfc_set_decl_location): Remove old location code.
2431         * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2432         * scanner.c (gfc_gobble_whitespace): Remove old location code.
2433         (get_file): Likewise.
2434         (preprocessor_line): Likewise.
2435         (load_file): Likewise.
2436         (gfc_new_file): Likewise.
2437         * trans.c (gfc_trans_runtime_check): Remove old location code.
2438         (gfc_get_backend_locus): Likewise.
2439         (gfc_set_backend_locus): Likewise.
2440         * data.c (gfc_assign_data_value): Remove old location code.
2441         * error.c (show_locus): Remove old location code.
2442         * gfortran.h (gfc_linebuf): Remove old location code.
2443         (gfc_linebuf_linenum): Remove old-location variant.
2444
2445 2008-02-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2446
2447         PR fortran/34729
2448         * trans-const.c (gfc_build_string_const): Don't call gettext.
2449         (gfc_build_localized_string_const): New function.
2450         * trans-const.h (gfc_build_localized_string_const): New prototype.
2451         * trans.c (gfc_trans_runtime_check): Use
2452         gfc_build_localized_string_const instead of gfc_build_string_const.
2453         (gfc_call_malloc): Likewise.
2454         (gfc_allocate_with_status): Likewise.
2455         (gfc_allocate_array_with_status): Likewise.
2456         (gfc_deallocate_with_status): Likewise.
2457         (gfc_call_realloc): Likewise.
2458         * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2459
2460 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
2461
2462         * arith.c: Update copyright years.
2463         * arith.h: Likewise.
2464         * array.c: Likewise.
2465         * bbt.c: Likewise.
2466         * check.c: Likewise.
2467         * data.c: Likewise.
2468         * data.h: Likewise.
2469         * decl.c: Likewise.
2470         * dependency.c: Likewise.
2471         * dependency.h: Likewise.
2472         * dump-parse-tree.c: Likewise.
2473         * error.c: Likewise.
2474         * expr.c: Likewise.
2475         * gfc-internals.texi: Likewise.
2476         * gfortran.h: Likewise.
2477         * gfortran.texi: Likewise.
2478         * gfortranspec.c: Likewise.
2479         * interface.c: Likewise.
2480         * intrinsic.c: Likewise.
2481         * intrinsic.h: Likewise.
2482         * intrinsic.texi: Likewise.
2483         * invoke.texi: Likewise.
2484         * io.c: Likewise.
2485         * iresolve.c: Likewise.
2486         * iso-c-binding.def: Likewise.
2487         * iso-fortran-env.def: Likewise.
2488         * lang-specs.h: Likewise.
2489         * lang.opt: Likewise.
2490         * libgfortran.h: Likewise.
2491         * match.c: Likewise.
2492         * match.h: Likewise.
2493         * matchexp.c: Likewise.
2494         * misc.c: Likewise.
2495         * module.c: Likewise.
2496         * openmp.c: Likewise.
2497         * options.c: Likewise.
2498         * parse.c: Likewise.
2499         * parse.h: Likewise.
2500         * primary.c: Likewise.
2501         * resolve.c: Likewise.
2502         * scanner.c: Likewise.
2503         * simplify.c: Likewise.
2504         * st.c: Likewise.
2505         * symbol.c: Likewise.
2506         * target-memory.c: Likewise.
2507         * target-memory.h: Likewise.
2508         * trans-array.h: Likewise.
2509         * trans-const.h: Likewise.
2510         * trans-stmt.h: Likewise.
2511         * trans-types.c: Likewise.
2512         * trans-types.h: Likewise.
2513         * types.def: Likewise.
2514
2515 2008-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2516
2517         PR fortran/35223
2518         * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2519         (gfc_simplify_ibset): Remove call to range_check.
2520         (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2521         (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2522         temporary gfc_typspec variable.
2523
2524 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
2525
2526         * trans-array.c (gfc_conv_descriptor_data_get,
2527         gfc_conv_descriptor_data_set_internal,
2528         gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2529         gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2530         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2531         gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2532         gfc_conv_array_transpose, gfc_grow_array,
2533         gfc_trans_array_constructor_subarray,
2534         gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2535         gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2536         gfc_conv_array_initializer, gfc_trans_array_bounds,
2537         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2538         gfc_get_dataptr_offset, gfc_conv_array_parameter,
2539         gfc_trans_dealloc_allocated, get_full_array_size,
2540         gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2541         instead of buildN.
2542         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2543         gfc_conv_component_ref, gfc_conv_cst_int_power,
2544         gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2545         * trans-common.c (create_common): Likewise.
2546         * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2547         Likewise.
2548         * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2549         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2550         gfc_trans_integer_select, gfc_trans_character_select,
2551         gfc_trans_forall_loop, compute_overall_iter_number,
2552         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2553         gfc_trans_deallocate): Likewise.
2554         * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2555         gfc_allocate_with_status, gfc_allocate_array_with_status,
2556         gfc_deallocate_with_status): Likewise.
2557         * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2558         * trans-io.c (set_parameter_const, set_parameter_value,
2559         set_parameter_ref, set_string, set_internal_unit, io_result,
2560         set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2561         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2562         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2563         gfc_generate_function_code): Likewise.
2564         * convert.c (convert): Likewise.
2565         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2566         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2567         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2568         gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2569         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2570         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2571         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2572         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2573         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2574         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2575         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2576         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2577         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2578         gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2579         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2580         gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2581         gfc_conv_intrinsic_repeat): Likewise.
2582
2583 2008-02-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2584
2585         PR target/25477
2586         * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2587         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2588         * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2589         gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2590         * trans-decl.c: Likewise.
2591
2592 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2593
2594         PR fortran/35059
2595         * expr.c (find_array_element): Modify traversing the constructor to
2596         avoid trying to access NULL memory pointed to by next for the
2597         last element. (find_array_section): Exit while loop if cons->next is
2598         NULL.
2599
2600 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2601
2602         PR fortran/34907
2603         * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2604         structure.
2605         (gfc_resolve_aint): Likewise.
2606         (gfc_resolve_anint): Likewise.
2607         (gfc_resolve_besn): Likewise.
2608         (gfc_resolve_cshift): Likewise.
2609         (gfc_resolve_ctime): Likewise.
2610         (gfc_resolve_eoshift): Likewise.
2611         (gfc_resolve_index_func): Likewise.
2612         (gfc_resolve_isatty): Likewise.
2613         (gfc_resolve_malloc): Likewise.
2614         (gfc_resolve_rrspacing): Likewise.
2615         (gfc_resolve_scale): Likewise.
2616         (gfc_resolve_set_exponent): Likewise.
2617         (gfc_resolve_spacing): Likewise.
2618         (gfc_resolve_spacing): Likewise.
2619         (gfc_resolve_fgetc): Likewise.
2620         (gfc_resolve_fputc): Likewise.
2621         (gfc_resolve_ftell): Likewise.
2622         (gfc_resolve_ttynam): Likewise.
2623         (gfc_resolve_alarm_sub): Likewise.
2624         (gfc_resolve_mvbits): Likewise.
2625         (gfc_resolve_getarg): Likewise.
2626         (gfc_resolve_signal_sub): Likewise.
2627         (gfc_resolve_exit): Likewise.
2628         (gfc_resolve_flush): Likewise.
2629         (gfc_resolve_free): Likewise.
2630         (gfc_resolve_ctime_sub): Likewise.
2631         (gfc_resolve_fgetc_sub): Likewise.
2632         (gfc_resolve_fputc_sub): Likewise.
2633         (gfc_resolve_fseek_sub): Likewise.
2634         (gfc_resolve_ftell_sub): Likewise.
2635         (gfc_resolve_ttynam_sub): Likewise.
2636
2637 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2638
2639         * gfc-internals.texi: Fix typos and markup nits.
2640         * gfortran.texi: Likewise.
2641         * intrinsic.texi: Likewise.
2642
2643 2008-02-21  Richard Guenther  <rguenther@suse.de>
2644
2645         * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2646         as unary PAREN_EXPR for real and complex typed expressions.
2647         (gfc_conv_unary_op): Fold the built tree.
2648
2649 2008-02-20  Tobias Burnus  <burnus@net-b.de>
2650
2651         PR fortran/34997
2652         * match.c (gfc_match_name): Improve error message for '$'.
2653
2654 2008-02-19  Daniel Franke  <franke.daniel@gmail.com>
2655
2656         PR fortran/35030
2657         * expr.c (gfc_check_pointer_assign): Add type and kind information
2658         to type-mismatch message.
2659         (gfc_check_assign): Unify error messages.
2660
2661 2008-02-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2662
2663         PR fortran/34952
2664         * gfortran.texi: Create new section for unimplemented extensions.
2665         Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2666         Remove "smaller projects" list. Fix a few typos.
2667
2668 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2669
2670         * intrinsic.texi: Rename INDEX node to avoid clashing with
2671         index.html on case-insensitive systems.
2672
2673 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2674
2675         PR fortran/35150
2676         * trans-expr.c (gfc_conv_function_call): Force evaluation of
2677         se->expr.
2678
2679 2008-02-10  Daniel Franke  <franke.daniel@gmail.com>
2680
2681         PR fortran/35019
2682         * lang.opt: Allow '-J<dir>' next to '-J <dir>', 
2683         likewise '-I <dir>' and '-I<dir>'.
2684
2685 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2686
2687         PR other/35107
2688         * Make-lang.in (f951): Add $(GMPLIBS).
2689
2690 2008-02-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2691
2692         PR fortran/35037
2693         * trans-common.c (build_field): Mark fields as volatile when needed.
2694
2695 2008-02-05  Tobias Burnus  <burnus@net-b.de>
2696
2697         PR fortran/35093
2698         * data.c (gfc_assign_data_value): Only free "size" if
2699         it has not already been freed.
2700
2701 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
2702
2703         PR fortran/34945
2704         * array.c (match_array_element_spec): Remove check for negative
2705         array size.
2706         (gfc_resolve_array_spec): Add check for negative size.
2707
2708 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
2709
2710         PR fortran/32315
2711         * data.c (gfc_assign_data_value): Add bounds check for array
2712         references.
2713
2714 2008-02-04  Daniel Franke  <franke.daniel@gmail.com>
2715
2716         * resolve.c (resolve_where): Fix typo.
2717         (gfc_resolve_where_code_in_forall): Likewise.
2718
2719 2008-02-03  Paul Thomas  <pault@gcc.gnu.org>
2720
2721         PR fortran/32760
2722         * resolve.c (resolve_allocate_deallocate): New function.
2723         (resolve_code): Call it for allocate and deallocate.
2724         * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2725         the checking of the STAT tag and put in above new function.
2726         * primary,c (match_variable): Do not fix flavor of host
2727         associated symbols yet if the type is not known.
2728
2729 2008-01-31  Paul Thomas  <pault@gcc.gnu.org>
2730
2731         PR fortran/34910
2732         * expr.c (gfc_check_assign): It is an error to assign
2733         to a sibling procedure.
2734
2735 2008-01-30  Paul Thomas  <pault@gcc.gnu.org>
2736
2737         PR fortran/34975
2738         * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2739         delete_symtree to gfc_delete_symtree.
2740         * gfortran.h : Add prototype for gfc_delete_symtree.
2741         * module.c (load_generic_interfaces): Transfer symbol to a
2742         unique symtree and delete old symtree, instead of renaming.
2743         (read_module): The rsym and the found symbol are the same, so
2744         the found symtree can be deleted.
2745
2746         PR fortran/34429
2747         * decl.c (match_char_spec): Remove the constraint on deferred
2748         matching of functions and free the length expression.
2749         delete_symtree to gfc_delete_symtree.
2750         (gfc_match_type_spec): Whitespace.
2751         (gfc_match_function_decl): Defer characteristic association for
2752         all types except BT_UNKNOWN.
2753         * parse.c (decode_specification_statement): Only derived type
2754         function matching is delayed to the end of specification.
2755
2756 2008-01-28  Tobias Burnus  <burnus@net-b.de>
2757
2758         PR libfortran/34980
2759         * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2760
2761 2008-01-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2762
2763         PR fortran/34990
2764         * array.c (gfc_check_constructor_type): Revert clearing the expression.
2765
2766 2008-01-26  Tobias Burnus  <burnus@net-b.de>
2767
2768         PR fortran/34848
2769         * trans-expr.c (gfc_conv_function_call): Don't call
2770         gfc_add_interface_mapping if the expression is NULL.
2771
2772 2008-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2773
2774         PR fortran/31610
2775         * trans-array.c (gfc_trans_create_temp_array): Remove call to
2776         gcc_assert (integer_zerop (loop->from[n])).
2777
2778 2008-01-25  Daniel Franke  <franke.daniel@gmail.com>
2779
2780         PR fortran/34661
2781         * resolve.c (resolve_where): Added check if user-defined assignment 
2782         operator is an elemental subroutine.
2783         (gfc_resolve_where_code_in_forall): Likewise.
2784
2785 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
2786
2787         PR fortran/33375
2788         PR fortran/34858
2789         * gfortran.h: Revert changes from 2008-01-17.
2790         * match.c: Likewise.
2791         * symbol.c: Likewise.
2792         (gfc_undo_symbols): Undo namespace changes related to common blocks.
2793
2794 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
2795
2796         PR fortran/34202
2797         * data.c (formalize_structure_cons): Skip formalization on
2798         empty structures.
2799
2800 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
2801
2802         * gfortran.texi (OpenMP): Extended existing documentation.
2803         (contributors): Added major contributors of 2008 that were
2804         not listed yet.
2805         (proposed extensions): Removed implemented items.
2806
2807 2008-01-24  Paul Thomas  <pault@gcc.gnu.org>
2808
2809         PR fortran/34872
2810         * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS  is
2811         seen, check for a statement label and, if present, delete it
2812         and set the locus to the start of the statement.
2813
2814 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
2815
2816         PR fortran/34875
2817         * trans-io.c (gfc_trans_transfer): If the array reference in a
2818         read has a vector subscript, use gfc_conv_subref_array_arg to
2819         copy back the temporary.
2820
2821 2008-01-22  Tobias Burnus  <burnus@net-b.de>
2822
2823         PR fortran/34848
2824         * interface.c (compare_actual_formal): Fix adding type
2825         to missing_arg_type for absent optional arguments.
2826
2827 2008-01-22  Tobias Burnus  <burnus@net-b.de>
2828
2829         PR fortran/34907
2830         * parse.c (parse_spec): Change = into ==.
2831
2832 2008-01-22  Daniel Franke  <franke.daniel@gmail.com>
2833
2834         PR fortran/34915
2835         * expr.c (check_elemental): Fix check for valid data types.
2836
2837 2008-01-22  Tobias Burnus  <burnus@net-b.de>
2838
2839         PR fortran/34899
2840         * scanner.c (load_line): Support <tab><digit> continuation lines.
2841         * invoke.texi (-Wtabs): Document this.
2842
2843 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
2844
2845         PR fortran/34896
2846         * module.c (read_module): Set use_rename attribute.
2847
2848 2007-01-21  Tobias Burnus  <burnus@net-b.de>
2849
2850         PR fortran/34901
2851         * interface.c (compare_parameter): Improved error message
2852         for arguments of same type and mismatched kinds.
2853
2854 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
2855
2856         PR fortran/34861
2857         * resolve.c (resolve_entries): Do not do an array bounds check
2858         if the result symbols are the same.
2859
2860         PR fortran/34854
2861         * module.c (read_module) : Hide the symtree of the previous
2862         version of the symbol if this symbol is renamed.
2863
2864 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
2865
2866         PR fortran/34784
2867         * array.c (gfc_check_constructor_type): Clear the expression ts
2868         so that the checking starts from the deepest level of array
2869         constructor.
2870         * primary.c (match_varspec): If an unknown type is changed to
2871         default character and the attempt to match a substring fails,
2872         change it back to unknown.
2873
2874         PR fortran/34785
2875         * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2876         NULL for an array constructor, use the cl.length expression to
2877         build it.
2878         (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2879         a tree assignment.
2880
2881 2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2882
2883         PR fortran/34817
2884         PR fortran/34838
2885         * iresolve.c (gfc_resolve_all):  Remove conversion of mask
2886         argument to kind=1 by removing call to resolve_mask_arg().
2887         (gfc_resolve_any):  Likewise.
2888
2889 2008-01-19  Tobias Burnus  <burnus@net-b.de>
2890
2891         PR fortran/34760
2892         * primary.c (match_variable): Handle FL_UNKNOWN without
2893         uneducated guessing.
2894         (match_variable): Improve error message.
2895
2896 2008-01-18  Tobias Burnus  <burnus@net-b.de>
2897
2898         PR fortran/32616
2899         * interface.c (get_expr_storage_size): Return storage size
2900         for array element designators.
2901         (compare_actual_formal): Reject unequal string sizes for
2902         assumed-shape dummy arguments. And fix error message for
2903         array-sections with vector subscripts.
2904
2905 2008-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2906
2907         PR fortran/34556
2908         * simplify.c (is_constant_array_expr): New static function that returns
2909         true if the given expression is an array and is constant.
2910         (gfc_simplify_reshape): Use new function.
2911
2912 2008-01-17  H.J. Lu  <hongjiu.lu@intel.com>
2913
2914         PR fortran/33375
2915         * symbol.c (free_common_tree): Renamed to ...
2916         (gfc_free_common_tree): This.  Remove static.
2917         (gfc_free_namespace): Updated.
2918
2919         * gfortran.h (gfc_free_common_tree): New.
2920
2921         * match.c (gfc_match_common): Call gfc_free_common_tree () with
2922         gfc_current_ns->common_root and set gfc_current_ns->common_root
2923         to NULL on syntax error.
2924
2925 2008-01-18  Richard Sandiford  <rsandifo@nildram.co.uk>
2926
2927         PR fortran/34686
2928         * trans-expr.c (gfc_conv_function_call): Use proper
2929         type for returned character pointers.
2930
2931 2008-01-17  Paul Thomas  <pault@gcc.gnu.org>
2932
2933         PR fortran/34429
2934         PR fortran/34431
2935         PR fortran/34471
2936         * decl.c : Remove gfc_function_kind_locus and
2937         gfc_function_type_locus. Add gfc_matching_function.
2938         (match_char_length): If matching a function and the length
2939         does not match, return MATCH_YES and try again later.
2940         (gfc_match_kind_spec): The same.
2941         (match_char_kind): The same.
2942         (gfc_match_type_spec): The same for numeric and derived types.
2943         (match_prefix): Rename as gfc_match_prefix.
2944         (gfc_match_function_decl): Except for function valued character
2945         lengths, defer applying kind, type and charlen info until the
2946         end of specification block.
2947         gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2948         parse.c (decode_specification_statement): New function.
2949         (decode_statement): Call it when a function has kind = -1. Set
2950         and reset gfc_matching function, as function statement is being
2951         matched.
2952         (match_deferred_characteristics): Simplify with a single call
2953         to gfc_match_prefix. Do appropriate error handling. In any
2954         case, make sure that kind = -1 is reset or corrected.
2955         (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2956         Throw an error if kind = -1 after last specification statement.
2957         parse.h : Prototype for gfc_match_prefix.
2958
2959 2008-01-16  Tobias Burnus  <burnus@net-b.de>
2960
2961         PR fortran/34796
2962         * interface.c (compare_parameter): Allow AS_DEFERRED array
2963         elements and reject attr.pointer array elemenents.
2964         (get_expr_storage_size): Return storage size of elements of
2965         assumed-shape and pointer arrays.
2966
2967 2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2968
2969         * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2970         for flag_tree_parallelize_loops.
2971
2972 2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
2973
2974         PR libfortran/34671
2975         * iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
2976         (gfc_resolve_any):  Likewise.
2977         (gfc_resolve_count):  Likewise.  Don't append kind of
2978         argument to function name.
2979
2980 2008-01-13  Tobias Burnus  <burnus@net-b.de>
2981
2982         PR fortran/34665
2983         * resolve.c (resolve_actual_arglist): For expressions,
2984         also check for assume-sized arrays.
2985         * interface.c (compare_parameter): Move F2003 character checks
2986         here, print error messages here, reject elements of
2987         assumed-shape array as argument to dummy arrays.
2988         (compare_actual_formal): Update for the changes above.
2989
2990 2008-01-13  Tobias Burnus  <burnus@net-b.de>
2991
2992         PR fortran/34763
2993         * decl.c (contained_procedure): Only check directly preceeding state.
2994
2995 2008-01-13  Tobias Burnus  <burnus@net-b.de>
2996
2997         PR fortran/34759
2998         * check.c (gfc_check_shape): Accept array ranges of
2999         assumed-size arrays.
3000
3001 2008-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3002
3003         PR fortran/34432
3004         * match.c (gfc_match_name): Don't error if leading character is a '(',
3005         just return MATCH_NO.
3006
3007 2008-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3008
3009         PR fortran/34722
3010         * trans-io.c (create_dummy_iostat): Commit the symbol.
3011
3012 2008-01-11  Paul Thomas  <pault@gcc.gnu.org>
3013
3014         PR fortran/34537
3015         * simplify.c (gfc_simplify_transfer): Return NULL if the size
3016         of the element is unavailable and only assign character length
3017         to the result, if 'mold' is constant.
3018
3019 2008-01-10  Paul Thomas  <pault@gcc.gnu.org>
3020
3021         PR fortran/34396
3022         * trans-array.c (gfc_trans_array_ctor_element):  Use gfc_trans_string_copy
3023         to assign strings and perform bounds checks on the string length.
3024         (get_array_ctor_strlen): Remove bounds checking.
3025         (gfc_trans_array_constructor): Initialize string length checking.
3026         * trans-array.h : Add prototype for gfc_trans_string_copy.
3027
3028 2008-01-08  Richard Guenther  <rguenther@suse.de>
3029
3030         PR fortran/34706
3031         PR tree-optimization/34683
3032         * trans-types.c (gfc_get_array_type_bounds): Use an array type
3033         with known size for accesses if that is known.
3034
3035 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
3036
3037         PR fortran/34476
3038         * expr.c (find_array_element): Check that the array bounds are
3039         constant before using them.  Use lower, as well as upper bound.
3040         (check_restricted): Allow implied index variable.
3041
3042 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
3043
3044         PR fortran/34681
3045         * trans_array.c (gfc_trans_deferred_array): Do not null the
3046         data pointer on entering scope, nor deallocate it on leaving
3047         scope, if the symbol has the 'save' attribute.
3048
3049         PR fortran/34704
3050         * trans_decl.c (gfc_finish_var_decl): Derived types with
3051         allocatable components and an initializer must be TREE_STATIC.
3052
3053 2008-01-07  Paul Thomas  <pault@gcc.gnu.org>
3054
3055         PR fortran/34672
3056         * module.c (write_generic): Rewrite completely.
3057         (write_module): Change call to write_generic.
3058
3059 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3060
3061         PR fortran/34659
3062         * scanner.c (load_line): Do not count ' ' as printable when checking for
3063         continuations.
3064
3065 2008-01-06  Paul Thomas  <pault@gcc.gnu.org>
3066
3067         PR fortran/34545
3068         * module.c (load_needed): If the namespace has no proc_name
3069         give it the module symbol.
3070
3071 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3072
3073         PR fortran/34387
3074         * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3075         the dummy variable expression, test for NULL, and pass the variable
3076         address to the called function.
3077
3078 2007-01-06  Tobias Burnus  <burnus@net-b.de>
3079
3080         PR fortran/34658
3081         * match.c (gfc_match_common): Remove blank common in
3082         DATA BLOCK warning.
3083         * resolve.c (resolve_common_vars): New function.
3084         (resolve_common_blocks): Move checks to resolve_common_vars
3085         and invoke that function.
3086         (resolve_types): Call resolve_common_vars for blank commons.
3087
3088 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3089
3090         PR fortran/34655
3091         * resolve.c (resolve_equivalence_derived): Reject derived types with
3092         default initialization if equivalenced with COMMON variable.
3093
3094 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3095
3096         PR fortran/34654
3097         * io.c (check_io_constraints): Disallow unformatted I/O for
3098         internal units.
3099
3100 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3101
3102         PR fortran/34660
3103         * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3104         ELEMENTAL functions.
3105
3106 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3107
3108         PR fortran/34662
3109         * interface.c (compare_actual_formal): Reject parameter
3110         actual to intent(out) dummy.
3111
3112 2008-01-04  Tobias Burnus  <burnus@net-b.de>
3113
3114         PR fortran/34557
3115         * primary.c (match_varspec): Gobble whitespace before
3116         checking for '('.