OSDN Git Service

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