OSDN Git Service

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