OSDN Git Service

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