OSDN Git Service

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