1 2009-11-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 * trans-const.c (gfc_conv_const): Set se->expr to a constant on error.
6 2009-11-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
9 * trans-array.c (gfc_conv_array_transpose): Delete unnecessary assert.
11 2009-11-26 Janus Weil <janus@gcc.gnu.org>
15 * gfortran.h (gfc_is_function_return_value): New prototype.
16 * match.c (gfc_match_call): Use new function
17 'gfc_is_function_return_value'.
18 * primary.c (gfc_is_function_return_value): New function to check if a
19 symbol is the return value of an encompassing function.
20 (match_actual_arg,gfc_match_rvalue,match_variable): Use new function
21 'gfc_is_function_return_value'.
22 * resolve.c (resolve_common_blocks,resolve_actual_arglist): Ditto.
24 2009-11-25 Jakub Jelinek <jakub@redhat.com>
27 * trans-openmp.c (gfc_trans_omp_do): When dovar isn't a VAR_DECL,
28 don't use simple loop and handle clauses properly.
30 2009-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
33 * decl.c (variable_decl): Do not error on initialization within a
34 derived type specification of a pure procedure.
36 2009-11-24 Janus Weil <janus@gcc.gnu.org>
39 * resolve.c (resolve_actual_arglist): Make sure procedure pointer
40 actual arguments are resolved correctly.
41 (resolve_function): An EXPR_FUNCTION which is a procedure pointer
42 component, has already been resolved.
43 (resolve_fl_derived): Procedure pointer components should not be
46 2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
49 * trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
50 with error message if not constant.
51 * resolve.c (next_data_value): Delete check for constant.
53 2009-11-20 Janus Weil <janus@gcc.gnu.org>
55 * intrinsic.texi (C_F_PROCPOINTER): Remove obsolete comment.
57 2009-11-20 Paul Thomas <pault@gcc.gnu.org>
58 Janus Weil <janus@gcc.gnu.org>
61 * trans-expr.c (gfc_conv_procedure_call): If procedure pointer
62 component call, use the component's 'always_explicit' attr
65 2009-11-19 Janus Weil <janus@gcc.gnu.org>
67 * trans-expr.c (conv_isocbinding_procedure): New function.
68 (gfc_conv_procedure_call): Move ISO_C_BINDING stuff to
71 2009-11-19 Tobias Burnus <burnus@net-b.de>
73 * gfortran.texi (Interoperable Subroutines and Functions): Fix
76 2009-11-18 Janus Weil <janus@gcc.gnu.org>
79 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
80 dummies which are passed to C_F_PROCPOINTER.
82 2009-11-18 Alexandre Oliva <aoliva@redhat.com>
84 * module.c (mio_f2k_derived): Initialize op.
86 2009-11-15 Janus Weil <janus@gcc.gnu.org>
89 * match.c (gfc_match_call): If we're inside a function with derived
90 type return value, allow calling a TBP of the result variable.
92 2009-11-12 Tobias Burnus <burnus@net-b.de>
94 * intrinsic.texi (XOR): Refer also to .NEQV.
95 (ISO_FORTRAN_ENV): State which parameters are F2008.
97 2009-11-11 Janus Weil <janus@gcc.gnu.org>
100 * resolve.c (resolve_ref): Take care of procedure pointer component
103 2009-11-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
106 * resolve.c (is_illegal_recursion): Return false if sym is program.
108 2009-11-06 Steven G. Kargl <kargl@gcc.gnu.org>
110 * resolve.c (check_typebound_override): Remove duplicate "in" in error
113 2009-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
116 * fortran/trans-decl.c: Silence intent(out) warning for derived type
117 dummy arguments with default initialization.
119 2009-11-05 Janus Weil <janus@gcc.gnu.org>
122 * interface.c (matching_typebound_op,gfc_extend_assign): Handle CLASS
125 2009-11-05 Janus Weil <janus@gcc.gnu.org>
129 * resolve.c (resolve_function,resolve_call): Prevent abstract interfaces
130 from being called, but allow deferred type-bound procedures with
133 2009-11-04 Tobias Burnus <burnus@gcc.gnu.org>
134 Janus Weil <janus@gcc.gnu.org>
138 * interface.c (gfc_check_operator_interface): Handle CLASS arguments.
139 * resolve.c (resolve_allocate_expr): Handle allocatable components of
142 2009-11-04 Richard Guenther <rguenther@suse.de>
144 * options.c (gfc_post_options): Rely on common code processing
145 LTO options. Only enable -fwhole-file here.
147 2009-11-03 Tobias Burnus <burnus@net-b.de>
150 * trans-expr.c (gfc_conv_procedure_call): Fix presence check
151 for optional arguments.
153 2009-11-01 Tobias Burnus <burnus@net-b.de>
156 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
157 autodeallocated allocatable scalars at the end of scope.
158 (gfc_generate_function_code): Fix indention.
159 * trans-expr.c (gfc_conv_procedure_call): For allocatable
160 scalars, fix calling by reference and autodeallocating
161 of intent out variables.
163 2009-11-01 Tobias Burnus <burnus@net-b.de>
166 * trans-expr.c (gfc_conv_procedure_call): Deallocate intent-out
167 variables only when present. Remove unneccessary present check.
169 2009-10-29 Tobias Burnus <burnus@net-b.de>
172 * trans-expr.c (gfc_conv_procedure_call,gfc_conv_expr_reference):
173 Use for generic EXPR_FUNCTION the attributes of the specific
176 2009-10-29 Janne Blomqvist <jb@gcc.gnu.org>
179 * resolve.c (apply_default_init_local): Treat -fno-automatic as if
182 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
184 * trans-common.c (create_common): Set TREE_PUBLIC to false on
187 2009-10-26 Janus Weil <janus@gcc.gnu.org>
190 * trans.c (gfc_trans_code): Remove call to
191 'tree_annotate_all_with_location'. Location should already be set.
192 * trans-openmp.c (gfc_trans_omp_workshare): Ditto.
193 * trans-stmt.c (gfc_trans_allocate): Do correct data initialization for
194 CLASS variables with SOURCE tag, plus some cleanup.
196 2009-10-24 Janus Weil <janus@gcc.gnu.org>
197 Paul Thomas <pault@gcc.gnu.org>
200 * module.c (load_derived_extensions): Skip symbols which are not being
203 2009-10-24 Paul Thomas <pault@gcc.gnu.org>
206 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Stop'extent'
209 2009-10-23 Janus Weil <janus@gcc.gnu.org>
212 * trans-expr.c (gfc_trans_scalar_assign): Handle CLASS variables.
214 2009-10-23 Janus Weil <janus@gcc.gnu.org>
217 * match.c (conformable_arrays): Move to resolve.c.
218 (gfc_match_allocate): Don't resolve SOURCE expr yet, and move some
219 checks to resolve_allocate_expr.
220 * resolve.c (conformable_arrays): Moved here from match.c.
221 (resolve_allocate_expr): Moved some checks here from gfc_match_allocate.
222 (resolve_code): Resolve SOURCE tag for ALLOCATE expressions.
224 2009-10-22 Janus Weil <janus@gcc.gnu.org>
227 * resolve.c (resolve_codes): Don't clear 'cs_base' for BLOCK constructs,
228 to make sure labels are treated correctly.
229 * symbol.c (gfc_get_st_label): Create labels in the right namespace.
230 For BLOCK constructs go into the parent namespace.
232 2009-10-21 Janus Weil <janus@gcc.gnu.org>
236 * match.c (select_type_set_tmp): Set flavor for temporary.
237 * resolve.c (resolve_class_typebound_call): Correctly resolve actual
240 2009-10-20 Paul Thomas <pault@gcc.gnu.org>
243 * resolve.c (resolve_arg_exprs): New function.
244 (resolve_class_compcall): Call the above.
245 (resolve_class_typebound_call): The same.
247 2009-10-19 Janus Weil <janus@gcc.gnu.org>
250 * parse.c (parse_derived): Correctly set 'alloc_comp' and 'pointer_comp'
252 * trans-array.c (structure_alloc_comps): Handle deallocation and
253 nullification of allocatable scalar components.
254 * trans-decl.c (gfc_get_symbol_decl): Remember allocatable scalars for
255 automatic deallocation.
256 (gfc_trans_deferred_vars): Automatically deallocate allocatable scalars.
258 2009-10-19 Tobias Burnus <burnus@net-b.de>
259 Steven G. Kargl <kargl@gcc.gnu.org>
262 * symbol.c (gfc_undo_symbols): Add NULL check.
263 * match.c (gfc_match_equivalence): Add check for
266 2009-10-19 Richard Guenther <rguenther@suse.de>
269 * trans-expr.c (gfc_trans_scalar_assign): Do not call
272 2009-10-17 Janus Weil <janus@gcc.gnu.org>
273 Paul Thomas <pault@gcc.gnu.org>
276 * decl.c (gfc_match_data_decl): Add BT_CLASS for undefined type
277 and empty type errors.
278 * parse.c (gfc_build_block_ns): Only set recursive if parent ns
284 * gfortran.h : Add class_ok bitfield to symbol_attr.
285 * decl.c (build_sym): Set attr.class_ok if dummy, pointer or
287 (build_struct): Use gfc_try 't' to carry errors past the call
288 to encapsulate_class_symbol.
289 (attr_decl1): For a CLASS object, apply the new attribute to
291 * match.c (gfc_match_select_type): Set attr.class_ok for an
293 * resolve.c (resolve_fl_variable_derived): Check a CLASS object
294 is dummy, pointer or allocatable by testing the class_ok and
295 the use_assoc attribute.
297 2009-10-16 Janus Weil <janus@gcc.gnu.org>
300 * resolve.c (resolve_ordinary_assign): Reject intrinsic assignments
301 to polymorphic variables.
303 2009-10-16 Paul Thomas <pault@gcc.gnu.org>
307 * trans-expr.c (select_class_proc): Convert the expression for the
308 vindex, carried on the first member of the esym list.
309 * gfortran.h : Add the vindex field to the esym_list structure.
310 and eliminate the class_object field.
311 * resolve.c (check_class_members): Remove the setting of the
313 (vindex_expr): New function.
314 (get_class_from_expr): New function.
315 (resolve_class_compcall): Call the above to find the ultimate
316 class or derived component. If derived, do not generate the
317 esym list. Add and expression for the vindex to the esym list
318 by calling the above.
319 (resolve_class_typebound_call): The same.
321 2009-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
324 * intrinsic.texi: Explicitly state that ETIME and DTIME take
325 REAL(4) arguments. Fix nearby typographically errors where
326 /leq was used instead of \leq.
328 2009-10-13 Janus Weil <janus@gcc.gnu.org>
331 * decl.c (encapsulate_class_symbol): Add new component '$size'.
332 * resolve.c (resolve_allocate_expr): Move CLASS handling to
334 (resolve_class_assign): Replaced by gfc_trans_class_assign.
335 (resolve_code): Remove calls to resolve_class_assign.
336 * trans.c (gfc_trans_code): Use new function gfc_trans_class_assign.
337 * trans-expr.c (get_proc_ptr_comp): Fix a memory leak.
338 (gfc_conv_procedure_call): For CLASS dummies, set the
340 (gfc_trans_class_assign): New function, replacing resolve_class_assign.
341 * trans-stmt.h (gfc_trans_class_assign): New prototype.
342 * trans-stmt.c (gfc_trans_allocate): Use correct size when allocating
343 CLASS variables. Do proper initialization. Move some code here from
344 resolve_allocate_expr.
346 2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
349 * io.c (check_format): Fix locus for error messages and fix a comment.
351 2009-10-11 Paul Thomas <pault@gcc.gnu.org>
354 * decl.c (hash_value): New function.
355 (gfc_match_derived_decl): Call it.
357 2009-10-09 Janus Weil <janus@gcc.gnu.org>
360 * decl.c (build_struct): Bugfix for CLASS components.
362 2009-10-09 Tobias Burnus <burnus@net-b.de>
365 * decl.c (encapsulate_class_symbol): Save attr.abstract.
366 * resolve.c (resolve_allocate_expr): Reject class allocate
367 without typespec or source=.
368 * trans-stmt.c (gfc_trans_allocate): Change gfc_warning
369 into gfc_error for "not yet implemented".
371 2009-10-09 Janus Weil <janus@gcc.gnu.org>
374 * gfortran.h (gfc_select_type_stack): New struct, to be used as a stack
375 for SELECT TYPE statements.
376 (select_type_stack): New global variable.
377 (type_selector,select_type_tmp): Removed.
378 * match.c (type_selector,type_selector): Removed.
379 (select_type_stack): New variable, serving as a stack for
380 SELECT TYPE statements.
381 (select_type_push,select_type_set_tmp): New functions.
382 (gfc_match_select_type): Call select_type_push.
383 (gfc_match_type_is): Call select_type_set_tmp.
384 * parse.c (select_type_pop): New function.
385 (parse_select_type_block): Call select_type_pop.
386 * symbol.c (select_type_insert_tmp): New function.
387 (gfc_find_sym_tree): Call select_type_insert_tmp.
389 2009-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
391 * arith.c (arith_power): Use mpc_pow_z.
392 * gfortran.h (HAVE_mpc_pow_z): Define.
394 2009-10-07 Daniel Kraft <d@domob.eu>
397 * resolve.c (resolve_contained_fntype): Clarify error message for
398 invalid assumed-length character result on module procedures.
400 2009-10-07 Janus Weil <janus@gcc.gnu.org>
402 * expr.c (gfc_check_pointer_assign): Do the correct type checking when
403 CLASS variables are involved.
404 * match.c (gfc_match_select_type): Parse associate-name in SELECT TYPE
405 statements, and set up a local namespace for the SELECT TYPE block.
406 * parse.h (gfc_build_block_ns): New prototype.
407 * parse.c (parse_select_type_block): Return from local namespace to its
408 parent after SELECT TYPE block.
409 (gfc_build_block_ns): New function for setting up the local namespace
410 for a BLOCK construct.
411 (parse_block_construct): Use gfc_build_block_ns.
412 * resolve.c (resolve_select_type): Insert assignment for the selector
413 variable, in case an associate-name is given, and put the SELECT TYPE
414 statement inside a BLOCK.
415 (resolve_code): Call resolve_class_assign after checking the assignment.
416 * symbol.c (gfc_find_sym_tree): Moved some code here from
418 (gfc_get_ha_sym_tree): Moved some code to gfc_find_sym_tree.
420 2009-10-07 Paul Thomas <pault@gcc.gnu.org>
423 * resolve.c (check_class_members): Reset compcall.assign.
425 2009-10-05 Paul Thomas <pault@gcc.gnu.org>
427 * trans-expr.c (select_class_proc): New function.
428 (conv_function_val): Deal with class methods and call above.
429 * symbol.c (gfc_type_compatible): Treat case where both ts1 and
431 gfortran.h : Add structure gfc_class_esym_list and include in
432 the structure gfc_expr.
433 * module.c (load_derived_extensions): New function.
434 (read_module): Call above.
435 (write_dt_extensions): New function.
436 (write_derived_extensions): New function.
437 (write_module): Use the above.
438 * resolve.c (resolve_typebound_call): Add a function expression
439 for class methods. This carries the chain of symbols for the
440 dynamic dispatch in select_class_proc.
441 (resolve_compcall): Add second, boolean argument to indicate if
442 a function is being handled.
443 (check_members): New function.
444 (check_class_members): New function.
445 (resolve_class_compcall): New function.
446 (resolve_class_typebound_call): New function.
447 (gfc_resolve_expr): Call above for component calls..
449 2009-10-05 Daniel Kraft <d@domob.eu>
452 * trans-stmt.c (gfc_trans_goto): Ignore statement list on assigned goto
455 2009-10-03 Richard Guenther <rguenther@suse.de>
457 * options.c (gfc_post_options): Handle -flto and -fwhopr.
459 2009-10-02 Tobias Burnus <burnus@net-b.de>
462 * trans-decl.c (gfc_init_default_dt): Check for presence of
463 the argument only if it is optional or in entry master.
464 (init_intent_out_dt): Ditto; call gfc_init_default_dt
465 for all derived types with initializers.
467 2009-10-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
470 * gfortran.h (HAVE_mpc_arc): Define.
471 * simplify.c (gfc_simplify_acos): Handle complex acos.
472 (gfc_simplify_acosh): Likewise for acosh.
473 (gfc_simplify_asin): Likewise for asin.
474 (gfc_simplify_asinh): Likewise for asinh.
475 (gfc_simplify_atan): Likewise for atan.
476 (gfc_simplify_atanh): Likewise for atanh.
478 2009-10-01 Tobias Burnus <burnus@net-b.de>
481 * decl.c (do_parm): Call add_init_expr_to_sym.
483 2009-09-30 Dennis Wassel <dennis.wassel@gmail.com>
485 * gcc/fortran/trans-array.c (gfc_trans_array_bound_check): Improved
486 bounds checking error messages. (gfc_conv_array_ref): Likewise.
487 (gfc_conv_ss_startstride): Likewise.
489 2009-09-30 Janus Weil <janus@gcc.gnu.org>
491 * resolve.c (check_typebound_baseobject): Don't check for
492 abstract types for CLASS.
493 (resolve_class_assign): Adapt for RHS being a CLASS.
494 * trans-intrinsic.c (gfc_conv_associated): Add component ref
497 2009-09-30 Janus Weil <janus@gcc.gnu.org>
499 * check.c (gfc_check_same_type_as): New function for checking
500 SAME_TYPE_AS and EXTENDS_TYPE_OF.
501 * decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class
502 container, if the contained type has it. Add an initializer for the
504 (add_init_expr_to_sym): Handle BT_CLASS.
505 (vindex_counter): New counter for setting vindices.
506 (gfc_match_derived_decl): Set vindex for all derived types, not only
507 those which are being extended.
508 * expr.c (gfc_check_assign_symbol): Handle NULL initialization of class
510 * gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and
511 GFC_ISYM_EXTENDS_TYPE_OF.
512 (gfc_type_is_extensible): New prototype.
513 * intrinsic.h (gfc_check_same_type_as): New prototype.
514 * intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF.
515 * primary.c (gfc_expr_attr): Handle CLASS-valued functions.
516 * resolve.c (resolve_structure_cons): Handle BT_CLASS.
517 (type_is_extensible): Make non-static and rename to
518 'gfc_type_is_extensible.
519 (resolve_select_type): Renamed type_is_extensible.
520 (resolve_class_assign): Handle NULL pointers.
521 (resolve_fl_variable_derived): Renamed type_is_extensible.
522 (resolve_fl_derived): Ditto.
523 * trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL
524 initialization of class pointer components.
525 (gfc_conv_structure): Handle BT_CLASS.
526 * trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of):
528 (gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF.
530 2009-09-30 Janus Weil <janus@gcc.gnu.org>
532 * gfortran.h (type_selector, select_type_tmp): New global variables.
533 * match.c (type_selector, select_type_tmp): New global variables,
534 used for SELECT TYPE statements.
535 (gfc_match_select_type): Better error handling. Remember selector.
536 (gfc_match_type_is): Create temporary variable.
537 * module.c (ab_attribute): New value 'AB_IS_CLASS'.
538 (attr_bits): New string.
539 (mio_symbol_attribute): Handle 'is_class'.
540 * resolve.c (resolve_select_type): Insert pointer assignment statement,
541 to assign temporary to selector.
542 * symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary
543 in SELECT TYPE statements.
545 2009-09-30 Janus Weil <janus@gcc.gnu.org>
547 * dump-parse-tree.c (show_code_node): Renamed 'alloc_list'.
548 * gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'.
549 (gfc_expr_to_initialize): New prototype.
550 * match.c (alloc_opt_list): Correctly check type compatibility.
551 Renamed 'alloc_list'.
552 (dealloc_opt_list): Renamed 'alloc_list'.
553 * resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize'
554 and make it non-static.
555 (resolve_allocate_expr): Set vindex for CLASS variables correctly.
556 Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'.
557 (resolve_allocate_deallocate): Renamed 'alloc_list'.
558 (check_class_pointer_assign): Rename to 'resolve_class_assign'. Change
559 argument type. Adjust to work with ordinary assignments.
560 (resolve_code): Call 'resolve_class_assign' for ordinary assignments.
561 Renamed 'check_class_pointer_assign'.
562 * st.c (gfc_free_statement): Renamed 'alloc_list'.
563 * trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle
564 size determination and initialization of CLASS variables. Bugfix for
565 ALLOCATE statements with default initialization and SOURCE block.
566 (gfc_trans_deallocate): Renamed 'alloc_list'.
568 2009-09-30 Paul Thomas <pault@gcc.gnu.org>
570 * trans-expr.c (gfc_conv_procedure_call): Convert a derived
571 type actual to a class object if the formal argument is a
574 2009-09-30 Janus Weil <janus@gcc.gnu.org>
577 * decl.c (build_struct): Handle allocatable scalar components.
578 * expr.c (gfc_add_component_ref): Correctly set typespec of expression,
579 after inserting component reference.
580 * match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no
581 variables are being used uninitialized.
582 * primary.c (gfc_match_varspec): Handle CLASS array components.
583 * resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to
585 * trans-array.c (structure_alloc_comps,gfc_trans_deferred_array):
586 Handle allocatable scalar components.
587 * trans-expr.c (gfc_conv_component_ref): Ditto.
588 * trans-types.c (gfc_get_derived_type): Ditto.
590 2009-09-30 Janus Weil <janus@gcc.gnu.org>
592 * decl.c (encapsulate_class_symbol): Modify names of class container
593 components by prefixing with '$'.
594 (gfc_match_end): Handle COMP_SELECT_TYPE.
595 * expr.c (gfc_add_component_ref): Modify names of class container
596 components by prefixing with '$'.
597 * gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and
599 (gfc_case): New field 'ts'.
600 (gfc_exec_op): Add EXEC_SELECT_TYPE.
601 (gfc_type_is_extension_of): New prototype.
602 * match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is):
604 * match.c (match_derived_type_spec): New function.
605 (match_type_spec): Use 'match_derived_type_spec'.
606 (match_case_eos): Modify error message.
607 (gfc_match_select_type): New function.
608 (gfc_match_case): Modify error message.
609 (gfc_match_type_is): New function.
610 (gfc_match_class_is): Ditto.
611 * parse.h (gfc_compile_state): Add COMP_SELECT_TYPE.
612 * parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS
614 (next_statement): Handle ST_SELECT_TYPE.
615 (gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS.
616 (parse_select_type_block): New function.
617 (parse_executable): Handle ST_SELECT_TYPE.
618 * resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of
619 class container components by prefixing with '$'.
620 (resolve_allocate_expr): Ditto.
621 (resolve_select_type): New function.
622 (gfc_resolve_blocks): Handle EXEC_SELECT_TYPE.
623 (check_class_pointer_assign): Modify names of class container
624 components by prefixing with '$'.
625 (resolve_code): Ditto.
626 * st.c (gfc_free_statement): Ditto.
627 * symbol.c (gfc_type_is_extension_of): New function.
628 (gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix.
629 * trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE.
631 2009-09-30 Janus Weil <janus@gcc.gnu.org>
632 Paul Thomas <pault@gcc.gnu.org>
634 * check.c (gfc_check_move_alloc): Arguments don't have to be arrays.
635 The second argument needs to be type-compatible with the first (not the
636 other way around, which makes a difference for CLASS entities).
637 * decl.c (encapsulate_class_symbol): New function.
638 (build_sym,build_struct): Handle BT_CLASS, call
639 'encapsulate_class_symbol'.
640 (gfc_match_decl_type_spec): Remove warning, use BT_CLASS.
641 (gfc_match_derived_decl): Set vindex;
642 * expr.c (gfc_add_component_ref): New function.
643 (gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol):
645 * dump-parse-tree.c (show_symbol): Print vindex.
646 * gfortran.h (bt): New basic type BT_CLASS.
647 (symbol_attribute): New field 'is_class'.
648 (gfc_typespec): Remove field 'is_class'.
649 (gfc_symbol): New field 'vindex'.
650 (gfc_get_ultimate_derived_super_type): New prototype.
651 (gfc_add_component_ref): Ditto.
652 * interface.c (gfc_compare_derived_types): Pointer equality check
653 moved here from gfc_compare_types.
654 (gfc_compare_types): Handle BT_CLASS and use
656 * match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call):
658 * misc.c (gfc_clear_ts): Removed is_class.
659 (gfc_basic_typename,gfc_typename): Handle BT_CLASS.
660 * module.c (bt_types,mio_typespec): Handle BT_CLASS.
661 (mio_symbol): Handle vindex.
662 * primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS.
663 * resolve.c (find_array_spec,check_typebound_baseobject):
665 (resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp'
667 (resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS.
668 (check_class_pointer_assign): New function.
669 (resolve_code): Handle BT_CLASS, call check_class_pointer_assign.
670 (resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived,
671 resolve_fl_variable): Handle BT_CLASS.
672 (check_generic_tbp_ambiguity): Add special case.
673 (resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS.
674 * symbol.c (gfc_get_ultimate_derived_super_type): New function.
675 (gfc_type_compatible): Handle BT_CLASS.
676 * trans-expr.c (conv_parent_component_references): Handle CLASS
678 (gfc_conv_initializer): Handle BT_CLASS.
679 * trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type):
682 2009-09-29 Daniel Kraft <d@domob.eu>
685 * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
686 (struct gfc_namespace): Convert flags to bit-fields and add flag
687 `construct_entities' for use with BLOCK constructs.
688 (enum gfc_exec_code): Add EXEC_BLOCK.
689 (struct gfc_code): Add namespace field to union for EXEC_BLOCK.
690 * match.h (gfc_match_block): New prototype.
691 * parse.h (enum gfc_compile_state): Add COMP_BLOCK.
692 * trans.h (gfc_process_block_locals): New prototype.
693 (gfc_trans_deferred_vars): Made public, new prototype.
694 * trans-stmt.h (gfc_trans_block_construct): New prototype.
695 * decl.c (gfc_match_end): Handle END BLOCK correctly.
696 (gfc_match_intent): Error if inside of BLOCK.
697 (gfc_match_optional), (gfc_match_value): Ditto.
698 * match.c (gfc_match_block): New routine.
699 * parse.c (decode_statement): Handle BLOCK statement.
700 (case_exec_markers): Add ST_BLOCK.
701 (case_end): Add ST_END_BLOCK.
702 (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
703 (parse_spec): Check for statements not allowed inside of BLOCK.
704 (parse_block_construct): New routine.
705 (parse_executable): Parse BLOCKs.
706 (parse_progunit): Disallow CONTAINS in BLOCK constructs.
707 * resolve.c (is_illegal_recursion): Find real container procedure and
708 don't get confused by BLOCK constructs.
709 (resolve_block_construct): New routine.
710 (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
711 * st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
712 * trans-decl.c (saved_local_decls): New static variable.
713 (add_decl_as_local): New routine.
714 (gfc_finish_var_decl): Add variable as local if inside BLOCK.
715 (gfc_trans_deferred_vars): Make public.
716 (gfc_process_block_locals): New routine.
717 * trans-stmt.c (gfc_trans_block_construct): New routine.
718 * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.
720 2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
723 * io.c (format_token): Add enumerators for rounding format specifiers.
724 (format_lex): Tokenize the rounding format specifiers.
725 (gfc_match_open): Enable rounding modes in OPEN statement.
727 2009-09-28 Richard Henderson <rth@redhat.com>
729 * f95-lang.c (gfc_init_builtin_functions): Update call to
730 build_common_builtin_nodes.
732 2009-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
734 * simplify.c (gfc_simplify_acos, gfc_simplify_acosh,
735 gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan,
736 gfc_simplify_atanh): Fix error message.
738 2009-09-24 Steven G. Kargl <kargl@gcc.gnu.org>
741 * error.c(gfc_warning_now): Move warnings_are_errors test to
742 after actual emitting of the warning.
743 * parse.c (next_free): Improve error locus printing.
744 (next_fixed): Change gfc_warn to gfc_warning_now, and improve
747 2009-09-16 Michael Matz <matz@suse.de>
750 * trans.h (struct lang_type): Remove nontarget_type member.
751 * trans.c (gfc_add_modify): Don't access it.
752 * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it,
753 instead set DECL_RESTRICTED_P on affected decls.
755 2009-09-14 Richard Henderson <rth@redhat.com>
757 * f95-lang.c (gfc_init_builtin_functions): Update call to
758 build_common_builtin_nodes.
759 (gfc_maybe_initialize_eh): Don't call
760 default_init_unwind_resume_libfunc.
762 2009-09-13 Richard Guenther <rguenther@suse.de>
763 Rafael Avila de Espindola <espindola@google.com>
765 * f95-lang.c (gfc_maybe_initialize_eh): Do not init
766 eh_personality_libfunc.
768 2009-09-11 Janus Weil <janus@gcc.gnu.org>
771 * resolve.c (resolve_ordinary_assign): Don't call resolve_code,
772 to avoid that subsequent codes are resolved more than once.
773 (resolve_code): Make sure that type-bound assignment operators are
777 2009-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
780 * fortran/decl.c(gfc_match_modproc): Check that module procedures
781 from a module can USEd in module procedure statements in other
782 program units. Update locus for better error message display.
783 Detect intrinsic procedures in module procedure statements.
785 2009-09-09 Richard Guenther <rguenther@suse.de>
788 * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
789 left 'tmp' unused in derived type assignment.
791 2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
794 * resolve_c (resolve_allocate_deallocate): Complain
795 if stat or errmsg varaible is an array.
797 2009-09-05 Paul Thomas <pault@gcc.gnu.org>
800 * primary.c (gfc_match_varspec): Do not look for typebound
801 procedures unless the derived type has a f2k_derived namespace.
803 2009-09-03 Diego Novillo <dnovillo@google.com>
805 * f95-lang.c (lang_hooks): Remove const qualifier.
807 2009-09-01 Richard Guenther <rguenther@suse.de>
809 * f95-lang.c (gfc_mark_addressable): Remove.
810 (LANG_HOOKS_MARK_ADDRESSABLE): Likewise.
812 2009-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
815 * scanner.c (next_char): Fix typo in comment.
816 (gfc_get_char_literal): Warn if truncate flag is set for both fixed and
817 free form source, adjusting error locus as needed.
818 * parse.c (next_fixed): Clear the truncate flag.
819 (next_statement): Remove truncate warning.
821 2009-08-31 Janus Weil <janus@gcc.gnu.org>
822 Paul Thomas <pault@gcc.gnu.org>
825 * array.c (gfc_match_array_constructor): Rename gfc_match_type_spec.
826 * decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec,
827 and reject CLASS with -std=f95.
828 (gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix,
829 match_procedure_interface): Rename gfc_match_type_spec.
830 * gfortran.h (gfc_type_compatible): Add prototype.
831 * match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec.
832 * match.c (match_intrinsic_typespec): Rename to match_type_spec, and
833 add handling of derived types.
834 (gfc_match_allocate): Rename match_intrinsic_typespec and check
835 type compatibility of derived types.
836 * symbol.c (gfc_type_compatible): New function to check if two types
839 2009-08-31 Janus Weil <janus@gcc.gnu.org>
842 * check.c (gfc_check_allocated): Implement allocatable scalars.
843 * resolve.c (resolve_allocate_expr,resolve_fl_var_and_proc): Ditto.
844 * trans-intrinsic.c (gfc_conv_allocated): Ditto.
846 2009-08-30 Daniel Kraft <d@domob.eu>
849 * dump-parse-tree.c (show_typebound_proc): Renamed from `show_typebound'
850 and accept gfc_typebound_proc and name instead of the symtree, needed
851 for intrinsic operator output.
852 (show_typebound_symtree): New method calling `show_typebound_proc'.
853 (show_f2k_derived): Output type-bound operators also.
854 (show_symbol): Moved output of `Procedure bindings:' label to
856 * gfortran.texi (Fortran 2003 status): Mention support of
857 array-constructors with explicit type specification, type-bound
858 procedures/operators, type extension, ABSTRACT types and DEFERRED.
859 Link to Fortran 2003 wiki page.
860 (Fortran 2008 status): Fix typo. Link to Fortran 2008 wiki page.
861 * gfc-internals.texi (Type-bound Procedures): Document the new
862 members/attributes of gfc_expr.value.compcall used for type-bound
864 (Type-bound Operators): New section documenting their internals.
866 2009-08-27 Janus Weil <janus@gcc.gnu.org>
869 * expr.c (gfc_check_pointer_assign): Enable interface check for
870 pointer assignments involving procedure pointer components.
871 * gfortran.h (gfc_compare_interfaces): Modified prototype.
872 * interface.c (gfc_compare_interfaces): Add argument 'name2', to be
873 used instead of s2->name. Don't rely on the proc_pointer attribute,
874 but instead on the flags handed to this function.
875 (check_interface1,compare_parameter): Add argument for
876 gfc_compare_interfaces.
877 * resolve.c (check_generic_tbp_ambiguity): Ditto.
879 2009-08-27 Daniel Kraft <d@domob.eu>
882 * gfortran.h (gfc_expr): Optionally store base-object in compcall value
883 and add a new flag to distinguish assign-calls generated.
884 (gfc_find_typebound_proc): Add locus argument.
885 (gfc_find_typebound_user_op), (gfc_find_typebound_intrinsic_op): Ditto.
886 (gfc_extend_expr): Return if failure was by a real error.
887 * interface.c (matching_typebound_op): New routine.
888 (build_compcall_for_operator): New routine.
889 (gfc_extend_expr): Handle type-bound operators, some clean-up and
890 return if failure was by a real error or just by not finding an
891 appropriate operator definition.
892 (gfc_extend_assign): Handle type-bound assignments.
893 * module.c (MOD_VERSION): Incremented.
894 (mio_intrinsic_op): New routine.
895 (mio_full_typebound_tree): New routine to make typebound-procedures IO
896 code reusable for type-bound user operators.
897 (mio_f2k_derived): IO of type-bound operators.
898 * primary.c (gfc_match_varspec): Initialize new fields in gfc_expr and
899 pass locus to gfc_find_typebound_proc.
900 * resolve.c (resolve_operator): Only output error about no matching
901 interface if gfc_extend_expr did not already fail with an error.
902 (extract_compcall_passed_object): Use specified base-object if present.
903 (update_compcall_arglist): Handle ignore_pass field.
904 (resolve_ordinary_assign): Update to handle extended code for
905 type-bound assignments, too.
906 (resolve_code): Handle EXEC_ASSIGN_CALL statement code.
907 (resolve_tb_generic_targets): Pass locus to gfc_find_typebound_proc.
908 (resolve_typebound_generic), (resolve_typebound_procedure): Ditto.
909 (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): Ditto.
910 (ensure_not_abstract_walker), (resolve_fl_derived): Ditto.
911 (resolve_typebound_procedures): Remove not-implemented error.
912 (resolve_typebound_call): Handle assign-call flag.
913 * symbol.c (find_typebound_proc_uop): New argument to pass locus for
914 error message about PRIVATE, verify that a found procedure is not marked
916 (gfc_find_typebound_intrinsic_op): Ditto.
917 (gfc_find_typebound_proc), (gfc_find_typebound_user_op): New locus arg.
919 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net>
922 * io.c: reverted previous patch.
924 2009-08-25 Janne Blomqvist <jb@gcc.gnu.org>
926 * gfortran.texi: Fix ENCODE example.
928 2009-08-25 Janus Weil <janus@gcc.gnu.org>
931 * primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for
932 calls to procedure pointer components, other references to procedure
933 pointer components are EXPR_VARIABLE.
934 * resolve.c (resolve_actual_arglist): Bugfix (there can be calls without
936 * trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp',
937 removed argument 'se' and made static. Avoid inserting a temporary
938 variable for calling the PPC.
939 (conv_function_val): Renamed gfc_get_proc_ptr_comp.
940 (gfc_conv_procedure_call): Distinguish functions returning a procedure
941 pointer from calls to a procedure pointer. Distinguish calls to
942 procedure pointer components from procedure pointer components as
944 * trans-stmt.h (gfc_get_proc_ptr_comp): Make it static.
946 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
949 * io.c (check_format): Fix to not error on slash after P. Fix some
952 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
955 * io.c (check_format): Fix to not error on right paren after P.
957 2009-08-24 Aldy Hernandez <aldyh@redhat.com>
960 * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
961 (transfer_array_desc): Same.
963 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
966 * io.c (check_format): Add checks for comma and the allowed
967 format specifiers after the 'P' specifier. Fix typo in error message
970 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
973 * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES.
974 (format_lex): Likewise.
975 (token_to_string): New function.
976 (check_format): Use the new tokens and the new function. Add
977 check for positive width.
979 2009-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
981 * fortran/decl.c: Disallow procedure pointers with -std=f95.
983 2009-08-22 Steven K. kargl <kargl@gcc.gnu.org>
984 Paul Thomas <pault@gcc.gnu.org>
986 * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec,
988 * fortran/gfortran.h: Add *expr3 entity to gfc_code. Add prototype
989 for gfc_match_char_spec.
990 * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE=
992 * fortran/match.c (match_intrinsic_typespec): New function to match
993 F2003 intrinsic-type-spec.
994 (conformable_arrays): New function. Check SOURCE= and
995 allocation-object are conformable.
996 (gfc_match_allocate): Use new functions. Match SOURCE= tag.
998 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net>
1001 * io.c : added variable to store original len of fmt
1002 * io.c (check_format): Consume H items using next_char
1003 in both modes to handle consecutive single quotes.
1004 Test for extra characters in fmt, issue warning.
1006 2009-08-21 Janus Weil <janus@gcc.gnu.org>
1009 * primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
1010 (gfc_expr_attr): Use gfc_variable_attr for procedure pointer components.
1011 * resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
1013 * trans-expr.c (gfc_conv_component_ref): Ditto.
1014 (gfc_conv_variable): Ditto.
1015 (gfc_conv_procedure_call): Ditto.
1016 (gfc_trans_pointer_assignment): Ditto.
1017 * trans-types.c (gfc_get_derived_type): Ditto.
1019 2009-08-20 Tobias Schlüter <tobi@gcc.gnu.org>
1021 * trans-stmt.c (gfc_trans_do): Add a few missing folds.
1023 2009-08-20 Michael Matz <matz@suse.de>
1026 * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
1027 instead of equality.
1029 2009-08-20 Janus Weil <janus@gcc.gnu.org>
1032 * resolve.c (resolve_symbol): Don't resolve formal_ns of intrinsic
1035 2009-08-18 Michael Matz <matz@suse.de>
1037 * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early,
1038 change order of length calculation to (end - start) + 1.
1039 (gfc_get_interface_mapping_array): Adjust call to
1040 gfc_get_nodesc_array_type.
1041 * trans-array.c (gfc_trans_create_temp_array,
1042 gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto.
1043 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
1044 * trans.c (gfc_add_modify): Assignment between base type and nontarget
1045 type are equal enough.
1046 (gfc_call_malloc): Use prvoid_type_node for return value of
1048 (gfc_allocate_with_status): Ditto.
1049 * trans-types.c (gfc_array_descriptor_base): Double size of this array.
1050 (gfc_init_types): Build prvoid_type_node.
1051 (gfc_build_array_type): New bool parameter "restricted".
1052 (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers,
1054 (gfc_get_array_descriptor_base): Ditto.
1055 (gfc_get_array_type_bounds): Ditto.
1056 (gfc_sym_type): Use symbol attributes to feed calls to above functions.
1057 (gfc_get_derived_type): Ditto.
1058 * trans.h (struct lang_type): Add nontarget_type member.
1059 * trans-types.h (prvoid_type_node): Declare.
1060 (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new
1062 * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be
1063 aliased a type with a different alias set than the base type.
1064 (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type.
1066 2009-08-18 Janus Weil <janus@gcc.gnu.org>
1067 Paul Thomas <pault@gcc.gnu.org>
1070 * trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl
1071 using the interface symbol. Character types are returned by reference.
1072 (gfc_get_derived_type): Prevent infinite recursion loop
1073 if a PPC has a derived-type formal arg.
1075 2008-08-17 Paul Thomas <pault@gcc.gnu.org>
1078 * trans-decl.c (gfc_trans_use_stmts): Keep going through use
1079 list if symbol is not use associated.
1081 2009-08-17 Daniel Kraft <d@domob.eu>
1084 * resolve.c (get_checked_tb_operator_target): New routine to do checks
1085 on type-bound operators in common between intrinsic and user operators.
1086 (resolve_typebound_intrinsic_op): Call it.
1087 (resolve_typebound_user_op): Ditto.
1089 2009-08-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1092 * scanner.c (gfc_next_char_literal): Add comment to improve
1094 * io.c (enum format_token): Add FMT_STAR. (format_lex): Add case
1095 for '*'. (check_format): Check for left paren after '*'. Change
1096 format checks to use %L to improve format string error locus.
1098 2009-08-17 Janus Weil <janus@gcc.gnu.org>
1101 * array.c (gfc_resolve_character_array_constructor): Add NULL argument
1103 * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1104 gfc_match_implicit): Ditto.
1105 * expr.c (simplify_const_ref): Fix memory leak.
1106 (gfc_simplify_expr): Add NULL argument to gfc_new_charlen.
1107 * gfortran.h (gfc_new_charlen): Modified prototype.
1108 * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Add NULL
1109 argument to gfc_new_charlen.
1110 * module.c (mio_charlen): Ditto.
1111 * resolve.c (gfc_resolve_substring_charlen,
1112 gfc_resolve_character_operator,fixup_charlen): Ditto.
1113 (resolve_fl_derived,resolve_symbol): Add argument to gfc_charlen.
1114 * symbol.c (gfc_new_charlen): Add argument 'old_cl' (to make a copy of
1115 an existing charlen).
1116 (gfc_set_default_type,generate_isocbinding_symbol): Fix memory leak.
1117 (gfc_copy_formal_args_intr): Add NULL argument to gfc_new_charlen.
1118 * trans-decl.c (create_function_arglist): Fix memory leak.
1120 2009-08-17 Richard Guenther <rguenther@suse.de>
1122 * trans-expr.c (gfc_trans_scalar_assign): Replace hack with
1125 2009-08-15 Tobias Burnus <burnus@net-b.de>
1128 * gfortranspec.c (lookup_option): Remove gfortran-specific
1129 version of -dumpversion.
1131 2009-08-14 Janus Weil <janus@gcc.gnu.org>
1134 * resolve.c (resolve_structure_cons): Make sure that ts.u.derived is
1135 only used if type is BT_DERIVED.
1137 2009-08-13 Janus Weil <janus@gcc.gnu.org>
1140 * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union.
1141 * decl.c (build_struct): Make sure 'cl' is only used
1142 if type is BT_CHARACTER.
1143 * symbol.c (gfc_set_default_type): Ditto.
1144 * resolve.c (resolve_symbol, resolve_fl_derived): Ditto.
1145 (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived'
1146 is only used if type is BT_DERIVED.
1147 * trans-io.c (transfer_expr): Make sure 'derived' is only used if type
1148 is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR).
1149 * array.c: Mechanical replacements to accomodate union in gfc_typespec.
1153 * dump-parse-tree.c: Ditto.
1155 * interface.c: Ditto.
1156 * iresolve.c: Ditto.
1164 * simplify.c: Ditto.
1166 * target-memory.c: Ditto.
1167 * trans-array.c: Ditto.
1168 * trans-common.c: Ditto.
1169 * trans-const.c: Ditto.
1170 * trans-decl.c: Ditto.
1171 * trans-expr.c: Ditto.
1172 * trans-intrinsic.c: Ditto.
1173 * trans-io.c: Ditto.
1174 * trans-stmt.c: Ditto.
1175 * trans-types.c: Ditto.
1177 2009-08-13 Janus Weil <janus@gcc.gnu.org>
1180 * resolve.c (resolve_symbol): Move some checking code to
1181 resolve_intrinsic, and call this from here.
1182 (resolve_intrinsic): Some checking code moved here from resolve_symbol.
1183 Make sure each intrinsic is only resolved once.
1185 2009-08-12 Tobias Burnus <burnus@net-b.de>
1188 * symbol.c (gfc_copy_attr): Merge bits instead of replace
1189 bits in gfc_copy_attr.
1190 * gfc_check_pointer_assign (gfc_check_pointer_assign):
1191 Initialize ext_attr bits by zero.
1193 2009-08-11 Richard Guenther <rguenther@suse.de>
1195 * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
1197 2009-08-11 Janus Weil <janus@gcc.gnu.org>
1200 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
1201 components as actual arguments.
1203 2009-08-10 Daniel Kraft <d@domob.eu>
1206 * gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op.
1207 (gfc_find_typebound_user_op): New routine.
1208 (gfc_find_typebound_intrinsic_op): Ditto.
1209 (gfc_check_operator_interface): Now public routine.
1210 * decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=).
1211 * interface.c (check_operator_interface): Made public, renamed to
1212 `gfc_check_operator_interface' accordingly and hand in the interface
1213 as gfc_symbol rather than gfc_interface so it is useful for type-bound
1214 operators, too. Return boolean result.
1215 (gfc_check_interfaces): Adapt call to `check_operator_interface'.
1216 * symbol.c (gfc_get_namespace): Initialize new field `tb_op'.
1217 (gfc_free_namespace): Free `tb_uop_root'-based tree.
1218 (find_typebound_proc_uop): New helper function.
1219 (gfc_find_typebound_proc): Use it.
1220 (gfc_find_typebound_user_op): New method.
1221 (gfc_find_typebound_intrinsic_op): Ditto.
1222 * resolve.c (resolve_tb_generic_targets): New helper function.
1223 (resolve_typebound_generic): Use it.
1224 (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New.
1225 (resolve_typebound_procedures): Resolve operators, too.
1226 (check_uop_procedure): New, code from gfc_resolve_uops.
1227 (gfc_resolve_uops): Moved main code to new `check_uop_procedure'.
1229 2009-08-10 Janus Weil <janus@gcc.gnu.org>
1232 * decl.c (gfc_match_type_spec): Match CLASS statement and warn about
1233 missing polymorphism.
1234 * gfortran.h (gfc_typespec): Add field 'is_class'.
1235 * misc.c (gfc_clear_ts): Initialize 'is_class' to zero.
1236 * resolve.c (type_is_extensible): New function to check if a derived
1238 (resolve_fl_variable_derived): Add error checks for CLASS variables.
1239 (resolve_typebound_procedure): Disallow non-polymorphic passed-object
1240 dummy arguments, turning warning into error.
1241 (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic
1242 passed-object dummy arguments for procedure pointer components,
1243 turning warning into error. Add error check for CLASS components.
1245 2009-08-05 Tobias Burnus <burnus@net-b.de>
1248 * gfortran.h (ext_attr_id_t): Add typedef for this enum.
1249 (gfc_add_ext_attribute): Use it.
1250 * decl.c (gfc_match_gcc_attributes): Ditto.
1251 * expr.c (gfc_check_pointer_assign): Ditto.
1252 * symbol.c (gfc_add_ext_attribute): Ditto.
1253 (gfc_copy_attr): Copy also ext_attr.
1254 * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
1255 * module.c (mio_symbol_attribute): Save ext_attr in the mod file.
1257 2009-08-05 Tobias Burnus <burnus@net-b.de>
1261 2009-08-04 Tobias Burnus <burnus@net-b.de>
1264 * trans-types.c (gfc_get_function_type): Fix typelist of
1265 functions without argument.
1267 2009-08-05 Paul Thomas <pault@gcc.gnu.org>
1270 * iresolve.c (gfc_resolve_transfer): Correct error in 'mold'
1271 character length for case where length expresson is NULL.
1273 2009-08-04 Tobias Burnus <burnus@net-b.de>
1276 * trans-types.c (gfc_get_function_type): Fix typelist of
1277 functions without argument.
1279 2009-08-04 Paul Thomas <pault@gcc.gnu.org>
1282 * decl.c (add_init_expr_to_sym): Character symbols can only be
1283 initialized with character expressions.
1285 2009-08-02 Janus Weil <janus@gcc.gnu.org>
1288 * decl.c (match_char_length): Warn about old-style character length
1290 * match.c (match_arithmetic_if,gfc_match_if): Modify warning message
1292 (gfc_match_goto): Warn about computed gotos.
1293 (gfc_match_return): Warn about alternate return.
1294 (gfc_match_st_function): Warn about statement functions.
1295 * resolve.c (resolve_fl_procedure): Modify warning message for
1296 assumed-length character functions.
1298 2009-08-01 Paul Thomas <pault@gcc.gnu.org>
1301 * error.c : Add static flag 'warnings_not_errors'.
1302 (gfc_error): If 'warnings_not_errors' is set, branch to code
1304 (gfc_clear_error): Reset 'warnings_not_errors'.
1305 (gfc_errors_to_warnings): New function.
1306 * options.c (gfc_post_options): If pedantic and flag_whole_file
1307 change the latter to a value of 2.
1308 * parse.c (parse_module): Add module namespace to gsymbol.
1309 (resolve_all_program_units): New function.
1310 (clean_up_modules): New function.
1311 (translate_all_program_units): New function.
1312 (gfc_parse_file): If whole_file, do not clean up module right
1313 away and add derived types to namespace derived types. In
1314 addition, call the three new functions above.
1315 * resolve.c (not_in_recursive): New function.
1316 (not_entry_self_reference): New function.
1317 (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN,
1318 procedure must not be in the course of being resolved and
1319 must return false for the two new functions. Pack away the
1320 current derived type list before calling gfc_resolve for the
1321 gsymbol namespace. It is unconditionally an error if the ranks
1322 of the reference and ther procedure do not match. Convert
1323 errors to warnings during call to gfc_procedure_use if not
1325 (gfc_resolve): Set namespace resolved flag to -1 during
1326 resolution and store current cs_base.
1327 * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation
1328 substitute a use associated variable, if it is available in a
1330 (gfc_get_extern_function_decl): If the procedure is use assoc,
1331 do not attempt to find it in a gsymbol because it could be an
1332 interface. If the symbol exists in a module namespace, return
1334 * trans-expr.c (gfc_trans_scalar_assign): If a derived type
1335 assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs.
1336 * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a
1337 boolean argument. Copy component backend_decls directly if the
1338 components are derived types and from_gsym is true.
1339 (gfc_get_derived_type): If whole_file copy the derived type from
1340 the module if it is use associated, otherwise, if can be found
1341 in another gsymbol namespace, use the existing derived type as
1342 the TYPE_CANONICAL and build normally.
1343 * gfortran.h : Add derived_types and resolved fields to
1344 gfc_namespace. Include prototype for gfc_errors_to_warnings.
1346 2009-07-29 Tobias Burnus <burnus@net-b.de>
1349 * trans-types.c (gfc_get_function_type): Do not add hidden
1350 string-length argument for BIND(C) procedures.
1351 * trans-decl.c (create_function_arglist): Skip over nonexisting
1352 string-length arguments for BIND(C) procedures.
1354 2009-07-28 Jakub Jelinek <jakub@redhat.com>
1357 * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of
1358 gfc_error to diagnose invalid COLLAPSE arguments.
1360 2009-07-28 Janus Weil <janus@gcc.gnu.org>
1363 * trans-types.c (gfc_get_ppc_type): For derived types, directly use the
1364 backend_decl, instead of calling gfc_typenode_for_spec, to avoid
1366 (gfc_get_derived_type): Correctly handle PPCs returning derived types,
1367 avoiding infinite recursion.
1369 2009-07-27 Janus Weil <janus@gcc.gnu.org>
1372 * interface.c (gfc_compare_interfaces): Call 'count_types_test' before
1373 'generic_correspondence', and only if checking a generic interface.
1375 2009-07-27 Tobias Burnus <burnus@net-b.de>
1378 * resolve.c (resolve_symbol): Do not initialize pointer derived-types.
1379 * trans-decl.c (init_intent_out_dt): Ditto.
1380 (generate_local_decl): No need to set attr.referenced for DT pointers.
1382 2009-07-26 Tobias Burnus <burnus@net-b.de>
1385 * intrinsic.c (make_generic): Remove assert as "atan" can be
1386 both ISYM_ATAN and ISYM_ATAN2.
1387 (add_functions): Add two-argument variant of ATAN.
1388 * intrinsic.h (gfc_check_atan_2): Add check for it.
1389 * intrinsic.texi (ATAN2): Correct and enhance description.
1390 (ATAN): Describe two-argument variant of ATAN.
1392 2009-07-25 Tobias Burnus <burnus@net-b.de>
1393 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1396 * intrinsic.c (add_functions): Support complex arguments for
1397 acos,acosh,asin,asinh,atan,atanh.
1398 * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support
1400 * simplify.c (gfc_simplify_acos,gfc_simplify_acosh,
1401 gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan,
1402 gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh,
1403 gfc_simplify_acosh,gfc_simplify_atanh): Support
1406 2009-07-25 Richard Guenther <rguenther@suse.de>
1409 * trans-types.c (gfc_get_array_type_bounds): Use
1410 build_distinct_type_copy with a proper TYPE_CANONICAL and
1411 re-use the type-decl of the original type.
1412 * trans-decl.c (build_entry_thunks): Signal cgraph we may not
1414 (create_main_function): Likewise.
1415 (gfc_generate_function_code): Likewise.
1416 * trans-expr.c (gfc_trans_subcomponent_assign): Do not use
1417 fold_convert on record types.
1419 2009-07-25 Janus Weil <janus@gcc.gnu.org>
1422 * decl.c (match_ppc_decl): Implement the PASS attribute for procedure
1424 (match_binding_attributes): Ditto.
1425 * gfortran.h (gfc_component): Add member 'tb'.
1426 (gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const.
1427 * module.c (MOD_VERSION): Bump module version.
1428 (binding_ppc): New string constants.
1429 (mio_component): Only use formal args if component is a procedure
1430 pointer and add 'tb' member.
1431 (mio_typebound_proc): Include pass_arg and take care of procedure
1433 * resolve.c (update_arglist_pass): Add argument 'name' and take care of
1435 (extract_ppc_passed_object): New function, analogous to
1436 extract_compcall_passed_object, but for procedure pointer components.
1437 (update_ppc_arglist): New function, analogous to
1438 update_compcall_arglist, but for procedure pointer components.
1439 (resolve_typebound_generic_call): Added argument to update_arglist_pass.
1440 (resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute.
1441 (resolve_fl_derived): Check the PASS argument for procedure pointer
1443 * symbol.c (verify_bind_c_derived_type): Reject procedure pointer
1444 components in BIND(C) types.
1446 2009-07-24 Janus Weil <janus@gcc.gnu.org>
1449 * array.c (gfc_resolve_character_array_constructor): Use new function
1451 * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1452 gfc_match_implicit): Ditto.
1453 * expr.c (gfc_simplify_expr): Ditto.
1454 * gfortran.h (gfc_new_charlen): New prototype.
1455 * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
1456 function gfc_new_charlen.
1457 * module.c (mio_charlen): Ditto.
1458 * resolve.c (gfc_resolve_substring_charlen,
1459 gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
1460 resolve_symbol): Ditto.
1461 * symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
1462 structure and add it to a namespace.
1463 (gfc_copy_formal_args_intr): Make sure ts.cl is present
1464 for CHARACTER variables.
1466 2009-07-24 Jakub Jelinek <jakub@redhat.com>
1470 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
1471 gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
1473 * trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
1474 * trans-array.h (gfc_trans_scalarized_loop_end): New prototype.
1476 2009-07-23 Jakub Jelinek <jakub@redhat.com>
1479 * io.c (gfc_resolve_dt): Add LOC argument. Fail if
1480 dt->io_unit is NULL. Return FAILURE after issuing error about
1481 negative UNIT number.
1482 (match_io_element): Don't segfault if current_dt->io_unit is NULL.
1483 * gfortran.h (gfc_resolve_dt): Adjust prototype.
1484 * resolve.c (resolve_code): Adjust caller.
1486 2009-07-22 Paul Thomas <pault@gcc.gnu.org>
1489 * trans-decl.c (generate_local_decl): Unreferenced result
1490 variables with allocatable components should be treated like
1491 INTENT_OUT dummy variables.
1493 2009-07-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1495 * trans.h (gfc_set_decl_assembler_name): New prototype.
1496 * trans-decl.c (gfc_set_decl_assembler_name): New function.
1497 (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1498 build_function_decl): Use gfc_set_decl_assembler_name instead of
1499 SET_DECL_ASSEMBLER_NAME.
1500 * trans-common.c (build_common_decl): Use
1501 gfc_set_decl_assembler_name instead of SET_DECL_ASSEMBLER_NAME.
1503 2009-07-21 Richard Guenther <rguenther@suse.de>
1506 * trans-decl.c (gfc_get_extern_function_decl): Do not set
1507 DECL_IS_MALLOC for pointer valued functions.
1508 (build_function_decl): The same.
1510 2009-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
1513 * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that
1514 the optional second argument isn't of COMPLEX type.
1516 2009-07-17 Richard Guenther <rguenther@suse.de>
1519 * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
1520 * trans-decl.c (gfc_gimplify_function): Remove.
1521 (build_entry_thunks): Do not gimplify here.
1522 (create_main_function): Likewise.
1523 (gfc_generate_function_code): Likewise.
1525 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
1526 Manuel López-Ibáñez <manu@gcc.gnu.org>
1529 * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
1530 trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
1531 argument to fold_{unary,binary,ternary}, fold_build[123],
1532 build_call_expr, build_size_arg, build_fold_addr_expr,
1533 build_call_array, non_lvalue, size_diffop,
1534 fold_build1_initializer, fold_build2_initializer,
1535 fold_build3_initializer, fold_build_call_array,
1536 fold_build_call_array_initializer, fold_single_bit_test,
1537 omit_one_operand, omit_two_operands, invert_truthvalue,
1538 fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
1539 combine_comparisons, fold_builtin_*, fold_call_expr,
1540 build_range_check, maybe_fold_offset_to_address, round_up,
1543 2009-07-15 Janus Weil <janus@gcc.gnu.org>
1546 * resolve.c (resolve_symbol): Don't resolve the formal namespace of a
1547 contained procedure.
1549 2009-07-14 Taras Glek <tglek@mozilla.com>
1550 Rafael Espindola <espindola@google.com>
1552 * Make-lang.in (fortran.install-plugin): New target for
1553 installing plugin headers.
1555 2009-07-13 H.J. Lu <hongjiu.lu@intel.com>
1557 * module.c (mio_symbol): Remove the unused variable, formal.
1559 2009-07-13 Janus Weil <janus@gcc.gnu.org>
1562 * module.c (mio_symbol): If the symbol has formal arguments,
1563 the formal namespace will be present.
1564 * resolve.c (resolve_actual_arglist): Correctly handle 'called'
1565 procedure pointer components as actual arguments.
1566 (resolve_fl_derived,resolve_symbol): Make sure the formal namespace
1568 * trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal
1569 arguments of procedure pointer components.
1571 2009-07-12 Tobias Burnus <burnus@net-b.de>
1572 Philippe Marguinaud <philippe.marguinaud@meteo.fr>
1575 * primary.c (match_charkind_name): Fix condition for $ matching.
1578 * libgfortran.h: Typedef the GFC_DTYPE_* enum.
1580 2009-07-11 Tobias Burnus <burnus@net-b.de>
1583 * check.c (gfc_check_fn_rc2008): New function.
1584 * intrinsic.h (gfc_check_fn_rc2008): New prototype.
1585 * intrinsic.c (add_functions): Add complex tan, cosh, sinh,
1588 2009-07-10 Paul Thomas <pault@gcc.gnu.org>
1591 * primary.c (match_kind_param): Return MATCH_NO if the symbol
1594 2008-07-09 Paul Thomas <pault@gcc.gnu.org>
1597 * resolve.c (check_host_association): Use the existing
1598 accessible symtree and treat function expressions with
1599 symbols that have procedure flavor.
1601 2009-07-09 Janus Weil <janus@gcc.gnu.org>
1604 * dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'.
1605 * expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1606 (gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'.
1607 (replace_comp,gfc_expr_replace_comp): New functions, analogous
1608 to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components
1610 * gfortran.h (gfc_expr_replace_comp): New prototype.
1611 (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1612 * interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'.
1613 * match.c (gfc_match_pointer_assignment): Ditto.
1614 * primary.c (gfc_match_varspec): Handle array-valued procedure pointers
1615 and procedure pointer components. Renamed 'is_proc_ptr_comp'.
1616 * resolve.c (resolve_fl_derived): Correctly handle interfaces with
1617 RESULT statement, and handle array-valued procedure pointer components.
1618 (resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed
1620 * trans-array.c (gfc_walk_function_expr): Ditto.
1621 * trans-decl.c (gfc_get_symbol_decl): Security check for presence of
1623 * trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure
1624 pointer components. Renamed 'is_proc_ptr_comp'.
1625 (conv_function_val,gfc_trans_arrayfunc_assign): Renamed
1627 (gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead
1629 * trans-io.c (gfc_trans_transfer): Handle array-valued procedure
1632 2009-07-09 Tobias Burnus <burnus@net-b.de>
1635 * intrinsic.c (gfc_convert_type_warn): Set sym->result.
1636 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1637 for optional arguments.
1639 2009-07-08 Tobias Burnus <burnus@net-b.de>
1642 * simplify.c (gfc_simplify_sign): Handle signed zero correctly.
1643 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Support
1645 * invoke.texi (-fno-sign-zero): Add text regarding SIGN intrinsic.
1647 2008-07-08 Paul Thomas <pault@gcc.gnu.org>
1650 * decl.c (match_procedure_interface): Correct the association
1651 or creation of the interface procedure's symbol.
1653 2009-07-04 Jakub Jelinek <jakub@redhat.com>
1655 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer
1656 maxloc initialize limit to -huge-1 rather than just -huge.
1658 2009-07-04 Janus Weil <janus@gcc.gnu.org>
1661 * interface.c (compare_actual_formal): Take care of proc-pointer-valued
1662 functions as actual arguments.
1663 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1664 * resolve.c (resolve_specific_f0): Use the correct ts.
1666 2009-07-02 Michael Matz <matz@suse.de>
1669 * trans-array.c (gfc_conv_descriptor_stride_get): Return
1670 constant one for strides in the first dimension of ALLOCATABLE
1673 2009-06-30 Janus Weil <janus@gcc.gnu.org>
1676 * trans-types.c (gfc_get_derived_type): Bugfix, reverting one hunk from
1679 2009-06-29 Tobias Burnus <burnus@net-b.de>
1682 * trans-expr.c (gfc_conv_procedure_call): Add -fcheck=pointer check.
1683 * libgfortran.h: Add GFC_RTCHECK_POINTER.
1684 * invoke.texi (-fcheck): Document new pointer option.
1685 * options.c (gfc_handle_runtime_check_option): Handle pointer option.
1687 * gfortran.texi (C Binding): Improve wording.
1688 * iso-c-binding.def: Remove obsolete comment.
1690 2009-06-29 Paul Thomas <pault@gcc.gnu.org>
1693 * dependency.h : Add second bool* argument to prototype of
1694 gfc_full_array_ref_p.
1695 * dependency.c (gfc_full_array_ref_p): If second argument is
1696 present, return true if last dimension of reference is an
1697 element or has unity stride.
1698 * trans-array.c : Add NULL second argument to references to
1699 gfc_full_array_ref_p.
1700 * trans-expr.c : The same, except for;
1701 (gfc_trans_arrayfunc_assign): Return fail if lhs reference
1702 is not a full array or a contiguous section.
1704 2009-06-28 Tobias Burnus <burnus@net-b.de>
1705 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1708 * symbol.c (gfc_add_ext_attribute): New function.
1709 (gfc_get_sym_tree): New argument allow_subroutine.
1710 (gfc_get_symbol,gfc_get_ha_sym_tree,gen_cptr_param,gen_fptr_param
1711 gen_shape_param,generate_isocbinding_symbol): Use it.
1712 * decl.c (find_special): New argument allow_subroutine.
1713 (add_init_expr_to_sym,add_hidden_procptr_result,attr_decl1,
1714 match_procedure_in_type,gfc_match_final_decl): Use it.
1715 (gfc_match_gcc_attributes): New function.
1716 * gfortran.texi (Mixed-Language Programming): New section
1717 "GNU Fortran Compiler Directives".
1718 * gfortran.h (ext_attr_t): New struct.
1719 (symbol_attributes): Use it.
1720 (gfc_add_ext_attribute): New prototype.
1721 (gfc_get_sym_tree): Update pototype.
1722 * expr.c (gfc_check_pointer_assign): Check whether call
1723 convention is the same.
1724 * module.c (import_iso_c_binding_module, create_int_parameter,
1725 use_iso_fortran_env_module): Update gfc_get_sym_tree call.
1726 * scanner.c (skip_gcc_attribute): New function.
1727 (skip_free_comments,skip_fixed_comments): Use it.
1728 (gfc_next_char_literal): Support !GCC$ lines.
1729 * resolve.c (check_host_association): Update
1730 gfc_get_sym_tree call.
1731 * match.c (gfc_match_sym_tree,gfc_match_call): Update
1732 gfc_get_sym_tree call.
1733 * trans-decl.c (add_attributes_to_decl): New function.
1734 (gfc_get_symbol_decl,get_proc_pointer_decl,
1735 gfc_get_extern_function_decl,build_function_decl: Use it.
1736 * match.h (gfc_match_gcc_attributes): Add prototype.
1737 * parse.c (decode_gcc_attribute): New function.
1738 (next_free,next_fixed): Support !GCC$ lines.
1739 * primary.c (match_actual_arg,check_for_implicit_index,
1740 gfc_match_rvalue,gfc_match_rvalue): Update
1741 gfc_get_sym_tree call.
1743 2009-06-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1745 * gfortran.h: Define HAVE_mpc_pow.
1746 * arith.c (complex_reciprocal, complex_pow): If HAVE_mpc_pow,
1747 don't define these functions.
1748 (arith_power): If HAVE_mpc_pow, use mpc_pow.
1750 2009-06-26 Janus Weil <janus@gcc.gnu.org>
1754 * decl.c (add_hidden_procptr_result): Copy the typespec to the hidden
1756 * expr.c (gfc_check_pointer_assign): Enable interface check for
1757 procedure pointer assignments where the rhs is a function returning a
1759 * resolve.c (resolve_symbol): If an external procedure with unspecified
1760 return type can not be implicitly typed, it must be a subroutine.
1762 2009-06-24 Janus Weil <janus@gcc.gnu.org>
1765 * gfortran.h (gfc_component): New member 'formal_ns'.
1766 (gfc_copy_formal_args_ppc,void gfc_ppc_use): New.
1767 * interface.c (gfc_ppc_use): New function, analogous to
1768 gfc_procedure_use, but for procedure pointer components.
1769 * module.c (MOD_VERSION): Bump module version.
1770 (mio_component): Treat formal arguments.
1771 (mio_formal_arglist): Changed argument from gfc_symbol to
1773 (mio_symbol): Changed argument of mio_formal_arglist.
1774 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Call gfc_ppc_use,
1775 to check actual arguments and treat formal args correctly.
1776 (resolve_fl_derived): Copy formal args of procedure pointer components
1777 from their interface.
1778 * symbol.c (gfc_copy_formal_args_ppc): New function, analogous to
1779 gfc_copy_formal_args, but for procedure pointer components.
1781 2009-06-22 Janus Weil <janus@gcc.gnu.org>
1785 * interface.c (compare_parameter): Set implicit type for function
1786 actual arguments with BT_UNKNOWN.
1788 2009-06-22 Tobias Burnus <burnus@net-b.de>
1792 * simplify.c (gfc_simplify_spread): Fix the case that source=
1795 2009-06-22 Paul Thomas <pault@gcc.gnu.org>
1798 * interface.c (gfc_search_interface): Hold back a match to an
1799 elementary procedure until all other possibilities are
1802 2009-06-22 Paul Thomas <pault@gcc.gnu.org>
1805 * simplify.c (gfc_simplify_spread): Restrict the result size to
1806 the limit for an array constructor.
1808 2009-06-21 Janus Weil <janus@gcc.gnu.org>
1811 * interface.c (gfc_compare_interfaces): Take care of implicit typing
1812 when checking the function attribute. Plus another bugfix.
1813 (compare_parameter): Set attr.function and attr.subroutine according
1814 to the usage of a procedure as actual argument.
1816 2009-06-20 Tobias Burnus <burnus@net-b.de>
1819 * trans-decl.c (add_argument_checking): Disable bounds check
1820 for allowed argument storage association.
1822 2009-06-19 Paul Thomas <pault@gcc.gnu.org>
1825 * trans-expr.c (gfc_conv_procedure_call): Do not deallocate
1826 allocatable components if the argument is a pointer.
1828 2009-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1830 * gfortran.h (gfc_expr): Use mpc_t to represent complex numbers.
1832 * arith.c, dump-parse-tree.c, expr.c, module.c, resolve.c,
1833 simplify.c, target-memory.c, target-memory.h, trans-const.c,
1834 trans-expr.c: Convert to mpc_t throughout.
1836 2009-06-19 Ian Lance Taylor <iant@google.com>
1838 * cpp.c (struct gfc_cpp_option_data): Give this struct, used for
1839 the global variable gfc_cpp_option, a name.
1841 2009-06-19 Janus Weil <janus@gcc.gnu.org>
1844 * trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr
1845 to a procedure pointer actual argument, if it is not itself a
1848 2009-06-18 Janus Weil <janus@gcc.gnu.org>
1851 * resolve.c (resolve_contained_fntype): Prevent implicit typing for
1852 procedures with explicit interface.
1853 * symbol.c (gfc_check_function_type): Ditto.
1855 2009-06-16 Ian Lance Taylor <iant@google.com>
1857 * decl.c (build_struct): Rewrite loop over constructor elements.
1859 2009-06-16 Janus Weil <janus@gcc.gnu.org>
1863 * expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with
1865 * gfortran.h (gfc_compare_interfaces): Additional argument.
1866 * interface.c (operator_correspondence): Removed.
1867 (gfc_compare_interfaces): Additional argument to return error message.
1868 Directly use the code from 'operator_correspondence' instead of calling
1869 the function. Check for OPTIONAL. Some rearrangements.
1870 (check_interface1): Call 'gfc_compare_interfaces' without error message.
1871 (compare_parameter): Call 'gfc_compare_interfaces' with error message.
1872 * resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces'
1873 without error message.
1875 2009-06-16 Tobias Burnus <burnus@net-b.de>
1878 * trans-decl.c (create_function_arglist): Copy formal charlist to
1879 have a proper passed_length for -fcheck=bounds.
1881 2009-06-12 Steven G. Kargl <kargls@comcast.net>
1883 * arith.c (gfc_enum_initializer): Move function ...
1884 * decl.c: ... here. Remove gfc_ prefix and make static.
1885 (enumerator_decl): Update function call.
1886 * gfortran.h: Remove gfc_enum_initializer prototype.
1888 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1890 * trans-array.c (gfc_trans_allocate_array_storage): Pass
1892 (gfc_trans_array_constructor_value): Same.
1893 (gfc_trans_scalarized_loop_end): Same.
1894 (gfc_conv_ss_startstride): Same.
1895 (gfc_trans_g77_array): Same.
1896 (gfc_trans_dummy_array_bias): Same.
1897 (gfc_conv_array_parameter): Same.
1898 (structure_alloc_comps): Same.
1899 * trans-expr.c (gfc_conv_function_call): Same.
1900 (fill_with_spaces): Same.
1901 (gfc_trans_string_copy): Same.
1902 (gfc_trans_scalar_assign): Same.
1903 * trans-stmt.c (gfc_trans_goto): Same.
1904 (gfc_trans_if_1): Same.
1905 (gfc_trans_simple_do): Same.
1906 (gfc_trans_do): Same.
1907 (gfc_trans_do_while): Same.
1908 (gfc_trans_logical_select): Same.
1909 (gfc_trans_select): Same.
1910 (gfc_trans_forall_loop): Same.
1911 (gfc_trans_nested_forall_loop): Same.
1912 (generate_loop_for_temp_to_lhs): Same.
1913 (generate_loop_for_rhs_to_temp): Same.
1914 (gfc_trans_forall_1): Same.
1915 (gfc_trans_where_assign): Same.
1916 (gfc_trans_where_3): Same.
1917 (gfc_trans_allocate): Same.
1918 * trans.c (gfc_finish_block): Same.
1919 (gfc_trans_runtime_check): Same.
1920 (gfc_call_malloc): Same.
1921 (gfc_allocate_with_status): Same.
1922 (gfc_call_free): Same.
1923 (gfc_deallocate_with_status): Same.
1924 (gfc_call_realloc): Same.
1925 (gfc_trans_code): Same.
1926 * trans-decl.c (gfc_init_default_dt): Same.
1927 (gfc_generate_constructors): Same.
1928 * trans-io.c (gfc_trans_io_runtime_check): Same.
1929 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
1930 (gfc_conv_intrinsic_fdate): Same.
1931 (gfc_conv_intrinsic_ttynam): Same.
1932 (gfc_conv_intrinsic_minmax): Same.
1933 (gfc_conv_intrinsic_minmax_char): Same.
1934 (gfc_conv_intrinsic_anyall): Same.
1935 (gfc_conv_intrinsic_count): Same.
1936 (gfc_conv_intrinsic_arith): Same.
1937 (gfc_conv_intrinsic_minmaxloc): Same.
1938 (gfc_conv_intrinsic_minmaxval): Same.
1939 (gfc_conv_intrinsic_rrspacing): Same.
1940 (gfc_conv_intrinsic_array_transfer): Same.
1941 (gfc_conv_intrinsic_trim): Same.
1942 (gfc_conv_intrinsic_repeat): Same.
1944 2009-06-12 Janus Weil <janus@gcc.gnu.org>
1947 * resolve.c (resolve_symbol): Additional error check, preventing an
1950 2009-06-11 Paul Thomas <pault@gcc.gnu.org>
1953 * resolve.c (next_data_value): It is an error if the value is
1956 2009-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1959 * intrinsic.c (add_functions): Add simplifiers for ISNAN,
1960 IS_IOSTAT_END and IS_IOSTAT_EOR.
1961 * intrinsic.h (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
1962 gfc_simplify_isnan): New prototypes.
1963 * intrinsic.c (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
1964 gfc_simplify_isnan): New functions.
1966 2009-06-11 Jakub Jelinek <jakub@redhat.com>
1968 * interface.c (fold_unary): Rename to...
1969 (fold_unary_intrinsic): ... this.
1970 (gfc_extend_expr): Adjust caller.
1971 (gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE
1973 * expr.c (gfc_simplify_expr): Initialize start and end before calling
1976 2009-06-10 Dave Korn <dave.korn.cygwin@gmail.com>
1978 * trans-decl.c (create_main_function): Don't build main decl twice.
1980 2009-06-09 Tobias Burnus <burnus@net-b.de>
1982 * trans-decl.c (gfc_generate_function_code): Use gfc_option.rtcheck
1983 instead of flag_bounds_check.
1984 * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and
1987 2009-06-08 Paul Thomas <pault@gcc.gnu.org>
1989 * trans-array.h : Replace prototypes for
1990 gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
1991 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
1992 prototypes of the same names with _get or _set appended.
1993 * trans-array.c : Make the originals of the above static and
1994 new functions for the _get and _set functions. Update all the
1995 references to these descriptor access functions.
1996 * trans-expr.c : Update references to the above descriptor
1998 * trans-intrinsic.c : The same.
1999 * trans-openmp.c : The same.
2000 * trans-stmt.c : The same.
2002 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
2004 * options.c (gfc_post_options): Disable dump_parse_tree
2005 during -fcompare-debug-second.
2007 2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2010 * gfortran.h (gfc_open): Add newunit expression to structure.
2011 * io.c (io_tag): Add new unit tag and fix whitespace.
2012 (match_open_element): Add matching for newunit.
2013 (gfc_free_open): Free the newunit expression.
2014 (gfc_resolve_open): Add newunit to resolution and check constraints.
2015 (gfc_resolve_close): Add check for non-negative unit.
2016 (gfc_resolve_filepos): Likewise.
2017 (gfc_resolve_dt): Likewise.
2018 * trans-io.c (set_parameter_value): Build runtime checks for unit
2019 numbers within range of kind=4 integer. (gfc_trans_open) Set the
2021 * ioparm.def (IOPARM): Define the newunit parameter as a pointer
2022 to GFC_INTEGER_4, pint4.
2024 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2028 * array.c (gfc_append_constructor): Added NULL-check.
2029 * check.c (gfc_check_spread): Check DIM.
2030 (gfc_check_unpack): Check that the ARRAY arguments provides enough
2032 * intrinsic.h (gfc_simplify_spread): New prototype.
2033 (gfc_simplify_unpack): Likewise.
2034 * intrinsic.c (add_functions): Added new simplifier callbacks.
2035 * simplify.c (gfc_simplify_spread): New.
2036 (gfc_simplify_unpack): New.
2037 * expr.c (check_transformational): Allow additional transformational
2038 intrinsics in initialization expression.
2040 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2044 * check.c (gfc_check_all_any): Check rank of DIM.
2045 (gfc_check_count): Likewise.
2046 * intrinsic.h (gfc_simplify_all): New prototype.
2047 (gfc_simplify_any): Likewise.
2048 (gfc_simplify_count): Likewise.
2049 (gfc_simplify_sum): Likewise.
2050 (gfc_simplify_product): Likewise.
2051 * intrinsic.c (add_functions): Added new simplifier callbacks.
2052 * simplify.c (transformational_result): New.
2053 (simplify_transformation_to_scalar): New.
2054 (simplify_transformation_to_array): New.
2056 (gfc_simplify_all): New.
2057 (gfc_simplify_any): New.
2058 (gfc_simplify_count): New.
2059 (gfc_simplify_sum): New.
2060 (gfc_simplify_product): New.
2061 * expr.c (check_transformational): Allow additional transformational
2062 intrinsics in initialization expression.
2064 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2066 * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
2067 (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
2068 (gfc_check_minloc_maxloc): Likewise.
2069 (check_reduction): Likewise.
2070 (gfc_check_size): Likewise.
2071 (gfc_check_ubound): Likewise.
2072 (gfc_check_cshift): Added missing shape-conformance checks.
2073 (gfc_check_eoshift): Likewise.
2074 * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
2075 * expr.c (gfc_check_conformance): Accept error-message chunks in
2076 printf-style. Changed all callers.
2079 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2083 * intrinsic.h (gfc_simplify_dot_product): New prototype.
2084 (gfc_simplify_matmul): Likewise.
2085 (gfc_simplify_transpose): Likewise.
2086 * intrinsic.c (add_functions): Added new simplifier callbacks.
2087 * simplify.c (init_result_expr): New.
2088 (compute_dot_product): New.
2089 (gfc_simplify_dot_product): New.
2090 (gfc_simplify_matmul): New.
2091 (gfc_simplify_transpose): New.
2092 * expr.c (check_transformational): Allow transformational intrinsics
2093 with simplifier in initialization expression.
2095 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
2098 * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
2101 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
2104 * intrinsic.h (gfc_simplify_pack): New prototype.
2105 * intrinsic.c (add_functions): Added
2106 simplifier-callback to PACK.
2107 * simplify.c (is_constant_array_expr): Moved
2108 to beginning of file.
2109 (gfc_simplify_pack): New.
2110 * check.c (gfc_check_pack): Check that VECTOR has enough elements.
2111 Added safeguards for empty arrays.
2113 2009-06-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2115 * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
2116 instead of MPC_RE/MPC_IM.
2118 2009-06-05 Alexandre Oliva <aoliva@redhat.com>
2120 * trans-decl.c (gfc_build_qualified_array): Don't skip generation
2122 * trans.h (struct lang_type): Add base_decls.
2123 (GFC_TYPE_ARRAY_BASE_DECL): New.
2124 * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
2125 proactively and excessively.
2126 (gfc_get_array_descr_info): Use existing base decls if available.
2128 2009-06-04 Daniel Franke <franke.daniel@gmail.com>
2131 * check.c (gfc_check_reshape): Additional checks for the
2132 SHAPE and ORDER arguments.
2133 * simplify.c (gfc_simplify_reshape): Converted argument checks
2136 2009-06-03 Tobias Burnus <burnus@net-b.de>
2138 * gfortran.texi: Add mixed-language programming, mention
2139 varying string lengths, some clean up of introduction parts.
2140 * intrinsic.texi (instrinsic modules): Create @menu for subsections.
2141 (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
2142 * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
2143 * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
2145 2009-06-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2146 Tobias Burnus <burnus@net-b.de>
2148 * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
2149 * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
2151 2009-06-03 Alexandre Oliva <aoliva@redhat.com>
2153 * module.c (mio_f2k_derived): Initialize cur.
2155 2009-06-01 Tobias Burnus <burnus@net-b.de>
2158 * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
2159 (create_main_function): Set main_identifier_node.
2161 2009-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2164 * trans-types.c (gfc_build_uint_type): Make nonstatic.
2165 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
2166 * trans-types.h (gfc_build_uint_type): Add prototype.
2167 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2168 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
2169 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
2170 gfc_conv_intrinsic_trailz): Call the right builtins or library
2171 functions, and cast arguments to unsigned types first.
2172 * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
2174 2009-05-27 Ian Lance Taylor <iant@google.com>
2176 * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
2178 (f951$(exeext)): Likewise.
2180 2009-05-27 Tobias Burnus <burnus@net-b.de>
2183 * trans-decl.c (create_main_function): Mark MAIN__ and
2184 argc/argv as TREE_USED and push/pop function_decl context
2187 2009-05-26 Tobias Burnus <burnus@net-b.de>
2190 * gfortranspec.c (lang_specific_driver): Stop linking
2192 * trans-decl.c (gfc_build_builtin_function_decls): Stop
2193 making MAIN__ publicly visible.
2194 (gfc_build_builtin_function_decls): Add
2195 gfor_fndecl_set_args.
2196 (create_main_function) New function.
2197 (gfc_generate_function_code): Use it.
2199 2009-05-26 Tobias Burnus <burnus@net-b.de>
2202 * match.c (gfc_match_nullify): NULLify freed pointer.
2204 2009-05-26 Ian Lance Taylor <iant@google.com>
2206 * Make-lang.in (gfortranspec.o): Use $(COMPILER).
2207 (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
2209 2009-05-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2211 * gfortran.h (GFC_MPC_RND_MODE): New.
2212 * simplify.c (call_mpc_func): New helper function.
2213 (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
2214 gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
2216 2009-05-25 Janus Weil <janus@gcc.gnu.org>
2219 * primary.c (gfc_match_varspec): Handle procedure pointer components
2220 with array return value.
2221 * resolve.c (resolve_expr_ppc): Ditto.
2222 (resolve_symbol): Make sure the interface of a procedure pointer has
2224 * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
2225 components with array return value.
2226 * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
2227 gfc_trans_arrayfunc_assign): Ditto.
2228 (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
2229 where the rhs is a dummy argument.
2230 * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
2231 procedure pointer components with array return value.
2233 2009-05-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2238 * trans-array.c (gfc_conv_ss_startstride): Add one to index.
2240 2009-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2243 * module.c (read_md5_from_module_file): Close file before returning.
2245 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2248 * primary.c (gfc_match_rvalue): Handle procedure pointer components in
2250 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
2252 (resolve_fl_derived): Procedure pointer components are not required to
2253 have constant array bounds in their return value.
2255 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2257 * intrinsic.c (add_sym): Fix my last commit (r147655),
2258 which broke bootstrap.
2260 2009-05-18 Richard Guenther <rguenther@suse.de>
2263 * trans-expr.c (gfc_trans_zero_assign): For local array
2264 destinations use an assignment from an empty constructor.
2266 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2270 * expr.c (gfc_check_pointer_assign): Check intents when comparing
2272 * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
2273 (gfc_compare_interfaces): Additional argument.
2274 * interface.c (operator_correspondence): Add check for equality of
2275 intents, and new argument 'intent_check'.
2276 (gfc_compare_interfaces): New argument 'intent_check', which is passed
2277 on to operator_correspondence.
2278 (check_interface1): Don't check intents when comparing interfaces.
2279 (compare_parameter): Do check intents when comparing interfaces.
2280 * intrinsic.c (add_sym): Add intents for arguments of intrinsic
2282 (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
2283 add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
2285 (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
2286 : New functions to add intrinsic symbols, specifying custom intents.
2287 (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
2288 (add_functions,add_subroutines): Add intents for various intrinsics.
2289 * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
2290 comparing interfaces.
2291 * symbol.c (gfc_copy_formal_args_intr): Copy intent.
2293 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2295 * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
2297 * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
2298 gfc_get_real_kind_from_width_isofortranenv): New prototypes.
2299 * iso-c-binding.def: Update definitions for the INT*_T,
2300 INT_LEAST*_T and INT_FAST*_T named parameters.
2301 * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
2302 gfc_get_real_kind_from_width_isofortranenv): New functions.
2304 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2307 * intrinsic.c (add_functions, add_subroutines): Fix argument
2308 names and wrap long lines.
2309 * intrinsic.texi: Fix documentation and argument names of
2310 LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
2311 GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
2312 SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
2313 SELECTED_REAL_KIND and XOR.
2315 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2318 * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
2319 * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
2320 * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
2321 gfc_simplify_erfc_scaled): New functions.
2323 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2326 * resolve.c (resolve_substring): Don't allow too large substring
2328 (gfc_resolve_substring_charlen): Fix typo.
2329 (gfc_resolve_character_operator): Fix typo.
2330 (resolve_charlen): Catch unreasonably large string lengths.
2331 * simplify.c (gfc_simplify_len): Don't error out on LEN
2334 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2337 * decl.c (set_enum_kind): Use global short-enums flag.
2338 * gfortran.h (gfc_option_t): Remove short_enums flag.
2339 * lang.opt (-fshort-enums): Refer to C documentation.
2340 * options.c (gfc_init_options, gfc_handle_option): Use global
2343 2009-05-15 Tobias Burnus <burnus@net-b.de>
2346 * f95-lang.c: Add gfc_maybe_initialize_eh.
2347 * gfortran.h: Add gfc_maybe_initialize_eh prototype.
2348 * Make-lang.in: Add new .h dendencies for f95-lang.c
2349 * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
2350 * misc.c (gfc_free): Avoid #define trickery for free.
2352 2009-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
2354 * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
2355 of allocate and deallocate statements.
2357 2009-05-14 Ian Lance Taylor <iant@google.com>
2359 * decl.c (match_attr_spec): Change d to unsigned int.
2360 * dump-parse-tree.c (show_namespace): Change op to int. Add cast.
2361 * interface.c (gfc_check_interfaces): Change i to int. Add casts.
2362 * module.c (read_module): Change i to int. Add cast.
2363 (write_module): Change i to int.
2364 * symbol.c (gfc_get_namespace): Change in to int.
2365 (gfc_free_namespace): Change i to int.
2366 * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
2367 unsigned int. Add cast.
2368 * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
2371 2009-05-14 Daniel Kraft <d@domob.eu>
2374 * dump-parse-tree.c (show_typebound): Fix missing adaption to new
2375 type-bound procedure storage structure.
2377 2009-05-14 Janus Weil <janus@gcc.gnu.org>
2380 * decl.c (gfc_match_function_decl): Use gfc_add_type.
2381 * symbol.c (gfc_add_type): Better checking for duplicate types in
2382 function declarations. And: Always give an error for duplicte types,
2383 not just a warning with -std=gnu.
2385 2009-05-14 Jakub Jelinek <jakub@redhat.com>
2388 * io.c (resolve_tag_format): CHARACTER array in FMT= argument
2389 isn't an extension. Reject non-CHARACTER array element of
2390 assumed shape or pointer or assumed size array.
2391 * trans-array.c (array_parameter_size): New function.
2392 (gfc_conv_array_parameter): Add size argument. Call
2393 array_parameter_size if it is non-NULL.
2394 * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
2395 * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
2397 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
2398 * trans-io.c (gfc_convert_array_to_string): Rewritten.
2400 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
2402 * gfortran.h (gfc_code): Rename struct member expr to expr1.
2403 * openmp.c (resolve_omp_atomic): Update expr to expr1.
2404 * interface.c (gfc_extend_assign): Ditto.
2405 * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
2406 gfc_trans_init_assign): Ditto.
2407 * dump-parse-tree.c (show_code_node): Ditto.
2408 * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
2409 * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
2410 gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
2411 gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
2412 gfc_trans_logical_select, gfc_trans_character_select
2413 forall_make_variable_temp, check_forall_dependencies
2414 gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
2415 gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
2416 * io.c (match_io_element, gfc_match_inquire): Ditto.
2417 * resolve.c (resolve_typebound_call, resolve_ppc_call,
2418 resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
2419 resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
2420 gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
2421 * st.c (gfc_free_statement): Ditto.
2422 * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
2423 match_arithmetic_if, gfc_match_if, gfc_match_elseif
2424 gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
2425 gfc_match_nullify, match_typebound_call, gfc_match_call
2426 gfc_match_select, match_simple_where, gfc_match_where
2427 gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
2428 * trans-io.c (gfc_trans_transfer): Ditto.
2429 * parse.c (parse_where_block, parse_if_block): Ditto.
2431 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
2433 * gfortran.h (gfc_code): Rename struct member label to label1.
2434 * dump-parse-tree.c (show_code_node): Update symbol.
2435 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
2436 gfc_trans_arithmetic_if): Ditto.
2437 * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
2438 * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
2439 gfc_match_assign, gfc_match_goto): Ditto.
2440 * parse.c (parse_do_block): Ditto.
2442 2009-05-13 Tobias Burnus <burnus@net-b.de>
2445 * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
2446 * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
2447 * trans.c (gfc_trans_code): Ditto.
2448 * resolve.c (resolve_code): Ditto.
2449 * st.c (gfc_free_statement): Ditto.
2450 * parse.c (accept_statement): Ditto.
2452 2009-05-12 Tobias Burnus <burnus@net-b.de>
2455 * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
2457 2009-05-11 Steve Ellcey <sje@cup.hp.com>
2459 * resolve.c (check_host_association): Initialize tail.
2461 2009-05-11 Janus Weil <janus@gcc.gnu.org>
2464 * resolve.c (resolve_fl_derived): Only return FAILURE if
2465 gfc_notify_std fails.
2467 2009-05-10 Ian Lance Taylor <iant@google.com>
2469 * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
2471 (enum gfc_omp_default_sharing): Likewise.
2472 * module.c (enum gfc_rsym_state): New enum, broken out of
2474 (enum gfc_wsym_state): Likewise.
2475 * parse.c (enum state_order): New enum, broken out of st_state.
2477 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
2480 * trans-array.c (gfc_trans_array_constructor_value): Fold
2481 convert numeric constants.
2482 (gfc_build_constant_array_constructor): The same.
2484 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
2487 * trans-expr.c (gfc_conv_operator_assign): Remove function.
2488 * trans.h : Remove prototype for gfc_conv_operator_assign.
2489 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
2490 derivde types with intent(out).
2491 (gfc_trans_call): Add mask, count1 and invert arguments. Add
2492 code to use mask for WHERE assignments.
2493 (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
2494 (gfc_trans_where_assign): The gfc_symbol argument is replaced
2495 by the corresponding code. If this has a resolved_sym, then
2496 gfc_trans_call is called. The call to gfc_conv_operator_assign
2498 (gfc_trans_where_2): Change the last argument in the call to
2499 gfc_trans_where_assign.
2500 * trans-stmt.h : Modify prototype for gfc_trans_call.
2501 * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
2503 2009-05-08 Janus Weil <janus@gcc.gnu.org>
2506 * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
2507 the symbol is a module procedure.
2509 2009-05-08 Tobias Burnus <burnus@net-b.de>
2511 * invoke.texi: Add do/recursion to the -fcheck= summary.
2513 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2516 * gfortran.texi: Document that we don't support variable FORMAT
2519 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2522 * error.c (error_print): Add missing break statement.
2524 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2527 * invoke.texi: Document that -fdollar-ok does not allow $ to be
2528 used in IMPLICIT statement.
2530 2009-05-06 Janus Weil <janus@gcc.gnu.org>
2531 Paul Thomas <pault@gcc.gnu.org>
2534 * decl.c (match_procedure_interface): New function to match the
2535 interface for a PROCEDURE statement.
2536 (match_procedure_decl): Call match_procedure_interface.
2537 (match_ppc_decl): New function to match the declaration of a
2538 procedure pointer component.
2539 (gfc_match_procedure): Call match_ppc_decl.
2540 (match_binding_attributes): Add new argument 'ppc' and handle the
2541 POINTER attribute for procedure pointer components.
2542 (match_procedure_in_type,gfc_match_generic): Added new argument to
2543 match_binding_attributes.
2544 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
2545 procedure pointer components.
2546 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
2547 (gfc_check_pointer_assign): Handle procedure pointer components, but no
2549 (is_proc_ptr_comp): New function to determine if an expression is a
2550 procedure pointer component.
2551 * gfortran.h (expr_t): Add EXPR_PPC.
2552 (symbol_attribute): Add new member 'proc_pointer_comp'.
2553 (gfc_component): Add new member 'formal'.
2554 (gfc_exec_op): Add EXEC_CALL_PPC.
2555 (gfc_get_default_type): Changed first argument.
2556 (is_proc_ptr_comp): Add prototype.
2557 (gfc_match_varspec): Add new argument.
2558 * interface.c (compare_actual_formal): Handle procedure pointer
2560 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
2561 procedure pointer components.
2562 * module.c (mio_expr): Handle EXPR_PPC.
2563 * parse.c (parse_derived): Handle procedure pointer components.
2564 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
2565 procedure pointer components.
2566 (gfc_variable_attr): Handle procedure pointer components.
2567 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
2568 first argument of gfc_get_default_type.
2569 (match_variable): Added new argument to gfc_match_varspec.
2570 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
2571 first argument of gfc_get_default_type.
2572 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
2574 (resolve_ppc_call): New function to resolve a call to a procedure
2575 pointer component (subroutine).
2576 (resolve_expr_ppc): New function to resolve a call to a procedure
2577 pointer component (function).
2578 (gfc_resolve_expr): Handle EXPR_PPC.
2579 (resolve_code): Handle EXEC_CALL_PPC.
2580 (resolve_fl_derived): Copy the interface for a procedure pointer
2582 (resolve_symbol): Fix overlong line.
2583 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
2584 * symbol.c (gfc_get_default_type): Changed first argument.
2585 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
2586 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
2587 * trans.h (gfc_conv_function_call): Renamed.
2588 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
2589 * trans-expr.c (gfc_conv_component_ref): Ditto.
2590 (gfc_conv_function_val): Rename to 'conv_function_val', add new
2591 argument 'expr' and handle procedure pointer components.
2592 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
2593 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
2594 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
2595 argument 'expr' and handle procedure pointer components.
2596 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
2597 procedure pointer component.
2598 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
2599 (gfc_conv_structure): Handle procedure pointer components.
2600 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
2601 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
2602 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
2603 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
2604 * trans-types.h (gfc_get_ppc_type): Add prototype.
2605 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
2606 for a procedure pointer component.
2607 (gfc_get_derived_type): Handle procedure pointer components.
2609 2009-05-06 Tobias Burnus <burnus@net-b.de>
2612 * resolve.c (resolve_symbol): Print no warning for implicitly
2613 typed intrinsic functions.
2615 2009-05-05 Janus Weil <janus@gcc.gnu.org>
2618 * expr.c (gfc_check_pointer_assign): Check for statement functions and
2619 internal procedures in procedure pointer assignments.
2621 2009-04-28 Janus Weil <janus@gcc.gnu.org>
2624 * resolve.c (resolve_symbol): Correctly copy the interface of a
2625 PROCEDURE statement if the interface involves a RESULT variable.
2627 2009-04-28 Janus Weil <janus@gcc.gnu.org>
2631 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
2633 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
2635 2009-04-28 Paul Thomas <pault@gcc.gnu.org>
2638 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
2639 type parentheses argument if it is a variable with allocatable
2642 2009-04-27 Ian Lance Taylor <iant@google.com>
2644 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
2646 * trans-io.c (st_parameter_field): Add casts to enum type.
2648 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
2651 fortran/data.c (gfc_assign_data_value): If the lvalue is an
2652 assumed character length entity in a data statement, then
2653 return FAILURE to prevent segmentation fault.
2655 2009-04-26 Jakub Jelinek <jakub@redhat.com>
2657 * trans-decl.c: Include pointer-set.h.
2658 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
2659 (gfc_nonlocal_dummy_array_decl): New function.
2660 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
2662 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
2663 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
2664 chain it to outermost block's vars, destroy it afterwards.
2665 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
2667 2009-04-25 Janus Weil <janus@gcc.gnu.org>
2670 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
2671 They differ if the symbol has been use-renamed.
2673 2009-04-24 Ian Lance Taylor <iant@google.com>
2675 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
2676 out of struct gfc_symbol.
2677 (struct gfc_symbol): Use enum gfc_symbol_type.
2678 (enum gfc_array_ref_dimen_type): New named enum type, broken out
2679 of struct gfc_array_ref).
2680 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
2681 (mod_pointee_as): Update declaration.
2682 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
2683 (gfc_mod_pointee_as): Change return type to "match".
2684 * module.c (mio_array_ref): Add cast to enum type.
2685 (mio_symbol): Likewise.
2686 * resolve.c (resolve_global_procedure): Change type to enum
2688 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
2691 2009-04-24 Daniel Kraft <d@domob.eu>
2693 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
2694 (struct gfc_symtree): Moved "typebound" member inside union.
2695 (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
2696 type-bound procedures there.
2697 (gfc_get_tbp_symtree): New procedure.
2698 * symbol.c (tentative_tbp_list): New global.
2699 (gfc_get_namespace): NULL new "tb_sym_root" member.
2700 (gfc_new_symtree): Removed initialization of "typebound" member.
2701 (gfc_undo_symbols): Process list of tentative tbp's.
2702 (gfc_commit_symbols): Ditto.
2703 (free_tb_tree): New method.
2704 (gfc_free_namespace): Call it.
2705 (gfc_get_typebound_proc): New method.
2706 (gfc_get_tbp_symtree): New method.
2707 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
2708 and gfc_namespace with regards to tbp's.
2709 * dump-parse-tree.c (show_typebound): Ditto.
2710 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
2711 as it isn't a symbol any longer.
2712 * module.c (mio_typebound_symtree): Adapt to changes.
2713 (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
2714 rather than "gfc_get_sym_tree".
2715 (mio_f2k_derived): Ditto.
2716 * decl.c (match_procedure_in_type): Ditto.
2717 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
2718 * resolve.c (check_typebound_override): Adapt to changes.
2719 (resolve_typebound_generic): Ditto.
2720 (resolve_typebound_procedures): Ditto.
2721 (ensure_not_abstract_walker): Ditto.
2722 (ensure_not_abstract): Ditto.
2723 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
2724 instance, through removed tentative ones).
2725 * gfc-internals.texi (Type-bound procedures): Document changes.
2727 2009-04-24 Janus Weil <janus@gcc.gnu.org>
2731 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
2732 for the formal arguments.
2734 2009-04-21 Taras Glek <tglek@mozilla.com>
2736 * f95-lang.c: Update GTY annotations to new syntax.
2737 * trans-intrinsic.c: Likewise.
2738 * trans-io.c: Likewise.
2739 * trans.h: Likewise.
2741 2009-04-22 Janus Weil <janus@gcc.gnu.org>
2744 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
2745 (match_procedure_decl): Set if_source.
2746 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
2747 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
2748 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
2749 add documentation. Rename copy_formal_args and copy_formal_args_intr.
2750 * interface.c (gfc_compare_interfaces): Check for return types,
2751 handle IFSRC_UNKNOWN.
2752 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
2753 (gfc_procedure_use): Modified handling of intrinsics.
2754 * intrinsic.c (add_functions): Bugfix for "dim".
2755 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
2756 which copies the interface from isym to sym.
2757 (resolve_procedure_expression,resolve_function): Use new function
2758 'resolve_intrinsic'.
2759 (resolve_symbol): Add function attribute for externals with return type
2760 and use new function 'resolve_intrinsic'.
2761 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
2762 (copy_formal_args): Renamed to gfc_copy_formal_args.
2763 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
2764 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
2766 2009-04-21 Joseph Myers <joseph@codesourcery.com>
2768 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
2769 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
2770 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
2771 copyright and license notices.
2772 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
2773 ChangeLog-2008: Correct dates.
2775 2009-04-20 Tobias Burnus <burnus@net-b.de>
2778 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
2780 2009-04-20 Paul Thomas <pault@gcc.gnu.org>
2783 * resolve.c (is_sym_host_assoc): New function.
2784 (resolve_fl_derived): Call it when checking PRIVATE components
2785 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
2787 (resolve_fl_namelist): Call it twice to check for host
2790 2009-04-20 Ian Lance Taylor <iant@google.com>
2792 * module.c (import_iso_c_binding_module): Add casts to enum type.
2793 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
2795 (gfc_conv_intrinsic_anyall): Likewise.
2796 (gfc_conv_intrinsic_arith): Likewise.
2797 (gfc_conv_intrinsic_minmaxloc): Likewise.
2798 (gfc_conv_intrinsic_minmaxval): Likewise.
2799 (gfc_conv_intrinsic_bitop): Likewise.
2800 (gfc_conv_intrinsic_singlebitop): Likewise.
2801 (gfc_conv_intrinsic_strcmp): Likewise.
2803 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
2804 Jakub Jelinek <jakub@redhat.com>
2807 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
2808 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
2809 (ompws_flags): New extern decl.
2810 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
2811 for the outer dimension if ompws_flags allow it.
2812 * trans.c (gfc_generate_code): Clear ompws_flags.
2813 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
2814 array assignments inside of !$omp workshare.
2815 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
2817 * trans-openmp.c (ompws_flags): New variable.
2818 (gfc_trans_omp_workshare): Rewritten.
2820 2009-04-11 Daniel Kraft <d@domob.eu>
2823 * gfortran.h (struct gfc_charlen): New field "passed_length" to store
2824 the actual passed string length for dummy arguments.
2825 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
2826 assertion, moved a local variable into the innermost block it is needed.
2827 (create_function_arglist): Removed TODO about the check being
2828 implemented and initialize cl->passed_length here.
2829 (add_argument_checking): New method.
2830 (gfc_generate_function_code): Call the argument checking method.
2832 2009-04-11 Janus Weil <janus@gcc.gnu.org>
2835 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
2837 2009-04-11 Daniel Franke <franke.daniel@gmail.com>
2839 * resolve.c (resolve_global_procedure): Enable whole-file checking for
2840 procedures that are declared later in the file.
2842 2009-04-10 Paolo Bonzini <bonzini@gnu.org>
2845 * trans.c (gfc_allocate_with_status): Fix type mismatches
2848 2009-04-10 Daniel Franke <franke.daniel@gmail.com>
2851 * expr.c (find_array_section): Leave early on zero-sized arrays.
2853 2009-04-09 Janus Weil <janus@gcc.gnu.org>
2856 * decl.c (add_hidden_procptr_result): New function for handling
2857 procedure pointer return values by adding a hidden result variable.
2858 (variable_decl,match_procedure_decl,gfc_match_function_decl,
2859 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
2861 * parse.c (parse_interface): Add EXTERNAL attribute only after
2862 FUNCTION/SUBROUTINE declaration is complete.
2863 * primary.c (replace_hidden_procptr_result): New function for replacing
2864 function symbol by hidden result variable.
2865 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
2867 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
2868 resolve_symbol): Allow for procedure pointer function results.
2869 (resolve_fl_procedure): Conflict detection moved here from
2871 * symbol.c (gfc_check_function_type): Allow for procedure pointer
2873 (check_conflict): Move some conflict detection to resolution stage.
2874 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
2877 2009-04-08 Jakub Jelinek <jakub@redhat.com>
2879 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
2880 contain TYPE_STRING_FLAG types.
2882 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
2885 * invoke.texi (fdollar-ok): Fix typo.
2887 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
2890 * invoke.texi (fdollar-ok): Clarify limitations.
2892 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
2895 * trans-array.c (gfc_trans_deferred_array): Return if this
2896 is a result variable.
2898 2009-04-07 Janus Weil <janus@gcc.gnu.org>
2901 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
2902 procedure pointer decls.
2904 2009-04-07 Janus Weil <janus@gcc.gnu.org>
2907 * expr.c (gfc_check_pointer_assign): Enable interface check for
2909 * gfortran.h: Add copy_formal_args_intr.
2910 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
2911 if second argument is an intrinsic.
2912 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
2914 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
2915 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
2916 intrinsic interfaces here. Must happen earlier.
2917 (resolve_symbol): Resolution of intrinsic interfaces moved here from
2918 resolve_specific_..., and formal args are now copied from intrinsic
2920 * symbol.c (copy_formal_args_intr): New function to copy the formal
2921 arguments from an intinsic procedure.
2923 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
2926 * dependency.c (ref_same_as_full_array): New function.
2927 (gfc_dep_resolver): Call it.
2929 2009-04-06 Janus Weil <janus@gcc.gnu.org>
2932 * decl.c (match_procedure_decl): Fix double declaration problems with
2933 PROCEDURE statements.
2934 * symbol.c (gfc_add_type): Ditto.
2936 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
2939 * trans-array.c (gfc_conv_array_ref): If the symbol has the
2940 temporary attribute use the array_spec for the bounds.
2941 * gfortran.h : Add the temporary field to the structure
2943 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
2944 temporary attribute.
2946 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
2949 * trans-array.c (gfc_trans_array_constructor_value): Shadow
2950 implied do-loop variable to avoid spurious middle-end warnings.
2952 2009-04-04 Tobias Burnus <burnus@net-b.de>
2955 * trans-decl.c (gfc_generate_function_code): Move recursive
2956 check to the right position.
2958 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
2961 * trans-common.c (translate_common): Do not offset the whole
2964 2009-04-03 Tobias Burnus <burnus@net-b.de>
2967 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
2968 if it is not a procedure pointer.
2969 * primary.c (match_actual_arg): Ditto.
2971 2009-03-31 Joseph Myers <joseph@codesourcery.com>
2973 PR preprocessor/15638
2974 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
2976 2009-03-30 Steven G. Kargl <kargls@comcast.net>
2979 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
2980 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
2981 comments. Minor whitespace cleanup.
2982 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
2983 (resolve_deallocate_expr (gfc_expr *e): Update error message.
2984 (resolve_allocate_expr): Remove dead code. Update error message.
2985 Move error checking to ...
2986 (resolve_allocate_deallocate): ... here. Add additional error
2987 checking for STAT, ERRMSG, and allocate-objects.
2988 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
2989 Check for redundant uses of STAT and ERRMSG. Reword error message
2990 and add checking for pointer, allocatable, and proc_pointer attributes.
2992 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
2997 * symbol.c : Add gfc_global_ns_list.
2998 * decl.c (add_global_entry): Set the namespace ('ns') field.
2999 * gfortran.h : Add the resolved field to gfc_namespace. Add the
3000 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
3001 gfc_option_t. Add the prototype for gfc_free_dt_list.
3002 * lang.opt : Add the whole-file option.
3003 * invoke.texi : Document the whole-file option.
3004 * resolve.c (resolve_global_procedure): If the fwhole-file
3005 option is set, reorder gsymbols to ensure that translation is
3006 in the right order. Resolve the gsymbol's namespace if that
3007 has not occurred and then check interfaces.
3008 (resolve_function): Move call to resolve_global_procedure.
3009 (resolve_call): The same.
3010 (resolve_codes): Store the current labels_obstack.
3011 (gfc_resolve) : Return if the namespace is already resolved.
3012 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
3013 option is selected, use the backend_decl of a gsymbol, if it is
3015 parse.c (add_global_procedure, add_global_program): If the flag
3016 whole-file is set, add the namespace to the gsymbol.
3017 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
3018 the global namespace list. Rearrange to do resolution of all
3019 the procedures in a file, followed by their translation.
3020 * options.c (gfc_init_options): Add -fwhole-file.
3021 (gfc_handle_option): The same.
3023 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3025 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
3026 family of intrinsics instead of BUILT_IN_INF family.
3027 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
3028 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
3030 2009-03-30 Jakub Jelinek <jakub@redhat.com>
3032 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
3033 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
3035 2009-03-30 Joseph Myers <joseph@codesourcery.com>
3037 PR rtl-optimization/323
3038 * options.c (gfc_post_options): Set
3039 flag_excess_precision_cmdline. Give an error for
3040 -fexcess-precision=standard for processors where the option is
3043 2009-03-29 Joseph Myers <joseph@codesourcery.com>
3045 PR preprocessor/34695
3046 * cpp.c (cb_cpp_error): New.
3047 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
3048 Don't check cpp_errors (cpp_in).
3049 (gfc_cpp_init_0): Set cb->error.
3051 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
3054 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
3055 expr.c (gfc_match_init_expr): Add global variable init_flag to
3056 flag matching an initialization expression.
3057 (check_intrinsic_op): Move no longer reachable error message to ...
3058 * arith.c (arith_power): ... here. Remove gfc_ prefix in
3059 gfc_arith_power. Use init_flag. Allow constant folding of x**y
3060 when y is REAL or COMPLEX.
3061 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
3062 for constant folding.
3063 * gfc_power: Update gfc_arith_power to arith_power
3065 2009-03-29 Daniel Kraft <d@domob.eu>
3068 * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
3069 added a comment explaining DEFERRED binding handling.
3070 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
3071 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
3072 and do some validity checks for DEFERRED and this construct.
3073 * module.c (binding_overriding): New string constant for DEFERRED.
3074 (mio_typebound_proc): Module-IO DEFERRED flag.
3075 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
3076 binding is not overridden by a DEFERRED one.
3077 (resolve_typebound_procedure): Allow abstract interfaces as targets
3078 for DEFERRED bindings.
3079 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
3080 (resolve_fl_derived): Use new "ensure_not_abstract" method for
3081 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
3082 binding is overridden.
3083 (check_typebound_baseobject): New method.
3084 (resolve_compcall), (resolve_typebound_call): Check base-object of
3085 the type-bound procedure call.
3086 * gfc-internals.texi (Type-bound procedures): Document a little bit
3087 about internal handling of DEFERRED bindings.
3089 2009-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3092 * gfortran.h (gfc_st_label): Fix comment.
3093 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
3094 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
3095 END SELECT with labels.
3096 (check_do_closure): Fix formatting.
3097 (parse_do_block): Fix typo in error message.
3098 * resolve.c (code_stack): Remove tail member. Update comment to
3099 new use of reachable_labels.
3100 (reachable_labels): Rename to ...
3101 (find_reachable_labels): ... this. Overhaul. Update preceding
3103 (resolve_branch): Fix comment preceding function. Rewrite.
3104 (resolve_code): Update call to find_reachable_labels. Add code to
3105 deal with EXEC_END_BLOCK.
3106 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
3107 Add 2009 to copyright years.
3108 * trans.c (gfc_trans_code): Likewise on both counts.
3110 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
3113 * expr.c (gfc_check_assign): Allow pointer components when
3117 * resolve.c (check_data_variable): Treat pointer arrays with
3120 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
3123 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
3124 have a string_length.
3126 2009-03-28 Tobias Burnus <burnus@net-b.de>
3129 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
3130 Add GFC_RTCHECK_DO support.
3131 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
3132 * invoke.texi (-fcheck): Document "do" option.
3134 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
3137 * trans-array.c (get_elemental_fcn_charlen): Remove.
3138 (get_array_charlen): New function to replace previous.
3140 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
3143 * parse.c (parse_derived): Do not break on finding pointer,
3144 allocatable or private components.
3146 2009-03-28 Tobias Burnus <burnus@net-b.de>
3149 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
3150 * trans-decl.c (gfc_generate_function_code): Add recursion check.
3151 * invoke.texi (-fcheck): Add recursive option.
3153 2009-03-28 Tobias Burnus <burnus@net-b.de>
3156 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
3158 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3159 Paul Thomas <pault@gcc.gnu.org>
3160 Tobias Burnus <burnus@net-b.de>
3162 * gfortran.h (gfc_option_t): Add rtcheck.
3163 * lang.opt: New option -fcheck.
3164 * libgfortran.h: Add GFC_RTCHECK_* constants.
3165 * invoke.texi: Document -fcheck.
3166 * options.c (gfc_handle_runtime_check_option): New function.
3167 (gfc_init_options,gfc_post_options,gfc_handle_option):
3170 2009-03-27 Richard Guenther <rguenther@suse.de>
3172 * trans-array.c (gfc_conv_descriptor_data_addr): Use
3173 gfc_build_addr_expr instead of build_fold_addr_expr.
3174 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
3175 gfc_trans_constant_array_constructor, gfc_conv_array_data,
3176 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
3177 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
3178 gfc_conv_function_val, gfc_conv_operator_assign,
3179 gfc_conv_subref_array_arg, gfc_conv_function_call,
3180 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
3181 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
3182 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3183 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
3184 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
3185 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
3186 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3187 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
3188 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
3189 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
3190 build_filepos, gfc_trans_inquire, gfc_trans_wait,
3191 nml_get_addr_expr, transfer_namelist_element, build_dt,
3192 gfc_trans_dt_end, transfer_array_component, transfer_expr,
3193 transfer_array_desc, gfc_trans_transfer): Likewise.
3194 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
3195 * trans.c (gfc_build_addr_expr): Mark the base of the address
3198 2009-03-27 Tobias Burnus <burnus@net-b.de>
3200 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
3201 (gfc_expr): Add is_snan.
3202 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
3203 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
3204 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
3205 * resolve.c (build_default_init_expr): Update call.
3206 * target-memory.c (encode_float): Ditto.
3207 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
3209 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3211 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
3214 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
3216 * simplify.c (gfc_simplify_transfer): Zero-initialize the
3219 2009-02-27 Tobias Burnus <burnus@net-b.de>
3222 * module.c (read_md5_from_module_file): Add missing quote.
3224 2009-02-27 Tobias Burnus <burnus@net-b.de>
3227 * module.c (read_md5_from_module_file): Include mod version
3228 in had-changed test.
3230 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
3233 * interface.c (compare_type_rank_if): Return 1 if the symbols
3234 are the same and deal with external procedures where one is
3235 identified to be a function or subroutine by usage but the
3238 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
3241 * trans-array.c (gfc_conv_array_initializer): Convert all
3242 expressions rather than ICEing.
3244 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3247 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
3248 make global. Change function name in error messages.
3249 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
3250 (gfc_array_ref_shape): Likewise.
3251 * gfortran.h: Add prototype for gfc_ref_dimen_size.
3252 * simplify.c (simplify_bound_dim): Add ref argument.
3253 If the reference isn't a full array, return one for
3254 the lower bound and the extent for the upper bound.
3255 (simplify_bound): For array sections, take as from the
3256 argument. Add reference to all to simplify_bound_dim.
3258 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
3260 * scanner.c (load_line): At end of line, skip '\r' without setting
3261 the truncation flag.
3263 2009-02-18 Daniel Kraft <d@domob.eu>
3265 * gfortran.texi: New chapter about compiler characteristics.
3266 (Compiler Characteristics): Document KIND type parameters here.
3268 2009-02-18 Tobias Burnus <burnus@net-b.de>
3270 * intrinsic.texi (MALLOC): Make example more portable.
3272 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
3275 * module.c (gfc_dump_module,gfc_use_module): Add module
3278 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
3282 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
3283 function references to ensure that a valid expression is used.
3284 (gfc_conv_function_call): Pass Cray pointers to procedures.
3286 2009-02-03 Jakub Jelinek <jakub@redhat.com>
3288 * gfortranspec.c (lang_specific_driver): Update copyright notice
3291 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
3295 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
3296 descriptor ubound for UBOUND, when the array lbound == 1.
3298 2009-01-27 Daniel Kraft <d@domob.eu>
3301 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
3302 for the real type needed to make it work for subcomponent-references.
3304 2009-01-21 Daniel Kraft <d@domob.eu>
3306 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
3308 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
3311 * resolve.c (check_host_association): Remove the matching to
3312 correct an incorrect host association and use manipulation of
3313 the expression instead.
3315 2009-01-20 Tobias Burnus <burnus@net-b.de>
3317 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
3319 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
3322 * simplify.c (simplify_bound): Don't use array specification
3323 if variable or component has subsequent references.
3325 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3328 * module.c (write_common_0): Add argument 'this_module' and
3329 check that non-use associated common blocks are written first.
3330 (write_common): Call write_common_0 twice, once with true and
3333 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3336 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
3337 been absorbed into gfc_conv_intrinsic_transfer. All
3338 references to it in trans-intrinsic.c have been changed
3339 accordingly. PR fixed by using a temporary for scalar
3340 character transfer, when the source is shorter than the
3343 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3346 * module.c (write_common_0): Revert patch of 2009-01-05.
3348 2009-01-16 Janus Weil <janus@gcc.gnu.org>
3351 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
3353 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
3354 Enable procedure pointers as module variables.
3356 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
3358 * ChangeLog-2007: Clean out svn merge droppings.
3360 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
3363 * target-memory.c (encode_derived): Encode NULL.
3365 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
3368 * resolve.c (check_host_association): Use the symtree name to
3369 search for a potential contained procedure, since this is the
3370 name by which it would be referenced.
3372 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3375 * interface.c (gfc_procedure_use): Don't warn about functions
3377 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
3380 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
3383 * module.c (write_common_0): Use the name of the symtree rather
3384 than the common block, to determine if the common has been
3387 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
3390 * check.c (gfc_check_random_seed): Added size check for GET
3391 dummy argument, reworded error messages to follow common pattern.
3393 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
3396 * trans-types.c (gfc_get_derived_type): Check for the
3397 presence of derived->ns->proc_name before
3398 accessing derived->ns->proc_name->attr.flavor .
3399 * resolve.c (resolve_symbol): Likewise.
3401 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
3404 * gfortran.h : Add bit to gfc_expr 'user_operator'
3405 * interface.c (gfc_extend_expr): Set the above if the operator
3406 is substituted by a function.
3407 * resolve.c (check_host_association): Return if above is set.
3409 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
3412 * ChangeLog-2008: Fix function name.
3415 * dependency.c (gfc_check_argument_var_dependency):
3416 Move the check for pointerness inside the if block
3417 so that it doesn't affect the return value.
3420 * trans-stmt.c (gfc_trans_call):
3421 Add the dependency code after the loop bounds calculation one.
3423 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
3425 * intrinsic.c (do_simplify): Removed already implemented TODO.
3427 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
3430 * simplify.c (gfc_simplify_merge): New.
3431 * intrinsic.h (gfc_simplify_merge): New prototype.
3432 * intrinsic.c (add_functions): Added simplification for MERGE.
3434 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
3437 * gfortran.h (gfc_is_data_pointer): Added prototype
3438 * resolve.c (gfc_iso_c_func_interface):
3439 Use gfc_is_data_pointer to test for pointer attribute.
3440 * dependency.c (gfc_is_data_pointer):
3441 Support pointer-returning functions.
3443 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
3445 * symbol.c (save_symbol): Don't SAVE function results.
3447 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
3450 * resolve.c (resolve_call): When searching for proper host
3451 association, use symtree rather than symbol. For everything
3452 except generic subroutines, substitute the symtree in the call
3453 rather than the symbol.
3456 Copyright (C) 2009 Free Software Foundation, Inc.
3458 Copying and distribution of this file, with or without modification,
3459 are permitted in any medium without royalty provided the copyright
3460 notice and this notice are preserved.