1 2009-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 * decl.c (variable_decl): Do not error on initialization within a
5 derived type specification of a pure procedure.
7 2009-11-24 Janus Weil <janus@gcc.gnu.org>
10 * resolve.c (resolve_actual_arglist): Make sure procedure pointer
11 actual arguments are resolved correctly.
12 (resolve_function): An EXPR_FUNCTION which is a procedure pointer
13 component, has already been resolved.
14 (resolve_fl_derived): Procedure pointer components should not be
17 2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
20 * trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
21 with error message if not constant.
22 * resolve.c (next_data_value): Delete check for constant.
24 2009-11-20 Janus Weil <janus@gcc.gnu.org>
26 * intrinsic.texi (C_F_PROCPOINTER): Remove obsolete comment.
28 2009-11-20 Paul Thomas <pault@gcc.gnu.org>
29 Janus Weil <janus@gcc.gnu.org>
32 * trans-expr.c (gfc_conv_procedure_call): If procedure pointer
33 component call, use the component's 'always_explicit' attr
36 2009-11-19 Janus Weil <janus@gcc.gnu.org>
38 * trans-expr.c (conv_isocbinding_procedure): New function.
39 (gfc_conv_procedure_call): Move ISO_C_BINDING stuff to
42 2009-11-19 Tobias Burnus <burnus@net-b.de>
44 * gfortran.texi (Interoperable Subroutines and Functions): Fix
47 2009-11-18 Janus Weil <janus@gcc.gnu.org>
50 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
51 dummies which are passed to C_F_PROCPOINTER.
53 2009-11-18 Alexandre Oliva <aoliva@redhat.com>
55 * module.c (mio_f2k_derived): Initialize op.
57 2009-11-15 Janus Weil <janus@gcc.gnu.org>
60 * match.c (gfc_match_call): If we're inside a function with derived
61 type return value, allow calling a TBP of the result variable.
63 2009-11-12 Tobias Burnus <burnus@net-b.de>
65 * intrinsic.texi (XOR): Refer also to .NEQV.
66 (ISO_FORTRAN_ENV): State which parameters are F2008.
68 2009-11-11 Janus Weil <janus@gcc.gnu.org>
71 * resolve.c (resolve_ref): Take care of procedure pointer component
74 2009-11-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
77 * resolve.c (is_illegal_recursion): Return false if sym is program.
79 2009-11-06 Steven G. Kargl <kargl@gcc.gnu.org>
81 * resolve.c (check_typebound_override): Remove duplicate "in" in error
84 2009-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
87 * fortran/trans-decl.c: Silence intent(out) warning for derived type
88 dummy arguments with default initialization.
90 2009-11-05 Janus Weil <janus@gcc.gnu.org>
93 * interface.c (matching_typebound_op,gfc_extend_assign): Handle CLASS
96 2009-11-05 Janus Weil <janus@gcc.gnu.org>
100 * resolve.c (resolve_function,resolve_call): Prevent abstract interfaces
101 from being called, but allow deferred type-bound procedures with
104 2009-11-04 Tobias Burnus <burnus@gcc.gnu.org>
105 Janus Weil <janus@gcc.gnu.org>
109 * interface.c (gfc_check_operator_interface): Handle CLASS arguments.
110 * resolve.c (resolve_allocate_expr): Handle allocatable components of
113 2009-11-04 Richard Guenther <rguenther@suse.de>
115 * options.c (gfc_post_options): Rely on common code processing
116 LTO options. Only enable -fwhole-file here.
118 2009-11-03 Tobias Burnus <burnus@net-b.de>
121 * trans-expr.c (gfc_conv_procedure_call): Fix presence check
122 for optional arguments.
124 2009-11-01 Tobias Burnus <burnus@net-b.de>
127 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
128 autodeallocated allocatable scalars at the end of scope.
129 (gfc_generate_function_code): Fix indention.
130 * trans-expr.c (gfc_conv_procedure_call): For allocatable
131 scalars, fix calling by reference and autodeallocating
132 of intent out variables.
134 2009-11-01 Tobias Burnus <burnus@net-b.de>
137 * trans-expr.c (gfc_conv_procedure_call): Deallocate intent-out
138 variables only when present. Remove unneccessary present check.
140 2009-10-29 Tobias Burnus <burnus@net-b.de>
143 * trans-expr.c (gfc_conv_procedure_call,gfc_conv_expr_reference):
144 Use for generic EXPR_FUNCTION the attributes of the specific
147 2009-10-29 Janne Blomqvist <jb@gcc.gnu.org>
150 * resolve.c (apply_default_init_local): Treat -fno-automatic as if
153 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
155 * trans-common.c (create_common): Set TREE_PUBLIC to false on
158 2009-10-26 Janus Weil <janus@gcc.gnu.org>
161 * trans.c (gfc_trans_code): Remove call to
162 'tree_annotate_all_with_location'. Location should already be set.
163 * trans-openmp.c (gfc_trans_omp_workshare): Ditto.
164 * trans-stmt.c (gfc_trans_allocate): Do correct data initialization for
165 CLASS variables with SOURCE tag, plus some cleanup.
167 2009-10-24 Janus Weil <janus@gcc.gnu.org>
168 Paul Thomas <pault@gcc.gnu.org>
171 * module.c (load_derived_extensions): Skip symbols which are not being
174 2009-10-24 Paul Thomas <pault@gcc.gnu.org>
177 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Stop'extent'
180 2009-10-23 Janus Weil <janus@gcc.gnu.org>
183 * trans-expr.c (gfc_trans_scalar_assign): Handle CLASS variables.
185 2009-10-23 Janus Weil <janus@gcc.gnu.org>
188 * match.c (conformable_arrays): Move to resolve.c.
189 (gfc_match_allocate): Don't resolve SOURCE expr yet, and move some
190 checks to resolve_allocate_expr.
191 * resolve.c (conformable_arrays): Moved here from match.c.
192 (resolve_allocate_expr): Moved some checks here from gfc_match_allocate.
193 (resolve_code): Resolve SOURCE tag for ALLOCATE expressions.
195 2009-10-22 Janus Weil <janus@gcc.gnu.org>
198 * resolve.c (resolve_codes): Don't clear 'cs_base' for BLOCK constructs,
199 to make sure labels are treated correctly.
200 * symbol.c (gfc_get_st_label): Create labels in the right namespace.
201 For BLOCK constructs go into the parent namespace.
203 2009-10-21 Janus Weil <janus@gcc.gnu.org>
207 * match.c (select_type_set_tmp): Set flavor for temporary.
208 * resolve.c (resolve_class_typebound_call): Correctly resolve actual
211 2009-10-20 Paul Thomas <pault@gcc.gnu.org>
214 * resolve.c (resolve_arg_exprs): New function.
215 (resolve_class_compcall): Call the above.
216 (resolve_class_typebound_call): The same.
218 2009-10-19 Janus Weil <janus@gcc.gnu.org>
221 * parse.c (parse_derived): Correctly set 'alloc_comp' and 'pointer_comp'
223 * trans-array.c (structure_alloc_comps): Handle deallocation and
224 nullification of allocatable scalar components.
225 * trans-decl.c (gfc_get_symbol_decl): Remember allocatable scalars for
226 automatic deallocation.
227 (gfc_trans_deferred_vars): Automatically deallocate allocatable scalars.
229 2009-10-19 Tobias Burnus <burnus@net-b.de>
230 Steven G. Kargl <kargl@gcc.gnu.org>
233 * symbol.c (gfc_undo_symbols): Add NULL check.
234 * match.c (gfc_match_equivalence): Add check for
237 2009-10-19 Richard Guenther <rguenther@suse.de>
240 * trans-expr.c (gfc_trans_scalar_assign): Do not call
243 2009-10-17 Janus Weil <janus@gcc.gnu.org>
244 Paul Thomas <pault@gcc.gnu.org>
247 * decl.c (gfc_match_data_decl): Add BT_CLASS for undefined type
248 and empty type errors.
249 * parse.c (gfc_build_block_ns): Only set recursive if parent ns
255 * gfortran.h : Add class_ok bitfield to symbol_attr.
256 * decl.c (build_sym): Set attr.class_ok if dummy, pointer or
258 (build_struct): Use gfc_try 't' to carry errors past the call
259 to encapsulate_class_symbol.
260 (attr_decl1): For a CLASS object, apply the new attribute to
262 * match.c (gfc_match_select_type): Set attr.class_ok for an
264 * resolve.c (resolve_fl_variable_derived): Check a CLASS object
265 is dummy, pointer or allocatable by testing the class_ok and
266 the use_assoc attribute.
268 2009-10-16 Janus Weil <janus@gcc.gnu.org>
271 * resolve.c (resolve_ordinary_assign): Reject intrinsic assignments
272 to polymorphic variables.
274 2009-10-16 Paul Thomas <pault@gcc.gnu.org>
278 * trans-expr.c (select_class_proc): Convert the expression for the
279 vindex, carried on the first member of the esym list.
280 * gfortran.h : Add the vindex field to the esym_list structure.
281 and eliminate the class_object field.
282 * resolve.c (check_class_members): Remove the setting of the
284 (vindex_expr): New function.
285 (get_class_from_expr): New function.
286 (resolve_class_compcall): Call the above to find the ultimate
287 class or derived component. If derived, do not generate the
288 esym list. Add and expression for the vindex to the esym list
289 by calling the above.
290 (resolve_class_typebound_call): The same.
292 2009-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
295 * intrinsic.texi: Explicitly state that ETIME and DTIME take
296 REAL(4) arguments. Fix nearby typographically errors where
297 /leq was used instead of \leq.
299 2009-10-13 Janus Weil <janus@gcc.gnu.org>
302 * decl.c (encapsulate_class_symbol): Add new component '$size'.
303 * resolve.c (resolve_allocate_expr): Move CLASS handling to
305 (resolve_class_assign): Replaced by gfc_trans_class_assign.
306 (resolve_code): Remove calls to resolve_class_assign.
307 * trans.c (gfc_trans_code): Use new function gfc_trans_class_assign.
308 * trans-expr.c (get_proc_ptr_comp): Fix a memory leak.
309 (gfc_conv_procedure_call): For CLASS dummies, set the
311 (gfc_trans_class_assign): New function, replacing resolve_class_assign.
312 * trans-stmt.h (gfc_trans_class_assign): New prototype.
313 * trans-stmt.c (gfc_trans_allocate): Use correct size when allocating
314 CLASS variables. Do proper initialization. Move some code here from
315 resolve_allocate_expr.
317 2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
320 * io.c (check_format): Fix locus for error messages and fix a comment.
322 2009-10-11 Paul Thomas <pault@gcc.gnu.org>
325 * decl.c (hash_value): New function.
326 (gfc_match_derived_decl): Call it.
328 2009-10-09 Janus Weil <janus@gcc.gnu.org>
331 * decl.c (build_struct): Bugfix for CLASS components.
333 2009-10-09 Tobias Burnus <burnus@net-b.de>
336 * decl.c (encapsulate_class_symbol): Save attr.abstract.
337 * resolve.c (resolve_allocate_expr): Reject class allocate
338 without typespec or source=.
339 * trans-stmt.c (gfc_trans_allocate): Change gfc_warning
340 into gfc_error for "not yet implemented".
342 2009-10-09 Janus Weil <janus@gcc.gnu.org>
345 * gfortran.h (gfc_select_type_stack): New struct, to be used as a stack
346 for SELECT TYPE statements.
347 (select_type_stack): New global variable.
348 (type_selector,select_type_tmp): Removed.
349 * match.c (type_selector,type_selector): Removed.
350 (select_type_stack): New variable, serving as a stack for
351 SELECT TYPE statements.
352 (select_type_push,select_type_set_tmp): New functions.
353 (gfc_match_select_type): Call select_type_push.
354 (gfc_match_type_is): Call select_type_set_tmp.
355 * parse.c (select_type_pop): New function.
356 (parse_select_type_block): Call select_type_pop.
357 * symbol.c (select_type_insert_tmp): New function.
358 (gfc_find_sym_tree): Call select_type_insert_tmp.
360 2009-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
362 * arith.c (arith_power): Use mpc_pow_z.
363 * gfortran.h (HAVE_mpc_pow_z): Define.
365 2009-10-07 Daniel Kraft <d@domob.eu>
368 * resolve.c (resolve_contained_fntype): Clarify error message for
369 invalid assumed-length character result on module procedures.
371 2009-10-07 Janus Weil <janus@gcc.gnu.org>
373 * expr.c (gfc_check_pointer_assign): Do the correct type checking when
374 CLASS variables are involved.
375 * match.c (gfc_match_select_type): Parse associate-name in SELECT TYPE
376 statements, and set up a local namespace for the SELECT TYPE block.
377 * parse.h (gfc_build_block_ns): New prototype.
378 * parse.c (parse_select_type_block): Return from local namespace to its
379 parent after SELECT TYPE block.
380 (gfc_build_block_ns): New function for setting up the local namespace
381 for a BLOCK construct.
382 (parse_block_construct): Use gfc_build_block_ns.
383 * resolve.c (resolve_select_type): Insert assignment for the selector
384 variable, in case an associate-name is given, and put the SELECT TYPE
385 statement inside a BLOCK.
386 (resolve_code): Call resolve_class_assign after checking the assignment.
387 * symbol.c (gfc_find_sym_tree): Moved some code here from
389 (gfc_get_ha_sym_tree): Moved some code to gfc_find_sym_tree.
391 2009-10-07 Paul Thomas <pault@gcc.gnu.org>
394 * resolve.c (check_class_members): Reset compcall.assign.
396 2009-10-05 Paul Thomas <pault@gcc.gnu.org>
398 * trans-expr.c (select_class_proc): New function.
399 (conv_function_val): Deal with class methods and call above.
400 * symbol.c (gfc_type_compatible): Treat case where both ts1 and
402 gfortran.h : Add structure gfc_class_esym_list and include in
403 the structure gfc_expr.
404 * module.c (load_derived_extensions): New function.
405 (read_module): Call above.
406 (write_dt_extensions): New function.
407 (write_derived_extensions): New function.
408 (write_module): Use the above.
409 * resolve.c (resolve_typebound_call): Add a function expression
410 for class methods. This carries the chain of symbols for the
411 dynamic dispatch in select_class_proc.
412 (resolve_compcall): Add second, boolean argument to indicate if
413 a function is being handled.
414 (check_members): New function.
415 (check_class_members): New function.
416 (resolve_class_compcall): New function.
417 (resolve_class_typebound_call): New function.
418 (gfc_resolve_expr): Call above for component calls..
420 2009-10-05 Daniel Kraft <d@domob.eu>
423 * trans-stmt.c (gfc_trans_goto): Ignore statement list on assigned goto
426 2009-10-03 Richard Guenther <rguenther@suse.de>
428 * options.c (gfc_post_options): Handle -flto and -fwhopr.
430 2009-10-02 Tobias Burnus <burnus@net-b.de>
433 * trans-decl.c (gfc_init_default_dt): Check for presence of
434 the argument only if it is optional or in entry master.
435 (init_intent_out_dt): Ditto; call gfc_init_default_dt
436 for all derived types with initializers.
438 2009-10-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
441 * gfortran.h (HAVE_mpc_arc): Define.
442 * simplify.c (gfc_simplify_acos): Handle complex acos.
443 (gfc_simplify_acosh): Likewise for acosh.
444 (gfc_simplify_asin): Likewise for asin.
445 (gfc_simplify_asinh): Likewise for asinh.
446 (gfc_simplify_atan): Likewise for atan.
447 (gfc_simplify_atanh): Likewise for atanh.
449 2009-10-01 Tobias Burnus <burnus@net-b.de>
452 * decl.c (do_parm): Call add_init_expr_to_sym.
454 2009-09-30 Dennis Wassel <dennis.wassel@gmail.com>
456 * gcc/fortran/trans-array.c (gfc_trans_array_bound_check): Improved
457 bounds checking error messages. (gfc_conv_array_ref): Likewise.
458 (gfc_conv_ss_startstride): Likewise.
460 2009-09-30 Janus Weil <janus@gcc.gnu.org>
462 * resolve.c (check_typebound_baseobject): Don't check for
463 abstract types for CLASS.
464 (resolve_class_assign): Adapt for RHS being a CLASS.
465 * trans-intrinsic.c (gfc_conv_associated): Add component ref
468 2009-09-30 Janus Weil <janus@gcc.gnu.org>
470 * check.c (gfc_check_same_type_as): New function for checking
471 SAME_TYPE_AS and EXTENDS_TYPE_OF.
472 * decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class
473 container, if the contained type has it. Add an initializer for the
475 (add_init_expr_to_sym): Handle BT_CLASS.
476 (vindex_counter): New counter for setting vindices.
477 (gfc_match_derived_decl): Set vindex for all derived types, not only
478 those which are being extended.
479 * expr.c (gfc_check_assign_symbol): Handle NULL initialization of class
481 * gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and
482 GFC_ISYM_EXTENDS_TYPE_OF.
483 (gfc_type_is_extensible): New prototype.
484 * intrinsic.h (gfc_check_same_type_as): New prototype.
485 * intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF.
486 * primary.c (gfc_expr_attr): Handle CLASS-valued functions.
487 * resolve.c (resolve_structure_cons): Handle BT_CLASS.
488 (type_is_extensible): Make non-static and rename to
489 'gfc_type_is_extensible.
490 (resolve_select_type): Renamed type_is_extensible.
491 (resolve_class_assign): Handle NULL pointers.
492 (resolve_fl_variable_derived): Renamed type_is_extensible.
493 (resolve_fl_derived): Ditto.
494 * trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL
495 initialization of class pointer components.
496 (gfc_conv_structure): Handle BT_CLASS.
497 * trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of):
499 (gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF.
501 2009-09-30 Janus Weil <janus@gcc.gnu.org>
503 * gfortran.h (type_selector, select_type_tmp): New global variables.
504 * match.c (type_selector, select_type_tmp): New global variables,
505 used for SELECT TYPE statements.
506 (gfc_match_select_type): Better error handling. Remember selector.
507 (gfc_match_type_is): Create temporary variable.
508 * module.c (ab_attribute): New value 'AB_IS_CLASS'.
509 (attr_bits): New string.
510 (mio_symbol_attribute): Handle 'is_class'.
511 * resolve.c (resolve_select_type): Insert pointer assignment statement,
512 to assign temporary to selector.
513 * symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary
514 in SELECT TYPE statements.
516 2009-09-30 Janus Weil <janus@gcc.gnu.org>
518 * dump-parse-tree.c (show_code_node): Renamed 'alloc_list'.
519 * gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'.
520 (gfc_expr_to_initialize): New prototype.
521 * match.c (alloc_opt_list): Correctly check type compatibility.
522 Renamed 'alloc_list'.
523 (dealloc_opt_list): Renamed 'alloc_list'.
524 * resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize'
525 and make it non-static.
526 (resolve_allocate_expr): Set vindex for CLASS variables correctly.
527 Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'.
528 (resolve_allocate_deallocate): Renamed 'alloc_list'.
529 (check_class_pointer_assign): Rename to 'resolve_class_assign'. Change
530 argument type. Adjust to work with ordinary assignments.
531 (resolve_code): Call 'resolve_class_assign' for ordinary assignments.
532 Renamed 'check_class_pointer_assign'.
533 * st.c (gfc_free_statement): Renamed 'alloc_list'.
534 * trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle
535 size determination and initialization of CLASS variables. Bugfix for
536 ALLOCATE statements with default initialization and SOURCE block.
537 (gfc_trans_deallocate): Renamed 'alloc_list'.
539 2009-09-30 Paul Thomas <pault@gcc.gnu.org>
541 * trans-expr.c (gfc_conv_procedure_call): Convert a derived
542 type actual to a class object if the formal argument is a
545 2009-09-30 Janus Weil <janus@gcc.gnu.org>
548 * decl.c (build_struct): Handle allocatable scalar components.
549 * expr.c (gfc_add_component_ref): Correctly set typespec of expression,
550 after inserting component reference.
551 * match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no
552 variables are being used uninitialized.
553 * primary.c (gfc_match_varspec): Handle CLASS array components.
554 * resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to
556 * trans-array.c (structure_alloc_comps,gfc_trans_deferred_array):
557 Handle allocatable scalar components.
558 * trans-expr.c (gfc_conv_component_ref): Ditto.
559 * trans-types.c (gfc_get_derived_type): Ditto.
561 2009-09-30 Janus Weil <janus@gcc.gnu.org>
563 * decl.c (encapsulate_class_symbol): Modify names of class container
564 components by prefixing with '$'.
565 (gfc_match_end): Handle COMP_SELECT_TYPE.
566 * expr.c (gfc_add_component_ref): Modify names of class container
567 components by prefixing with '$'.
568 * gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and
570 (gfc_case): New field 'ts'.
571 (gfc_exec_op): Add EXEC_SELECT_TYPE.
572 (gfc_type_is_extension_of): New prototype.
573 * match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is):
575 * match.c (match_derived_type_spec): New function.
576 (match_type_spec): Use 'match_derived_type_spec'.
577 (match_case_eos): Modify error message.
578 (gfc_match_select_type): New function.
579 (gfc_match_case): Modify error message.
580 (gfc_match_type_is): New function.
581 (gfc_match_class_is): Ditto.
582 * parse.h (gfc_compile_state): Add COMP_SELECT_TYPE.
583 * parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS
585 (next_statement): Handle ST_SELECT_TYPE.
586 (gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS.
587 (parse_select_type_block): New function.
588 (parse_executable): Handle ST_SELECT_TYPE.
589 * resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of
590 class container components by prefixing with '$'.
591 (resolve_allocate_expr): Ditto.
592 (resolve_select_type): New function.
593 (gfc_resolve_blocks): Handle EXEC_SELECT_TYPE.
594 (check_class_pointer_assign): Modify names of class container
595 components by prefixing with '$'.
596 (resolve_code): Ditto.
597 * st.c (gfc_free_statement): Ditto.
598 * symbol.c (gfc_type_is_extension_of): New function.
599 (gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix.
600 * trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE.
602 2009-09-30 Janus Weil <janus@gcc.gnu.org>
603 Paul Thomas <pault@gcc.gnu.org>
605 * check.c (gfc_check_move_alloc): Arguments don't have to be arrays.
606 The second argument needs to be type-compatible with the first (not the
607 other way around, which makes a difference for CLASS entities).
608 * decl.c (encapsulate_class_symbol): New function.
609 (build_sym,build_struct): Handle BT_CLASS, call
610 'encapsulate_class_symbol'.
611 (gfc_match_decl_type_spec): Remove warning, use BT_CLASS.
612 (gfc_match_derived_decl): Set vindex;
613 * expr.c (gfc_add_component_ref): New function.
614 (gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol):
616 * dump-parse-tree.c (show_symbol): Print vindex.
617 * gfortran.h (bt): New basic type BT_CLASS.
618 (symbol_attribute): New field 'is_class'.
619 (gfc_typespec): Remove field 'is_class'.
620 (gfc_symbol): New field 'vindex'.
621 (gfc_get_ultimate_derived_super_type): New prototype.
622 (gfc_add_component_ref): Ditto.
623 * interface.c (gfc_compare_derived_types): Pointer equality check
624 moved here from gfc_compare_types.
625 (gfc_compare_types): Handle BT_CLASS and use
627 * match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call):
629 * misc.c (gfc_clear_ts): Removed is_class.
630 (gfc_basic_typename,gfc_typename): Handle BT_CLASS.
631 * module.c (bt_types,mio_typespec): Handle BT_CLASS.
632 (mio_symbol): Handle vindex.
633 * primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS.
634 * resolve.c (find_array_spec,check_typebound_baseobject):
636 (resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp'
638 (resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS.
639 (check_class_pointer_assign): New function.
640 (resolve_code): Handle BT_CLASS, call check_class_pointer_assign.
641 (resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived,
642 resolve_fl_variable): Handle BT_CLASS.
643 (check_generic_tbp_ambiguity): Add special case.
644 (resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS.
645 * symbol.c (gfc_get_ultimate_derived_super_type): New function.
646 (gfc_type_compatible): Handle BT_CLASS.
647 * trans-expr.c (conv_parent_component_references): Handle CLASS
649 (gfc_conv_initializer): Handle BT_CLASS.
650 * trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type):
653 2009-09-29 Daniel Kraft <d@domob.eu>
656 * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
657 (struct gfc_namespace): Convert flags to bit-fields and add flag
658 `construct_entities' for use with BLOCK constructs.
659 (enum gfc_exec_code): Add EXEC_BLOCK.
660 (struct gfc_code): Add namespace field to union for EXEC_BLOCK.
661 * match.h (gfc_match_block): New prototype.
662 * parse.h (enum gfc_compile_state): Add COMP_BLOCK.
663 * trans.h (gfc_process_block_locals): New prototype.
664 (gfc_trans_deferred_vars): Made public, new prototype.
665 * trans-stmt.h (gfc_trans_block_construct): New prototype.
666 * decl.c (gfc_match_end): Handle END BLOCK correctly.
667 (gfc_match_intent): Error if inside of BLOCK.
668 (gfc_match_optional), (gfc_match_value): Ditto.
669 * match.c (gfc_match_block): New routine.
670 * parse.c (decode_statement): Handle BLOCK statement.
671 (case_exec_markers): Add ST_BLOCK.
672 (case_end): Add ST_END_BLOCK.
673 (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
674 (parse_spec): Check for statements not allowed inside of BLOCK.
675 (parse_block_construct): New routine.
676 (parse_executable): Parse BLOCKs.
677 (parse_progunit): Disallow CONTAINS in BLOCK constructs.
678 * resolve.c (is_illegal_recursion): Find real container procedure and
679 don't get confused by BLOCK constructs.
680 (resolve_block_construct): New routine.
681 (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
682 * st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
683 * trans-decl.c (saved_local_decls): New static variable.
684 (add_decl_as_local): New routine.
685 (gfc_finish_var_decl): Add variable as local if inside BLOCK.
686 (gfc_trans_deferred_vars): Make public.
687 (gfc_process_block_locals): New routine.
688 * trans-stmt.c (gfc_trans_block_construct): New routine.
689 * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.
691 2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
694 * io.c (format_token): Add enumerators for rounding format specifiers.
695 (format_lex): Tokenize the rounding format specifiers.
696 (gfc_match_open): Enable rounding modes in OPEN statement.
698 2009-09-28 Richard Henderson <rth@redhat.com>
700 * f95-lang.c (gfc_init_builtin_functions): Update call to
701 build_common_builtin_nodes.
703 2009-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
705 * simplify.c (gfc_simplify_acos, gfc_simplify_acosh,
706 gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan,
707 gfc_simplify_atanh): Fix error message.
709 2009-09-24 Steven G. Kargl <kargl@gcc.gnu.org>
712 * error.c(gfc_warning_now): Move warnings_are_errors test to
713 after actual emitting of the warning.
714 * parse.c (next_free): Improve error locus printing.
715 (next_fixed): Change gfc_warn to gfc_warning_now, and improve
718 2009-09-16 Michael Matz <matz@suse.de>
721 * trans.h (struct lang_type): Remove nontarget_type member.
722 * trans.c (gfc_add_modify): Don't access it.
723 * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it,
724 instead set DECL_RESTRICTED_P on affected decls.
726 2009-09-14 Richard Henderson <rth@redhat.com>
728 * f95-lang.c (gfc_init_builtin_functions): Update call to
729 build_common_builtin_nodes.
730 (gfc_maybe_initialize_eh): Don't call
731 default_init_unwind_resume_libfunc.
733 2009-09-13 Richard Guenther <rguenther@suse.de>
734 Rafael Avila de Espindola <espindola@google.com>
736 * f95-lang.c (gfc_maybe_initialize_eh): Do not init
737 eh_personality_libfunc.
739 2009-09-11 Janus Weil <janus@gcc.gnu.org>
742 * resolve.c (resolve_ordinary_assign): Don't call resolve_code,
743 to avoid that subsequent codes are resolved more than once.
744 (resolve_code): Make sure that type-bound assignment operators are
748 2009-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
751 * fortran/decl.c(gfc_match_modproc): Check that module procedures
752 from a module can USEd in module procedure statements in other
753 program units. Update locus for better error message display.
754 Detect intrinsic procedures in module procedure statements.
756 2009-09-09 Richard Guenther <rguenther@suse.de>
759 * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
760 left 'tmp' unused in derived type assignment.
762 2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
765 * resolve_c (resolve_allocate_deallocate): Complain
766 if stat or errmsg varaible is an array.
768 2009-09-05 Paul Thomas <pault@gcc.gnu.org>
771 * primary.c (gfc_match_varspec): Do not look for typebound
772 procedures unless the derived type has a f2k_derived namespace.
774 2009-09-03 Diego Novillo <dnovillo@google.com>
776 * f95-lang.c (lang_hooks): Remove const qualifier.
778 2009-09-01 Richard Guenther <rguenther@suse.de>
780 * f95-lang.c (gfc_mark_addressable): Remove.
781 (LANG_HOOKS_MARK_ADDRESSABLE): Likewise.
783 2009-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
786 * scanner.c (next_char): Fix typo in comment.
787 (gfc_get_char_literal): Warn if truncate flag is set for both fixed and
788 free form source, adjusting error locus as needed.
789 * parse.c (next_fixed): Clear the truncate flag.
790 (next_statement): Remove truncate warning.
792 2009-08-31 Janus Weil <janus@gcc.gnu.org>
793 Paul Thomas <pault@gcc.gnu.org>
796 * array.c (gfc_match_array_constructor): Rename gfc_match_type_spec.
797 * decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec,
798 and reject CLASS with -std=f95.
799 (gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix,
800 match_procedure_interface): Rename gfc_match_type_spec.
801 * gfortran.h (gfc_type_compatible): Add prototype.
802 * match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec.
803 * match.c (match_intrinsic_typespec): Rename to match_type_spec, and
804 add handling of derived types.
805 (gfc_match_allocate): Rename match_intrinsic_typespec and check
806 type compatibility of derived types.
807 * symbol.c (gfc_type_compatible): New function to check if two types
810 2009-08-31 Janus Weil <janus@gcc.gnu.org>
813 * check.c (gfc_check_allocated): Implement allocatable scalars.
814 * resolve.c (resolve_allocate_expr,resolve_fl_var_and_proc): Ditto.
815 * trans-intrinsic.c (gfc_conv_allocated): Ditto.
817 2009-08-30 Daniel Kraft <d@domob.eu>
820 * dump-parse-tree.c (show_typebound_proc): Renamed from `show_typebound'
821 and accept gfc_typebound_proc and name instead of the symtree, needed
822 for intrinsic operator output.
823 (show_typebound_symtree): New method calling `show_typebound_proc'.
824 (show_f2k_derived): Output type-bound operators also.
825 (show_symbol): Moved output of `Procedure bindings:' label to
827 * gfortran.texi (Fortran 2003 status): Mention support of
828 array-constructors with explicit type specification, type-bound
829 procedures/operators, type extension, ABSTRACT types and DEFERRED.
830 Link to Fortran 2003 wiki page.
831 (Fortran 2008 status): Fix typo. Link to Fortran 2008 wiki page.
832 * gfc-internals.texi (Type-bound Procedures): Document the new
833 members/attributes of gfc_expr.value.compcall used for type-bound
835 (Type-bound Operators): New section documenting their internals.
837 2009-08-27 Janus Weil <janus@gcc.gnu.org>
840 * expr.c (gfc_check_pointer_assign): Enable interface check for
841 pointer assignments involving procedure pointer components.
842 * gfortran.h (gfc_compare_interfaces): Modified prototype.
843 * interface.c (gfc_compare_interfaces): Add argument 'name2', to be
844 used instead of s2->name. Don't rely on the proc_pointer attribute,
845 but instead on the flags handed to this function.
846 (check_interface1,compare_parameter): Add argument for
847 gfc_compare_interfaces.
848 * resolve.c (check_generic_tbp_ambiguity): Ditto.
850 2009-08-27 Daniel Kraft <d@domob.eu>
853 * gfortran.h (gfc_expr): Optionally store base-object in compcall value
854 and add a new flag to distinguish assign-calls generated.
855 (gfc_find_typebound_proc): Add locus argument.
856 (gfc_find_typebound_user_op), (gfc_find_typebound_intrinsic_op): Ditto.
857 (gfc_extend_expr): Return if failure was by a real error.
858 * interface.c (matching_typebound_op): New routine.
859 (build_compcall_for_operator): New routine.
860 (gfc_extend_expr): Handle type-bound operators, some clean-up and
861 return if failure was by a real error or just by not finding an
862 appropriate operator definition.
863 (gfc_extend_assign): Handle type-bound assignments.
864 * module.c (MOD_VERSION): Incremented.
865 (mio_intrinsic_op): New routine.
866 (mio_full_typebound_tree): New routine to make typebound-procedures IO
867 code reusable for type-bound user operators.
868 (mio_f2k_derived): IO of type-bound operators.
869 * primary.c (gfc_match_varspec): Initialize new fields in gfc_expr and
870 pass locus to gfc_find_typebound_proc.
871 * resolve.c (resolve_operator): Only output error about no matching
872 interface if gfc_extend_expr did not already fail with an error.
873 (extract_compcall_passed_object): Use specified base-object if present.
874 (update_compcall_arglist): Handle ignore_pass field.
875 (resolve_ordinary_assign): Update to handle extended code for
876 type-bound assignments, too.
877 (resolve_code): Handle EXEC_ASSIGN_CALL statement code.
878 (resolve_tb_generic_targets): Pass locus to gfc_find_typebound_proc.
879 (resolve_typebound_generic), (resolve_typebound_procedure): Ditto.
880 (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): Ditto.
881 (ensure_not_abstract_walker), (resolve_fl_derived): Ditto.
882 (resolve_typebound_procedures): Remove not-implemented error.
883 (resolve_typebound_call): Handle assign-call flag.
884 * symbol.c (find_typebound_proc_uop): New argument to pass locus for
885 error message about PRIVATE, verify that a found procedure is not marked
887 (gfc_find_typebound_intrinsic_op): Ditto.
888 (gfc_find_typebound_proc), (gfc_find_typebound_user_op): New locus arg.
890 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net>
893 * io.c: reverted previous patch.
895 2009-08-25 Janne Blomqvist <jb@gcc.gnu.org>
897 * gfortran.texi: Fix ENCODE example.
899 2009-08-25 Janus Weil <janus@gcc.gnu.org>
902 * primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for
903 calls to procedure pointer components, other references to procedure
904 pointer components are EXPR_VARIABLE.
905 * resolve.c (resolve_actual_arglist): Bugfix (there can be calls without
907 * trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp',
908 removed argument 'se' and made static. Avoid inserting a temporary
909 variable for calling the PPC.
910 (conv_function_val): Renamed gfc_get_proc_ptr_comp.
911 (gfc_conv_procedure_call): Distinguish functions returning a procedure
912 pointer from calls to a procedure pointer. Distinguish calls to
913 procedure pointer components from procedure pointer components as
915 * trans-stmt.h (gfc_get_proc_ptr_comp): Make it static.
917 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
920 * io.c (check_format): Fix to not error on slash after P. Fix some
923 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
926 * io.c (check_format): Fix to not error on right paren after P.
928 2009-08-24 Aldy Hernandez <aldyh@redhat.com>
931 * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
932 (transfer_array_desc): Same.
934 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
937 * io.c (check_format): Add checks for comma and the allowed
938 format specifiers after the 'P' specifier. Fix typo in error message
941 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
944 * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES.
945 (format_lex): Likewise.
946 (token_to_string): New function.
947 (check_format): Use the new tokens and the new function. Add
948 check for positive width.
950 2009-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
952 * fortran/decl.c: Disallow procedure pointers with -std=f95.
954 2009-08-22 Steven K. kargl <kargl@gcc.gnu.org>
955 Paul Thomas <pault@gcc.gnu.org>
957 * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec,
959 * fortran/gfortran.h: Add *expr3 entity to gfc_code. Add prototype
960 for gfc_match_char_spec.
961 * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE=
963 * fortran/match.c (match_intrinsic_typespec): New function to match
964 F2003 intrinsic-type-spec.
965 (conformable_arrays): New function. Check SOURCE= and
966 allocation-object are conformable.
967 (gfc_match_allocate): Use new functions. Match SOURCE= tag.
969 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net>
972 * io.c : added variable to store original len of fmt
973 * io.c (check_format): Consume H items using next_char
974 in both modes to handle consecutive single quotes.
975 Test for extra characters in fmt, issue warning.
977 2009-08-21 Janus Weil <janus@gcc.gnu.org>
980 * primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
981 (gfc_expr_attr): Use gfc_variable_attr for procedure pointer components.
982 * resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
984 * trans-expr.c (gfc_conv_component_ref): Ditto.
985 (gfc_conv_variable): Ditto.
986 (gfc_conv_procedure_call): Ditto.
987 (gfc_trans_pointer_assignment): Ditto.
988 * trans-types.c (gfc_get_derived_type): Ditto.
990 2009-08-20 Tobias Schlüter <tobi@gcc.gnu.org>
992 * trans-stmt.c (gfc_trans_do): Add a few missing folds.
994 2009-08-20 Michael Matz <matz@suse.de>
997 * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
1000 2009-08-20 Janus Weil <janus@gcc.gnu.org>
1003 * resolve.c (resolve_symbol): Don't resolve formal_ns of intrinsic
1006 2009-08-18 Michael Matz <matz@suse.de>
1008 * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early,
1009 change order of length calculation to (end - start) + 1.
1010 (gfc_get_interface_mapping_array): Adjust call to
1011 gfc_get_nodesc_array_type.
1012 * trans-array.c (gfc_trans_create_temp_array,
1013 gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto.
1014 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
1015 * trans.c (gfc_add_modify): Assignment between base type and nontarget
1016 type are equal enough.
1017 (gfc_call_malloc): Use prvoid_type_node for return value of
1019 (gfc_allocate_with_status): Ditto.
1020 * trans-types.c (gfc_array_descriptor_base): Double size of this array.
1021 (gfc_init_types): Build prvoid_type_node.
1022 (gfc_build_array_type): New bool parameter "restricted".
1023 (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers,
1025 (gfc_get_array_descriptor_base): Ditto.
1026 (gfc_get_array_type_bounds): Ditto.
1027 (gfc_sym_type): Use symbol attributes to feed calls to above functions.
1028 (gfc_get_derived_type): Ditto.
1029 * trans.h (struct lang_type): Add nontarget_type member.
1030 * trans-types.h (prvoid_type_node): Declare.
1031 (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new
1033 * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be
1034 aliased a type with a different alias set than the base type.
1035 (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type.
1037 2009-08-18 Janus Weil <janus@gcc.gnu.org>
1038 Paul Thomas <pault@gcc.gnu.org>
1041 * trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl
1042 using the interface symbol. Character types are returned by reference.
1043 (gfc_get_derived_type): Prevent infinite recursion loop
1044 if a PPC has a derived-type formal arg.
1046 2008-08-17 Paul Thomas <pault@gcc.gnu.org>
1049 * trans-decl.c (gfc_trans_use_stmts): Keep going through use
1050 list if symbol is not use associated.
1052 2009-08-17 Daniel Kraft <d@domob.eu>
1055 * resolve.c (get_checked_tb_operator_target): New routine to do checks
1056 on type-bound operators in common between intrinsic and user operators.
1057 (resolve_typebound_intrinsic_op): Call it.
1058 (resolve_typebound_user_op): Ditto.
1060 2009-08-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1063 * scanner.c (gfc_next_char_literal): Add comment to improve
1065 * io.c (enum format_token): Add FMT_STAR. (format_lex): Add case
1066 for '*'. (check_format): Check for left paren after '*'. Change
1067 format checks to use %L to improve format string error locus.
1069 2009-08-17 Janus Weil <janus@gcc.gnu.org>
1072 * array.c (gfc_resolve_character_array_constructor): Add NULL argument
1074 * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1075 gfc_match_implicit): Ditto.
1076 * expr.c (simplify_const_ref): Fix memory leak.
1077 (gfc_simplify_expr): Add NULL argument to gfc_new_charlen.
1078 * gfortran.h (gfc_new_charlen): Modified prototype.
1079 * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Add NULL
1080 argument to gfc_new_charlen.
1081 * module.c (mio_charlen): Ditto.
1082 * resolve.c (gfc_resolve_substring_charlen,
1083 gfc_resolve_character_operator,fixup_charlen): Ditto.
1084 (resolve_fl_derived,resolve_symbol): Add argument to gfc_charlen.
1085 * symbol.c (gfc_new_charlen): Add argument 'old_cl' (to make a copy of
1086 an existing charlen).
1087 (gfc_set_default_type,generate_isocbinding_symbol): Fix memory leak.
1088 (gfc_copy_formal_args_intr): Add NULL argument to gfc_new_charlen.
1089 * trans-decl.c (create_function_arglist): Fix memory leak.
1091 2009-08-17 Richard Guenther <rguenther@suse.de>
1093 * trans-expr.c (gfc_trans_scalar_assign): Replace hack with
1096 2009-08-15 Tobias Burnus <burnus@net-b.de>
1099 * gfortranspec.c (lookup_option): Remove gfortran-specific
1100 version of -dumpversion.
1102 2009-08-14 Janus Weil <janus@gcc.gnu.org>
1105 * resolve.c (resolve_structure_cons): Make sure that ts.u.derived is
1106 only used if type is BT_DERIVED.
1108 2009-08-13 Janus Weil <janus@gcc.gnu.org>
1111 * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union.
1112 * decl.c (build_struct): Make sure 'cl' is only used
1113 if type is BT_CHARACTER.
1114 * symbol.c (gfc_set_default_type): Ditto.
1115 * resolve.c (resolve_symbol, resolve_fl_derived): Ditto.
1116 (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived'
1117 is only used if type is BT_DERIVED.
1118 * trans-io.c (transfer_expr): Make sure 'derived' is only used if type
1119 is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR).
1120 * array.c: Mechanical replacements to accomodate union in gfc_typespec.
1124 * dump-parse-tree.c: Ditto.
1126 * interface.c: Ditto.
1127 * iresolve.c: Ditto.
1135 * simplify.c: Ditto.
1137 * target-memory.c: Ditto.
1138 * trans-array.c: Ditto.
1139 * trans-common.c: Ditto.
1140 * trans-const.c: Ditto.
1141 * trans-decl.c: Ditto.
1142 * trans-expr.c: Ditto.
1143 * trans-intrinsic.c: Ditto.
1144 * trans-io.c: Ditto.
1145 * trans-stmt.c: Ditto.
1146 * trans-types.c: Ditto.
1148 2009-08-13 Janus Weil <janus@gcc.gnu.org>
1151 * resolve.c (resolve_symbol): Move some checking code to
1152 resolve_intrinsic, and call this from here.
1153 (resolve_intrinsic): Some checking code moved here from resolve_symbol.
1154 Make sure each intrinsic is only resolved once.
1156 2009-08-12 Tobias Burnus <burnus@net-b.de>
1159 * symbol.c (gfc_copy_attr): Merge bits instead of replace
1160 bits in gfc_copy_attr.
1161 * gfc_check_pointer_assign (gfc_check_pointer_assign):
1162 Initialize ext_attr bits by zero.
1164 2009-08-11 Richard Guenther <rguenther@suse.de>
1166 * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
1168 2009-08-11 Janus Weil <janus@gcc.gnu.org>
1171 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
1172 components as actual arguments.
1174 2009-08-10 Daniel Kraft <d@domob.eu>
1177 * gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op.
1178 (gfc_find_typebound_user_op): New routine.
1179 (gfc_find_typebound_intrinsic_op): Ditto.
1180 (gfc_check_operator_interface): Now public routine.
1181 * decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=).
1182 * interface.c (check_operator_interface): Made public, renamed to
1183 `gfc_check_operator_interface' accordingly and hand in the interface
1184 as gfc_symbol rather than gfc_interface so it is useful for type-bound
1185 operators, too. Return boolean result.
1186 (gfc_check_interfaces): Adapt call to `check_operator_interface'.
1187 * symbol.c (gfc_get_namespace): Initialize new field `tb_op'.
1188 (gfc_free_namespace): Free `tb_uop_root'-based tree.
1189 (find_typebound_proc_uop): New helper function.
1190 (gfc_find_typebound_proc): Use it.
1191 (gfc_find_typebound_user_op): New method.
1192 (gfc_find_typebound_intrinsic_op): Ditto.
1193 * resolve.c (resolve_tb_generic_targets): New helper function.
1194 (resolve_typebound_generic): Use it.
1195 (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New.
1196 (resolve_typebound_procedures): Resolve operators, too.
1197 (check_uop_procedure): New, code from gfc_resolve_uops.
1198 (gfc_resolve_uops): Moved main code to new `check_uop_procedure'.
1200 2009-08-10 Janus Weil <janus@gcc.gnu.org>
1203 * decl.c (gfc_match_type_spec): Match CLASS statement and warn about
1204 missing polymorphism.
1205 * gfortran.h (gfc_typespec): Add field 'is_class'.
1206 * misc.c (gfc_clear_ts): Initialize 'is_class' to zero.
1207 * resolve.c (type_is_extensible): New function to check if a derived
1209 (resolve_fl_variable_derived): Add error checks for CLASS variables.
1210 (resolve_typebound_procedure): Disallow non-polymorphic passed-object
1211 dummy arguments, turning warning into error.
1212 (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic
1213 passed-object dummy arguments for procedure pointer components,
1214 turning warning into error. Add error check for CLASS components.
1216 2009-08-05 Tobias Burnus <burnus@net-b.de>
1219 * gfortran.h (ext_attr_id_t): Add typedef for this enum.
1220 (gfc_add_ext_attribute): Use it.
1221 * decl.c (gfc_match_gcc_attributes): Ditto.
1222 * expr.c (gfc_check_pointer_assign): Ditto.
1223 * symbol.c (gfc_add_ext_attribute): Ditto.
1224 (gfc_copy_attr): Copy also ext_attr.
1225 * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
1226 * module.c (mio_symbol_attribute): Save ext_attr in the mod file.
1228 2009-08-05 Tobias Burnus <burnus@net-b.de>
1232 2009-08-04 Tobias Burnus <burnus@net-b.de>
1235 * trans-types.c (gfc_get_function_type): Fix typelist of
1236 functions without argument.
1238 2009-08-05 Paul Thomas <pault@gcc.gnu.org>
1241 * iresolve.c (gfc_resolve_transfer): Correct error in 'mold'
1242 character length for case where length expresson is NULL.
1244 2009-08-04 Tobias Burnus <burnus@net-b.de>
1247 * trans-types.c (gfc_get_function_type): Fix typelist of
1248 functions without argument.
1250 2009-08-04 Paul Thomas <pault@gcc.gnu.org>
1253 * decl.c (add_init_expr_to_sym): Character symbols can only be
1254 initialized with character expressions.
1256 2009-08-02 Janus Weil <janus@gcc.gnu.org>
1259 * decl.c (match_char_length): Warn about old-style character length
1261 * match.c (match_arithmetic_if,gfc_match_if): Modify warning message
1263 (gfc_match_goto): Warn about computed gotos.
1264 (gfc_match_return): Warn about alternate return.
1265 (gfc_match_st_function): Warn about statement functions.
1266 * resolve.c (resolve_fl_procedure): Modify warning message for
1267 assumed-length character functions.
1269 2009-08-01 Paul Thomas <pault@gcc.gnu.org>
1272 * error.c : Add static flag 'warnings_not_errors'.
1273 (gfc_error): If 'warnings_not_errors' is set, branch to code
1275 (gfc_clear_error): Reset 'warnings_not_errors'.
1276 (gfc_errors_to_warnings): New function.
1277 * options.c (gfc_post_options): If pedantic and flag_whole_file
1278 change the latter to a value of 2.
1279 * parse.c (parse_module): Add module namespace to gsymbol.
1280 (resolve_all_program_units): New function.
1281 (clean_up_modules): New function.
1282 (translate_all_program_units): New function.
1283 (gfc_parse_file): If whole_file, do not clean up module right
1284 away and add derived types to namespace derived types. In
1285 addition, call the three new functions above.
1286 * resolve.c (not_in_recursive): New function.
1287 (not_entry_self_reference): New function.
1288 (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN,
1289 procedure must not be in the course of being resolved and
1290 must return false for the two new functions. Pack away the
1291 current derived type list before calling gfc_resolve for the
1292 gsymbol namespace. It is unconditionally an error if the ranks
1293 of the reference and ther procedure do not match. Convert
1294 errors to warnings during call to gfc_procedure_use if not
1296 (gfc_resolve): Set namespace resolved flag to -1 during
1297 resolution and store current cs_base.
1298 * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation
1299 substitute a use associated variable, if it is available in a
1301 (gfc_get_extern_function_decl): If the procedure is use assoc,
1302 do not attempt to find it in a gsymbol because it could be an
1303 interface. If the symbol exists in a module namespace, return
1305 * trans-expr.c (gfc_trans_scalar_assign): If a derived type
1306 assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs.
1307 * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a
1308 boolean argument. Copy component backend_decls directly if the
1309 components are derived types and from_gsym is true.
1310 (gfc_get_derived_type): If whole_file copy the derived type from
1311 the module if it is use associated, otherwise, if can be found
1312 in another gsymbol namespace, use the existing derived type as
1313 the TYPE_CANONICAL and build normally.
1314 * gfortran.h : Add derived_types and resolved fields to
1315 gfc_namespace. Include prototype for gfc_errors_to_warnings.
1317 2009-07-29 Tobias Burnus <burnus@net-b.de>
1320 * trans-types.c (gfc_get_function_type): Do not add hidden
1321 string-length argument for BIND(C) procedures.
1322 * trans-decl.c (create_function_arglist): Skip over nonexisting
1323 string-length arguments for BIND(C) procedures.
1325 2009-07-28 Jakub Jelinek <jakub@redhat.com>
1328 * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of
1329 gfc_error to diagnose invalid COLLAPSE arguments.
1331 2009-07-28 Janus Weil <janus@gcc.gnu.org>
1334 * trans-types.c (gfc_get_ppc_type): For derived types, directly use the
1335 backend_decl, instead of calling gfc_typenode_for_spec, to avoid
1337 (gfc_get_derived_type): Correctly handle PPCs returning derived types,
1338 avoiding infinite recursion.
1340 2009-07-27 Janus Weil <janus@gcc.gnu.org>
1343 * interface.c (gfc_compare_interfaces): Call 'count_types_test' before
1344 'generic_correspondence', and only if checking a generic interface.
1346 2009-07-27 Tobias Burnus <burnus@net-b.de>
1349 * resolve.c (resolve_symbol): Do not initialize pointer derived-types.
1350 * trans-decl.c (init_intent_out_dt): Ditto.
1351 (generate_local_decl): No need to set attr.referenced for DT pointers.
1353 2009-07-26 Tobias Burnus <burnus@net-b.de>
1356 * intrinsic.c (make_generic): Remove assert as "atan" can be
1357 both ISYM_ATAN and ISYM_ATAN2.
1358 (add_functions): Add two-argument variant of ATAN.
1359 * intrinsic.h (gfc_check_atan_2): Add check for it.
1360 * intrinsic.texi (ATAN2): Correct and enhance description.
1361 (ATAN): Describe two-argument variant of ATAN.
1363 2009-07-25 Tobias Burnus <burnus@net-b.de>
1364 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1367 * intrinsic.c (add_functions): Support complex arguments for
1368 acos,acosh,asin,asinh,atan,atanh.
1369 * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support
1371 * simplify.c (gfc_simplify_acos,gfc_simplify_acosh,
1372 gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan,
1373 gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh,
1374 gfc_simplify_acosh,gfc_simplify_atanh): Support
1377 2009-07-25 Richard Guenther <rguenther@suse.de>
1380 * trans-types.c (gfc_get_array_type_bounds): Use
1381 build_distinct_type_copy with a proper TYPE_CANONICAL and
1382 re-use the type-decl of the original type.
1383 * trans-decl.c (build_entry_thunks): Signal cgraph we may not
1385 (create_main_function): Likewise.
1386 (gfc_generate_function_code): Likewise.
1387 * trans-expr.c (gfc_trans_subcomponent_assign): Do not use
1388 fold_convert on record types.
1390 2009-07-25 Janus Weil <janus@gcc.gnu.org>
1393 * decl.c (match_ppc_decl): Implement the PASS attribute for procedure
1395 (match_binding_attributes): Ditto.
1396 * gfortran.h (gfc_component): Add member 'tb'.
1397 (gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const.
1398 * module.c (MOD_VERSION): Bump module version.
1399 (binding_ppc): New string constants.
1400 (mio_component): Only use formal args if component is a procedure
1401 pointer and add 'tb' member.
1402 (mio_typebound_proc): Include pass_arg and take care of procedure
1404 * resolve.c (update_arglist_pass): Add argument 'name' and take care of
1406 (extract_ppc_passed_object): New function, analogous to
1407 extract_compcall_passed_object, but for procedure pointer components.
1408 (update_ppc_arglist): New function, analogous to
1409 update_compcall_arglist, but for procedure pointer components.
1410 (resolve_typebound_generic_call): Added argument to update_arglist_pass.
1411 (resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute.
1412 (resolve_fl_derived): Check the PASS argument for procedure pointer
1414 * symbol.c (verify_bind_c_derived_type): Reject procedure pointer
1415 components in BIND(C) types.
1417 2009-07-24 Janus Weil <janus@gcc.gnu.org>
1420 * array.c (gfc_resolve_character_array_constructor): Use new function
1422 * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1423 gfc_match_implicit): Ditto.
1424 * expr.c (gfc_simplify_expr): Ditto.
1425 * gfortran.h (gfc_new_charlen): New prototype.
1426 * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
1427 function gfc_new_charlen.
1428 * module.c (mio_charlen): Ditto.
1429 * resolve.c (gfc_resolve_substring_charlen,
1430 gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
1431 resolve_symbol): Ditto.
1432 * symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
1433 structure and add it to a namespace.
1434 (gfc_copy_formal_args_intr): Make sure ts.cl is present
1435 for CHARACTER variables.
1437 2009-07-24 Jakub Jelinek <jakub@redhat.com>
1441 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
1442 gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
1444 * trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
1445 * trans-array.h (gfc_trans_scalarized_loop_end): New prototype.
1447 2009-07-23 Jakub Jelinek <jakub@redhat.com>
1450 * io.c (gfc_resolve_dt): Add LOC argument. Fail if
1451 dt->io_unit is NULL. Return FAILURE after issuing error about
1452 negative UNIT number.
1453 (match_io_element): Don't segfault if current_dt->io_unit is NULL.
1454 * gfortran.h (gfc_resolve_dt): Adjust prototype.
1455 * resolve.c (resolve_code): Adjust caller.
1457 2009-07-22 Paul Thomas <pault@gcc.gnu.org>
1460 * trans-decl.c (generate_local_decl): Unreferenced result
1461 variables with allocatable components should be treated like
1462 INTENT_OUT dummy variables.
1464 2009-07-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1466 * trans.h (gfc_set_decl_assembler_name): New prototype.
1467 * trans-decl.c (gfc_set_decl_assembler_name): New function.
1468 (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1469 build_function_decl): Use gfc_set_decl_assembler_name instead of
1470 SET_DECL_ASSEMBLER_NAME.
1471 * trans-common.c (build_common_decl): Use
1472 gfc_set_decl_assembler_name instead of SET_DECL_ASSEMBLER_NAME.
1474 2009-07-21 Richard Guenther <rguenther@suse.de>
1477 * trans-decl.c (gfc_get_extern_function_decl): Do not set
1478 DECL_IS_MALLOC for pointer valued functions.
1479 (build_function_decl): The same.
1481 2009-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
1484 * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that
1485 the optional second argument isn't of COMPLEX type.
1487 2009-07-17 Richard Guenther <rguenther@suse.de>
1490 * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
1491 * trans-decl.c (gfc_gimplify_function): Remove.
1492 (build_entry_thunks): Do not gimplify here.
1493 (create_main_function): Likewise.
1494 (gfc_generate_function_code): Likewise.
1496 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
1497 Manuel López-Ibáñez <manu@gcc.gnu.org>
1500 * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
1501 trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
1502 argument to fold_{unary,binary,ternary}, fold_build[123],
1503 build_call_expr, build_size_arg, build_fold_addr_expr,
1504 build_call_array, non_lvalue, size_diffop,
1505 fold_build1_initializer, fold_build2_initializer,
1506 fold_build3_initializer, fold_build_call_array,
1507 fold_build_call_array_initializer, fold_single_bit_test,
1508 omit_one_operand, omit_two_operands, invert_truthvalue,
1509 fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
1510 combine_comparisons, fold_builtin_*, fold_call_expr,
1511 build_range_check, maybe_fold_offset_to_address, round_up,
1514 2009-07-15 Janus Weil <janus@gcc.gnu.org>
1517 * resolve.c (resolve_symbol): Don't resolve the formal namespace of a
1518 contained procedure.
1520 2009-07-14 Taras Glek <tglek@mozilla.com>
1521 Rafael Espindola <espindola@google.com>
1523 * Make-lang.in (fortran.install-plugin): New target for
1524 installing plugin headers.
1526 2009-07-13 H.J. Lu <hongjiu.lu@intel.com>
1528 * module.c (mio_symbol): Remove the unused variable, formal.
1530 2009-07-13 Janus Weil <janus@gcc.gnu.org>
1533 * module.c (mio_symbol): If the symbol has formal arguments,
1534 the formal namespace will be present.
1535 * resolve.c (resolve_actual_arglist): Correctly handle 'called'
1536 procedure pointer components as actual arguments.
1537 (resolve_fl_derived,resolve_symbol): Make sure the formal namespace
1539 * trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal
1540 arguments of procedure pointer components.
1542 2009-07-12 Tobias Burnus <burnus@net-b.de>
1543 Philippe Marguinaud <philippe.marguinaud@meteo.fr>
1546 * primary.c (match_charkind_name): Fix condition for $ matching.
1549 * libgfortran.h: Typedef the GFC_DTYPE_* enum.
1551 2009-07-11 Tobias Burnus <burnus@net-b.de>
1554 * check.c (gfc_check_fn_rc2008): New function.
1555 * intrinsic.h (gfc_check_fn_rc2008): New prototype.
1556 * intrinsic.c (add_functions): Add complex tan, cosh, sinh,
1559 2009-07-10 Paul Thomas <pault@gcc.gnu.org>
1562 * primary.c (match_kind_param): Return MATCH_NO if the symbol
1565 2008-07-09 Paul Thomas <pault@gcc.gnu.org>
1568 * resolve.c (check_host_association): Use the existing
1569 accessible symtree and treat function expressions with
1570 symbols that have procedure flavor.
1572 2009-07-09 Janus Weil <janus@gcc.gnu.org>
1575 * dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'.
1576 * expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1577 (gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'.
1578 (replace_comp,gfc_expr_replace_comp): New functions, analogous
1579 to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components
1581 * gfortran.h (gfc_expr_replace_comp): New prototype.
1582 (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1583 * interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'.
1584 * match.c (gfc_match_pointer_assignment): Ditto.
1585 * primary.c (gfc_match_varspec): Handle array-valued procedure pointers
1586 and procedure pointer components. Renamed 'is_proc_ptr_comp'.
1587 * resolve.c (resolve_fl_derived): Correctly handle interfaces with
1588 RESULT statement, and handle array-valued procedure pointer components.
1589 (resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed
1591 * trans-array.c (gfc_walk_function_expr): Ditto.
1592 * trans-decl.c (gfc_get_symbol_decl): Security check for presence of
1594 * trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure
1595 pointer components. Renamed 'is_proc_ptr_comp'.
1596 (conv_function_val,gfc_trans_arrayfunc_assign): Renamed
1598 (gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead
1600 * trans-io.c (gfc_trans_transfer): Handle array-valued procedure
1603 2009-07-09 Tobias Burnus <burnus@net-b.de>
1606 * intrinsic.c (gfc_convert_type_warn): Set sym->result.
1607 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1608 for optional arguments.
1610 2009-07-08 Tobias Burnus <burnus@net-b.de>
1613 * simplify.c (gfc_simplify_sign): Handle signed zero correctly.
1614 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Support
1616 * invoke.texi (-fno-sign-zero): Add text regarding SIGN intrinsic.
1618 2008-07-08 Paul Thomas <pault@gcc.gnu.org>
1621 * decl.c (match_procedure_interface): Correct the association
1622 or creation of the interface procedure's symbol.
1624 2009-07-04 Jakub Jelinek <jakub@redhat.com>
1626 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer
1627 maxloc initialize limit to -huge-1 rather than just -huge.
1629 2009-07-04 Janus Weil <janus@gcc.gnu.org>
1632 * interface.c (compare_actual_formal): Take care of proc-pointer-valued
1633 functions as actual arguments.
1634 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1635 * resolve.c (resolve_specific_f0): Use the correct ts.
1637 2009-07-02 Michael Matz <matz@suse.de>
1640 * trans-array.c (gfc_conv_descriptor_stride_get): Return
1641 constant one for strides in the first dimension of ALLOCATABLE
1644 2009-06-30 Janus Weil <janus@gcc.gnu.org>
1647 * trans-types.c (gfc_get_derived_type): Bugfix, reverting one hunk from
1650 2009-06-29 Tobias Burnus <burnus@net-b.de>
1653 * trans-expr.c (gfc_conv_procedure_call): Add -fcheck=pointer check.
1654 * libgfortran.h: Add GFC_RTCHECK_POINTER.
1655 * invoke.texi (-fcheck): Document new pointer option.
1656 * options.c (gfc_handle_runtime_check_option): Handle pointer option.
1658 * gfortran.texi (C Binding): Improve wording.
1659 * iso-c-binding.def: Remove obsolete comment.
1661 2009-06-29 Paul Thomas <pault@gcc.gnu.org>
1664 * dependency.h : Add second bool* argument to prototype of
1665 gfc_full_array_ref_p.
1666 * dependency.c (gfc_full_array_ref_p): If second argument is
1667 present, return true if last dimension of reference is an
1668 element or has unity stride.
1669 * trans-array.c : Add NULL second argument to references to
1670 gfc_full_array_ref_p.
1671 * trans-expr.c : The same, except for;
1672 (gfc_trans_arrayfunc_assign): Return fail if lhs reference
1673 is not a full array or a contiguous section.
1675 2009-06-28 Tobias Burnus <burnus@net-b.de>
1676 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1679 * symbol.c (gfc_add_ext_attribute): New function.
1680 (gfc_get_sym_tree): New argument allow_subroutine.
1681 (gfc_get_symbol,gfc_get_ha_sym_tree,gen_cptr_param,gen_fptr_param
1682 gen_shape_param,generate_isocbinding_symbol): Use it.
1683 * decl.c (find_special): New argument allow_subroutine.
1684 (add_init_expr_to_sym,add_hidden_procptr_result,attr_decl1,
1685 match_procedure_in_type,gfc_match_final_decl): Use it.
1686 (gfc_match_gcc_attributes): New function.
1687 * gfortran.texi (Mixed-Language Programming): New section
1688 "GNU Fortran Compiler Directives".
1689 * gfortran.h (ext_attr_t): New struct.
1690 (symbol_attributes): Use it.
1691 (gfc_add_ext_attribute): New prototype.
1692 (gfc_get_sym_tree): Update pototype.
1693 * expr.c (gfc_check_pointer_assign): Check whether call
1694 convention is the same.
1695 * module.c (import_iso_c_binding_module, create_int_parameter,
1696 use_iso_fortran_env_module): Update gfc_get_sym_tree call.
1697 * scanner.c (skip_gcc_attribute): New function.
1698 (skip_free_comments,skip_fixed_comments): Use it.
1699 (gfc_next_char_literal): Support !GCC$ lines.
1700 * resolve.c (check_host_association): Update
1701 gfc_get_sym_tree call.
1702 * match.c (gfc_match_sym_tree,gfc_match_call): Update
1703 gfc_get_sym_tree call.
1704 * trans-decl.c (add_attributes_to_decl): New function.
1705 (gfc_get_symbol_decl,get_proc_pointer_decl,
1706 gfc_get_extern_function_decl,build_function_decl: Use it.
1707 * match.h (gfc_match_gcc_attributes): Add prototype.
1708 * parse.c (decode_gcc_attribute): New function.
1709 (next_free,next_fixed): Support !GCC$ lines.
1710 * primary.c (match_actual_arg,check_for_implicit_index,
1711 gfc_match_rvalue,gfc_match_rvalue): Update
1712 gfc_get_sym_tree call.
1714 2009-06-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1716 * gfortran.h: Define HAVE_mpc_pow.
1717 * arith.c (complex_reciprocal, complex_pow): If HAVE_mpc_pow,
1718 don't define these functions.
1719 (arith_power): If HAVE_mpc_pow, use mpc_pow.
1721 2009-06-26 Janus Weil <janus@gcc.gnu.org>
1725 * decl.c (add_hidden_procptr_result): Copy the typespec to the hidden
1727 * expr.c (gfc_check_pointer_assign): Enable interface check for
1728 procedure pointer assignments where the rhs is a function returning a
1730 * resolve.c (resolve_symbol): If an external procedure with unspecified
1731 return type can not be implicitly typed, it must be a subroutine.
1733 2009-06-24 Janus Weil <janus@gcc.gnu.org>
1736 * gfortran.h (gfc_component): New member 'formal_ns'.
1737 (gfc_copy_formal_args_ppc,void gfc_ppc_use): New.
1738 * interface.c (gfc_ppc_use): New function, analogous to
1739 gfc_procedure_use, but for procedure pointer components.
1740 * module.c (MOD_VERSION): Bump module version.
1741 (mio_component): Treat formal arguments.
1742 (mio_formal_arglist): Changed argument from gfc_symbol to
1744 (mio_symbol): Changed argument of mio_formal_arglist.
1745 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Call gfc_ppc_use,
1746 to check actual arguments and treat formal args correctly.
1747 (resolve_fl_derived): Copy formal args of procedure pointer components
1748 from their interface.
1749 * symbol.c (gfc_copy_formal_args_ppc): New function, analogous to
1750 gfc_copy_formal_args, but for procedure pointer components.
1752 2009-06-22 Janus Weil <janus@gcc.gnu.org>
1756 * interface.c (compare_parameter): Set implicit type for function
1757 actual arguments with BT_UNKNOWN.
1759 2009-06-22 Tobias Burnus <burnus@net-b.de>
1763 * simplify.c (gfc_simplify_spread): Fix the case that source=
1766 2009-06-22 Paul Thomas <pault@gcc.gnu.org>
1769 * interface.c (gfc_search_interface): Hold back a match to an
1770 elementary procedure until all other possibilities are
1773 2009-06-22 Paul Thomas <pault@gcc.gnu.org>
1776 * simplify.c (gfc_simplify_spread): Restrict the result size to
1777 the limit for an array constructor.
1779 2009-06-21 Janus Weil <janus@gcc.gnu.org>
1782 * interface.c (gfc_compare_interfaces): Take care of implicit typing
1783 when checking the function attribute. Plus another bugfix.
1784 (compare_parameter): Set attr.function and attr.subroutine according
1785 to the usage of a procedure as actual argument.
1787 2009-06-20 Tobias Burnus <burnus@net-b.de>
1790 * trans-decl.c (add_argument_checking): Disable bounds check
1791 for allowed argument storage association.
1793 2009-06-19 Paul Thomas <pault@gcc.gnu.org>
1796 * trans-expr.c (gfc_conv_procedure_call): Do not deallocate
1797 allocatable components if the argument is a pointer.
1799 2009-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1801 * gfortran.h (gfc_expr): Use mpc_t to represent complex numbers.
1803 * arith.c, dump-parse-tree.c, expr.c, module.c, resolve.c,
1804 simplify.c, target-memory.c, target-memory.h, trans-const.c,
1805 trans-expr.c: Convert to mpc_t throughout.
1807 2009-06-19 Ian Lance Taylor <iant@google.com>
1809 * cpp.c (struct gfc_cpp_option_data): Give this struct, used for
1810 the global variable gfc_cpp_option, a name.
1812 2009-06-19 Janus Weil <janus@gcc.gnu.org>
1815 * trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr
1816 to a procedure pointer actual argument, if it is not itself a
1819 2009-06-18 Janus Weil <janus@gcc.gnu.org>
1822 * resolve.c (resolve_contained_fntype): Prevent implicit typing for
1823 procedures with explicit interface.
1824 * symbol.c (gfc_check_function_type): Ditto.
1826 2009-06-16 Ian Lance Taylor <iant@google.com>
1828 * decl.c (build_struct): Rewrite loop over constructor elements.
1830 2009-06-16 Janus Weil <janus@gcc.gnu.org>
1834 * expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with
1836 * gfortran.h (gfc_compare_interfaces): Additional argument.
1837 * interface.c (operator_correspondence): Removed.
1838 (gfc_compare_interfaces): Additional argument to return error message.
1839 Directly use the code from 'operator_correspondence' instead of calling
1840 the function. Check for OPTIONAL. Some rearrangements.
1841 (check_interface1): Call 'gfc_compare_interfaces' without error message.
1842 (compare_parameter): Call 'gfc_compare_interfaces' with error message.
1843 * resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces'
1844 without error message.
1846 2009-06-16 Tobias Burnus <burnus@net-b.de>
1849 * trans-decl.c (create_function_arglist): Copy formal charlist to
1850 have a proper passed_length for -fcheck=bounds.
1852 2009-06-12 Steven G. Kargl <kargls@comcast.net>
1854 * arith.c (gfc_enum_initializer): Move function ...
1855 * decl.c: ... here. Remove gfc_ prefix and make static.
1856 (enumerator_decl): Update function call.
1857 * gfortran.h: Remove gfc_enum_initializer prototype.
1859 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1861 * trans-array.c (gfc_trans_allocate_array_storage): Pass
1863 (gfc_trans_array_constructor_value): Same.
1864 (gfc_trans_scalarized_loop_end): Same.
1865 (gfc_conv_ss_startstride): Same.
1866 (gfc_trans_g77_array): Same.
1867 (gfc_trans_dummy_array_bias): Same.
1868 (gfc_conv_array_parameter): Same.
1869 (structure_alloc_comps): Same.
1870 * trans-expr.c (gfc_conv_function_call): Same.
1871 (fill_with_spaces): Same.
1872 (gfc_trans_string_copy): Same.
1873 (gfc_trans_scalar_assign): Same.
1874 * trans-stmt.c (gfc_trans_goto): Same.
1875 (gfc_trans_if_1): Same.
1876 (gfc_trans_simple_do): Same.
1877 (gfc_trans_do): Same.
1878 (gfc_trans_do_while): Same.
1879 (gfc_trans_logical_select): Same.
1880 (gfc_trans_select): Same.
1881 (gfc_trans_forall_loop): Same.
1882 (gfc_trans_nested_forall_loop): Same.
1883 (generate_loop_for_temp_to_lhs): Same.
1884 (generate_loop_for_rhs_to_temp): Same.
1885 (gfc_trans_forall_1): Same.
1886 (gfc_trans_where_assign): Same.
1887 (gfc_trans_where_3): Same.
1888 (gfc_trans_allocate): Same.
1889 * trans.c (gfc_finish_block): Same.
1890 (gfc_trans_runtime_check): Same.
1891 (gfc_call_malloc): Same.
1892 (gfc_allocate_with_status): Same.
1893 (gfc_call_free): Same.
1894 (gfc_deallocate_with_status): Same.
1895 (gfc_call_realloc): Same.
1896 (gfc_trans_code): Same.
1897 * trans-decl.c (gfc_init_default_dt): Same.
1898 (gfc_generate_constructors): Same.
1899 * trans-io.c (gfc_trans_io_runtime_check): Same.
1900 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
1901 (gfc_conv_intrinsic_fdate): Same.
1902 (gfc_conv_intrinsic_ttynam): Same.
1903 (gfc_conv_intrinsic_minmax): Same.
1904 (gfc_conv_intrinsic_minmax_char): Same.
1905 (gfc_conv_intrinsic_anyall): Same.
1906 (gfc_conv_intrinsic_count): Same.
1907 (gfc_conv_intrinsic_arith): Same.
1908 (gfc_conv_intrinsic_minmaxloc): Same.
1909 (gfc_conv_intrinsic_minmaxval): Same.
1910 (gfc_conv_intrinsic_rrspacing): Same.
1911 (gfc_conv_intrinsic_array_transfer): Same.
1912 (gfc_conv_intrinsic_trim): Same.
1913 (gfc_conv_intrinsic_repeat): Same.
1915 2009-06-12 Janus Weil <janus@gcc.gnu.org>
1918 * resolve.c (resolve_symbol): Additional error check, preventing an
1921 2009-06-11 Paul Thomas <pault@gcc.gnu.org>
1924 * resolve.c (next_data_value): It is an error if the value is
1927 2009-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1930 * intrinsic.c (add_functions): Add simplifiers for ISNAN,
1931 IS_IOSTAT_END and IS_IOSTAT_EOR.
1932 * intrinsic.h (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
1933 gfc_simplify_isnan): New prototypes.
1934 * intrinsic.c (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
1935 gfc_simplify_isnan): New functions.
1937 2009-06-11 Jakub Jelinek <jakub@redhat.com>
1939 * interface.c (fold_unary): Rename to...
1940 (fold_unary_intrinsic): ... this.
1941 (gfc_extend_expr): Adjust caller.
1942 (gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE
1944 * expr.c (gfc_simplify_expr): Initialize start and end before calling
1947 2009-06-10 Dave Korn <dave.korn.cygwin@gmail.com>
1949 * trans-decl.c (create_main_function): Don't build main decl twice.
1951 2009-06-09 Tobias Burnus <burnus@net-b.de>
1953 * trans-decl.c (gfc_generate_function_code): Use gfc_option.rtcheck
1954 instead of flag_bounds_check.
1955 * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and
1958 2009-06-08 Paul Thomas <pault@gcc.gnu.org>
1960 * trans-array.h : Replace prototypes for
1961 gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
1962 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
1963 prototypes of the same names with _get or _set appended.
1964 * trans-array.c : Make the originals of the above static and
1965 new functions for the _get and _set functions. Update all the
1966 references to these descriptor access functions.
1967 * trans-expr.c : Update references to the above descriptor
1969 * trans-intrinsic.c : The same.
1970 * trans-openmp.c : The same.
1971 * trans-stmt.c : The same.
1973 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
1975 * options.c (gfc_post_options): Disable dump_parse_tree
1976 during -fcompare-debug-second.
1978 2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1981 * gfortran.h (gfc_open): Add newunit expression to structure.
1982 * io.c (io_tag): Add new unit tag and fix whitespace.
1983 (match_open_element): Add matching for newunit.
1984 (gfc_free_open): Free the newunit expression.
1985 (gfc_resolve_open): Add newunit to resolution and check constraints.
1986 (gfc_resolve_close): Add check for non-negative unit.
1987 (gfc_resolve_filepos): Likewise.
1988 (gfc_resolve_dt): Likewise.
1989 * trans-io.c (set_parameter_value): Build runtime checks for unit
1990 numbers within range of kind=4 integer. (gfc_trans_open) Set the
1992 * ioparm.def (IOPARM): Define the newunit parameter as a pointer
1993 to GFC_INTEGER_4, pint4.
1995 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
1999 * array.c (gfc_append_constructor): Added NULL-check.
2000 * check.c (gfc_check_spread): Check DIM.
2001 (gfc_check_unpack): Check that the ARRAY arguments provides enough
2003 * intrinsic.h (gfc_simplify_spread): New prototype.
2004 (gfc_simplify_unpack): Likewise.
2005 * intrinsic.c (add_functions): Added new simplifier callbacks.
2006 * simplify.c (gfc_simplify_spread): New.
2007 (gfc_simplify_unpack): New.
2008 * expr.c (check_transformational): Allow additional transformational
2009 intrinsics in initialization expression.
2011 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2015 * check.c (gfc_check_all_any): Check rank of DIM.
2016 (gfc_check_count): Likewise.
2017 * intrinsic.h (gfc_simplify_all): New prototype.
2018 (gfc_simplify_any): Likewise.
2019 (gfc_simplify_count): Likewise.
2020 (gfc_simplify_sum): Likewise.
2021 (gfc_simplify_product): Likewise.
2022 * intrinsic.c (add_functions): Added new simplifier callbacks.
2023 * simplify.c (transformational_result): New.
2024 (simplify_transformation_to_scalar): New.
2025 (simplify_transformation_to_array): New.
2027 (gfc_simplify_all): New.
2028 (gfc_simplify_any): New.
2029 (gfc_simplify_count): New.
2030 (gfc_simplify_sum): New.
2031 (gfc_simplify_product): New.
2032 * expr.c (check_transformational): Allow additional transformational
2033 intrinsics in initialization expression.
2035 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2037 * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
2038 (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
2039 (gfc_check_minloc_maxloc): Likewise.
2040 (check_reduction): Likewise.
2041 (gfc_check_size): Likewise.
2042 (gfc_check_ubound): Likewise.
2043 (gfc_check_cshift): Added missing shape-conformance checks.
2044 (gfc_check_eoshift): Likewise.
2045 * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
2046 * expr.c (gfc_check_conformance): Accept error-message chunks in
2047 printf-style. Changed all callers.
2050 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2054 * intrinsic.h (gfc_simplify_dot_product): New prototype.
2055 (gfc_simplify_matmul): Likewise.
2056 (gfc_simplify_transpose): Likewise.
2057 * intrinsic.c (add_functions): Added new simplifier callbacks.
2058 * simplify.c (init_result_expr): New.
2059 (compute_dot_product): New.
2060 (gfc_simplify_dot_product): New.
2061 (gfc_simplify_matmul): New.
2062 (gfc_simplify_transpose): New.
2063 * expr.c (check_transformational): Allow transformational intrinsics
2064 with simplifier in initialization expression.
2066 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
2069 * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
2072 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
2075 * intrinsic.h (gfc_simplify_pack): New prototype.
2076 * intrinsic.c (add_functions): Added
2077 simplifier-callback to PACK.
2078 * simplify.c (is_constant_array_expr): Moved
2079 to beginning of file.
2080 (gfc_simplify_pack): New.
2081 * check.c (gfc_check_pack): Check that VECTOR has enough elements.
2082 Added safeguards for empty arrays.
2084 2009-06-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2086 * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
2087 instead of MPC_RE/MPC_IM.
2089 2009-06-05 Alexandre Oliva <aoliva@redhat.com>
2091 * trans-decl.c (gfc_build_qualified_array): Don't skip generation
2093 * trans.h (struct lang_type): Add base_decls.
2094 (GFC_TYPE_ARRAY_BASE_DECL): New.
2095 * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
2096 proactively and excessively.
2097 (gfc_get_array_descr_info): Use existing base decls if available.
2099 2009-06-04 Daniel Franke <franke.daniel@gmail.com>
2102 * check.c (gfc_check_reshape): Additional checks for the
2103 SHAPE and ORDER arguments.
2104 * simplify.c (gfc_simplify_reshape): Converted argument checks
2107 2009-06-03 Tobias Burnus <burnus@net-b.de>
2109 * gfortran.texi: Add mixed-language programming, mention
2110 varying string lengths, some clean up of introduction parts.
2111 * intrinsic.texi (instrinsic modules): Create @menu for subsections.
2112 (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
2113 * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
2114 * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
2116 2009-06-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2117 Tobias Burnus <burnus@net-b.de>
2119 * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
2120 * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
2122 2009-06-03 Alexandre Oliva <aoliva@redhat.com>
2124 * module.c (mio_f2k_derived): Initialize cur.
2126 2009-06-01 Tobias Burnus <burnus@net-b.de>
2129 * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
2130 (create_main_function): Set main_identifier_node.
2132 2009-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2135 * trans-types.c (gfc_build_uint_type): Make nonstatic.
2136 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
2137 * trans-types.h (gfc_build_uint_type): Add prototype.
2138 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2139 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
2140 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
2141 gfc_conv_intrinsic_trailz): Call the right builtins or library
2142 functions, and cast arguments to unsigned types first.
2143 * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
2145 2009-05-27 Ian Lance Taylor <iant@google.com>
2147 * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
2149 (f951$(exeext)): Likewise.
2151 2009-05-27 Tobias Burnus <burnus@net-b.de>
2154 * trans-decl.c (create_main_function): Mark MAIN__ and
2155 argc/argv as TREE_USED and push/pop function_decl context
2158 2009-05-26 Tobias Burnus <burnus@net-b.de>
2161 * gfortranspec.c (lang_specific_driver): Stop linking
2163 * trans-decl.c (gfc_build_builtin_function_decls): Stop
2164 making MAIN__ publicly visible.
2165 (gfc_build_builtin_function_decls): Add
2166 gfor_fndecl_set_args.
2167 (create_main_function) New function.
2168 (gfc_generate_function_code): Use it.
2170 2009-05-26 Tobias Burnus <burnus@net-b.de>
2173 * match.c (gfc_match_nullify): NULLify freed pointer.
2175 2009-05-26 Ian Lance Taylor <iant@google.com>
2177 * Make-lang.in (gfortranspec.o): Use $(COMPILER).
2178 (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
2180 2009-05-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2182 * gfortran.h (GFC_MPC_RND_MODE): New.
2183 * simplify.c (call_mpc_func): New helper function.
2184 (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
2185 gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
2187 2009-05-25 Janus Weil <janus@gcc.gnu.org>
2190 * primary.c (gfc_match_varspec): Handle procedure pointer components
2191 with array return value.
2192 * resolve.c (resolve_expr_ppc): Ditto.
2193 (resolve_symbol): Make sure the interface of a procedure pointer has
2195 * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
2196 components with array return value.
2197 * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
2198 gfc_trans_arrayfunc_assign): Ditto.
2199 (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
2200 where the rhs is a dummy argument.
2201 * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
2202 procedure pointer components with array return value.
2204 2009-05-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2209 * trans-array.c (gfc_conv_ss_startstride): Add one to index.
2211 2009-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2214 * module.c (read_md5_from_module_file): Close file before returning.
2216 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2219 * primary.c (gfc_match_rvalue): Handle procedure pointer components in
2221 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
2223 (resolve_fl_derived): Procedure pointer components are not required to
2224 have constant array bounds in their return value.
2226 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2228 * intrinsic.c (add_sym): Fix my last commit (r147655),
2229 which broke bootstrap.
2231 2009-05-18 Richard Guenther <rguenther@suse.de>
2234 * trans-expr.c (gfc_trans_zero_assign): For local array
2235 destinations use an assignment from an empty constructor.
2237 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2241 * expr.c (gfc_check_pointer_assign): Check intents when comparing
2243 * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
2244 (gfc_compare_interfaces): Additional argument.
2245 * interface.c (operator_correspondence): Add check for equality of
2246 intents, and new argument 'intent_check'.
2247 (gfc_compare_interfaces): New argument 'intent_check', which is passed
2248 on to operator_correspondence.
2249 (check_interface1): Don't check intents when comparing interfaces.
2250 (compare_parameter): Do check intents when comparing interfaces.
2251 * intrinsic.c (add_sym): Add intents for arguments of intrinsic
2253 (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
2254 add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
2256 (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
2257 : New functions to add intrinsic symbols, specifying custom intents.
2258 (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
2259 (add_functions,add_subroutines): Add intents for various intrinsics.
2260 * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
2261 comparing interfaces.
2262 * symbol.c (gfc_copy_formal_args_intr): Copy intent.
2264 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2266 * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
2268 * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
2269 gfc_get_real_kind_from_width_isofortranenv): New prototypes.
2270 * iso-c-binding.def: Update definitions for the INT*_T,
2271 INT_LEAST*_T and INT_FAST*_T named parameters.
2272 * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
2273 gfc_get_real_kind_from_width_isofortranenv): New functions.
2275 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2278 * intrinsic.c (add_functions, add_subroutines): Fix argument
2279 names and wrap long lines.
2280 * intrinsic.texi: Fix documentation and argument names of
2281 LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
2282 GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
2283 SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
2284 SELECTED_REAL_KIND and XOR.
2286 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2289 * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
2290 * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
2291 * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
2292 gfc_simplify_erfc_scaled): New functions.
2294 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2297 * resolve.c (resolve_substring): Don't allow too large substring
2299 (gfc_resolve_substring_charlen): Fix typo.
2300 (gfc_resolve_character_operator): Fix typo.
2301 (resolve_charlen): Catch unreasonably large string lengths.
2302 * simplify.c (gfc_simplify_len): Don't error out on LEN
2305 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2308 * decl.c (set_enum_kind): Use global short-enums flag.
2309 * gfortran.h (gfc_option_t): Remove short_enums flag.
2310 * lang.opt (-fshort-enums): Refer to C documentation.
2311 * options.c (gfc_init_options, gfc_handle_option): Use global
2314 2009-05-15 Tobias Burnus <burnus@net-b.de>
2317 * f95-lang.c: Add gfc_maybe_initialize_eh.
2318 * gfortran.h: Add gfc_maybe_initialize_eh prototype.
2319 * Make-lang.in: Add new .h dendencies for f95-lang.c
2320 * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
2321 * misc.c (gfc_free): Avoid #define trickery for free.
2323 2009-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
2325 * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
2326 of allocate and deallocate statements.
2328 2009-05-14 Ian Lance Taylor <iant@google.com>
2330 * decl.c (match_attr_spec): Change d to unsigned int.
2331 * dump-parse-tree.c (show_namespace): Change op to int. Add cast.
2332 * interface.c (gfc_check_interfaces): Change i to int. Add casts.
2333 * module.c (read_module): Change i to int. Add cast.
2334 (write_module): Change i to int.
2335 * symbol.c (gfc_get_namespace): Change in to int.
2336 (gfc_free_namespace): Change i to int.
2337 * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
2338 unsigned int. Add cast.
2339 * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
2342 2009-05-14 Daniel Kraft <d@domob.eu>
2345 * dump-parse-tree.c (show_typebound): Fix missing adaption to new
2346 type-bound procedure storage structure.
2348 2009-05-14 Janus Weil <janus@gcc.gnu.org>
2351 * decl.c (gfc_match_function_decl): Use gfc_add_type.
2352 * symbol.c (gfc_add_type): Better checking for duplicate types in
2353 function declarations. And: Always give an error for duplicte types,
2354 not just a warning with -std=gnu.
2356 2009-05-14 Jakub Jelinek <jakub@redhat.com>
2359 * io.c (resolve_tag_format): CHARACTER array in FMT= argument
2360 isn't an extension. Reject non-CHARACTER array element of
2361 assumed shape or pointer or assumed size array.
2362 * trans-array.c (array_parameter_size): New function.
2363 (gfc_conv_array_parameter): Add size argument. Call
2364 array_parameter_size if it is non-NULL.
2365 * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
2366 * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
2368 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
2369 * trans-io.c (gfc_convert_array_to_string): Rewritten.
2371 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
2373 * gfortran.h (gfc_code): Rename struct member expr to expr1.
2374 * openmp.c (resolve_omp_atomic): Update expr to expr1.
2375 * interface.c (gfc_extend_assign): Ditto.
2376 * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
2377 gfc_trans_init_assign): Ditto.
2378 * dump-parse-tree.c (show_code_node): Ditto.
2379 * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
2380 * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
2381 gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
2382 gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
2383 gfc_trans_logical_select, gfc_trans_character_select
2384 forall_make_variable_temp, check_forall_dependencies
2385 gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
2386 gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
2387 * io.c (match_io_element, gfc_match_inquire): Ditto.
2388 * resolve.c (resolve_typebound_call, resolve_ppc_call,
2389 resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
2390 resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
2391 gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
2392 * st.c (gfc_free_statement): Ditto.
2393 * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
2394 match_arithmetic_if, gfc_match_if, gfc_match_elseif
2395 gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
2396 gfc_match_nullify, match_typebound_call, gfc_match_call
2397 gfc_match_select, match_simple_where, gfc_match_where
2398 gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
2399 * trans-io.c (gfc_trans_transfer): Ditto.
2400 * parse.c (parse_where_block, parse_if_block): Ditto.
2402 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
2404 * gfortran.h (gfc_code): Rename struct member label to label1.
2405 * dump-parse-tree.c (show_code_node): Update symbol.
2406 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
2407 gfc_trans_arithmetic_if): Ditto.
2408 * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
2409 * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
2410 gfc_match_assign, gfc_match_goto): Ditto.
2411 * parse.c (parse_do_block): Ditto.
2413 2009-05-13 Tobias Burnus <burnus@net-b.de>
2416 * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
2417 * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
2418 * trans.c (gfc_trans_code): Ditto.
2419 * resolve.c (resolve_code): Ditto.
2420 * st.c (gfc_free_statement): Ditto.
2421 * parse.c (accept_statement): Ditto.
2423 2009-05-12 Tobias Burnus <burnus@net-b.de>
2426 * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
2428 2009-05-11 Steve Ellcey <sje@cup.hp.com>
2430 * resolve.c (check_host_association): Initialize tail.
2432 2009-05-11 Janus Weil <janus@gcc.gnu.org>
2435 * resolve.c (resolve_fl_derived): Only return FAILURE if
2436 gfc_notify_std fails.
2438 2009-05-10 Ian Lance Taylor <iant@google.com>
2440 * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
2442 (enum gfc_omp_default_sharing): Likewise.
2443 * module.c (enum gfc_rsym_state): New enum, broken out of
2445 (enum gfc_wsym_state): Likewise.
2446 * parse.c (enum state_order): New enum, broken out of st_state.
2448 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
2451 * trans-array.c (gfc_trans_array_constructor_value): Fold
2452 convert numeric constants.
2453 (gfc_build_constant_array_constructor): The same.
2455 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
2458 * trans-expr.c (gfc_conv_operator_assign): Remove function.
2459 * trans.h : Remove prototype for gfc_conv_operator_assign.
2460 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
2461 derivde types with intent(out).
2462 (gfc_trans_call): Add mask, count1 and invert arguments. Add
2463 code to use mask for WHERE assignments.
2464 (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
2465 (gfc_trans_where_assign): The gfc_symbol argument is replaced
2466 by the corresponding code. If this has a resolved_sym, then
2467 gfc_trans_call is called. The call to gfc_conv_operator_assign
2469 (gfc_trans_where_2): Change the last argument in the call to
2470 gfc_trans_where_assign.
2471 * trans-stmt.h : Modify prototype for gfc_trans_call.
2472 * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
2474 2009-05-08 Janus Weil <janus@gcc.gnu.org>
2477 * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
2478 the symbol is a module procedure.
2480 2009-05-08 Tobias Burnus <burnus@net-b.de>
2482 * invoke.texi: Add do/recursion to the -fcheck= summary.
2484 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2487 * gfortran.texi: Document that we don't support variable FORMAT
2490 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2493 * error.c (error_print): Add missing break statement.
2495 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2498 * invoke.texi: Document that -fdollar-ok does not allow $ to be
2499 used in IMPLICIT statement.
2501 2009-05-06 Janus Weil <janus@gcc.gnu.org>
2502 Paul Thomas <pault@gcc.gnu.org>
2505 * decl.c (match_procedure_interface): New function to match the
2506 interface for a PROCEDURE statement.
2507 (match_procedure_decl): Call match_procedure_interface.
2508 (match_ppc_decl): New function to match the declaration of a
2509 procedure pointer component.
2510 (gfc_match_procedure): Call match_ppc_decl.
2511 (match_binding_attributes): Add new argument 'ppc' and handle the
2512 POINTER attribute for procedure pointer components.
2513 (match_procedure_in_type,gfc_match_generic): Added new argument to
2514 match_binding_attributes.
2515 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
2516 procedure pointer components.
2517 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
2518 (gfc_check_pointer_assign): Handle procedure pointer components, but no
2520 (is_proc_ptr_comp): New function to determine if an expression is a
2521 procedure pointer component.
2522 * gfortran.h (expr_t): Add EXPR_PPC.
2523 (symbol_attribute): Add new member 'proc_pointer_comp'.
2524 (gfc_component): Add new member 'formal'.
2525 (gfc_exec_op): Add EXEC_CALL_PPC.
2526 (gfc_get_default_type): Changed first argument.
2527 (is_proc_ptr_comp): Add prototype.
2528 (gfc_match_varspec): Add new argument.
2529 * interface.c (compare_actual_formal): Handle procedure pointer
2531 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
2532 procedure pointer components.
2533 * module.c (mio_expr): Handle EXPR_PPC.
2534 * parse.c (parse_derived): Handle procedure pointer components.
2535 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
2536 procedure pointer components.
2537 (gfc_variable_attr): Handle procedure pointer components.
2538 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
2539 first argument of gfc_get_default_type.
2540 (match_variable): Added new argument to gfc_match_varspec.
2541 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
2542 first argument of gfc_get_default_type.
2543 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
2545 (resolve_ppc_call): New function to resolve a call to a procedure
2546 pointer component (subroutine).
2547 (resolve_expr_ppc): New function to resolve a call to a procedure
2548 pointer component (function).
2549 (gfc_resolve_expr): Handle EXPR_PPC.
2550 (resolve_code): Handle EXEC_CALL_PPC.
2551 (resolve_fl_derived): Copy the interface for a procedure pointer
2553 (resolve_symbol): Fix overlong line.
2554 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
2555 * symbol.c (gfc_get_default_type): Changed first argument.
2556 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
2557 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
2558 * trans.h (gfc_conv_function_call): Renamed.
2559 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
2560 * trans-expr.c (gfc_conv_component_ref): Ditto.
2561 (gfc_conv_function_val): Rename to 'conv_function_val', add new
2562 argument 'expr' and handle procedure pointer components.
2563 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
2564 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
2565 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
2566 argument 'expr' and handle procedure pointer components.
2567 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
2568 procedure pointer component.
2569 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
2570 (gfc_conv_structure): Handle procedure pointer components.
2571 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
2572 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
2573 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
2574 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
2575 * trans-types.h (gfc_get_ppc_type): Add prototype.
2576 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
2577 for a procedure pointer component.
2578 (gfc_get_derived_type): Handle procedure pointer components.
2580 2009-05-06 Tobias Burnus <burnus@net-b.de>
2583 * resolve.c (resolve_symbol): Print no warning for implicitly
2584 typed intrinsic functions.
2586 2009-05-05 Janus Weil <janus@gcc.gnu.org>
2589 * expr.c (gfc_check_pointer_assign): Check for statement functions and
2590 internal procedures in procedure pointer assignments.
2592 2009-04-28 Janus Weil <janus@gcc.gnu.org>
2595 * resolve.c (resolve_symbol): Correctly copy the interface of a
2596 PROCEDURE statement if the interface involves a RESULT variable.
2598 2009-04-28 Janus Weil <janus@gcc.gnu.org>
2602 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
2604 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
2606 2009-04-28 Paul Thomas <pault@gcc.gnu.org>
2609 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
2610 type parentheses argument if it is a variable with allocatable
2613 2009-04-27 Ian Lance Taylor <iant@google.com>
2615 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
2617 * trans-io.c (st_parameter_field): Add casts to enum type.
2619 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
2622 fortran/data.c (gfc_assign_data_value): If the lvalue is an
2623 assumed character length entity in a data statement, then
2624 return FAILURE to prevent segmentation fault.
2626 2009-04-26 Jakub Jelinek <jakub@redhat.com>
2628 * trans-decl.c: Include pointer-set.h.
2629 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
2630 (gfc_nonlocal_dummy_array_decl): New function.
2631 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
2633 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
2634 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
2635 chain it to outermost block's vars, destroy it afterwards.
2636 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
2638 2009-04-25 Janus Weil <janus@gcc.gnu.org>
2641 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
2642 They differ if the symbol has been use-renamed.
2644 2009-04-24 Ian Lance Taylor <iant@google.com>
2646 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
2647 out of struct gfc_symbol.
2648 (struct gfc_symbol): Use enum gfc_symbol_type.
2649 (enum gfc_array_ref_dimen_type): New named enum type, broken out
2650 of struct gfc_array_ref).
2651 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
2652 (mod_pointee_as): Update declaration.
2653 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
2654 (gfc_mod_pointee_as): Change return type to "match".
2655 * module.c (mio_array_ref): Add cast to enum type.
2656 (mio_symbol): Likewise.
2657 * resolve.c (resolve_global_procedure): Change type to enum
2659 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
2662 2009-04-24 Daniel Kraft <d@domob.eu>
2664 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
2665 (struct gfc_symtree): Moved "typebound" member inside union.
2666 (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
2667 type-bound procedures there.
2668 (gfc_get_tbp_symtree): New procedure.
2669 * symbol.c (tentative_tbp_list): New global.
2670 (gfc_get_namespace): NULL new "tb_sym_root" member.
2671 (gfc_new_symtree): Removed initialization of "typebound" member.
2672 (gfc_undo_symbols): Process list of tentative tbp's.
2673 (gfc_commit_symbols): Ditto.
2674 (free_tb_tree): New method.
2675 (gfc_free_namespace): Call it.
2676 (gfc_get_typebound_proc): New method.
2677 (gfc_get_tbp_symtree): New method.
2678 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
2679 and gfc_namespace with regards to tbp's.
2680 * dump-parse-tree.c (show_typebound): Ditto.
2681 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
2682 as it isn't a symbol any longer.
2683 * module.c (mio_typebound_symtree): Adapt to changes.
2684 (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
2685 rather than "gfc_get_sym_tree".
2686 (mio_f2k_derived): Ditto.
2687 * decl.c (match_procedure_in_type): Ditto.
2688 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
2689 * resolve.c (check_typebound_override): Adapt to changes.
2690 (resolve_typebound_generic): Ditto.
2691 (resolve_typebound_procedures): Ditto.
2692 (ensure_not_abstract_walker): Ditto.
2693 (ensure_not_abstract): Ditto.
2694 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
2695 instance, through removed tentative ones).
2696 * gfc-internals.texi (Type-bound procedures): Document changes.
2698 2009-04-24 Janus Weil <janus@gcc.gnu.org>
2702 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
2703 for the formal arguments.
2705 2009-04-21 Taras Glek <tglek@mozilla.com>
2707 * f95-lang.c: Update GTY annotations to new syntax.
2708 * trans-intrinsic.c: Likewise.
2709 * trans-io.c: Likewise.
2710 * trans.h: Likewise.
2712 2009-04-22 Janus Weil <janus@gcc.gnu.org>
2715 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
2716 (match_procedure_decl): Set if_source.
2717 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
2718 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
2719 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
2720 add documentation. Rename copy_formal_args and copy_formal_args_intr.
2721 * interface.c (gfc_compare_interfaces): Check for return types,
2722 handle IFSRC_UNKNOWN.
2723 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
2724 (gfc_procedure_use): Modified handling of intrinsics.
2725 * intrinsic.c (add_functions): Bugfix for "dim".
2726 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
2727 which copies the interface from isym to sym.
2728 (resolve_procedure_expression,resolve_function): Use new function
2729 'resolve_intrinsic'.
2730 (resolve_symbol): Add function attribute for externals with return type
2731 and use new function 'resolve_intrinsic'.
2732 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
2733 (copy_formal_args): Renamed to gfc_copy_formal_args.
2734 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
2735 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
2737 2009-04-21 Joseph Myers <joseph@codesourcery.com>
2739 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
2740 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
2741 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
2742 copyright and license notices.
2743 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
2744 ChangeLog-2008: Correct dates.
2746 2009-04-20 Tobias Burnus <burnus@net-b.de>
2749 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
2751 2009-04-20 Paul Thomas <pault@gcc.gnu.org>
2754 * resolve.c (is_sym_host_assoc): New function.
2755 (resolve_fl_derived): Call it when checking PRIVATE components
2756 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
2758 (resolve_fl_namelist): Call it twice to check for host
2761 2009-04-20 Ian Lance Taylor <iant@google.com>
2763 * module.c (import_iso_c_binding_module): Add casts to enum type.
2764 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
2766 (gfc_conv_intrinsic_anyall): Likewise.
2767 (gfc_conv_intrinsic_arith): Likewise.
2768 (gfc_conv_intrinsic_minmaxloc): Likewise.
2769 (gfc_conv_intrinsic_minmaxval): Likewise.
2770 (gfc_conv_intrinsic_bitop): Likewise.
2771 (gfc_conv_intrinsic_singlebitop): Likewise.
2772 (gfc_conv_intrinsic_strcmp): Likewise.
2774 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
2775 Jakub Jelinek <jakub@redhat.com>
2778 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
2779 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
2780 (ompws_flags): New extern decl.
2781 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
2782 for the outer dimension if ompws_flags allow it.
2783 * trans.c (gfc_generate_code): Clear ompws_flags.
2784 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
2785 array assignments inside of !$omp workshare.
2786 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
2788 * trans-openmp.c (ompws_flags): New variable.
2789 (gfc_trans_omp_workshare): Rewritten.
2791 2009-04-11 Daniel Kraft <d@domob.eu>
2794 * gfortran.h (struct gfc_charlen): New field "passed_length" to store
2795 the actual passed string length for dummy arguments.
2796 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
2797 assertion, moved a local variable into the innermost block it is needed.
2798 (create_function_arglist): Removed TODO about the check being
2799 implemented and initialize cl->passed_length here.
2800 (add_argument_checking): New method.
2801 (gfc_generate_function_code): Call the argument checking method.
2803 2009-04-11 Janus Weil <janus@gcc.gnu.org>
2806 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
2808 2009-04-11 Daniel Franke <franke.daniel@gmail.com>
2810 * resolve.c (resolve_global_procedure): Enable whole-file checking for
2811 procedures that are declared later in the file.
2813 2009-04-10 Paolo Bonzini <bonzini@gnu.org>
2816 * trans.c (gfc_allocate_with_status): Fix type mismatches
2819 2009-04-10 Daniel Franke <franke.daniel@gmail.com>
2822 * expr.c (find_array_section): Leave early on zero-sized arrays.
2824 2009-04-09 Janus Weil <janus@gcc.gnu.org>
2827 * decl.c (add_hidden_procptr_result): New function for handling
2828 procedure pointer return values by adding a hidden result variable.
2829 (variable_decl,match_procedure_decl,gfc_match_function_decl,
2830 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
2832 * parse.c (parse_interface): Add EXTERNAL attribute only after
2833 FUNCTION/SUBROUTINE declaration is complete.
2834 * primary.c (replace_hidden_procptr_result): New function for replacing
2835 function symbol by hidden result variable.
2836 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
2838 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
2839 resolve_symbol): Allow for procedure pointer function results.
2840 (resolve_fl_procedure): Conflict detection moved here from
2842 * symbol.c (gfc_check_function_type): Allow for procedure pointer
2844 (check_conflict): Move some conflict detection to resolution stage.
2845 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
2848 2009-04-08 Jakub Jelinek <jakub@redhat.com>
2850 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
2851 contain TYPE_STRING_FLAG types.
2853 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
2856 * invoke.texi (fdollar-ok): Fix typo.
2858 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
2861 * invoke.texi (fdollar-ok): Clarify limitations.
2863 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
2866 * trans-array.c (gfc_trans_deferred_array): Return if this
2867 is a result variable.
2869 2009-04-07 Janus Weil <janus@gcc.gnu.org>
2872 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
2873 procedure pointer decls.
2875 2009-04-07 Janus Weil <janus@gcc.gnu.org>
2878 * expr.c (gfc_check_pointer_assign): Enable interface check for
2880 * gfortran.h: Add copy_formal_args_intr.
2881 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
2882 if second argument is an intrinsic.
2883 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
2885 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
2886 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
2887 intrinsic interfaces here. Must happen earlier.
2888 (resolve_symbol): Resolution of intrinsic interfaces moved here from
2889 resolve_specific_..., and formal args are now copied from intrinsic
2891 * symbol.c (copy_formal_args_intr): New function to copy the formal
2892 arguments from an intinsic procedure.
2894 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
2897 * dependency.c (ref_same_as_full_array): New function.
2898 (gfc_dep_resolver): Call it.
2900 2009-04-06 Janus Weil <janus@gcc.gnu.org>
2903 * decl.c (match_procedure_decl): Fix double declaration problems with
2904 PROCEDURE statements.
2905 * symbol.c (gfc_add_type): Ditto.
2907 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
2910 * trans-array.c (gfc_conv_array_ref): If the symbol has the
2911 temporary attribute use the array_spec for the bounds.
2912 * gfortran.h : Add the temporary field to the structure
2914 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
2915 temporary attribute.
2917 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
2920 * trans-array.c (gfc_trans_array_constructor_value): Shadow
2921 implied do-loop variable to avoid spurious middle-end warnings.
2923 2009-04-04 Tobias Burnus <burnus@net-b.de>
2926 * trans-decl.c (gfc_generate_function_code): Move recursive
2927 check to the right position.
2929 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
2932 * trans-common.c (translate_common): Do not offset the whole
2935 2009-04-03 Tobias Burnus <burnus@net-b.de>
2938 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
2939 if it is not a procedure pointer.
2940 * primary.c (match_actual_arg): Ditto.
2942 2009-03-31 Joseph Myers <joseph@codesourcery.com>
2944 PR preprocessor/15638
2945 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
2947 2009-03-30 Steven G. Kargl <kargls@comcast.net>
2950 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
2951 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
2952 comments. Minor whitespace cleanup.
2953 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
2954 (resolve_deallocate_expr (gfc_expr *e): Update error message.
2955 (resolve_allocate_expr): Remove dead code. Update error message.
2956 Move error checking to ...
2957 (resolve_allocate_deallocate): ... here. Add additional error
2958 checking for STAT, ERRMSG, and allocate-objects.
2959 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
2960 Check for redundant uses of STAT and ERRMSG. Reword error message
2961 and add checking for pointer, allocatable, and proc_pointer attributes.
2963 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
2968 * symbol.c : Add gfc_global_ns_list.
2969 * decl.c (add_global_entry): Set the namespace ('ns') field.
2970 * gfortran.h : Add the resolved field to gfc_namespace. Add the
2971 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
2972 gfc_option_t. Add the prototype for gfc_free_dt_list.
2973 * lang.opt : Add the whole-file option.
2974 * invoke.texi : Document the whole-file option.
2975 * resolve.c (resolve_global_procedure): If the fwhole-file
2976 option is set, reorder gsymbols to ensure that translation is
2977 in the right order. Resolve the gsymbol's namespace if that
2978 has not occurred and then check interfaces.
2979 (resolve_function): Move call to resolve_global_procedure.
2980 (resolve_call): The same.
2981 (resolve_codes): Store the current labels_obstack.
2982 (gfc_resolve) : Return if the namespace is already resolved.
2983 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
2984 option is selected, use the backend_decl of a gsymbol, if it is
2986 parse.c (add_global_procedure, add_global_program): If the flag
2987 whole-file is set, add the namespace to the gsymbol.
2988 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
2989 the global namespace list. Rearrange to do resolution of all
2990 the procedures in a file, followed by their translation.
2991 * options.c (gfc_init_options): Add -fwhole-file.
2992 (gfc_handle_option): The same.
2994 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2996 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
2997 family of intrinsics instead of BUILT_IN_INF family.
2998 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
2999 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
3001 2009-03-30 Jakub Jelinek <jakub@redhat.com>
3003 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
3004 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
3006 2009-03-30 Joseph Myers <joseph@codesourcery.com>
3008 PR rtl-optimization/323
3009 * options.c (gfc_post_options): Set
3010 flag_excess_precision_cmdline. Give an error for
3011 -fexcess-precision=standard for processors where the option is
3014 2009-03-29 Joseph Myers <joseph@codesourcery.com>
3016 PR preprocessor/34695
3017 * cpp.c (cb_cpp_error): New.
3018 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
3019 Don't check cpp_errors (cpp_in).
3020 (gfc_cpp_init_0): Set cb->error.
3022 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
3025 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
3026 expr.c (gfc_match_init_expr): Add global variable init_flag to
3027 flag matching an initialization expression.
3028 (check_intrinsic_op): Move no longer reachable error message to ...
3029 * arith.c (arith_power): ... here. Remove gfc_ prefix in
3030 gfc_arith_power. Use init_flag. Allow constant folding of x**y
3031 when y is REAL or COMPLEX.
3032 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
3033 for constant folding.
3034 * gfc_power: Update gfc_arith_power to arith_power
3036 2009-03-29 Daniel Kraft <d@domob.eu>
3039 * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
3040 added a comment explaining DEFERRED binding handling.
3041 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
3042 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
3043 and do some validity checks for DEFERRED and this construct.
3044 * module.c (binding_overriding): New string constant for DEFERRED.
3045 (mio_typebound_proc): Module-IO DEFERRED flag.
3046 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
3047 binding is not overridden by a DEFERRED one.
3048 (resolve_typebound_procedure): Allow abstract interfaces as targets
3049 for DEFERRED bindings.
3050 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
3051 (resolve_fl_derived): Use new "ensure_not_abstract" method for
3052 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
3053 binding is overridden.
3054 (check_typebound_baseobject): New method.
3055 (resolve_compcall), (resolve_typebound_call): Check base-object of
3056 the type-bound procedure call.
3057 * gfc-internals.texi (Type-bound procedures): Document a little bit
3058 about internal handling of DEFERRED bindings.
3060 2009-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3063 * gfortran.h (gfc_st_label): Fix comment.
3064 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
3065 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
3066 END SELECT with labels.
3067 (check_do_closure): Fix formatting.
3068 (parse_do_block): Fix typo in error message.
3069 * resolve.c (code_stack): Remove tail member. Update comment to
3070 new use of reachable_labels.
3071 (reachable_labels): Rename to ...
3072 (find_reachable_labels): ... this. Overhaul. Update preceding
3074 (resolve_branch): Fix comment preceding function. Rewrite.
3075 (resolve_code): Update call to find_reachable_labels. Add code to
3076 deal with EXEC_END_BLOCK.
3077 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
3078 Add 2009 to copyright years.
3079 * trans.c (gfc_trans_code): Likewise on both counts.
3081 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
3084 * expr.c (gfc_check_assign): Allow pointer components when
3088 * resolve.c (check_data_variable): Treat pointer arrays with
3091 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
3094 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
3095 have a string_length.
3097 2009-03-28 Tobias Burnus <burnus@net-b.de>
3100 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
3101 Add GFC_RTCHECK_DO support.
3102 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
3103 * invoke.texi (-fcheck): Document "do" option.
3105 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
3108 * trans-array.c (get_elemental_fcn_charlen): Remove.
3109 (get_array_charlen): New function to replace previous.
3111 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
3114 * parse.c (parse_derived): Do not break on finding pointer,
3115 allocatable or private components.
3117 2009-03-28 Tobias Burnus <burnus@net-b.de>
3120 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
3121 * trans-decl.c (gfc_generate_function_code): Add recursion check.
3122 * invoke.texi (-fcheck): Add recursive option.
3124 2009-03-28 Tobias Burnus <burnus@net-b.de>
3127 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
3129 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3130 Paul Thomas <pault@gcc.gnu.org>
3131 Tobias Burnus <burnus@net-b.de>
3133 * gfortran.h (gfc_option_t): Add rtcheck.
3134 * lang.opt: New option -fcheck.
3135 * libgfortran.h: Add GFC_RTCHECK_* constants.
3136 * invoke.texi: Document -fcheck.
3137 * options.c (gfc_handle_runtime_check_option): New function.
3138 (gfc_init_options,gfc_post_options,gfc_handle_option):
3141 2009-03-27 Richard Guenther <rguenther@suse.de>
3143 * trans-array.c (gfc_conv_descriptor_data_addr): Use
3144 gfc_build_addr_expr instead of build_fold_addr_expr.
3145 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
3146 gfc_trans_constant_array_constructor, gfc_conv_array_data,
3147 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
3148 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
3149 gfc_conv_function_val, gfc_conv_operator_assign,
3150 gfc_conv_subref_array_arg, gfc_conv_function_call,
3151 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
3152 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
3153 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3154 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
3155 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
3156 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
3157 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3158 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
3159 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
3160 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
3161 build_filepos, gfc_trans_inquire, gfc_trans_wait,
3162 nml_get_addr_expr, transfer_namelist_element, build_dt,
3163 gfc_trans_dt_end, transfer_array_component, transfer_expr,
3164 transfer_array_desc, gfc_trans_transfer): Likewise.
3165 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
3166 * trans.c (gfc_build_addr_expr): Mark the base of the address
3169 2009-03-27 Tobias Burnus <burnus@net-b.de>
3171 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
3172 (gfc_expr): Add is_snan.
3173 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
3174 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
3175 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
3176 * resolve.c (build_default_init_expr): Update call.
3177 * target-memory.c (encode_float): Ditto.
3178 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
3180 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3182 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
3185 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
3187 * simplify.c (gfc_simplify_transfer): Zero-initialize the
3190 2009-02-27 Tobias Burnus <burnus@net-b.de>
3193 * module.c (read_md5_from_module_file): Add missing quote.
3195 2009-02-27 Tobias Burnus <burnus@net-b.de>
3198 * module.c (read_md5_from_module_file): Include mod version
3199 in had-changed test.
3201 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
3204 * interface.c (compare_type_rank_if): Return 1 if the symbols
3205 are the same and deal with external procedures where one is
3206 identified to be a function or subroutine by usage but the
3209 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
3212 * trans-array.c (gfc_conv_array_initializer): Convert all
3213 expressions rather than ICEing.
3215 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3218 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
3219 make global. Change function name in error messages.
3220 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
3221 (gfc_array_ref_shape): Likewise.
3222 * gfortran.h: Add prototype for gfc_ref_dimen_size.
3223 * simplify.c (simplify_bound_dim): Add ref argument.
3224 If the reference isn't a full array, return one for
3225 the lower bound and the extent for the upper bound.
3226 (simplify_bound): For array sections, take as from the
3227 argument. Add reference to all to simplify_bound_dim.
3229 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
3231 * scanner.c (load_line): At end of line, skip '\r' without setting
3232 the truncation flag.
3234 2009-02-18 Daniel Kraft <d@domob.eu>
3236 * gfortran.texi: New chapter about compiler characteristics.
3237 (Compiler Characteristics): Document KIND type parameters here.
3239 2009-02-18 Tobias Burnus <burnus@net-b.de>
3241 * intrinsic.texi (MALLOC): Make example more portable.
3243 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
3246 * module.c (gfc_dump_module,gfc_use_module): Add module
3249 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
3253 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
3254 function references to ensure that a valid expression is used.
3255 (gfc_conv_function_call): Pass Cray pointers to procedures.
3257 2009-02-03 Jakub Jelinek <jakub@redhat.com>
3259 * gfortranspec.c (lang_specific_driver): Update copyright notice
3262 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
3266 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
3267 descriptor ubound for UBOUND, when the array lbound == 1.
3269 2009-01-27 Daniel Kraft <d@domob.eu>
3272 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
3273 for the real type needed to make it work for subcomponent-references.
3275 2009-01-21 Daniel Kraft <d@domob.eu>
3277 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
3279 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
3282 * resolve.c (check_host_association): Remove the matching to
3283 correct an incorrect host association and use manipulation of
3284 the expression instead.
3286 2009-01-20 Tobias Burnus <burnus@net-b.de>
3288 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
3290 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
3293 * simplify.c (simplify_bound): Don't use array specification
3294 if variable or component has subsequent references.
3296 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3299 * module.c (write_common_0): Add argument 'this_module' and
3300 check that non-use associated common blocks are written first.
3301 (write_common): Call write_common_0 twice, once with true and
3304 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3307 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
3308 been absorbed into gfc_conv_intrinsic_transfer. All
3309 references to it in trans-intrinsic.c have been changed
3310 accordingly. PR fixed by using a temporary for scalar
3311 character transfer, when the source is shorter than the
3314 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3317 * module.c (write_common_0): Revert patch of 2009-01-05.
3319 2009-01-16 Janus Weil <janus@gcc.gnu.org>
3322 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
3324 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
3325 Enable procedure pointers as module variables.
3327 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
3329 * ChangeLog-2007: Clean out svn merge droppings.
3331 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
3334 * target-memory.c (encode_derived): Encode NULL.
3336 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
3339 * resolve.c (check_host_association): Use the symtree name to
3340 search for a potential contained procedure, since this is the
3341 name by which it would be referenced.
3343 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3346 * interface.c (gfc_procedure_use): Don't warn about functions
3348 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
3351 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
3354 * module.c (write_common_0): Use the name of the symtree rather
3355 than the common block, to determine if the common has been
3358 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
3361 * check.c (gfc_check_random_seed): Added size check for GET
3362 dummy argument, reworded error messages to follow common pattern.
3364 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
3367 * trans-types.c (gfc_get_derived_type): Check for the
3368 presence of derived->ns->proc_name before
3369 accessing derived->ns->proc_name->attr.flavor .
3370 * resolve.c (resolve_symbol): Likewise.
3372 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
3375 * gfortran.h : Add bit to gfc_expr 'user_operator'
3376 * interface.c (gfc_extend_expr): Set the above if the operator
3377 is substituted by a function.
3378 * resolve.c (check_host_association): Return if above is set.
3380 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
3383 * ChangeLog-2008: Fix function name.
3386 * dependency.c (gfc_check_argument_var_dependency):
3387 Move the check for pointerness inside the if block
3388 so that it doesn't affect the return value.
3391 * trans-stmt.c (gfc_trans_call):
3392 Add the dependency code after the loop bounds calculation one.
3394 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
3396 * intrinsic.c (do_simplify): Removed already implemented TODO.
3398 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
3401 * simplify.c (gfc_simplify_merge): New.
3402 * intrinsic.h (gfc_simplify_merge): New prototype.
3403 * intrinsic.c (add_functions): Added simplification for MERGE.
3405 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
3408 * gfortran.h (gfc_is_data_pointer): Added prototype
3409 * resolve.c (gfc_iso_c_func_interface):
3410 Use gfc_is_data_pointer to test for pointer attribute.
3411 * dependency.c (gfc_is_data_pointer):
3412 Support pointer-returning functions.
3414 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
3416 * symbol.c (save_symbol): Don't SAVE function results.
3418 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
3421 * resolve.c (resolve_call): When searching for proper host
3422 association, use symtree rather than symbol. For everything
3423 except generic subroutines, substitute the symtree in the call
3424 rather than the symbol.
3427 Copyright (C) 2009 Free Software Foundation, Inc.
3429 Copying and distribution of this file, with or without modification,
3430 are permitted in any medium without royalty provided the copyright
3431 notice and this notice are preserved.