OSDN Git Service

c54639a15b54154d5b309ca420b66ef7e37cf981
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2009-10-09  Janus Weil  <janus@gcc.gnu.org>
2
3         PR fortran/41579
4         * gfortran.h (gfc_select_type_stack): New struct, to be used as a stack
5         for SELECT TYPE statements.
6         (select_type_stack): New global variable.
7         (type_selector,select_type_tmp): Removed.
8         * match.c (type_selector,type_selector): Removed.
9         (select_type_stack): New variable, serving as a stack for
10         SELECT TYPE statements.
11         (select_type_push,select_type_set_tmp): New functions.
12         (gfc_match_select_type): Call select_type_push.
13         (gfc_match_type_is): Call select_type_set_tmp.
14         * parse.c (select_type_pop): New function.
15         (parse_select_type_block): Call select_type_pop.
16         * symbol.c (select_type_insert_tmp): New function.
17         (gfc_find_sym_tree): Call select_type_insert_tmp.
18
19 2009-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20
21         * arith.c (arith_power): Use mpc_pow_z.
22         * gfortran.h (HAVE_mpc_pow_z): Define.
23
24 2009-10-07  Daniel Kraft  <d@domob.eu>
25
26         PR fortran/41615
27         * resolve.c (resolve_contained_fntype): Clarify error message for
28         invalid assumed-length character result on module procedures.
29
30 2009-10-07  Janus Weil  <janus@gcc.gnu.org>
31
32         * expr.c (gfc_check_pointer_assign): Do the correct type checking when
33         CLASS variables are involved.
34         * match.c (gfc_match_select_type): Parse associate-name in SELECT TYPE
35         statements, and set up a local namespace for the SELECT TYPE block.
36         * parse.h (gfc_build_block_ns): New prototype.
37         * parse.c (parse_select_type_block): Return from local namespace to its
38         parent after SELECT TYPE block.
39         (gfc_build_block_ns): New function for setting up the local namespace
40         for a BLOCK construct.
41         (parse_block_construct): Use gfc_build_block_ns.
42         * resolve.c (resolve_select_type): Insert assignment for the selector
43         variable, in case an associate-name is given, and put the SELECT TYPE
44         statement inside a BLOCK.
45         (resolve_code): Call resolve_class_assign after checking the assignment.
46         * symbol.c (gfc_find_sym_tree): Moved some code here from
47         gfc_get_ha_sym_tree.
48         (gfc_get_ha_sym_tree): Moved some code to gfc_find_sym_tree.
49
50 2009-10-07  Paul Thomas <pault@gcc.gnu.org>
51
52         PR fortran/41613
53         * resolve.c (check_class_members): Reset compcall.assign.
54
55 2009-10-05  Paul Thomas  <pault@gcc.gnu.org>
56
57         * trans-expr.c (select_class_proc): New function.
58         (conv_function_val): Deal with class methods and call above.
59         * symbol.c (gfc_type_compatible): Treat case where both ts1 and
60         ts2 are BT_CLASS.
61         gfortran.h : Add structure gfc_class_esym_list and include in
62         the structure gfc_expr.
63         * module.c (load_derived_extensions): New function.
64         (read_module): Call above.
65         (write_dt_extensions): New function.
66         (write_derived_extensions): New function.
67         (write_module): Use the above.
68         * resolve.c (resolve_typebound_call): Add a function expression
69         for class methods.  This carries the chain of symbols for the
70         dynamic dispatch in select_class_proc.
71         (resolve_compcall): Add second, boolean argument to indicate if
72         a function is being handled.
73         (check_members): New function.
74         (check_class_members): New function.
75         (resolve_class_compcall): New function.
76         (resolve_class_typebound_call): New function.
77         (gfc_resolve_expr): Call above for component calls.. 
78
79 2009-10-05  Daniel Kraft  <d@domob.eu>
80
81         PR fortran/41403
82         * trans-stmt.c (gfc_trans_goto): Ignore statement list on assigned goto
83         if it is present.
84
85 2009-10-03  Richard Guenther  <rguenther@suse.de>
86
87         * options.c (gfc_post_options): Handle -flto and -fwhopr.
88
89 2009-10-02  Tobias Burnus  <burnus@net-b.de>
90
91         PR fortran/41479
92         * trans-decl.c (gfc_init_default_dt): Check for presence of
93         the argument only if it is optional or in entry master.
94         (init_intent_out_dt): Ditto; call gfc_init_default_dt
95         for all derived types with initializers.
96
97 2009-10-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
98
99         PR fortran/33197
100         * gfortran.h (HAVE_mpc_arc): Define.
101         * simplify.c (gfc_simplify_acos): Handle complex acos.
102         (gfc_simplify_acosh): Likewise for acosh.
103         (gfc_simplify_asin): Likewise for asin.
104         (gfc_simplify_asinh): Likewise for asinh.
105         (gfc_simplify_atan): Likewise for atan.
106         (gfc_simplify_atanh): Likewise for atanh.
107
108 2009-10-01  Tobias Burnus  <burnus@net-b.de>
109
110         PR fortran/41515
111         * decl.c (do_parm): Call add_init_expr_to_sym.
112
113 2009-09-30  Dennis Wassel  <dennis.wassel@gmail.com>
114
115         * gcc/fortran/trans-array.c (gfc_trans_array_bound_check): Improved
116         bounds checking error messages. (gfc_conv_array_ref): Likewise.
117         (gfc_conv_ss_startstride): Likewise.
118
119 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
120
121         * resolve.c (check_typebound_baseobject): Don't check for
122         abstract types for CLASS.
123         (resolve_class_assign): Adapt for RHS being a CLASS.
124         * trans-intrinsic.c (gfc_conv_associated): Add component ref
125         if expr is a CLASS.
126
127 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
128
129         * check.c (gfc_check_same_type_as): New function for checking
130         SAME_TYPE_AS and EXTENDS_TYPE_OF.
131         * decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class
132         container, if the contained type has it. Add an initializer for the
133         class container.
134         (add_init_expr_to_sym): Handle BT_CLASS.
135         (vindex_counter): New counter for setting vindices.
136         (gfc_match_derived_decl): Set vindex for all derived types, not only
137         those which are being extended.
138         * expr.c (gfc_check_assign_symbol): Handle NULL initialization of class
139         pointers.
140         * gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and
141         GFC_ISYM_EXTENDS_TYPE_OF.
142         (gfc_type_is_extensible): New prototype.
143         * intrinsic.h (gfc_check_same_type_as): New prototype.
144         * intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF.
145         * primary.c (gfc_expr_attr): Handle CLASS-valued functions.
146         * resolve.c (resolve_structure_cons): Handle BT_CLASS.
147         (type_is_extensible): Make non-static and rename to
148         'gfc_type_is_extensible.
149         (resolve_select_type): Renamed type_is_extensible.
150         (resolve_class_assign): Handle NULL pointers.
151         (resolve_fl_variable_derived): Renamed type_is_extensible.
152         (resolve_fl_derived): Ditto.
153         * trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL
154         initialization of class pointer components.
155         (gfc_conv_structure): Handle BT_CLASS.
156         * trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of):
157         New functions.
158         (gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF.
159
160 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
161
162         * gfortran.h (type_selector, select_type_tmp): New global variables.
163         * match.c (type_selector, select_type_tmp): New global variables,
164         used for SELECT TYPE statements.
165         (gfc_match_select_type): Better error handling. Remember selector.
166         (gfc_match_type_is): Create temporary variable.
167         * module.c (ab_attribute): New value 'AB_IS_CLASS'.
168         (attr_bits): New string.
169         (mio_symbol_attribute): Handle 'is_class'.
170         * resolve.c (resolve_select_type): Insert pointer assignment statement,
171         to assign temporary to selector.
172         * symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary
173         in SELECT TYPE statements.
174
175 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
176
177         * dump-parse-tree.c (show_code_node): Renamed 'alloc_list'.
178         * gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'.
179         (gfc_expr_to_initialize): New prototype.
180         * match.c (alloc_opt_list): Correctly check type compatibility.
181         Renamed 'alloc_list'.
182         (dealloc_opt_list): Renamed 'alloc_list'.
183         * resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize'
184         and make it non-static.
185         (resolve_allocate_expr): Set vindex for CLASS variables correctly.
186         Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'.
187         (resolve_allocate_deallocate): Renamed 'alloc_list'.
188         (check_class_pointer_assign): Rename to 'resolve_class_assign'. Change
189         argument type. Adjust to work with ordinary assignments.
190         (resolve_code): Call 'resolve_class_assign' for ordinary assignments.
191         Renamed 'check_class_pointer_assign'.
192         * st.c (gfc_free_statement): Renamed 'alloc_list'.
193         * trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle
194         size determination and initialization of CLASS variables. Bugfix for
195         ALLOCATE statements with default initialization and SOURCE block.
196         (gfc_trans_deallocate): Renamed 'alloc_list'.
197
198 2009-09-30  Paul Thomas  <pault@gcc.gnu.org>
199
200         * trans-expr.c (gfc_conv_procedure_call): Convert a derived
201         type actual to a class object if the formal argument is a
202         class.
203
204 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
205
206         PR fortran/40996
207         * decl.c (build_struct): Handle allocatable scalar components.
208         * expr.c (gfc_add_component_ref): Correctly set typespec of expression,
209         after inserting component reference.
210         * match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no
211         variables are being used uninitialized.
212         * primary.c (gfc_match_varspec): Handle CLASS array components.
213         * resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to
214         EXEC_SELECT.
215         * trans-array.c (structure_alloc_comps,gfc_trans_deferred_array):
216         Handle allocatable scalar components.
217         * trans-expr.c (gfc_conv_component_ref): Ditto.
218         * trans-types.c (gfc_get_derived_type): Ditto.
219
220 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
221
222         * decl.c (encapsulate_class_symbol): Modify names of class container
223         components by prefixing with '$'.
224         (gfc_match_end): Handle COMP_SELECT_TYPE.
225         * expr.c (gfc_add_component_ref): Modify names of class container
226         components by prefixing with '$'.
227         * gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and
228         ST_CLASS_IS.
229         (gfc_case): New field 'ts'.
230         (gfc_exec_op): Add EXEC_SELECT_TYPE.
231         (gfc_type_is_extension_of): New prototype.
232         * match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is):
233         New prototypes.
234         * match.c (match_derived_type_spec): New function.
235         (match_type_spec): Use 'match_derived_type_spec'.
236         (match_case_eos): Modify error message.
237         (gfc_match_select_type): New function.
238         (gfc_match_case): Modify error message.
239         (gfc_match_type_is): New function.
240         (gfc_match_class_is): Ditto.
241         * parse.h (gfc_compile_state): Add COMP_SELECT_TYPE.
242         * parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS
243         statements.
244         (next_statement): Handle ST_SELECT_TYPE.
245         (gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS.
246         (parse_select_type_block): New function.
247         (parse_executable): Handle ST_SELECT_TYPE.
248         * resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of
249         class container components by prefixing with '$'.
250         (resolve_allocate_expr): Ditto.
251         (resolve_select_type): New function.
252         (gfc_resolve_blocks): Handle EXEC_SELECT_TYPE.
253         (check_class_pointer_assign): Modify names of class container
254         components by prefixing with '$'.
255         (resolve_code): Ditto.
256         * st.c (gfc_free_statement): Ditto.
257         * symbol.c (gfc_type_is_extension_of): New function.
258         (gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix.
259         * trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE.
260
261 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
262             Paul Thomas <pault@gcc.gnu.org> 
263
264         * check.c (gfc_check_move_alloc): Arguments don't have to be arrays.
265         The second argument needs to be type-compatible with the first (not the
266         other way around, which makes a difference for CLASS entities).
267         * decl.c (encapsulate_class_symbol): New function.
268         (build_sym,build_struct): Handle BT_CLASS, call
269         'encapsulate_class_symbol'.
270         (gfc_match_decl_type_spec): Remove warning, use BT_CLASS.
271         (gfc_match_derived_decl): Set vindex;
272         * expr.c (gfc_add_component_ref): New function.
273         (gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol):
274         Handle BT_CLASS.
275         * dump-parse-tree.c (show_symbol): Print vindex.
276         * gfortran.h (bt): New basic type BT_CLASS.
277         (symbol_attribute): New field 'is_class'.
278         (gfc_typespec): Remove field 'is_class'.
279         (gfc_symbol): New field 'vindex'.
280         (gfc_get_ultimate_derived_super_type): New prototype.
281         (gfc_add_component_ref): Ditto.
282         * interface.c (gfc_compare_derived_types): Pointer equality check
283         moved here from gfc_compare_types.
284         (gfc_compare_types): Handle BT_CLASS and use
285         gfc_type_compatible.
286         * match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call):
287         Handle BT_CLASS.
288         * misc.c (gfc_clear_ts): Removed is_class.
289         (gfc_basic_typename,gfc_typename): Handle BT_CLASS.
290         * module.c (bt_types,mio_typespec): Handle BT_CLASS.
291         (mio_symbol): Handle vindex.
292         * primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS.
293         * resolve.c (find_array_spec,check_typebound_baseobject):
294         Handle BT_CLASS.
295         (resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp'
296         inside 'gcc_assert'.
297         (resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS.
298         (check_class_pointer_assign): New function.
299         (resolve_code): Handle BT_CLASS, call check_class_pointer_assign.
300         (resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived,
301         resolve_fl_variable): Handle BT_CLASS.
302         (check_generic_tbp_ambiguity): Add special case.
303         (resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS.
304         * symbol.c (gfc_get_ultimate_derived_super_type): New function.
305         (gfc_type_compatible): Handle BT_CLASS.
306         * trans-expr.c (conv_parent_component_references): Handle CLASS
307         containers.
308         (gfc_conv_initializer): Handle BT_CLASS.
309         * trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type):
310         Handle BT_CLASS.
311
312 2009-09-29  Daniel Kraft  <d@domob.eu>
313
314         PR fortran/39626
315         * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
316         (struct gfc_namespace): Convert flags to bit-fields and add flag
317         `construct_entities' for use with BLOCK constructs.
318         (enum gfc_exec_code): Add EXEC_BLOCK.
319         (struct gfc_code): Add namespace field to union for EXEC_BLOCK.
320         * match.h (gfc_match_block): New prototype.
321         * parse.h (enum gfc_compile_state): Add COMP_BLOCK.
322         * trans.h (gfc_process_block_locals): New prototype.
323         (gfc_trans_deferred_vars): Made public, new prototype.
324         * trans-stmt.h (gfc_trans_block_construct): New prototype.
325         * decl.c (gfc_match_end): Handle END BLOCK correctly.
326         (gfc_match_intent): Error if inside of BLOCK.
327         (gfc_match_optional), (gfc_match_value): Ditto.
328         * match.c (gfc_match_block): New routine.
329         * parse.c (decode_statement): Handle BLOCK statement.
330         (case_exec_markers): Add ST_BLOCK.
331         (case_end): Add ST_END_BLOCK.
332         (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
333         (parse_spec): Check for statements not allowed inside of BLOCK.
334         (parse_block_construct): New routine.
335         (parse_executable): Parse BLOCKs.
336         (parse_progunit): Disallow CONTAINS in BLOCK constructs.
337         * resolve.c (is_illegal_recursion): Find real container procedure and
338         don't get confused by BLOCK constructs.
339         (resolve_block_construct): New routine.
340         (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
341         * st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
342         * trans-decl.c (saved_local_decls): New static variable.
343         (add_decl_as_local): New routine.
344         (gfc_finish_var_decl): Add variable as local if inside BLOCK.
345         (gfc_trans_deferred_vars): Make public.
346         (gfc_process_block_locals): New routine.
347         * trans-stmt.c (gfc_trans_block_construct): New routine.
348         * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.
349
350 2009-09-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
351
352         PR fortran/35862
353         * io.c (format_token): Add enumerators for rounding format specifiers.
354         (format_lex): Tokenize the rounding format specifiers.
355         (gfc_match_open): Enable rounding modes in OPEN statement.
356
357 2009-09-28  Richard Henderson  <rth@redhat.com>
358
359         * f95-lang.c (gfc_init_builtin_functions): Update call to
360         build_common_builtin_nodes.
361
362 2009-09-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
363
364         * simplify.c (gfc_simplify_acos, gfc_simplify_acosh,
365         gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan,
366         gfc_simplify_atanh): Fix error message.
367
368 2009-09-24  Steven G. Kargl  <kargl@gcc.gnu.org>
369
370         PR fortran/41459
371         * error.c(gfc_warning_now): Move warnings_are_errors test to 
372         after actual emitting of the warning.
373         * parse.c (next_free): Improve error locus printing.
374         (next_fixed): Change gfc_warn to gfc_warning_now, and improve
375         locus reporting.
376  
377
378 2009-09-16  Michael Matz  <matz@suse.de>
379
380         PR fortran/41212
381         * trans.h (struct lang_type): Remove nontarget_type member.
382         * trans.c (gfc_add_modify): Don't access it.
383         * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it,
384         instead set DECL_RESTRICTED_P on affected decls.
385
386 2009-09-14  Richard Henderson  <rth@redhat.com>
387
388         * f95-lang.c (gfc_init_builtin_functions): Update call to
389         build_common_builtin_nodes.
390         (gfc_maybe_initialize_eh): Don't call
391         default_init_unwind_resume_libfunc.
392
393 2009-09-13  Richard Guenther  <rguenther@suse.de>
394         Rafael Avila de Espindola  <espindola@google.com>
395
396         * f95-lang.c (gfc_maybe_initialize_eh): Do not init
397         eh_personality_libfunc.
398
399 2009-09-11  Janus Weil  <janus@gcc.gnu.org>
400
401         PR fortran/41242
402         * resolve.c (resolve_ordinary_assign): Don't call resolve_code,
403         to avoid that subsequent codes are resolved more than once.
404         (resolve_code): Make sure that type-bound assignment operators are
405         resolved correctly.
406
407
408 2009-09-10  Steven G. Kargl  <kargl@gcc.gnu.org>
409
410         PR fortran/31292
411         * fortran/decl.c(gfc_match_modproc): Check that module procedures
412         from a module can USEd in module procedure statements in other
413         program units.  Update locus for better error message display.
414         Detect intrinsic procedures in module procedure statements.
415
416 2009-09-09  Richard Guenther  <rguenther@suse.de>
417
418         PR fortran/41297
419         * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
420         left 'tmp' unused in derived type assignment.
421
422 2009-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
423
424         PR fortran/41197
425         * resolve_c (resolve_allocate_deallocate):  Complain
426         if stat or errmsg varaible is an array.
427
428 2009-09-05  Paul Thomas  <pault@gcc.gnu.org>
429
430         PR fortran/41258
431         * primary.c (gfc_match_varspec): Do not look for typebound
432         procedures unless the derived type has a f2k_derived namespace.
433
434 2009-09-03  Diego Novillo  <dnovillo@google.com>
435
436         * f95-lang.c (lang_hooks): Remove const qualifier.
437
438 2009-09-01  Richard Guenther  <rguenther@suse.de>
439
440         * f95-lang.c (gfc_mark_addressable): Remove.
441         (LANG_HOOKS_MARK_ADDRESSABLE): Likewise.
442
443 2009-08-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
444
445         PR fortran/39229
446         * scanner.c (next_char): Fix typo in comment.
447         (gfc_get_char_literal): Warn if truncate flag is set for both fixed and
448         free form source, adjusting error locus as needed.
449         * parse.c (next_fixed): Clear the truncate flag.
450         (next_statement): Remove truncate warning.
451
452 2009-08-31  Janus Weil  <janus@gcc.gnu.org>
453             Paul Thomas  <pault@gcc.gnu.org>
454
455         PR fortran/40940
456         * array.c (gfc_match_array_constructor): Rename gfc_match_type_spec.
457         * decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec,
458         and reject CLASS with -std=f95.
459         (gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix,
460         match_procedure_interface): Rename gfc_match_type_spec.
461         * gfortran.h (gfc_type_compatible): Add prototype.
462         * match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec.
463         * match.c (match_intrinsic_typespec): Rename to match_type_spec, and
464         add handling of derived types.
465         (gfc_match_allocate): Rename match_intrinsic_typespec and check
466         type compatibility of derived types.
467         * symbol.c (gfc_type_compatible): New function to check if two types
468         are compatible.
469
470 2009-08-31  Janus Weil  <janus@gcc.gnu.org>
471
472         PR fortran/40996
473         * check.c (gfc_check_allocated): Implement allocatable scalars.
474         * resolve.c (resolve_allocate_expr,resolve_fl_var_and_proc): Ditto.
475         * trans-intrinsic.c (gfc_conv_allocated): Ditto.
476
477 2009-08-30  Daniel Kraft  <d@domob.eu>
478
479         PR fortran/37425
480         * dump-parse-tree.c (show_typebound_proc): Renamed from `show_typebound'
481         and accept gfc_typebound_proc and name instead of the symtree, needed
482         for intrinsic operator output.
483         (show_typebound_symtree): New method calling `show_typebound_proc'.
484         (show_f2k_derived): Output type-bound operators also.
485         (show_symbol): Moved output of `Procedure bindings:' label to
486         `show_f2k_derived'.
487         * gfortran.texi (Fortran 2003 status): Mention support of
488         array-constructors with explicit type specification, type-bound
489         procedures/operators, type extension, ABSTRACT types and DEFERRED.
490         Link to Fortran 2003 wiki page.
491         (Fortran 2008 status): Fix typo.  Link to Fortran 2008 wiki page.
492         * gfc-internals.texi (Type-bound Procedures): Document the new
493         members/attributes of gfc_expr.value.compcall used for type-bound
494         operators.
495         (Type-bound Operators): New section documenting their internals.
496
497 2009-08-27  Janus Weil  <janus@gcc.gnu.org>
498
499         PR fortran/40869
500         * expr.c (gfc_check_pointer_assign): Enable interface check for
501         pointer assignments involving procedure pointer components.
502         * gfortran.h (gfc_compare_interfaces): Modified prototype.
503         * interface.c (gfc_compare_interfaces): Add argument 'name2', to be
504         used instead of s2->name. Don't rely on the proc_pointer attribute,
505         but instead on the flags handed to this function.
506         (check_interface1,compare_parameter): Add argument for
507         gfc_compare_interfaces.
508         * resolve.c (check_generic_tbp_ambiguity): Ditto.
509
510 2009-08-27  Daniel Kraft  <d@domob.eu>
511
512         PR fortran/37425
513         * gfortran.h (gfc_expr): Optionally store base-object in compcall value
514         and add a new flag to distinguish assign-calls generated.
515         (gfc_find_typebound_proc): Add locus argument.
516         (gfc_find_typebound_user_op), (gfc_find_typebound_intrinsic_op): Ditto.
517         (gfc_extend_expr): Return if failure was by a real error.
518         * interface.c (matching_typebound_op): New routine.
519         (build_compcall_for_operator): New routine.
520         (gfc_extend_expr): Handle type-bound operators, some clean-up and
521         return if failure was by a real error or just by not finding an
522         appropriate operator definition.
523         (gfc_extend_assign): Handle type-bound assignments.
524         * module.c (MOD_VERSION): Incremented.
525         (mio_intrinsic_op): New routine.
526         (mio_full_typebound_tree): New routine to make typebound-procedures IO
527         code reusable for type-bound user operators.
528         (mio_f2k_derived): IO of type-bound operators.
529         * primary.c (gfc_match_varspec): Initialize new fields in gfc_expr and
530         pass locus to gfc_find_typebound_proc.
531         * resolve.c (resolve_operator): Only output error about no matching
532         interface if gfc_extend_expr did not already fail with an error.
533         (extract_compcall_passed_object): Use specified base-object if present.
534         (update_compcall_arglist): Handle ignore_pass field.
535         (resolve_ordinary_assign): Update to handle extended code for
536         type-bound assignments, too.
537         (resolve_code): Handle EXEC_ASSIGN_CALL statement code.
538         (resolve_tb_generic_targets): Pass locus to gfc_find_typebound_proc.
539         (resolve_typebound_generic), (resolve_typebound_procedure): Ditto.
540         (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): Ditto.
541         (ensure_not_abstract_walker), (resolve_fl_derived): Ditto.
542         (resolve_typebound_procedures): Remove not-implemented error.
543         (resolve_typebound_call): Handle assign-call flag.
544         * symbol.c (find_typebound_proc_uop): New argument to pass locus for
545         error message about PRIVATE, verify that a found procedure is not marked
546         as erraneous.
547         (gfc_find_typebound_intrinsic_op): Ditto.
548         (gfc_find_typebound_proc), (gfc_find_typebound_user_op): New locus arg.
549
550 2009-08-22  Bud Davis <bdavis9659@sbcglobal.net>
551
552         PR fortran/28093
553         * io.c: reverted previous patch.
554
555 2009-08-25  Janne Blomqvist  <jb@gcc.gnu.org>
556
557         * gfortran.texi: Fix ENCODE example.
558
559 2009-08-25  Janus Weil  <janus@gcc.gnu.org>
560
561         PR fortran/41139
562         * primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for
563         calls to procedure pointer components, other references to procedure
564         pointer components are EXPR_VARIABLE.
565         * resolve.c (resolve_actual_arglist): Bugfix (there can be calls without
566         actual arglist).
567         * trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp',
568         removed argument 'se' and made static. Avoid inserting a temporary
569         variable for calling the PPC.
570         (conv_function_val): Renamed gfc_get_proc_ptr_comp.
571         (gfc_conv_procedure_call): Distinguish functions returning a procedure
572         pointer from calls to a procedure pointer. Distinguish calls to
573         procedure pointer components from procedure pointer components as
574         actual arguments.
575         * trans-stmt.h (gfc_get_proc_ptr_comp): Make it static.
576
577 2009-08-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
578
579         PR fortran/41162
580         * io.c (check_format): Fix to not error on slash after P. Fix some
581         error loci.
582         
583 2009-08-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
584
585         PR fortran/41154
586         * io.c (check_format): Fix to not error on right paren after P.
587
588 2009-08-24  Aldy Hernandez  <aldyh@redhat.com>
589
590         PR fortran/40660
591         * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
592         (transfer_array_desc): Same.
593
594 2009-08-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
595
596         PR fortran/35754
597         * io.c (check_format): Add checks for comma and the allowed
598         format specifiers after the 'P' specifier. Fix typo in error message
599         and adjust locus.
600
601 2009-08-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
602
603         PR fortran/37446
604         * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES.
605         (format_lex): Likewise.
606         (token_to_string): New function.
607         (check_format): Use the new tokens and the new function. Add
608         check for positive width.
609
610 2009-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
611
612         * fortran/decl.c: Disallow procedure pointers with -std=f95.
613
614 2009-08-22 Steven K. kargl  <kargl@gcc.gnu.org>
615            Paul Thomas  <pault@gcc.gnu.org>
616
617         * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec,
618         and remove static.
619         * fortran/gfortran.h: Add *expr3 entity to gfc_code.  Add prototype
620         for gfc_match_char_spec.
621         * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE=
622         tag.
623         * fortran/match.c (match_intrinsic_typespec): New function to match
624         F2003 intrinsic-type-spec.
625         (conformable_arrays): New function. Check SOURCE= and
626         allocation-object are conformable.
627         (gfc_match_allocate): Use new functions.  Match SOURCE= tag.
628
629 2009-08-22  Bud Davis <bdavis9659@sbcglobal.net>
630
631         PR fortran/28093
632         * io.c : added variable to store original len of fmt
633         * io.c (check_format): Consume H items using next_char
634         in both modes to handle consecutive single quotes.
635         Test for extra characters in fmt, issue warning.
636
637 2009-08-21  Janus Weil  <janus@gcc.gnu.org>
638
639         PR fortran/41106
640         * primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
641         (gfc_expr_attr): Use gfc_variable_attr for procedure pointer components.
642         * resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
643         pointer components.
644         * trans-expr.c (gfc_conv_component_ref): Ditto.
645         (gfc_conv_variable): Ditto.
646         (gfc_conv_procedure_call): Ditto.
647         (gfc_trans_pointer_assignment): Ditto.
648         * trans-types.c (gfc_get_derived_type): Ditto.
649
650 2009-08-20  Tobias Schlüter  <tobi@gcc.gnu.org>
651
652         * trans-stmt.c (gfc_trans_do): Add a few missing folds.
653
654 2009-08-20  Michael Matz  <matz@suse.de>
655
656         PR fortran/41126
657         * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
658         instead of equality.
659
660 2009-08-20  Janus Weil  <janus@gcc.gnu.org>
661
662         PR fortran/41121
663         * resolve.c (resolve_symbol): Don't resolve formal_ns of intrinsic
664         procedures.
665
666 2009-08-18  Michael Matz  <matz@suse.de>
667
668         * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early,
669         change order of length calculation to (end - start) + 1.
670         (gfc_get_interface_mapping_array): Adjust call to
671         gfc_get_nodesc_array_type.
672         * trans-array.c (gfc_trans_create_temp_array,
673         gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto.
674         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
675         * trans.c (gfc_add_modify): Assignment between base type and nontarget
676         type are equal enough.
677         (gfc_call_malloc): Use prvoid_type_node for return value of
678         __builtin_malloc.
679         (gfc_allocate_with_status): Ditto.
680         * trans-types.c (gfc_array_descriptor_base): Double size of this array.
681         (gfc_init_types): Build prvoid_type_node.
682         (gfc_build_array_type): New bool parameter "restricted".
683         (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers,
684         if it's true.
685         (gfc_get_array_descriptor_base): Ditto.
686         (gfc_get_array_type_bounds): Ditto.
687         (gfc_sym_type): Use symbol attributes to feed calls to above functions.
688         (gfc_get_derived_type): Ditto.
689         * trans.h (struct lang_type): Add nontarget_type member.
690         * trans-types.h (prvoid_type_node): Declare.
691         (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new
692         parameter.
693         * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be
694         aliased a type with a different alias set than the base type.
695         (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type.
696
697 2009-08-18  Janus Weil  <janus@gcc.gnu.org>
698             Paul Thomas  <pault@gcc.gnu.org>
699
700         PR fortran/40870
701         * trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl
702         using the interface symbol. Character types are returned by reference.
703         (gfc_get_derived_type): Prevent infinite recursion loop
704         if a PPC has a derived-type formal arg.
705
706 2008-08-17  Paul Thomas  <pault@gcc.gnu.org>
707
708         PR fortran/41062
709         * trans-decl.c (gfc_trans_use_stmts):  Keep going through use
710         list if symbol is not use associated.
711
712 2009-08-17  Daniel Kraft  <d@domob.eu>
713
714         PR fortran/37425
715         * resolve.c (get_checked_tb_operator_target): New routine to do checks
716         on type-bound operators in common between intrinsic and user operators.
717         (resolve_typebound_intrinsic_op): Call it.
718         (resolve_typebound_user_op): Ditto.
719
720 2009-08-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
721
722         PR fortran/41075
723         * scanner.c (gfc_next_char_literal): Add comment to improve 
724         readability.
725         * io.c (enum format_token): Add FMT_STAR. (format_lex): Add case
726         for '*'. (check_format): Check for left paren after '*'.  Change
727         format checks to use %L to improve format string error locus.
728
729 2009-08-17  Janus Weil  <janus@gcc.gnu.org>
730
731         PR fortran/40877
732         * array.c (gfc_resolve_character_array_constructor): Add NULL argument
733         to gfc_new_charlen.
734         * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
735         gfc_match_implicit): Ditto.
736         * expr.c (simplify_const_ref): Fix memory leak.
737         (gfc_simplify_expr): Add NULL argument to gfc_new_charlen.
738         * gfortran.h (gfc_new_charlen): Modified prototype.
739         * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Add NULL
740         argument to gfc_new_charlen.
741         * module.c (mio_charlen): Ditto.
742         * resolve.c (gfc_resolve_substring_charlen,
743         gfc_resolve_character_operator,fixup_charlen): Ditto.
744         (resolve_fl_derived,resolve_symbol): Add argument to gfc_charlen.
745         * symbol.c (gfc_new_charlen): Add argument 'old_cl' (to make a copy of
746         an existing charlen).
747         (gfc_set_default_type,generate_isocbinding_symbol): Fix memory leak.
748         (gfc_copy_formal_args_intr): Add NULL argument to gfc_new_charlen.
749         * trans-decl.c (create_function_arglist): Fix memory leak.
750
751 2009-08-17  Richard Guenther  <rguenther@suse.de>
752
753         * trans-expr.c (gfc_trans_scalar_assign): Replace hack with
754         more proper hack.
755
756 2009-08-15  Tobias Burnus  <burnus@net-b.de>
757
758         PR fortran/41080
759         * gfortranspec.c (lookup_option): Remove gfortran-specific
760         version of -dumpversion.
761
762 2009-08-14  Janus Weil  <janus@gcc.gnu.org>
763
764         PR fortran/41070
765         * resolve.c (resolve_structure_cons): Make sure that ts.u.derived is
766         only used if type is BT_DERIVED.
767
768 2009-08-13  Janus Weil  <janus@gcc.gnu.org>
769
770         PR fortran/40941
771         * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union.
772         * decl.c (build_struct): Make sure 'cl' is only used
773         if type is BT_CHARACTER.
774         * symbol.c (gfc_set_default_type): Ditto.
775         * resolve.c (resolve_symbol, resolve_fl_derived): Ditto.
776         (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived'
777         is only used if type is BT_DERIVED.
778         * trans-io.c (transfer_expr): Make sure 'derived' is only used if type
779         is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR).
780         * array.c: Mechanical replacements to accomodate union in gfc_typespec.
781         * check.c: Ditto.
782         * data.c: Ditto.
783         * decl.c: Ditto.
784         * dump-parse-tree.c: Ditto.
785         * expr.c: Ditto.
786         * interface.c: Ditto.
787         * iresolve.c: Ditto.
788         * match.c: Ditto.
789         * misc.c: Ditto.
790         * module.c: Ditto.
791         * openmp.c: Ditto.
792         * parse.c: Ditto.
793         * primary.c: Ditto.
794         * resolve.c: Ditto.
795         * simplify.c: Ditto.
796         * symbol.c: Ditto.
797         * target-memory.c: Ditto.
798         * trans-array.c: Ditto.
799         * trans-common.c: Ditto.
800         * trans-const.c: Ditto.
801         * trans-decl.c: Ditto.
802         * trans-expr.c: Ditto.
803         * trans-intrinsic.c: Ditto.
804         * trans-io.c: Ditto.
805         * trans-stmt.c: Ditto.
806         * trans-types.c: Ditto.
807
808 2009-08-13  Janus Weil  <janus@gcc.gnu.org>
809
810         PR fortran/40995
811         * resolve.c (resolve_symbol): Move some checking code to
812         resolve_intrinsic, and call this from here.
813         (resolve_intrinsic): Some checking code moved here from resolve_symbol.
814         Make sure each intrinsic is only resolved once.
815
816 2009-08-12  Tobias Burnus  <burnus@net-b.de>
817
818         PR fortran/41034
819         * symbol.c (gfc_copy_attr): Merge bits instead of replace
820         bits in gfc_copy_attr.
821         * gfc_check_pointer_assign (gfc_check_pointer_assign):
822         Initialize ext_attr bits by zero.
823
824 2009-08-11  Richard Guenther  <rguenther@suse.de>
825
826         * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
827
828 2009-08-11  Janus Weil  <janus@gcc.gnu.org>
829
830         PR fortran/41022
831         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
832         components as actual arguments.
833
834 2009-08-10  Daniel Kraft  <d@domob.eu>
835
836         PR fortran/37425
837         * gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op.
838         (gfc_find_typebound_user_op): New routine.
839         (gfc_find_typebound_intrinsic_op): Ditto.
840         (gfc_check_operator_interface): Now public routine.
841         * decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=).
842         * interface.c (check_operator_interface): Made public, renamed to
843         `gfc_check_operator_interface' accordingly and hand in the interface
844         as gfc_symbol rather than gfc_interface so it is useful for type-bound
845         operators, too.  Return boolean result.
846         (gfc_check_interfaces): Adapt call to `check_operator_interface'.
847         * symbol.c (gfc_get_namespace): Initialize new field `tb_op'.
848         (gfc_free_namespace): Free `tb_uop_root'-based tree.
849         (find_typebound_proc_uop): New helper function.
850         (gfc_find_typebound_proc): Use it.
851         (gfc_find_typebound_user_op): New method.
852         (gfc_find_typebound_intrinsic_op): Ditto.
853         * resolve.c (resolve_tb_generic_targets): New helper function.
854         (resolve_typebound_generic): Use it.
855         (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New.
856         (resolve_typebound_procedures): Resolve operators, too.
857         (check_uop_procedure): New, code from gfc_resolve_uops.
858         (gfc_resolve_uops): Moved main code to new `check_uop_procedure'.
859
860 2009-08-10  Janus Weil  <janus@gcc.gnu.org>
861
862         PR fortran/40940
863         * decl.c (gfc_match_type_spec): Match CLASS statement and warn about
864         missing polymorphism.
865         * gfortran.h (gfc_typespec): Add field 'is_class'.
866         * misc.c (gfc_clear_ts): Initialize 'is_class' to zero.
867         * resolve.c (type_is_extensible): New function to check if a derived
868         type is extensible.
869         (resolve_fl_variable_derived): Add error checks for CLASS variables.
870         (resolve_typebound_procedure): Disallow non-polymorphic passed-object
871         dummy arguments, turning warning into error.
872         (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic
873         passed-object dummy arguments for procedure pointer components,
874         turning warning into error. Add error check for CLASS components.
875
876 2009-08-05  Tobias Burnus  <burnus@net-b.de>
877
878         PR fortran/40955
879         * gfortran.h (ext_attr_id_t): Add typedef for this enum.
880         (gfc_add_ext_attribute): Use it.
881         * decl.c (gfc_match_gcc_attributes): Ditto.
882         * expr.c (gfc_check_pointer_assign): Ditto.
883         * symbol.c (gfc_add_ext_attribute): Ditto.
884         (gfc_copy_attr): Copy also ext_attr.
885         * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
886         * module.c (mio_symbol_attribute): Save ext_attr in the mod file.
887
888 2009-08-05  Tobias Burnus  <burnus@net-b.de>
889
890         PR fortran/40969
891         Revert:
892         2009-08-04  Tobias Burnus  <burnus@net-b.de>
893
894         PR fortran/40949
895         * trans-types.c (gfc_get_function_type): Fix typelist of
896         functions without argument.
897
898 2009-08-05  Paul Thomas  <pault@gcc.gnu.org>
899
900         PR fortran/40847
901         * iresolve.c (gfc_resolve_transfer): Correct error in 'mold'
902         character length for case where length expresson is NULL.
903
904 2009-08-04  Tobias Burnus  <burnus@net-b.de>
905
906         PR fortran/40949
907         * trans-types.c (gfc_get_function_type): Fix typelist of
908         functions without argument.
909
910 2009-08-04  Paul Thomas  <pault@gcc.gnu.org>
911
912         PR fortran/40875
913         * decl.c (add_init_expr_to_sym): Character symbols can only be
914         initialized with character expressions.
915
916 2009-08-02  Janus Weil  <janus@gcc.gnu.org>
917
918         PR fortran/40881
919         * decl.c (match_char_length): Warn about old-style character length
920         declarations.
921         * match.c (match_arithmetic_if,gfc_match_if): Modify warning message
922         for arithmetic if.
923         (gfc_match_goto): Warn about computed gotos.
924         (gfc_match_return): Warn about alternate return.
925         (gfc_match_st_function): Warn about statement functions.
926         * resolve.c (resolve_fl_procedure): Modify warning message for
927         assumed-length character functions.
928
929 2009-08-01  Paul Thomas  <pault@gcc.gnu.org>
930
931         PR fortran/40011
932         * error.c : Add static flag 'warnings_not_errors'.
933         (gfc_error): If 'warnings_not_errors' is set, branch to code
934         from gfc_warning.
935         (gfc_clear_error): Reset 'warnings_not_errors'.
936         (gfc_errors_to_warnings): New function.
937         * options.c (gfc_post_options): If pedantic and flag_whole_file
938         change the latter to a value of 2.
939         * parse.c (parse_module): Add module namespace to gsymbol.
940         (resolve_all_program_units): New function.
941         (clean_up_modules): New function.
942         (translate_all_program_units): New function.
943         (gfc_parse_file): If whole_file, do not clean up module right
944         away and add derived types to namespace derived types. In
945         addition, call the three new functions above.
946         * resolve.c (not_in_recursive): New function.
947         (not_entry_self_reference): New function.
948         (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN,
949         procedure must not be in the course of being resolved and
950         must return false for the two new functions. Pack away the
951         current derived type list before calling gfc_resolve for the
952         gsymbol namespace.  It is unconditionally an error if the ranks
953         of the reference and ther procedure do not match. Convert
954         errors to warnings during call to gfc_procedure_use if not
955         pedantic or legacy.
956         (gfc_resolve): Set namespace resolved flag to -1 during
957         resolution and store current cs_base.
958         * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation
959         substitute a use associated variable, if it is available in a
960         gsymbolnamespace.
961         (gfc_get_extern_function_decl): If the procedure is use assoc,
962         do not attempt to find it in a gsymbol because it could be an
963         interface. If the symbol exists in a module namespace, return
964         its backend_decl.
965         * trans-expr.c (gfc_trans_scalar_assign): If a derived type
966         assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs.
967         * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a
968         boolean argument. Copy component backend_decls directly if the
969         components are derived types and from_gsym is true.
970         (gfc_get_derived_type): If whole_file copy the derived type from
971         the module if it is use associated, otherwise, if can be found
972         in another gsymbol namespace, use the existing derived type as
973         the TYPE_CANONICAL and build normally.
974         * gfortran.h : Add derived_types and resolved fields to
975         gfc_namespace. Include prototype for gfc_errors_to_warnings.
976
977 2009-07-29  Tobias Burnus  <burnus@net-b.de>
978
979         PR fortran/40898
980         * trans-types.c (gfc_get_function_type): Do not add hidden
981         string-length argument for BIND(C) procedures.
982         * trans-decl.c (create_function_arglist): Skip over nonexisting
983         string-length arguments for BIND(C) procedures.
984
985 2009-07-28  Jakub Jelinek  <jakub@redhat.com>
986
987         PR fortran/40878
988         * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of
989         gfc_error to diagnose invalid COLLAPSE arguments.
990
991 2009-07-28  Janus Weil  <janus@gcc.gnu.org>
992
993         PR fortran/40882
994         * trans-types.c (gfc_get_ppc_type): For derived types, directly use the
995         backend_decl, instead of calling gfc_typenode_for_spec, to avoid
996         infinte loop.
997         (gfc_get_derived_type): Correctly handle PPCs returning derived types,
998         avoiding infinite recursion.
999
1000 2009-07-27  Janus Weil  <janus@gcc.gnu.org>
1001
1002         PR fortran/40848
1003         * interface.c (gfc_compare_interfaces): Call 'count_types_test' before
1004         'generic_correspondence', and only if checking a generic interface.
1005
1006 2009-07-27  Tobias Burnus  <burnus@net-b.de>
1007
1008         PR fortran/40851
1009         * resolve.c (resolve_symbol): Do not initialize pointer derived-types.
1010         * trans-decl.c (init_intent_out_dt): Ditto.
1011         (generate_local_decl): No need to set attr.referenced for DT pointers.
1012
1013 2009-07-26  Tobias Burnus  <burnus@net-b.de>
1014
1015         PR fortran/33197
1016         * intrinsic.c (make_generic): Remove assert as "atan" can be
1017         both ISYM_ATAN and ISYM_ATAN2.
1018         (add_functions): Add two-argument variant of ATAN.
1019         * intrinsic.h (gfc_check_atan_2): Add check for it.
1020         * intrinsic.texi (ATAN2): Correct and enhance description.
1021         (ATAN): Describe two-argument variant of ATAN.
1022
1023 2009-07-25  Tobias Burnus  <burnus@net-b.de>
1024             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1025
1026         PR fortran/33197
1027         * intrinsic.c (add_functions): Support complex arguments for
1028         acos,acosh,asin,asinh,atan,atanh.
1029         * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support
1030         complex arguments.
1031         * simplify.c (gfc_simplify_acos,gfc_simplify_acosh,
1032         gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan,
1033         gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh,
1034         gfc_simplify_acosh,gfc_simplify_atanh): Support
1035         complex arguments.
1036
1037 2009-07-25  Richard Guenther  <rguenther@suse.de>
1038
1039         PR fortran/40005
1040         * trans-types.c (gfc_get_array_type_bounds): Use
1041         build_distinct_type_copy with a proper TYPE_CANONICAL and
1042         re-use the type-decl of the original type.
1043         * trans-decl.c (build_entry_thunks): Signal cgraph we may not
1044         garbage collect.
1045         (create_main_function): Likewise.
1046         (gfc_generate_function_code): Likewise.
1047         * trans-expr.c (gfc_trans_subcomponent_assign): Do not use
1048         fold_convert on record types.
1049
1050 2009-07-25  Janus Weil  <janus@gcc.gnu.org>
1051
1052         PR fortran/39630
1053         * decl.c (match_ppc_decl): Implement the PASS attribute for procedure
1054         pointer components.
1055         (match_binding_attributes): Ditto.
1056         * gfortran.h (gfc_component): Add member 'tb'.
1057         (gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const.
1058         * module.c (MOD_VERSION): Bump module version.
1059         (binding_ppc): New string constants.
1060         (mio_component): Only use formal args if component is a procedure
1061         pointer and add 'tb' member.
1062         (mio_typebound_proc): Include pass_arg and take care of procedure
1063         pointer components.
1064         * resolve.c (update_arglist_pass): Add argument 'name' and take care of
1065         optional arguments.
1066         (extract_ppc_passed_object): New function, analogous to
1067         extract_compcall_passed_object, but for procedure pointer components.
1068         (update_ppc_arglist): New function, analogous to
1069         update_compcall_arglist, but for procedure pointer components.
1070         (resolve_typebound_generic_call): Added argument to update_arglist_pass.
1071         (resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute.
1072         (resolve_fl_derived): Check the PASS argument for procedure pointer
1073         components.
1074         * symbol.c (verify_bind_c_derived_type): Reject procedure pointer
1075         components in BIND(C) types.
1076
1077 2009-07-24  Janus Weil  <janus@gcc.gnu.org>
1078
1079         PR fortran/40822
1080         * array.c (gfc_resolve_character_array_constructor): Use new function
1081         gfc_new_charlen.
1082         * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1083         gfc_match_implicit): Ditto.
1084         * expr.c (gfc_simplify_expr): Ditto.
1085         * gfortran.h (gfc_new_charlen): New prototype.
1086         * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
1087         function gfc_new_charlen.
1088         * module.c (mio_charlen): Ditto.
1089         * resolve.c (gfc_resolve_substring_charlen,
1090         gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
1091         resolve_symbol): Ditto.
1092         * symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
1093         structure and add it to a namespace.
1094         (gfc_copy_formal_args_intr): Make sure ts.cl is present
1095         for CHARACTER variables.
1096
1097 2009-07-24  Jakub Jelinek  <jakub@redhat.com>
1098
1099         PR fortran/40643
1100         PR fortran/31067
1101         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
1102         gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
1103         optimize.
1104         * trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
1105         * trans-array.h (gfc_trans_scalarized_loop_end): New prototype.
1106
1107 2009-07-23  Jakub Jelinek  <jakub@redhat.com>
1108
1109         PR fortran/40839
1110         * io.c (gfc_resolve_dt): Add LOC argument.  Fail if
1111         dt->io_unit is NULL.  Return FAILURE after issuing error about
1112         negative UNIT number.
1113         (match_io_element): Don't segfault if current_dt->io_unit is NULL.
1114         * gfortran.h (gfc_resolve_dt): Adjust prototype.
1115         * resolve.c (resolve_code): Adjust caller.
1116
1117 2009-07-22  Paul Thomas  <pault@gcc.gnu.org>
1118
1119         PR fortran/40796
1120         * trans-decl.c (generate_local_decl): Unreferenced result
1121         variables with allocatable components should be treated like
1122         INTENT_OUT dummy variables.
1123
1124 2009-07-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1125
1126         * trans.h (gfc_set_decl_assembler_name): New prototype.
1127         * trans-decl.c (gfc_set_decl_assembler_name): New function.
1128         (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1129         build_function_decl): Use gfc_set_decl_assembler_name instead of
1130         SET_DECL_ASSEMBLER_NAME.
1131         * trans-common.c (build_common_decl): Use
1132         gfc_set_decl_assembler_name instead of SET_DECL_ASSEMBLER_NAME.
1133
1134 2009-07-21  Richard Guenther  <rguenther@suse.de>
1135
1136         PR fortran/40726
1137         * trans-decl.c (gfc_get_extern_function_decl): Do not set
1138         DECL_IS_MALLOC for pointer valued functions.
1139         (build_function_decl): The same.
1140
1141 2009-07-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1142
1143         PR fortran/40727
1144         * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that
1145         the optional second argument isn't of COMPLEX type.
1146
1147 2009-07-17  Richard Guenther  <rguenther@suse.de>
1148
1149         PR c/40401
1150         * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
1151         * trans-decl.c (gfc_gimplify_function): Remove.
1152         (build_entry_thunks): Do not gimplify here.
1153         (create_main_function): Likewise.
1154         (gfc_generate_function_code): Likewise.
1155
1156 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
1157             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1158
1159         PR 40435 
1160         * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
1161         trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
1162         argument to fold_{unary,binary,ternary}, fold_build[123],
1163         build_call_expr, build_size_arg, build_fold_addr_expr,
1164         build_call_array, non_lvalue, size_diffop,
1165         fold_build1_initializer, fold_build2_initializer,
1166         fold_build3_initializer, fold_build_call_array,
1167         fold_build_call_array_initializer, fold_single_bit_test,
1168         omit_one_operand, omit_two_operands, invert_truthvalue,
1169         fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
1170         combine_comparisons, fold_builtin_*, fold_call_expr,
1171         build_range_check, maybe_fold_offset_to_address, round_up,
1172         round_down.
1173
1174 2009-07-15  Janus Weil  <janus@gcc.gnu.org>
1175
1176         PR fortran/40743
1177         * resolve.c (resolve_symbol): Don't resolve the formal namespace of a
1178         contained procedure.
1179
1180 2009-07-14  Taras Glek  <tglek@mozilla.com>
1181             Rafael Espindola  <espindola@google.com>
1182
1183         * Make-lang.in (fortran.install-plugin): New target for
1184         installing plugin headers.
1185
1186 2009-07-13  H.J. Lu  <hongjiu.lu@intel.com>
1187
1188         * module.c (mio_symbol): Remove the unused variable, formal.
1189
1190 2009-07-13  Janus Weil  <janus@gcc.gnu.org>
1191
1192         PR fortran/40646
1193         * module.c (mio_symbol): If the symbol has formal arguments,
1194         the formal namespace will be present.
1195         * resolve.c (resolve_actual_arglist): Correctly handle 'called'
1196         procedure pointer components as actual arguments.
1197         (resolve_fl_derived,resolve_symbol): Make sure the formal namespace
1198         is present.
1199         * trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal
1200         arguments of procedure pointer components.
1201
1202 2009-07-12  Tobias Burnus  <burnus@net-b.de>
1203             Philippe Marguinaud <philippe.marguinaud@meteo.fr>
1204
1205         PR fortran/40588
1206         * primary.c (match_charkind_name): Fix condition for $ matching.
1207
1208         PR libfortran/22423
1209         * libgfortran.h: Typedef the GFC_DTYPE_* enum.
1210
1211 2009-07-11  Tobias Burnus  <burnus@net-b.de>
1212
1213         PR fortran/33197
1214         * check.c (gfc_check_fn_rc2008): New function.
1215         * intrinsic.h (gfc_check_fn_rc2008): New prototype.
1216         * intrinsic.c (add_functions): Add complex tan, cosh, sinh,
1217         and tanh.
1218
1219 2009-07-10  Paul Thomas  <pault@gcc.gnu.org>
1220
1221         PR fortran/39334
1222         * primary.c (match_kind_param): Return MATCH_NO if the symbol
1223         has no value.
1224
1225 2008-07-09  Paul Thomas  <pault@gcc.gnu.org>
1226
1227         PR fortran/40629
1228         * resolve.c (check_host_association):  Use the existing
1229         accessible symtree and treat function expressions with
1230         symbols that have procedure flavor.
1231
1232 2009-07-09  Janus Weil  <janus@gcc.gnu.org>
1233
1234         PR fortran/40646
1235         * dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'.
1236         * expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1237         (gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'.
1238         (replace_comp,gfc_expr_replace_comp): New functions, analogous
1239         to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components
1240         instead of symbols.
1241         * gfortran.h (gfc_expr_replace_comp): New prototype.
1242         (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1243         * interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'.
1244         * match.c (gfc_match_pointer_assignment): Ditto.
1245         * primary.c (gfc_match_varspec): Handle array-valued procedure pointers
1246         and procedure pointer components. Renamed 'is_proc_ptr_comp'.
1247         * resolve.c (resolve_fl_derived): Correctly handle interfaces with
1248         RESULT statement, and handle array-valued procedure pointer components.
1249         (resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed
1250         'is_proc_ptr_comp'.
1251         * trans-array.c (gfc_walk_function_expr): Ditto.
1252         * trans-decl.c (gfc_get_symbol_decl): Security check for presence of
1253         ns->proc_name.
1254         * trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure
1255         pointer components. Renamed 'is_proc_ptr_comp'.
1256         (conv_function_val,gfc_trans_arrayfunc_assign): Renamed
1257         'is_proc_ptr_comp'.
1258         (gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead
1259         make a copy of it.
1260         * trans-io.c (gfc_trans_transfer): Handle array-valued procedure
1261         pointer components.
1262
1263 2009-07-09  Tobias Burnus  <burnus@net-b.de>
1264
1265         PR fortran/40604
1266         * intrinsic.c (gfc_convert_type_warn): Set sym->result.
1267         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1268         for optional arguments.
1269
1270 2009-07-08  Tobias Burnus  <burnus@net-b.de>
1271
1272         PR fortran/40675
1273         * simplify.c (gfc_simplify_sign): Handle signed zero correctly.
1274         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Support
1275         -fno-sign-zero.
1276         * invoke.texi (-fno-sign-zero): Add text regarding SIGN intrinsic.
1277
1278 2008-07-08  Paul Thomas  <pault@gcc.gnu.org>
1279
1280         PR fortran/40591
1281         * decl.c (match_procedure_interface):  Correct the association
1282         or creation of the interface procedure's symbol.
1283
1284 2009-07-04  Jakub Jelinek  <jakub@redhat.com>
1285
1286         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer
1287         maxloc initialize limit to -huge-1 rather than just -huge.
1288
1289 2009-07-04  Janus Weil  <janus@gcc.gnu.org>
1290
1291         PR fortran/40593
1292         * interface.c (compare_actual_formal): Take care of proc-pointer-valued
1293         functions as actual arguments.
1294         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1295         * resolve.c (resolve_specific_f0): Use the correct ts.
1296
1297 2009-07-02  Michael Matz  <matz@suse.de>
1298
1299         PR fortran/32131
1300         * trans-array.c (gfc_conv_descriptor_stride_get): Return
1301         constant one for strides in the first dimension of ALLOCATABLE
1302         arrays.
1303
1304 2009-06-30  Janus Weil  <janus@gcc.gnu.org>
1305
1306         PR fortran/40594
1307         * trans-types.c (gfc_get_derived_type): Bugfix, reverting one hunk from
1308         r147206.
1309
1310 2009-06-29  Tobias Burnus  <burnus@net-b.de>
1311
1312         PR fortran/40580
1313         * trans-expr.c  (gfc_conv_procedure_call): Add -fcheck=pointer check.
1314         * libgfortran.h: Add GFC_RTCHECK_POINTER.
1315         * invoke.texi (-fcheck): Document new pointer option.
1316         * options.c (gfc_handle_runtime_check_option): Handle pointer option.
1317
1318         * gfortran.texi (C Binding): Improve wording.
1319         * iso-c-binding.def: Remove obsolete comment.
1320
1321 2009-06-29  Paul Thomas  <pault@gcc.gnu.org>
1322
1323         PR fortran/40551
1324         * dependency.h : Add second bool* argument to prototype of
1325         gfc_full_array_ref_p.
1326         * dependency.c (gfc_full_array_ref_p): If second argument is
1327         present, return true if last dimension of reference is an
1328         element or has unity stride.
1329         * trans-array.c : Add NULL second argument to references to
1330         gfc_full_array_ref_p.
1331         * trans-expr.c : The same, except for;
1332         (gfc_trans_arrayfunc_assign): Return fail if lhs reference
1333         is not a full array or a contiguous section.
1334
1335 2009-06-28  Tobias Burnus  <burnus@net-b.de>
1336             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1337
1338         PR fortran/34112
1339         * symbol.c (gfc_add_ext_attribute): New function.
1340         (gfc_get_sym_tree): New argument allow_subroutine.
1341         (gfc_get_symbol,gfc_get_ha_sym_tree,gen_cptr_param,gen_fptr_param
1342         gen_shape_param,generate_isocbinding_symbol): Use it.
1343         * decl.c (find_special): New argument allow_subroutine.
1344         (add_init_expr_to_sym,add_hidden_procptr_result,attr_decl1,
1345         match_procedure_in_type,gfc_match_final_decl): Use it.
1346         (gfc_match_gcc_attributes): New function.
1347         * gfortran.texi (Mixed-Language Programming): New section
1348         "GNU Fortran Compiler Directives".
1349         * gfortran.h (ext_attr_t): New struct.
1350         (symbol_attributes): Use it.
1351         (gfc_add_ext_attribute): New prototype.
1352         (gfc_get_sym_tree): Update pototype.
1353         * expr.c (gfc_check_pointer_assign): Check whether call
1354         convention is the same.
1355         * module.c (import_iso_c_binding_module, create_int_parameter,
1356         use_iso_fortran_env_module): Update gfc_get_sym_tree call.
1357         * scanner.c (skip_gcc_attribute): New function.
1358         (skip_free_comments,skip_fixed_comments): Use it.
1359         (gfc_next_char_literal): Support !GCC$ lines.
1360         * resolve.c (check_host_association): Update
1361         gfc_get_sym_tree call.
1362         * match.c (gfc_match_sym_tree,gfc_match_call): Update
1363         gfc_get_sym_tree call.
1364         * trans-decl.c (add_attributes_to_decl): New function.
1365         (gfc_get_symbol_decl,get_proc_pointer_decl,
1366         gfc_get_extern_function_decl,build_function_decl: Use it.
1367         * match.h (gfc_match_gcc_attributes): Add prototype.
1368         * parse.c (decode_gcc_attribute): New function.
1369         (next_free,next_fixed): Support !GCC$ lines.
1370         * primary.c (match_actual_arg,check_for_implicit_index,
1371         gfc_match_rvalue,gfc_match_rvalue): Update
1372         gfc_get_sym_tree call.
1373
1374 2009-06-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1375
1376         * gfortran.h: Define HAVE_mpc_pow.
1377         * arith.c (complex_reciprocal, complex_pow): If HAVE_mpc_pow,
1378         don't define these functions.
1379         (arith_power): If HAVE_mpc_pow, use mpc_pow.
1380
1381 2009-06-26  Janus Weil  <janus@gcc.gnu.org>
1382
1383         PR fortran/39997
1384         PR fortran/40541
1385         * decl.c (add_hidden_procptr_result): Copy the typespec to the hidden
1386         result.
1387         * expr.c (gfc_check_pointer_assign): Enable interface check for
1388         procedure pointer assignments where the rhs is a function returning a
1389         procedure pointer.
1390         * resolve.c (resolve_symbol): If an external procedure with unspecified
1391         return type can not be implicitly typed, it must be a subroutine.
1392
1393 2009-06-24  Janus Weil  <janus@gcc.gnu.org>
1394
1395         PR fortran/40427
1396         * gfortran.h (gfc_component): New member 'formal_ns'.
1397         (gfc_copy_formal_args_ppc,void gfc_ppc_use): New.
1398         * interface.c (gfc_ppc_use): New function, analogous to
1399         gfc_procedure_use, but for procedure pointer components.
1400         * module.c (MOD_VERSION): Bump module version.
1401         (mio_component): Treat formal arguments.
1402         (mio_formal_arglist): Changed argument from gfc_symbol to
1403         gfc_formal_arglist.
1404         (mio_symbol): Changed argument of mio_formal_arglist.
1405         * resolve.c (resolve_ppc_call,resolve_expr_ppc): Call gfc_ppc_use,
1406         to check actual arguments and treat formal args correctly.
1407         (resolve_fl_derived): Copy formal args of procedure pointer components
1408         from their interface.
1409         * symbol.c (gfc_copy_formal_args_ppc): New function, analogous to
1410         gfc_copy_formal_args, but for procedure pointer components.
1411
1412 2009-06-22  Janus Weil  <janus@gcc.gnu.org>
1413
1414         PR fortran/37254
1415         PR fortran/39850
1416         * interface.c (compare_parameter): Set implicit type for function
1417         actual arguments with BT_UNKNOWN.
1418
1419 2009-06-22  Tobias Burnus  <burnus@net-b.de>
1420
1421         PR fortran/40472
1422         PR fortran/50520
1423         * simplify.c (gfc_simplify_spread): Fix the case that source=
1424         is a scalar.
1425
1426 2009-06-22  Paul Thomas  <pault@gcc.gnu.org>
1427
1428         PR fortran/40443
1429         * interface.c (gfc_search_interface): Hold back a match to an
1430         elementary procedure until all other possibilities are
1431         exhausted.
1432
1433 2009-06-22  Paul Thomas  <pault@gcc.gnu.org>
1434
1435         PR fortran/40472
1436         * simplify.c (gfc_simplify_spread): Restrict the result size to
1437         the limit for an array constructor.
1438
1439 2009-06-21  Janus Weil  <janus@gcc.gnu.org>
1440
1441         PR fortran/39850
1442         * interface.c (gfc_compare_interfaces): Take care of implicit typing
1443         when checking the function attribute. Plus another bugfix.
1444         (compare_parameter): Set attr.function and attr.subroutine according
1445         to the usage of a procedure as actual argument.
1446
1447 2009-06-20  Tobias Burnus  <burnus@net-b.de>
1448
1449         PR fortran/40452
1450         * trans-decl.c (add_argument_checking): Disable bounds check
1451         for allowed argument storage association.
1452
1453 2009-06-19  Paul Thomas  <pault@gcc.gnu.org>
1454
1455         PR fortran/40440
1456         * trans-expr.c (gfc_conv_procedure_call): Do not deallocate
1457         allocatable components if the argument is a pointer.
1458
1459 2009-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1460
1461         * gfortran.h (gfc_expr): Use mpc_t to represent complex numbers.
1462
1463         * arith.c, dump-parse-tree.c, expr.c, module.c, resolve.c,
1464         simplify.c, target-memory.c, target-memory.h, trans-const.c,
1465         trans-expr.c: Convert to mpc_t throughout.
1466
1467 2009-06-19  Ian Lance Taylor  <iant@google.com>
1468
1469         * cpp.c (struct gfc_cpp_option_data): Give this struct, used for
1470         the global variable gfc_cpp_option, a name.
1471
1472 2009-06-19  Janus Weil  <janus@gcc.gnu.org>
1473
1474         PR fortran/40450
1475         * trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr
1476         to a procedure pointer actual argument, if it is not itself a
1477         dummy arg.
1478
1479 2009-06-18  Janus Weil  <janus@gcc.gnu.org>
1480
1481         PR fortran/40451
1482         * resolve.c (resolve_contained_fntype): Prevent implicit typing for
1483         procedures with explicit interface.
1484         * symbol.c (gfc_check_function_type): Ditto.
1485
1486 2009-06-16  Ian Lance Taylor  <iant@google.com>
1487
1488         * decl.c (build_struct): Rewrite loop over constructor elements.
1489
1490 2009-06-16  Janus Weil  <janus@gcc.gnu.org>
1491
1492         PR fortran/36947
1493         PR fortran/40039
1494         * expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with
1495         error message.
1496         * gfortran.h (gfc_compare_interfaces): Additional argument.
1497         * interface.c (operator_correspondence): Removed.
1498         (gfc_compare_interfaces): Additional argument to return error message.
1499         Directly use the code from 'operator_correspondence' instead of calling
1500         the function. Check for OPTIONAL. Some rearrangements.
1501         (check_interface1): Call 'gfc_compare_interfaces' without error message.
1502         (compare_parameter): Call 'gfc_compare_interfaces' with error message.
1503         * resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces'
1504         without error message.
1505
1506 2009-06-16  Tobias Burnus  <burnus@net-b.de>
1507
1508         PR fortran/40383
1509         * trans-decl.c (create_function_arglist): Copy formal charlist to
1510         have a proper passed_length for -fcheck=bounds.
1511
1512 2009-06-12  Steven G. Kargl  <kargls@comcast.net>
1513
1514         * arith.c (gfc_enum_initializer): Move function ...
1515         * decl.c: ... here.  Remove gfc_ prefix and make static.
1516         (enumerator_decl): Update function call.
1517         * gfortran.h:  Remove gfc_enum_initializer prototype.
1518
1519 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1520
1521         * trans-array.c (gfc_trans_allocate_array_storage): Pass
1522         location on down.
1523         (gfc_trans_array_constructor_value): Same.
1524         (gfc_trans_scalarized_loop_end): Same.
1525         (gfc_conv_ss_startstride): Same.
1526         (gfc_trans_g77_array): Same.
1527         (gfc_trans_dummy_array_bias): Same.
1528         (gfc_conv_array_parameter): Same.
1529         (structure_alloc_comps): Same.
1530         * trans-expr.c (gfc_conv_function_call): Same.
1531         (fill_with_spaces): Same.
1532         (gfc_trans_string_copy): Same.
1533         (gfc_trans_scalar_assign): Same.
1534         * trans-stmt.c (gfc_trans_goto): Same.
1535         (gfc_trans_if_1): Same.
1536         (gfc_trans_simple_do): Same.
1537         (gfc_trans_do): Same.
1538         (gfc_trans_do_while): Same.
1539         (gfc_trans_logical_select): Same.
1540         (gfc_trans_select): Same.
1541         (gfc_trans_forall_loop): Same.
1542         (gfc_trans_nested_forall_loop): Same.
1543         (generate_loop_for_temp_to_lhs): Same.
1544         (generate_loop_for_rhs_to_temp): Same.
1545         (gfc_trans_forall_1): Same.
1546         (gfc_trans_where_assign): Same.
1547         (gfc_trans_where_3): Same.
1548         (gfc_trans_allocate): Same.
1549         * trans.c (gfc_finish_block): Same.
1550         (gfc_trans_runtime_check): Same.
1551         (gfc_call_malloc): Same.
1552         (gfc_allocate_with_status): Same.
1553         (gfc_call_free): Same.
1554         (gfc_deallocate_with_status): Same.
1555         (gfc_call_realloc): Same.
1556         (gfc_trans_code): Same.
1557         * trans-decl.c (gfc_init_default_dt): Same.
1558         (gfc_generate_constructors): Same.
1559         * trans-io.c (gfc_trans_io_runtime_check): Same.
1560         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
1561         (gfc_conv_intrinsic_fdate): Same.
1562         (gfc_conv_intrinsic_ttynam): Same.
1563         (gfc_conv_intrinsic_minmax): Same.
1564         (gfc_conv_intrinsic_minmax_char): Same.
1565         (gfc_conv_intrinsic_anyall): Same.
1566         (gfc_conv_intrinsic_count): Same.
1567         (gfc_conv_intrinsic_arith): Same.
1568         (gfc_conv_intrinsic_minmaxloc): Same.
1569         (gfc_conv_intrinsic_minmaxval): Same.
1570         (gfc_conv_intrinsic_rrspacing): Same.
1571         (gfc_conv_intrinsic_array_transfer): Same.
1572         (gfc_conv_intrinsic_trim): Same.
1573         (gfc_conv_intrinsic_repeat): Same.
1574         
1575 2009-06-12  Janus Weil  <janus@gcc.gnu.org>
1576
1577         PR fortran/40176
1578         * resolve.c (resolve_symbol): Additional error check, preventing an
1579         infinite loop.
1580
1581 2009-06-11  Paul Thomas  <pault@gcc.gnu.org>
1582
1583         PR fortran/40402
1584         * resolve.c (next_data_value): It is an error if the value is
1585         not constant.
1586
1587 2009-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1588
1589         PR fortran/38718
1590         * intrinsic.c (add_functions): Add simplifiers for ISNAN,
1591         IS_IOSTAT_END and IS_IOSTAT_EOR.
1592         * intrinsic.h (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
1593         gfc_simplify_isnan): New prototypes.
1594         * intrinsic.c (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
1595         gfc_simplify_isnan): New functions.
1596
1597 2009-06-11  Jakub Jelinek  <jakub@redhat.com>
1598
1599         * interface.c (fold_unary): Rename to...
1600         (fold_unary_intrinsic): ... this.
1601         (gfc_extend_expr): Adjust caller.
1602         (gfc_match_generic_spec): Likewise.  Initialize *op to INTRINSIC_NONE
1603         to avoid warnings.
1604         * expr.c (gfc_simplify_expr): Initialize start and end before calling
1605         gfc_extract_int.
1606
1607 2009-06-10  Dave Korn  <dave.korn.cygwin@gmail.com>
1608
1609         * trans-decl.c (create_main_function):  Don't build main decl twice.
1610
1611 2009-06-09  Tobias Burnus  <burnus@net-b.de>
1612
1613         * trans-decl.c (gfc_generate_function_code): Use gfc_option.rtcheck
1614         instead of flag_bounds_check.
1615         * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and
1616         REAL{32,64,128}.
1617
1618 2009-06-08  Paul Thomas  <pault@gcc.gnu.org>
1619
1620         * trans-array.h : Replace prototypes for
1621         gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
1622         gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
1623         prototypes of the same names with _get or _set appended.
1624         * trans-array.c : Make the originals of the above static and
1625         new functions for the _get and _set functions. Update all the
1626         references to these descriptor access functions.
1627         * trans-expr.c : Update references to the above descriptor
1628         access functions.
1629         * trans-intrinsic.c : The same.
1630         * trans-openmp.c : The same.
1631         * trans-stmt.c : The same.
1632
1633 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
1634
1635         * options.c (gfc_post_options): Disable dump_parse_tree
1636         during -fcompare-debug-second.
1637
1638 2009-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1639
1640         PR fortran/40008
1641         * gfortran.h (gfc_open): Add newunit expression to structure.
1642         * io.c (io_tag): Add new unit tag and fix whitespace.
1643         (match_open_element): Add matching for newunit.
1644         (gfc_free_open): Free the newunit expression.
1645         (gfc_resolve_open): Add newunit to resolution and check constraints.
1646         (gfc_resolve_close): Add check for non-negative unit.
1647         (gfc_resolve_filepos): Likewise.
1648         (gfc_resolve_dt): Likewise.
1649         * trans-io.c (set_parameter_value): Build runtime checks for unit
1650         numbers within range of kind=4 integer. (gfc_trans_open) Set the
1651         newunit parameter.
1652         * ioparm.def (IOPARM): Define the newunit parameter as a pointer
1653         to GFC_INTEGER_4, pint4.
1654
1655 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
1656
1657         PR fortran/25104
1658         PR fortran/29962
1659         * array.c (gfc_append_constructor): Added NULL-check.
1660         * check.c (gfc_check_spread): Check DIM.
1661         (gfc_check_unpack): Check that the ARRAY arguments provides enough
1662         values for MASK.
1663         * intrinsic.h (gfc_simplify_spread): New prototype.
1664         (gfc_simplify_unpack): Likewise.
1665         * intrinsic.c (add_functions): Added new simplifier callbacks.
1666         * simplify.c (gfc_simplify_spread): New.
1667         (gfc_simplify_unpack): New.
1668         * expr.c (check_transformational): Allow additional transformational
1669         intrinsics in initialization expression.
1670
1671 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
1672
1673         PR fortran/25104
1674         PR fortran/29962
1675         * check.c (gfc_check_all_any): Check rank of DIM.
1676         (gfc_check_count): Likewise.
1677         * intrinsic.h (gfc_simplify_all): New prototype.
1678         (gfc_simplify_any): Likewise.
1679         (gfc_simplify_count): Likewise.
1680         (gfc_simplify_sum): Likewise.
1681         (gfc_simplify_product): Likewise.
1682         * intrinsic.c (add_functions): Added new simplifier callbacks.
1683         * simplify.c (transformational_result): New.
1684         (simplify_transformation_to_scalar): New.
1685         (simplify_transformation_to_array): New.
1686         (gfc_count): New.
1687         (gfc_simplify_all): New.
1688         (gfc_simplify_any): New.
1689         (gfc_simplify_count): New.
1690         (gfc_simplify_sum): New.
1691         (gfc_simplify_product): New.
1692         * expr.c (check_transformational): Allow additional transformational
1693         intrinsics in initialization expression.
1694
1695 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
1696
1697         * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
1698         (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
1699         (gfc_check_minloc_maxloc): Likewise.
1700         (check_reduction): Likewise.
1701         (gfc_check_size): Likewise.
1702         (gfc_check_ubound): Likewise.
1703         (gfc_check_cshift): Added missing shape-conformance checks.
1704         (gfc_check_eoshift): Likewise.
1705         * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
1706         * expr.c (gfc_check_conformance): Accept error-message chunks in 
1707         printf-style. Changed all callers.
1708
1709
1710 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
1711
1712         PR fortran/25104
1713         PR fortran/29962
1714         * intrinsic.h (gfc_simplify_dot_product): New prototype.
1715         (gfc_simplify_matmul): Likewise.
1716         (gfc_simplify_transpose): Likewise.
1717         * intrinsic.c (add_functions): Added new simplifier callbacks.
1718         * simplify.c (init_result_expr): New.
1719         (compute_dot_product): New.
1720         (gfc_simplify_dot_product): New.
1721         (gfc_simplify_matmul): New.
1722         (gfc_simplify_transpose): New.
1723         * expr.c (check_transformational): Allow transformational intrinsics
1724         with simplifier in initialization expression.
1725
1726 2009-06-06  Daniel Franke  <franke.daniel@gmail.com>
1727
1728         PR fortran/37203
1729         * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
1730         without padding.
1731
1732 2009-06-06  Daniel Franke  <franke.daniel@gmail.com>
1733
1734         PR fortran/32890
1735         * intrinsic.h (gfc_simplify_pack): New prototype.
1736         * intrinsic.c (add_functions): Added
1737         simplifier-callback to PACK.
1738         * simplify.c (is_constant_array_expr): Moved
1739         to beginning of file.
1740         (gfc_simplify_pack): New.
1741         * check.c (gfc_check_pack): Check that VECTOR has enough elements.
1742         Added safeguards for empty arrays.
1743
1744 2009-06-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1745
1746         * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
1747         instead of MPC_RE/MPC_IM.
1748
1749 2009-06-05  Alexandre Oliva  <aoliva@redhat.com>
1750
1751         * trans-decl.c (gfc_build_qualified_array): Don't skip generation
1752         of range types.
1753         * trans.h (struct lang_type): Add base_decls.
1754         (GFC_TYPE_ARRAY_BASE_DECL): New.
1755         * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
1756         proactively and excessively.
1757         (gfc_get_array_descr_info): Use existing base decls if available.
1758
1759 2009-06-04  Daniel Franke  <franke.daniel@gmail.com>
1760
1761         PR fortran/37203
1762         * check.c (gfc_check_reshape): Additional checks for the
1763         SHAPE and ORDER arguments.
1764         * simplify.c (gfc_simplify_reshape): Converted argument checks
1765         to asserts.
1766
1767 2009-06-03  Tobias Burnus  <burnus@net-b.de>
1768
1769         * gfortran.texi: Add mixed-language programming, mention
1770         varying string lengths, some clean up of introduction parts.
1771         * intrinsic.texi (instrinsic modules): Create @menu for subsections.
1772         (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
1773         * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
1774         * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
1775
1776 2009-06-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1777             Tobias Burnus  <burnus@net-b.de>
1778
1779         * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
1780         * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
1781
1782 2009-06-03  Alexandre Oliva  <aoliva@redhat.com>
1783
1784         * module.c (mio_f2k_derived): Initialize cur.
1785
1786 2009-06-01  Tobias Burnus  <burnus@net-b.de>
1787
1788         PR fortran/40309
1789         * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
1790         (create_main_function): Set main_identifier_node.
1791
1792 2009-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1793
1794         PR fortran/40019
1795         * trans-types.c (gfc_build_uint_type): Make nonstatic.
1796         * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
1797         * trans-types.h (gfc_build_uint_type): Add prototype.
1798         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1799         gfor_fndecl_clz128 and gfor_fndecl_ctz128.
1800         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
1801         gfc_conv_intrinsic_trailz): Call the right builtins or library
1802         functions, and cast arguments to unsigned types first.
1803         * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
1804
1805 2009-05-27  Ian Lance Taylor  <iant@google.com>
1806
1807         * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
1808         $(LINKER).
1809         (f951$(exeext)): Likewise.
1810
1811 2009-05-27  Tobias Burnus  <burnus@net-b.de>
1812
1813         PR fortran/40270
1814         * trans-decl.c (create_main_function): Mark MAIN__ and
1815         argc/argv as TREE_USED and push/pop function_decl context
1816         if needed.
1817
1818 2009-05-26  Tobias Burnus  <burnus@net-b.de>
1819
1820         PR fortran/39178
1821         * gfortranspec.c (lang_specific_driver): Stop linking
1822         libgfortranbegin.
1823         * trans-decl.c (gfc_build_builtin_function_decls): Stop
1824         making MAIN__ publicly visible.
1825         (gfc_build_builtin_function_decls): Add
1826         gfor_fndecl_set_args.
1827         (create_main_function) New function.
1828         (gfc_generate_function_code): Use it.
1829
1830 2009-05-26  Tobias Burnus  <burnus@net-b.de>
1831
1832         PR fortran/40246
1833         * match.c (gfc_match_nullify): NULLify freed pointer.
1834
1835 2009-05-26  Ian Lance Taylor  <iant@google.com>
1836
1837         * Make-lang.in (gfortranspec.o): Use $(COMPILER).
1838         (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
1839
1840 2009-05-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1841
1842         * gfortran.h (GFC_MPC_RND_MODE): New.
1843         * simplify.c (call_mpc_func): New helper function.
1844         (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
1845         gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
1846
1847 2009-05-25  Janus Weil  <janus@gcc.gnu.org>
1848
1849         PR fortran/40176
1850         * primary.c (gfc_match_varspec): Handle procedure pointer components
1851         with array return value.
1852         * resolve.c (resolve_expr_ppc): Ditto.
1853         (resolve_symbol): Make sure the interface of a procedure pointer has
1854         been resolved.
1855         * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
1856         components with array return value.
1857         * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
1858         gfc_trans_arrayfunc_assign): Ditto.
1859         (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
1860         where the rhs is a dummy argument.
1861         * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
1862         procedure pointer components with array return value.
1863
1864 2009-05-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1865             Dominique Dhumieres
1866
1867         PR fortran/35732
1868         PR fortran/39872
1869         * trans-array.c (gfc_conv_ss_startstride): Add one to index.
1870
1871 2009-05-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1872
1873         PR fortran/40195
1874         * module.c (read_md5_from_module_file): Close file before returning.
1875
1876 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
1877
1878         PR fortran/40164
1879         * primary.c (gfc_match_rvalue): Handle procedure pointer components in
1880         arrays.
1881         * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
1882         array references.
1883         (resolve_fl_derived): Procedure pointer components are not required to
1884         have constant array bounds in their return value.
1885
1886 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
1887
1888         * intrinsic.c (add_sym): Fix my last commit (r147655),
1889         which broke bootstrap.
1890
1891 2009-05-18  Richard Guenther  <rguenther@suse.de>
1892
1893         PR fortran/40168
1894         * trans-expr.c (gfc_trans_zero_assign): For local array
1895         destinations use an assignment from an empty constructor.
1896
1897 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
1898
1899         PR fortran/36947
1900         PR fortran/40039
1901         * expr.c (gfc_check_pointer_assign): Check intents when comparing
1902         interfaces.
1903         * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
1904         (gfc_compare_interfaces): Additional argument.
1905         * interface.c (operator_correspondence): Add check for equality of
1906         intents, and new argument 'intent_check'.
1907         (gfc_compare_interfaces): New argument 'intent_check', which is passed
1908         on to operator_correspondence.
1909         (check_interface1): Don't check intents when comparing interfaces.
1910         (compare_parameter): Do check intents when comparing interfaces.
1911         * intrinsic.c (add_sym): Add intents for arguments of intrinsic
1912         procedures.
1913         (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
1914         add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
1915         default.
1916         (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
1917         : New functions to add intrinsic symbols, specifying custom intents.
1918         (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
1919         (add_functions,add_subroutines): Add intents for various intrinsics.
1920         * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
1921         comparing interfaces.
1922         * symbol.c (gfc_copy_formal_args_intr): Copy intent.
1923
1924 2009-05-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1925
1926         * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
1927         REAL64 and REAL128.
1928         * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
1929         gfc_get_real_kind_from_width_isofortranenv): New prototypes.
1930         * iso-c-binding.def: Update definitions for the INT*_T,
1931         INT_LEAST*_T and INT_FAST*_T named parameters.
1932         * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
1933         gfc_get_real_kind_from_width_isofortranenv): New functions.
1934
1935 2009-05-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1936
1937         PR fortran/36260
1938         * intrinsic.c (add_functions, add_subroutines): Fix argument
1939         names and wrap long lines.
1940         * intrinsic.texi: Fix documentation and argument names of
1941         LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
1942         GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
1943         SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
1944         SELECTED_REAL_KIND and XOR.
1945
1946 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1947
1948         PR fortran/33197
1949         * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
1950         * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
1951         * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
1952         gfc_simplify_erfc_scaled): New functions.
1953
1954 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1955
1956         PR fortran/31243
1957         * resolve.c (resolve_substring): Don't allow too large substring
1958         indexes.
1959         (gfc_resolve_substring_charlen): Fix typo.
1960         (gfc_resolve_character_operator): Fix typo.
1961         (resolve_charlen): Catch unreasonably large string lengths.
1962         * simplify.c (gfc_simplify_len): Don't error out on LEN
1963         range checks.
1964
1965 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1966
1967         PR fortran/36031
1968         * decl.c (set_enum_kind): Use global short-enums flag.
1969         * gfortran.h (gfc_option_t): Remove short_enums flag.
1970         * lang.opt (-fshort-enums): Refer to C documentation.
1971         * options.c (gfc_init_options, gfc_handle_option): Use global
1972         short-enums flag.
1973
1974 2009-05-15  Tobias Burnus  <burnus@net-b.de>
1975
1976         PR fortran/39352
1977         * f95-lang.c: Add gfc_maybe_initialize_eh.
1978         * gfortran.h: Add gfc_maybe_initialize_eh prototype.
1979         * Make-lang.in: Add new .h dendencies for f95-lang.c
1980         * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
1981         * misc.c (gfc_free): Avoid #define trickery for free.
1982
1983 2009-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1984
1985         * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
1986         of allocate and deallocate statements.
1987
1988 2009-05-14  Ian Lance Taylor  <iant@google.com>
1989
1990         * decl.c (match_attr_spec): Change d to unsigned int.
1991         * dump-parse-tree.c (show_namespace): Change op to int.  Add cast.
1992         * interface.c (gfc_check_interfaces): Change i to int.  Add casts.
1993         * module.c (read_module): Change i to int.  Add cast.
1994         (write_module): Change i to int.
1995         * symbol.c (gfc_get_namespace): Change in to int.
1996         (gfc_free_namespace): Change i to int.
1997         * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
1998         unsigned int.  Add cast.
1999         * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
2000         Add casts.
2001
2002 2009-05-14  Daniel Kraft  <d@domob.eu>
2003
2004         PR fortran/40045
2005         * dump-parse-tree.c (show_typebound): Fix missing adaption to new
2006         type-bound procedure storage structure.
2007
2008 2009-05-14  Janus Weil  <janus@gcc.gnu.org>
2009
2010         PR fortran/39996
2011         * decl.c (gfc_match_function_decl): Use gfc_add_type.
2012         * symbol.c (gfc_add_type): Better checking for duplicate types in
2013         function declarations. And: Always give an error for duplicte types,
2014         not just a warning with -std=gnu.
2015
2016 2009-05-14  Jakub Jelinek  <jakub@redhat.com>
2017
2018         PR fortran/39865
2019         * io.c (resolve_tag_format): CHARACTER array in FMT= argument
2020         isn't an extension.  Reject non-CHARACTER array element of
2021         assumed shape or pointer or assumed size array.
2022         * trans-array.c (array_parameter_size): New function.
2023         (gfc_conv_array_parameter): Add size argument.  Call
2024         array_parameter_size if it is non-NULL.
2025         * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
2026         * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
2027         Adjust callers.
2028         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
2029         * trans-io.c (gfc_convert_array_to_string): Rewritten.
2030
2031 2009-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
2032
2033         * gfortran.h (gfc_code): Rename struct member expr to expr1.
2034         * openmp.c (resolve_omp_atomic): Update expr to expr1.
2035         * interface.c (gfc_extend_assign): Ditto.
2036         * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
2037         gfc_trans_init_assign): Ditto.
2038         * dump-parse-tree.c (show_code_node): Ditto.
2039         * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
2040         * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
2041         gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
2042         gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
2043         gfc_trans_logical_select, gfc_trans_character_select
2044         forall_make_variable_temp, check_forall_dependencies
2045         gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
2046         gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
2047         * io.c (match_io_element, gfc_match_inquire): Ditto.
2048         * resolve.c (resolve_typebound_call, resolve_ppc_call,
2049         resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
2050         resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
2051         gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
2052         * st.c (gfc_free_statement): Ditto.
2053         * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
2054         match_arithmetic_if, gfc_match_if, gfc_match_elseif
2055         gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
2056         gfc_match_nullify, match_typebound_call, gfc_match_call
2057         gfc_match_select, match_simple_where, gfc_match_where
2058         gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
2059         * trans-io.c (gfc_trans_transfer): Ditto.
2060         * parse.c (parse_where_block, parse_if_block): Ditto.
2061
2062 2009-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
2063
2064         * gfortran.h (gfc_code): Rename struct member label to label1.
2065         * dump-parse-tree.c (show_code_node): Update symbol.
2066         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
2067         gfc_trans_arithmetic_if): Ditto.
2068         * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
2069         * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
2070         gfc_match_assign, gfc_match_goto): Ditto.
2071         * parse.c (parse_do_block): Ditto.
2072
2073 2009-05-13  Tobias Burnus  <burnus@net-b.de>
2074
2075         PR fortran/34153
2076         * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
2077         * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
2078         * trans.c (gfc_trans_code): Ditto.
2079         * resolve.c (resolve_code): Ditto.
2080         * st.c (gfc_free_statement): Ditto.
2081         * parse.c (accept_statement): Ditto.
2082
2083 2009-05-12  Tobias Burnus  <burnus@net-b.de>
2084
2085         PR fortran/40110
2086         * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
2087
2088 2009-05-11  Steve Ellcey  <sje@cup.hp.com>
2089
2090         * resolve.c (check_host_association): Initialize tail.
2091
2092 2009-05-11  Janus Weil  <janus@gcc.gnu.org>
2093
2094         PR fortran/40089
2095         * resolve.c (resolve_fl_derived): Only return FAILURE if
2096         gfc_notify_std fails.
2097
2098 2009-05-10  Ian Lance Taylor  <iant@google.com>
2099
2100         * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
2101         gfc_omp_clauses.
2102         (enum gfc_omp_default_sharing): Likewise.
2103         * module.c (enum gfc_rsym_state): New enum, broken out of
2104         pointer_info.
2105         (enum gfc_wsym_state): Likewise.
2106         * parse.c (enum state_order): New enum, broken out of st_state.
2107
2108 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
2109
2110         PR fortran/40018
2111         * trans-array.c (gfc_trans_array_constructor_value): Fold
2112         convert numeric constants.
2113         (gfc_build_constant_array_constructor): The same.
2114
2115 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
2116
2117         PR fortran/38863
2118         * trans-expr.c (gfc_conv_operator_assign): Remove function.
2119         * trans.h : Remove prototype for gfc_conv_operator_assign.
2120         * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
2121         derivde types with intent(out).
2122         (gfc_trans_call): Add mask, count1 and invert arguments. Add
2123         code to use mask for WHERE assignments.
2124         (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
2125         (gfc_trans_where_assign): The gfc_symbol argument is replaced
2126         by the corresponding code. If this has a resolved_sym, then
2127         gfc_trans_call is called. The call to gfc_conv_operator_assign
2128         is removed.
2129         (gfc_trans_where_2): Change the last argument in the call to
2130         gfc_trans_where_assign.
2131         * trans-stmt.h : Modify prototype for gfc_trans_call.
2132         * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
2133
2134 2009-05-08  Janus Weil  <janus@gcc.gnu.org>
2135
2136         PR fortran/39876
2137         * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
2138         the symbol is a module procedure.
2139
2140 2009-05-08  Tobias Burnus  <burnus@net-b.de>
2141
2142         * invoke.texi: Add do/recursion to the -fcheck= summary.
2143
2144 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2145
2146         PR fortran/38830
2147         * gfortran.texi: Document that we don't support variable FORMAT
2148         expressions.
2149
2150 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2151
2152         PR fortran/39576
2153         * error.c (error_print): Add missing break statement.
2154
2155 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2156
2157         PR fortran/36382
2158         * invoke.texi: Document that -fdollar-ok does not allow $ to be
2159         used in IMPLICIT statement.
2160
2161 2009-05-06  Janus Weil  <janus@gcc.gnu.org>
2162             Paul Thomas  <pault@gcc.gnu.org>
2163
2164         PR fortran/39630
2165         * decl.c (match_procedure_interface): New function to match the
2166         interface for a PROCEDURE statement.
2167         (match_procedure_decl): Call match_procedure_interface.
2168         (match_ppc_decl): New function to match the declaration of a
2169         procedure pointer component.
2170         (gfc_match_procedure):  Call match_ppc_decl.
2171         (match_binding_attributes): Add new argument 'ppc' and handle the
2172         POINTER attribute for procedure pointer components.
2173         (match_procedure_in_type,gfc_match_generic): Added new argument to
2174         match_binding_attributes.
2175         * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
2176         procedure pointer components.
2177         * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
2178         (gfc_check_pointer_assign): Handle procedure pointer components, but no
2179         full checking yet.
2180         (is_proc_ptr_comp): New function to determine if an expression is a
2181         procedure pointer component.
2182         * gfortran.h (expr_t): Add EXPR_PPC.
2183         (symbol_attribute): Add new member 'proc_pointer_comp'.
2184         (gfc_component): Add new member 'formal'.
2185         (gfc_exec_op): Add EXEC_CALL_PPC.
2186         (gfc_get_default_type): Changed first argument.
2187         (is_proc_ptr_comp): Add prototype.
2188         (gfc_match_varspec): Add new argument.
2189         * interface.c (compare_actual_formal): Handle procedure pointer
2190         components.
2191         * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
2192         procedure pointer components.
2193         * module.c (mio_expr): Handle EXPR_PPC.
2194         * parse.c (parse_derived): Handle procedure pointer components.
2195         * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
2196         procedure pointer components.
2197         (gfc_variable_attr): Handle procedure pointer components.
2198         (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
2199         first argument of gfc_get_default_type.
2200         (match_variable): Added new argument to gfc_match_varspec.
2201         * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
2202         first argument of gfc_get_default_type.
2203         (resolve_structure_cons,resolve_actual_arglist): Handle procedure
2204         pointer components.
2205         (resolve_ppc_call): New function to resolve a call to a procedure
2206         pointer component (subroutine).
2207         (resolve_expr_ppc): New function to resolve a call to a procedure
2208         pointer component (function).
2209         (gfc_resolve_expr): Handle EXPR_PPC.
2210         (resolve_code): Handle EXEC_CALL_PPC.
2211         (resolve_fl_derived): Copy the interface for a procedure pointer
2212         component.
2213         (resolve_symbol): Fix overlong line.
2214         * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
2215         * symbol.c (gfc_get_default_type): Changed first argument.
2216         (gfc_set_default_type): Changed first argument of gfc_get_default_type.
2217         (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
2218         * trans.h (gfc_conv_function_call): Renamed.
2219         * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
2220         * trans-expr.c (gfc_conv_component_ref): Ditto.
2221         (gfc_conv_function_val): Rename to 'conv_function_val', add new
2222         argument 'expr' and handle procedure pointer components.
2223         (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
2224         (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
2225         (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
2226         argument 'expr' and handle procedure pointer components.
2227         (gfc_get_proc_ptr_comp): New function to get the backend decl for a
2228         procedure pointer component.
2229         (gfc_conv_function_expr): Renamed gfc_conv_function_call.
2230         (gfc_conv_structure): Handle procedure pointer components.
2231         * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
2232         conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
2233         * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
2234         * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
2235         * trans-types.h (gfc_get_ppc_type): Add prototype.
2236         * trans-types.c (gfc_get_ppc_type): New function to build a tree node
2237         for a procedure pointer component.
2238         (gfc_get_derived_type): Handle procedure pointer components.
2239
2240 2009-05-06  Tobias Burnus  <burnus@net-b.de>
2241
2242         PR fortran/40041
2243         * resolve.c (resolve_symbol): Print no warning for implicitly
2244         typed intrinsic functions.
2245
2246 2009-05-05  Janus Weil  <janus@gcc.gnu.org>
2247
2248         PR fortran/39998
2249         * expr.c (gfc_check_pointer_assign): Check for statement functions and
2250         internal procedures in procedure pointer assignments.
2251
2252 2009-04-28  Janus Weil  <janus@gcc.gnu.org>
2253
2254         PR fortran/39946
2255         * resolve.c (resolve_symbol): Correctly copy the interface of a
2256         PROCEDURE statement if the interface involves a RESULT variable.
2257
2258 2009-04-28  Janus Weil  <janus@gcc.gnu.org>
2259
2260         PR fortran/39930
2261         PR fortran/39931
2262         * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
2263         side is a pointer.
2264         * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
2265
2266 2009-04-28  Paul Thomas  <pault@gcc.gnu.org>
2267
2268         PR fortran/39879
2269         * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
2270         type parentheses argument if it is a variable with allocatable
2271         components.
2272
2273 2009-04-27  Ian Lance Taylor  <iant@google.com>
2274
2275         * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
2276         type.
2277         * trans-io.c (st_parameter_field): Add casts to enum type.
2278
2279 2009-04-26  Steven G. Kargl  <kargl@gcc.gnu.org>
2280
2281         PR fortran/39893
2282         fortran/data.c (gfc_assign_data_value): If the lvalue is an 
2283         assumed character length entity in a data statement, then 
2284         return FAILURE to prevent segmentation fault.
2285
2286 2009-04-26  Jakub Jelinek  <jakub@redhat.com>
2287
2288         * trans-decl.c: Include pointer-set.h.
2289         (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
2290         (gfc_nonlocal_dummy_array_decl): New function.
2291         (gfc_get_symbol_decl): Call it for non-local dummy args with saved
2292         descriptor.
2293         (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
2294         (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
2295         chain it to outermost block's vars, destroy it afterwards.
2296         * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
2297
2298 2009-04-25  Janus Weil  <janus@gcc.gnu.org>
2299
2300         PR fortran/39688
2301         * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
2302         They differ if the symbol has been use-renamed.
2303
2304 2009-04-24  Ian Lance Taylor  <iant@google.com>
2305
2306         * gfortran.h (enum gfc_symbol_type): New named enum type, broken
2307         out of struct gfc_symbol.
2308         (struct gfc_symbol): Use enum gfc_symbol_type.
2309         (enum gfc_array_ref_dimen_type): New named enum type, broken out
2310         of struct gfc_array_ref).
2311         (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
2312         (mod_pointee_as): Update declaration.
2313         * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
2314         (gfc_mod_pointee_as): Change return type to "match".
2315         * module.c (mio_array_ref): Add cast to enum type.
2316         (mio_symbol): Likewise.
2317         * resolve.c (resolve_global_procedure): Change type to enum
2318         gfc_symbol_type.
2319         * trans-io.c (gfc_build_st_parameter): Change type to unsigned
2320         int.
2321
2322 2009-04-24  Daniel Kraft  <d@domob.eu>
2323
2324         * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
2325         (struct gfc_symtree): Moved "typebound" member inside union.
2326         (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
2327         type-bound procedures there.
2328         (gfc_get_tbp_symtree): New procedure.
2329         * symbol.c (tentative_tbp_list): New global.
2330         (gfc_get_namespace): NULL new "tb_sym_root" member.
2331         (gfc_new_symtree): Removed initialization of "typebound" member.
2332         (gfc_undo_symbols): Process list of tentative tbp's.
2333         (gfc_commit_symbols): Ditto.
2334         (free_tb_tree): New method.
2335         (gfc_free_namespace): Call it.
2336         (gfc_get_typebound_proc): New method.
2337         (gfc_get_tbp_symtree): New method.
2338         (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
2339         and gfc_namespace with regards to tbp's.
2340         * dump-parse-tree.c (show_typebound): Ditto.
2341         * primary.c (gfc_match_varspec): Ditto.  Don't reference tbp-symbol
2342         as it isn't a symbol any longer.
2343         * module.c (mio_typebound_symtree): Adapt to changes.
2344         (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
2345         rather than "gfc_get_sym_tree".
2346         (mio_f2k_derived): Ditto.
2347         * decl.c (match_procedure_in_type): Ditto.
2348         (gfc_match_generic): Ditto.  Don't reference tbp-symbol.
2349         * resolve.c (check_typebound_override): Adapt to changes.
2350         (resolve_typebound_generic): Ditto.
2351         (resolve_typebound_procedures): Ditto.
2352         (ensure_not_abstract_walker): Ditto.
2353         (ensure_not_abstract): Ditto.
2354         (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
2355         instance, through removed tentative ones).
2356         * gfc-internals.texi (Type-bound procedures): Document changes.
2357
2358 2009-04-24  Janus Weil  <janus@gcc.gnu.org>
2359
2360         PR fortran/39861
2361         PR fortran/39864
2362         * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
2363         for the formal arguments.
2364
2365 2009-04-21  Taras Glek <tglek@mozilla.com>
2366
2367         * f95-lang.c: Update GTY annotations to new syntax.
2368         * trans-intrinsic.c: Likewise.
2369         * trans-io.c: Likewise.
2370         * trans.h: Likewise.
2371
2372 2009-04-22  Janus Weil  <janus@gcc.gnu.org>
2373
2374         PR fortran/39735
2375         * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
2376         (match_procedure_decl): Set if_source.
2377         * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
2378         And: Check interface also for IFSRC_UNKNOWN (return type may be known).
2379         * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
2380         add documentation. Rename copy_formal_args and copy_formal_args_intr.
2381         * interface.c (gfc_compare_interfaces): Check for return types,
2382         handle IFSRC_UNKNOWN.
2383         (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
2384         (gfc_procedure_use): Modified handling of intrinsics.
2385         * intrinsic.c (add_functions): Bugfix for "dim".
2386         * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
2387         which copies the interface from isym to sym.
2388         (resolve_procedure_expression,resolve_function): Use new function
2389         'resolve_intrinsic'.
2390         (resolve_symbol): Add function attribute for externals with return type
2391         and use new function 'resolve_intrinsic'.
2392         * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
2393         (copy_formal_args): Renamed to gfc_copy_formal_args.
2394         (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
2395         * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
2396
2397 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
2398
2399         * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
2400         ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
2401         ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
2402         copyright and license notices.
2403         * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
2404         ChangeLog-2008: Correct dates.
2405
2406 2009-04-20  Tobias Burnus  <burnus@net-b.de>
2407
2408         PR fortran/39811
2409         * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
2410
2411 2009-04-20  Paul Thomas  <pault@gcc.gnu.org>
2412
2413         PR fortran/39800
2414         * resolve.c (is_sym_host_assoc): New function.
2415         (resolve_fl_derived): Call it when checking PRIVATE components
2416         of PUBLIC derived types.  Change gfc_error to a gfc_notify_std
2417         with std=f2003.
2418         (resolve_fl_namelist): Call it twice to check for host
2419         association.
2420
2421 2009-04-20  Ian Lance Taylor  <iant@google.com>
2422
2423         * module.c (import_iso_c_binding_module): Add casts to enum type.
2424         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
2425         tree_code.
2426         (gfc_conv_intrinsic_anyall): Likewise.
2427         (gfc_conv_intrinsic_arith): Likewise.
2428         (gfc_conv_intrinsic_minmaxloc): Likewise.
2429         (gfc_conv_intrinsic_minmaxval): Likewise.
2430         (gfc_conv_intrinsic_bitop): Likewise.
2431         (gfc_conv_intrinsic_singlebitop): Likewise.
2432         (gfc_conv_intrinsic_strcmp): Likewise.
2433
2434 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
2435             Jakub Jelinek  <jakub@redhat.com>
2436
2437         PR fortran/35423
2438         * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
2439         OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
2440         (ompws_flags): New extern decl.
2441         * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
2442         for the outer dimension if ompws_flags allow it.
2443         * trans.c (gfc_generate_code): Clear ompws_flags.
2444         * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
2445         array assignments inside of !$omp workshare.
2446         * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
2447         and constructs.
2448         * trans-openmp.c (ompws_flags): New variable.
2449         (gfc_trans_omp_workshare): Rewritten.
2450
2451 2009-04-11  Daniel Kraft  <d@domob.eu>
2452
2453         PR fortran/37746
2454         * gfortran.h (struct gfc_charlen): New field "passed_length" to store
2455         the actual passed string length for dummy arguments.
2456         * trans-decl.c (gfc_create_string_length): Formatting fixes and added
2457         assertion, moved a local variable into the innermost block it is needed.
2458         (create_function_arglist): Removed TODO about the check being
2459         implemented and initialize cl->passed_length here.
2460         (add_argument_checking): New method.
2461         (gfc_generate_function_code): Call the argument checking method.
2462
2463 2009-04-11  Janus Weil  <janus@gcc.gnu.org>
2464
2465         PR fortran/39692
2466         * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
2467
2468 2009-04-11  Daniel Franke  <franke.daniel@gmail.com>
2469
2470         * resolve.c (resolve_global_procedure): Enable whole-file checking for
2471         procedures that are declared later in the file.
2472         
2473 2009-04-10  Paolo Bonzini  <bonzini@gnu.org>
2474
2475         PR middle-end/39701
2476         * trans.c (gfc_allocate_with_status): Fix type mismatches
2477         on "pstat == 0".
2478
2479 2009-04-10  Daniel Franke  <franke.daniel@gmail.com>
2480
2481         PR fortran/38709
2482         * expr.c (find_array_section): Leave early on zero-sized arrays.
2483
2484 2009-04-09  Janus Weil  <janus@gcc.gnu.org>
2485
2486         PR fortran/36704
2487         * decl.c (add_hidden_procptr_result): New function for handling
2488         procedure pointer return values by adding a hidden result variable.
2489         (variable_decl,match_procedure_decl,gfc_match_function_decl,
2490         gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
2491         return values.
2492         * parse.c (parse_interface): Add EXTERNAL attribute only after
2493         FUNCTION/SUBROUTINE declaration is complete.
2494         * primary.c (replace_hidden_procptr_result): New function for replacing
2495         function symbol by hidden result variable.
2496         (gfc_match_rvalue,match_variable): Replace symbol by hidden result
2497         variable.
2498         * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
2499         resolve_symbol): Allow for procedure pointer function results.
2500         (resolve_fl_procedure): Conflict detection moved here from
2501         'check_conflict'.
2502         * symbol.c (gfc_check_function_type): Allow for procedure pointer
2503         function results.
2504         (check_conflict): Move some conflict detection to resolution stage.
2505         * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
2506         result variables.
2507
2508 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
2509
2510         * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
2511         contain TYPE_STRING_FLAG types.
2512
2513 2009-04-08  Janne Blomqvist  <jb@gcc.gnu.org>
2514
2515         PR fortran/39670
2516         * invoke.texi (fdollar-ok): Fix typo.
2517         
2518 2009-04-08  Daniel Franke  <franke.daniel@gmail.com>
2519
2520         PR fortran/39670
2521         * invoke.texi (fdollar-ok): Clarify limitations.
2522
2523 2009-04-08  Paul Thomas  <pault@gcc.gnu.org>
2524
2525         PR fortran/38863
2526         * trans-array.c (gfc_trans_deferred_array): Return if this
2527         is a result variable.
2528
2529 2009-04-07  Janus Weil  <janus@gcc.gnu.org>
2530
2531         PR fortran/38152
2532         * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
2533         procedure pointer decls.
2534
2535 2009-04-07  Janus Weil  <janus@gcc.gnu.org>
2536
2537         PR fortran/38290
2538         * expr.c (gfc_check_pointer_assign): Enable interface check for
2539         procedure pointers.
2540         * gfortran.h: Add copy_formal_args_intr.
2541         * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
2542         if second argument is an intrinsic.
2543         (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
2544         and ts.
2545         (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
2546         * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
2547         intrinsic interfaces here. Must happen earlier.
2548         (resolve_symbol): Resolution of intrinsic interfaces moved here from
2549         resolve_specific_..., and formal args are now copied from intrinsic
2550         interfaces.
2551         * symbol.c (copy_formal_args_intr): New function to copy the formal
2552         arguments from an intinsic procedure.
2553
2554 2009-04-06  Paul Thomas  <pault@gcc.gnu.org>
2555
2556         PR fortran/38863
2557         * dependency.c (ref_same_as_full_array): New function.
2558         (gfc_dep_resolver): Call it.
2559
2560 2009-04-06  Janus Weil  <janus@gcc.gnu.org>
2561
2562         PR fortran/39414
2563         * decl.c (match_procedure_decl): Fix double declaration problems with
2564         PROCEDURE statements.
2565         * symbol.c (gfc_add_type): Ditto.
2566
2567 2009-04-06  Paul Thomas  <pault@gcc.gnu.org>
2568
2569         PR fortran/36091
2570         * trans-array.c (gfc_conv_array_ref): If the symbol has the
2571         temporary attribute use the array_spec for the bounds.
2572         * gfortran.h : Add the temporary field to the structure
2573         'symbol_attribute'.
2574         * trans-stmt.c (forall_make_variable_temp): Set the symbol's
2575         temporary attribute.
2576
2577 2009-04-05  Daniel Franke  <franke.daniel@gmail.com>
2578
2579         PR fortran/29458
2580         * trans-array.c (gfc_trans_array_constructor_value): Shadow
2581         implied do-loop variable to avoid spurious middle-end warnings.
2582
2583 2009-04-04  Tobias Burnus  <burnus@net-b.de>
2584
2585         PR fortran/39577
2586         * trans-decl.c (gfc_generate_function_code): Move recursive
2587         check to the right position.
2588
2589 2009-04-04  Paul Thomas  <pault@gcc.gnu.org>
2590
2591         PR fortran/37614
2592         * trans-common.c (translate_common): Do not offset the whole
2593         coomon block.
2594
2595 2009-04-03  Tobias Burnus  <burnus@net-b.de>
2596
2597         PR fortran/39594
2598         * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
2599         if it is not a procedure pointer.
2600         * primary.c (match_actual_arg): Ditto.
2601
2602 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
2603
2604         PR preprocessor/15638
2605         * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
2606
2607 2009-03-30  Steven G. Kargl  <kargls@comcast.net>
2608
2609         PR fortran/38389
2610         * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
2611         (gfc_trans_deallocate): Add translation of ERRMSG.  Remove stale
2612         comments.  Minor whitespace cleanup.
2613         * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
2614         (resolve_deallocate_expr (gfc_expr *e): Update error message.
2615         (resolve_allocate_expr):  Remove dead code.  Update error message.
2616         Move error checking to ...
2617         (resolve_allocate_deallocate): ... here.  Add additional error
2618         checking for STAT, ERRMSG, and allocate-objects.
2619         * match.c(gfc_match_allocate,gfc_match_deallocate):  Parse ERRMSG.
2620         Check for redundant uses of STAT and ERRMSG.  Reword error message
2621         and add checking for pointer, allocatable, and proc_pointer attributes.
2622
2623 2009-03-30  Paul Thomas  <pault@gcc.gnu.org>
2624
2625         PR fortran/22571
2626         PR fortran/26227
2627         PR fortran/24886
2628         * symbol.c : Add gfc_global_ns_list.
2629         * decl.c (add_global_entry): Set the namespace ('ns') field.
2630         * gfortran.h : Add the resolved field to gfc_namespace. Add the
2631         namespace ('ns') field to gfc_gsymbol.  Add flag_whole_file to
2632         gfc_option_t.  Add the prototype for gfc_free_dt_list.
2633         * lang.opt : Add the whole-file option.
2634         * invoke.texi : Document the whole-file option.
2635         * resolve.c (resolve_global_procedure): If the fwhole-file
2636         option is set, reorder gsymbols to ensure that translation is
2637         in the right order.  Resolve the gsymbol's namespace if that
2638         has not occurred and then check interfaces.
2639         (resolve_function): Move call to resolve_global_procedure.
2640         (resolve_call): The same.
2641         (resolve_codes): Store the current labels_obstack.
2642         (gfc_resolve) : Return if the namespace is already resolved.
2643         trans-decl.c (gfc_get_extern_function_decl): If the whole_file
2644         option is selected, use the backend_decl of a gsymbol, if it is
2645         available.
2646         parse.c (add_global_procedure, add_global_program): If the flag
2647         whole-file is set, add the namespace to the gsymbol.
2648         (gfc_parse_file): On -fwhole-file, put procedure namespaces on
2649         the global namespace list.  Rearrange to do resolution of all
2650         the procedures in a file, followed by their translation.
2651         * options.c (gfc_init_options): Add -fwhole-file.
2652         (gfc_handle_option): The same.
2653
2654 2009-03-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2655
2656         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
2657         family of intrinsics instead of BUILT_IN_INF family.
2658         * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
2659         BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
2660
2661 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
2662
2663         * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
2664         sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
2665
2666 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
2667
2668         PR rtl-optimization/323
2669         * options.c (gfc_post_options): Set
2670         flag_excess_precision_cmdline.  Give an error for
2671         -fexcess-precision=standard for processors where the option is
2672         significant.
2673
2674 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
2675
2676         PR preprocessor/34695
2677         * cpp.c (cb_cpp_error): New.
2678         (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
2679         Don't check cpp_errors (cpp_in).
2680         (gfc_cpp_init_0): Set cb->error.
2681
2682 2009-03-29  Steven G. Kargl  <kargl@gcc.gnu.org>
2683
2684         PR fortran/38823
2685         * gfortran.h: Add ARITH_PROHIBIT to arith enum.
2686         expr.c (gfc_match_init_expr): Add global variable init_flag to
2687         flag matching an initialization expression.
2688         (check_intrinsic_op): Move no longer reachable error message to ...
2689         * arith.c (arith_power): ... here.  Remove gfc_ prefix in
2690         gfc_arith_power.  Use init_flag.  Allow constant folding of x**y
2691         when y is REAL or COMPLEX.
2692         (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
2693         for constant folding.
2694         * gfc_power: Update gfc_arith_power to arith_power
2695
2696 2009-03-29  Daniel Kraft  <d@domob.eu>
2697
2698         PR fortran/37423
2699         * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
2700         added a comment explaining DEFERRED binding handling.
2701         * decl.c (match_binding_attributes): Really match DEFERRED attribute.
2702         (match_procedure_in_type): Really match PROCEDURE(interface) syntax
2703         and do some validity checks for DEFERRED and this construct.
2704         * module.c (binding_overriding): New string constant for DEFERRED.
2705         (mio_typebound_proc): Module-IO DEFERRED flag.
2706         * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
2707         binding is not overridden by a DEFERRED one.
2708         (resolve_typebound_procedure): Allow abstract interfaces as targets
2709         for DEFERRED bindings.
2710         (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
2711         (resolve_fl_derived): Use new "ensure_not_abstract" method for
2712         non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
2713         binding is overridden.
2714         (check_typebound_baseobject): New method.
2715         (resolve_compcall), (resolve_typebound_call): Check base-object of
2716         the type-bound procedure call.
2717         * gfc-internals.texi (Type-bound procedures): Document a little bit
2718         about internal handling of DEFERRED bindings.
2719
2720 2009-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
2721
2722         PR fortran/38507
2723         * gfortran.h (gfc_st_label): Fix comment.
2724         (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
2725         * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
2726         END SELECT with labels.
2727         (check_do_closure): Fix formatting.
2728         (parse_do_block): Fix typo in error message.
2729         * resolve.c (code_stack): Remove tail member.  Update comment to
2730         new use of reachable_labels.
2731         (reachable_labels): Rename to ...
2732         (find_reachable_labels): ... this.  Overhaul.  Update preceding
2733         comment.
2734         (resolve_branch): Fix comment preceding function.  Rewrite.
2735         (resolve_code): Update call to find_reachable_labels.  Add code to
2736         deal with EXEC_END_BLOCK.
2737         * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
2738         Add 2009 to copyright years.
2739         * trans.c (gfc_trans_code): Likewise on both counts.
2740
2741 2009-03-31  Paul Thomas  <pault@gcc.gnu.org>
2742
2743         PR fortran/38917
2744         * expr.c (gfc_check_assign): Allow pointer components when
2745         checking for NULL.
2746
2747         PR fortran/38918
2748         * resolve.c (check_data_variable): Treat pointer arrays with
2749         scalars.
2750
2751 2009-03-31  Paul Thomas  <pault@gcc.gnu.org>
2752
2753         PR fortran/38915
2754         * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
2755         have a string_length.
2756
2757 2009-03-28  Tobias Burnus  <burnus@net-b.de>
2758
2759         PR fortran/34656
2760         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
2761         Add GFC_RTCHECK_DO support.
2762         * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
2763         * invoke.texi (-fcheck): Document "do" option.
2764
2765 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
2766
2767         PR fortran/38538
2768         * trans-array.c (get_elemental_fcn_charlen): Remove.
2769         (get_array_charlen): New function to replace previous.
2770
2771 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
2772
2773         PR fortran/38765
2774         * parse.c (parse_derived): Do not break on finding pointer,
2775         allocatable or private components.
2776
2777 2009-03-28  Tobias Burnus  <burnus@net-b.de>
2778
2779         PR fortran/32626
2780         * option.c (gfc_handle_runtime_check_option): Enable recursion check.
2781         * trans-decl.c (gfc_generate_function_code): Add recursion check.
2782         * invoke.texi (-fcheck): Add recursive option.
2783
2784 2009-03-28  Tobias Burnus  <burnus@net-b.de>
2785
2786         PR fortran/38432
2787         * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
2788
2789 2009-03-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2790             Paul Thomas  <pault@gcc.gnu.org>
2791             Tobias Burnus  <burnus@net-b.de>
2792
2793         * gfortran.h (gfc_option_t): Add rtcheck.
2794         * lang.opt: New option -fcheck.
2795         * libgfortran.h: Add GFC_RTCHECK_* constants.
2796         * invoke.texi: Document -fcheck.
2797         * options.c (gfc_handle_runtime_check_option): New function.
2798         (gfc_init_options,gfc_post_options,gfc_handle_option):
2799         Add -fcheck option.
2800
2801 2009-03-27  Richard Guenther  <rguenther@suse.de>
2802
2803         * trans-array.c (gfc_conv_descriptor_data_addr): Use
2804         gfc_build_addr_expr instead of build_fold_addr_expr.
2805         (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
2806         gfc_trans_constant_array_constructor, gfc_conv_array_data,
2807         gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
2808         * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
2809         gfc_conv_function_val, gfc_conv_operator_assign,
2810         gfc_conv_subref_array_arg, gfc_conv_function_call,
2811         gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
2812         * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
2813         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2814         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
2815         gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
2816         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
2817         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2818         gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
2819         * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
2820         gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
2821         build_filepos, gfc_trans_inquire, gfc_trans_wait,
2822         nml_get_addr_expr, transfer_namelist_element, build_dt,
2823         gfc_trans_dt_end, transfer_array_component, transfer_expr,
2824         transfer_array_desc, gfc_trans_transfer): Likewise.
2825         * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
2826         * trans.c (gfc_build_addr_expr): Mark the base of the address
2827         TREE_ADDRESSABLE.
2828
2829 2009-03-27  Tobias Burnus  <burnus@net-b.de>
2830
2831         * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
2832         (gfc_expr): Add is_snan.
2833         * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
2834         (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
2835         * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
2836         * resolve.c (build_default_init_expr): Update call.
2837         * target-memory.c (encode_float): Ditto.
2838         * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
2839
2840 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2841
2842         * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
2843         and -fpreprocessed.
2844
2845 2009-03-06  Alexandre Oliva <aoliva@redhat.com>
2846
2847         * simplify.c (gfc_simplify_transfer): Zero-initialize the
2848         buffer.
2849
2850 2009-02-27  Tobias Burnus  <burnus@net-b.de>
2851
2852         PR fortran/39309
2853         * module.c (read_md5_from_module_file): Add missing quote.
2854
2855 2009-02-27  Tobias Burnus  <burnus@net-b.de>
2856
2857         PR fortran/39309
2858         * module.c (read_md5_from_module_file): Include mod version
2859         in had-changed test.
2860
2861 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
2862
2863         PR fortran/39295
2864         * interface.c (compare_type_rank_if): Return 1 if the symbols
2865         are the same and deal with external procedures where one is
2866         identified to be a function or subroutine by usage but the
2867         other is not.
2868
2869 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
2870
2871         PR fortran/39292
2872         * trans-array.c (gfc_conv_array_initializer): Convert all
2873         expressions rather than ICEing.
2874
2875 2009-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
2876
2877         PR fortran/38914
2878         * array.c (ref_dimen_size):  Rename to gfc_ref_dimen_size,
2879         make global.  Change function name in error messages.
2880         (ref_size):  Change ref_dimen_size to gfc_ref_dimen_size.
2881         (gfc_array_ref_shape):  Likewise.
2882         * gfortran.h:  Add prototype for gfc_ref_dimen_size.
2883         * simplify.c (simplify_bound_dim):  Add ref argument.
2884         If the reference isn't a full array, return one for
2885         the lower bound and the extent for the upper bound.
2886         (simplify_bound):  For array sections, take as from the
2887         argument.  Add reference to all to simplify_bound_dim.
2888
2889 2009-02-19  Daniel Franke  <franke.daniel@gmail.com>
2890
2891         * scanner.c (load_line): At end of line, skip '\r' without setting
2892         the truncation flag.
2893
2894 2009-02-18  Daniel Kraft  <d@domob.eu>
2895
2896         * gfortran.texi: New chapter about compiler characteristics.
2897         (Compiler Characteristics): Document KIND type parameters here.
2898
2899 2009-02-18  Tobias Burnus  <burnus@net-b.de>
2900
2901         * intrinsic.texi (MALLOC): Make example more portable.
2902
2903 2009-02-13  Mikael Morin  <mikael.morin@tele2.fr>
2904
2905         PR fortran/38259
2906         * module.c (gfc_dump_module,gfc_use_module): Add module
2907         version number.
2908
2909 2009-02-13  Paul Thomas  <pault@gcc.gnu.org>
2910
2911         PR fortran/36703
2912         PR fortran/36528
2913         * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
2914         function references to ensure that a valid expression is used.
2915         (gfc_conv_function_call): Pass Cray pointers to procedures.
2916
2917 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
2918
2919         * gfortranspec.c (lang_specific_driver): Update copyright notice
2920         dates.
2921
2922 2009-01-28  Paul Thomas  <pault@gcc.gnu.org>
2923
2924         PR fortran/38852
2925         PR fortran/39006
2926         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
2927         descriptor ubound for UBOUND, when the array lbound == 1.
2928
2929 2009-01-27  Daniel Kraft  <d@domob.eu>
2930
2931         PR fortran/38883
2932         * trans-stmt.c (gfc_conv_elemental_dependencies):  Create temporary
2933         for the real type needed to make it work for subcomponent-references.
2934
2935 2009-01-21  Daniel Kraft  <d@domob.eu>
2936
2937         * trans-stmt.c (gfc_conv_elemental_dependencies):  Cleaned up comment.
2938
2939 2009-01-20  Paul Thomas  <pault@gcc.gnu.org>
2940
2941         PR fortran/38907
2942         * resolve.c (check_host_association): Remove the matching to
2943         correct an incorrect host association and use manipulation of
2944         the expression instead.
2945
2946 2009-01-20  Tobias Burnus  <burnus@net-b.de>
2947
2948         * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
2949
2950 2009-01-19  Mikael Morin  <mikael.morin@tele2.fr>
2951
2952         PR fortran/38859
2953         * simplify.c (simplify_bound): Don't use array specification
2954         if variable or component has subsequent references.
2955
2956 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
2957
2958         PR fortran/38657
2959         * module.c (write_common_0): Add argument 'this_module' and
2960         check that non-use associated common blocks are written first.
2961         (write_common): Call write_common_0 twice, once with true and
2962         then with false.
2963
2964 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
2965
2966         PR fortran/34955
2967         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
2968         been absorbed into gfc_conv_intrinsic_transfer. All
2969         references to it in trans-intrinsic.c have been changed
2970         accordingly.  PR fixed by using a temporary for scalar
2971         character transfer, when the source is shorter than the
2972         destination.
2973
2974 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
2975
2976         PR fortran/38657
2977         * module.c (write_common_0): Revert patch of 2009-01-05.
2978
2979 2009-01-16  Janus Weil  <janus@gcc.gnu.org>
2980
2981         PR fortran/38152
2982         * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
2983         pointers as lvalue.
2984         * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
2985         Enable procedure pointers as module variables.
2986
2987 2009-01-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2988
2989         * ChangeLog-2007: Clean out svn merge droppings.
2990
2991 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
2992
2993         PR fortran/38763
2994         * target-memory.c (encode_derived): Encode NULL.
2995
2996 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
2997
2998         PR fortran/38765
2999         * resolve.c (check_host_association): Use the symtree name to
3000         search for a potential contained procedure, since this is the
3001         name by which it would be referenced.
3002
3003 2009-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
3004
3005         PR fortran/38220
3006         * interface.c (gfc_procedure_use):  Don't warn about functions
3007         from ISO_C_BINDING.
3008         * symbol.c (generate_isocbinding_symbol):  Mark c_loc and
3009         c_funloc as pure.
3010
3011 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
3012
3013         PR fortran/38657
3014         * module.c (write_common_0): Use the name of the symtree rather
3015         than the common block, to determine if the common has been
3016         written.
3017
3018 2009-01-05  Daniel Franke  <franke.daniel@gmail.com>
3019
3020         PR fortran/37159
3021         * check.c (gfc_check_random_seed): Added size check for GET
3022         dummy argument, reworded error messages to follow common pattern.
3023
3024 2009-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
3025
3026         PR fortran/38672
3027         * trans-types.c (gfc_get_derived_type):  Check for the
3028         presence of derived->ns->proc_name before
3029         accessing derived->ns->proc_name->attr.flavor .
3030         * resolve.c (resolve_symbol):  Likewise.
3031
3032 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
3033
3034         PR fortran/38665
3035         * gfortran.h : Add bit to gfc_expr 'user_operator'
3036         * interface.c (gfc_extend_expr): Set the above if the operator
3037         is substituted by a function. 
3038         * resolve.c (check_host_association): Return if above is set.
3039
3040 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
3041
3042         PR fortran/35681
3043         * ChangeLog-2008: Fix function name.
3044
3045         PR fortran/38487
3046         * dependency.c (gfc_check_argument_var_dependency):
3047         Move the check for pointerness inside the if block
3048         so that it doesn't affect the return value.
3049
3050         PR fortran/38669
3051         * trans-stmt.c (gfc_trans_call):
3052         Add the dependency code after the loop bounds calculation one.
3053
3054 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
3055
3056         * intrinsic.c (do_simplify): Removed already implemented TODO.
3057
3058 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
3059
3060         PR fortran/38718
3061         * simplify.c (gfc_simplify_merge): New.
3062         * intrinsic.h (gfc_simplify_merge): New prototype.
3063         * intrinsic.c (add_functions): Added simplification for MERGE.
3064
3065 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
3066
3067         PR fortran/38536
3068         * gfortran.h (gfc_is_data_pointer): Added prototype
3069         * resolve.c (gfc_iso_c_func_interface):
3070         Use gfc_is_data_pointer to test for pointer attribute.
3071         * dependency.c (gfc_is_data_pointer):
3072         Support pointer-returning functions.
3073
3074 2009-01-03  Daniel Franke  <franke.daniel@gmail.com>
3075
3076         * symbol.c (save_symbol): Don't SAVE function results.
3077
3078 2009-01-03  Paul Thomas  <pault@gcc.gnu.org>
3079
3080         PR fortran/38594
3081         * resolve.c (resolve_call): When searching for proper host
3082         association, use symtree rather than symbol.  For everything
3083         except generic subroutines, substitute the symtree in the call
3084         rather than the symbol.
3085
3086 \f
3087 Copyright (C) 2009 Free Software Foundation, Inc.
3088
3089 Copying and distribution of this file, with or without modification,
3090 are permitted in any medium without royalty provided the copyright
3091 notice and this notice are preserved.