1 2009-12-01 Janne Blomqvist <jb@gcc.gnu.org>
4 * trans-stmt.c (gfc_trans_do): Sign test using ternary operator.
6 2009-11-30 Janus Weil <janus@gcc.gnu.org>
9 * resolve.c (resolve_select_type): Check for duplicate CLASS IS blocks.
11 2009-11-30 Janus Weil <janus@gcc.gnu.org>
14 * decl.c (gfc_match_derived_decl): Set extension level.
15 * gfortran.h (symbol_attribute): Expand 'extension' bit field to 8 bit.
16 * iresolve.c (gfc_resolve_extends_type_of): Return value of
17 'is_extension_of' has kind=4.
18 * match.c (select_type_set_tmp,gfc_match_class_is): Create temporary
20 * module.c (MOD_VERSION): Bump module version.
21 (ab_attribute,attr_bits): Remove AB_EXTENSION.
22 (mio_symbol_attribute): Handle expanded 'extension' field.
23 * resolve.c (resolve_select_type): Implement CLASS IS blocks.
24 (resolve_fl_variable_derived): Show correct type name.
25 * symbol.c (gfc_build_class_symbol): Set extension level.
27 2009-11-30 Janus Weil <janus@gcc.gnu.org>
29 * intrinsic.h (gfc_resolve_extends_type_of): Add prototype.
30 * intrinsic.c (add_functions): Use 'gfc_resolve_extends_type_of'.
31 * iresolve.c (gfc_resolve_extends_type_of): New function, which
32 replaces the call to EXTENDS_TYPE_OF by the library function
33 'is_extension_of' and modifies the arguments.
34 * trans-intrinsic.c (gfc_conv_extends_type_of): Removed.
35 (gfc_conv_intrinsic_function): FOR EXTENDS_TYPE_OF, don't call
36 gfc_conv_extends_type_of but gfc_conv_intrinsic_funcall.
38 2009-11-30 Paul Thomas <pault@gcc.gnu.org>
39 Janus Weil <janus@gcc.gnu.org>
41 * decl.c (encapsulate_class_symbol): Replaced by
42 'gfc_build_class_symbol'.
43 (build_sym,build_struct): Call 'gfc_build_class_symbol'.
44 (gfc_match_derived_decl): Replace vindex by hash_value.
45 * dump-parse-tree.c (show_symbol): Replace vindex by hash_value.
46 * gfortran.h (symbol_attribute): Add field 'vtab'.
47 (gfc_symbol): Replace vindex by hash_value.
48 (gfc_class_esym_list): Ditto.
49 (gfc_get_derived_type,gfc_build_class_symbol,gfc_find_derived_vtab):
51 * module.c (mio_symbol): Replace vindex by hash_value.
52 * resolve.c (vindex_expr): Rename to 'hash_value_expr'.
53 (resolve_class_compcall,resolve_class_typebound_call): Renamed
55 (resolve_select_type): Replace $vindex by $vptr->$hash.
56 * symbol.c (gfc_add_save): Handle vtab symbols.
57 (gfc_type_compatible): Rewrite.
58 (gfc_build_class_symbol): New function which replaces
59 'encapsulate_class_symbol'.
60 (gfc_find_derived_vtab): New function to set up a vtab symbol for a
62 * trans-decl.c (gfc_create_module_variable): Handle vtab symbols.
63 * trans-expr.c (select_class_proc): Replace vindex by hash_value.
64 (gfc_conv_derived_to_class): New function to construct a temporary
65 CLASS variable from a derived type expression.
66 (gfc_conv_procedure_call): Call 'gfc_conv_derived_to_class'.
67 (gfc_conv_structure): Initialize the $extends and $size fields of
69 (gfc_trans_class_assign): Replace $vindex by $vptr. Remove the $size
71 * trans-intrinsic.c (gfc_conv_same_type_as): Replace $vindex by
72 $vptr->$hash, and replace vindex by hash_value.
73 * trans-stmt.c (gfc_trans_allocate): Insert $vptr references, replace
74 $vindex by $vptr. Remove the $size assignment.
75 * trans-types.c (gfc_get_derived_type): Make it non-static.
77 2009-11-30 Thomas Koenig <tkoenig@gcc.gnu.org>
80 * trans-stmt.c (gfc_trans_do): Calculate loop count
81 without if statements.
83 2009-11-28 Jakub Jelinek <jakub@redhat.com>
85 * trans-common.c (create_common): Remove unused offset variable.
86 * io.c (gfc_match_wait): Remove unused loc variable.
87 * trans-openmp.c (gfc_trans_omp_clauses): Remove unused old_clauses
89 (gfc_trans_omp_do): Remove unused outermost variable.
90 * iresolve.c (gfc_resolve_alarm_sub, gfc_resolve_fseek_sub): Remove
91 unused status variable.
92 * module.c (number_use_names): Remove unused c variable.
93 (load_derived_extensions): Remove unused nuse variable.
94 * trans-expr.c (gfc_conv_substring): Remove unused var variable.
95 * trans-types.c (gfc_get_array_descr_info): Remove unused offset_off
97 * matchexp.c (match_primary): Remove unused where variable.
98 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Remove unused cond2
100 (gfc_conv_intrinsic_sizeof): Remove unused source variable.
101 (gfc_conv_intrinsic_transfer): Remove unused stride variable.
102 (gfc_conv_intrinsic_function): Remove unused isym variable.
103 * arith.c (gfc_hollerith2real, gfc_hollerith2complex,
104 gfc_hollerith2logical): Remove unused len variable.
105 * parse.c (parse_derived): Remove unused derived_sym variable.
106 * decl.c (variable_decl): Remove unused old_locus variable.
107 * resolve.c (check_class_members): Remove unused tbp_sym variable.
108 (resolve_ordinary_assign): Remove unused assign_proc variable.
109 (resolve_equivalence): Remove unused value_name variable.
110 * data.c (get_array_index): Remove unused re variable.
111 * trans-array.c (gfc_conv_array_transpose): Remove unused src_info
113 (gfc_conv_resolve_dependencies): Remove unused aref and temp_dim
115 (gfc_conv_loop_setup): Remove unused dim and len variables.
116 (gfc_walk_variable_expr): Remove unused head variable.
117 * match.c (match_typebound_call): Remove unused var variable.
118 * intrinsic.c (gfc_convert_chartype): Remove unused from_ts variable.
120 2009-11-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
123 * trans-const.c (gfc_conv_const): Set se->expr to a constant on error.
125 2009-11-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
128 * trans-array.c (gfc_conv_array_transpose): Delete unnecessary assert.
130 2009-11-26 Janus Weil <janus@gcc.gnu.org>
134 * gfortran.h (gfc_is_function_return_value): New prototype.
135 * match.c (gfc_match_call): Use new function
136 'gfc_is_function_return_value'.
137 * primary.c (gfc_is_function_return_value): New function to check if a
138 symbol is the return value of an encompassing function.
139 (match_actual_arg,gfc_match_rvalue,match_variable): Use new function
140 'gfc_is_function_return_value'.
141 * resolve.c (resolve_common_blocks,resolve_actual_arglist): Ditto.
143 2009-11-25 Jakub Jelinek <jakub@redhat.com>
146 * trans-openmp.c (gfc_trans_omp_do): When dovar isn't a VAR_DECL,
147 don't use simple loop and handle clauses properly.
149 2009-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
152 * decl.c (variable_decl): Do not error on initialization within a
153 derived type specification of a pure procedure.
155 2009-11-24 Janus Weil <janus@gcc.gnu.org>
158 * resolve.c (resolve_actual_arglist): Make sure procedure pointer
159 actual arguments are resolved correctly.
160 (resolve_function): An EXPR_FUNCTION which is a procedure pointer
161 component, has already been resolved.
162 (resolve_fl_derived): Procedure pointer components should not be
165 2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
168 * trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
169 with error message if not constant.
170 * resolve.c (next_data_value): Delete check for constant.
172 2009-11-20 Janus Weil <janus@gcc.gnu.org>
174 * intrinsic.texi (C_F_PROCPOINTER): Remove obsolete comment.
176 2009-11-20 Paul Thomas <pault@gcc.gnu.org>
177 Janus Weil <janus@gcc.gnu.org>
180 * trans-expr.c (gfc_conv_procedure_call): If procedure pointer
181 component call, use the component's 'always_explicit' attr
184 2009-11-19 Janus Weil <janus@gcc.gnu.org>
186 * trans-expr.c (conv_isocbinding_procedure): New function.
187 (gfc_conv_procedure_call): Move ISO_C_BINDING stuff to
190 2009-11-19 Tobias Burnus <burnus@net-b.de>
192 * gfortran.texi (Interoperable Subroutines and Functions): Fix
195 2009-11-18 Janus Weil <janus@gcc.gnu.org>
198 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
199 dummies which are passed to C_F_PROCPOINTER.
201 2009-11-18 Alexandre Oliva <aoliva@redhat.com>
203 * module.c (mio_f2k_derived): Initialize op.
205 2009-11-15 Janus Weil <janus@gcc.gnu.org>
208 * match.c (gfc_match_call): If we're inside a function with derived
209 type return value, allow calling a TBP of the result variable.
211 2009-11-12 Tobias Burnus <burnus@net-b.de>
213 * intrinsic.texi (XOR): Refer also to .NEQV.
214 (ISO_FORTRAN_ENV): State which parameters are F2008.
216 2009-11-11 Janus Weil <janus@gcc.gnu.org>
219 * resolve.c (resolve_ref): Take care of procedure pointer component
222 2009-11-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
225 * resolve.c (is_illegal_recursion): Return false if sym is program.
227 2009-11-06 Steven G. Kargl <kargl@gcc.gnu.org>
229 * resolve.c (check_typebound_override): Remove duplicate "in" in error
232 2009-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
235 * fortran/trans-decl.c: Silence intent(out) warning for derived type
236 dummy arguments with default initialization.
238 2009-11-05 Janus Weil <janus@gcc.gnu.org>
241 * interface.c (matching_typebound_op,gfc_extend_assign): Handle CLASS
244 2009-11-05 Janus Weil <janus@gcc.gnu.org>
248 * resolve.c (resolve_function,resolve_call): Prevent abstract interfaces
249 from being called, but allow deferred type-bound procedures with
252 2009-11-04 Tobias Burnus <burnus@gcc.gnu.org>
253 Janus Weil <janus@gcc.gnu.org>
257 * interface.c (gfc_check_operator_interface): Handle CLASS arguments.
258 * resolve.c (resolve_allocate_expr): Handle allocatable components of
261 2009-11-04 Richard Guenther <rguenther@suse.de>
263 * options.c (gfc_post_options): Rely on common code processing
264 LTO options. Only enable -fwhole-file here.
266 2009-11-03 Tobias Burnus <burnus@net-b.de>
269 * trans-expr.c (gfc_conv_procedure_call): Fix presence check
270 for optional arguments.
272 2009-11-01 Tobias Burnus <burnus@net-b.de>
275 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
276 autodeallocated allocatable scalars at the end of scope.
277 (gfc_generate_function_code): Fix indention.
278 * trans-expr.c (gfc_conv_procedure_call): For allocatable
279 scalars, fix calling by reference and autodeallocating
280 of intent out variables.
282 2009-11-01 Tobias Burnus <burnus@net-b.de>
285 * trans-expr.c (gfc_conv_procedure_call): Deallocate intent-out
286 variables only when present. Remove unneccessary present check.
288 2009-10-29 Tobias Burnus <burnus@net-b.de>
291 * trans-expr.c (gfc_conv_procedure_call,gfc_conv_expr_reference):
292 Use for generic EXPR_FUNCTION the attributes of the specific
295 2009-10-29 Janne Blomqvist <jb@gcc.gnu.org>
298 * resolve.c (apply_default_init_local): Treat -fno-automatic as if
301 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
303 * trans-common.c (create_common): Set TREE_PUBLIC to false on
306 2009-10-26 Janus Weil <janus@gcc.gnu.org>
309 * trans.c (gfc_trans_code): Remove call to
310 'tree_annotate_all_with_location'. Location should already be set.
311 * trans-openmp.c (gfc_trans_omp_workshare): Ditto.
312 * trans-stmt.c (gfc_trans_allocate): Do correct data initialization for
313 CLASS variables with SOURCE tag, plus some cleanup.
315 2009-10-24 Janus Weil <janus@gcc.gnu.org>
316 Paul Thomas <pault@gcc.gnu.org>
319 * module.c (load_derived_extensions): Skip symbols which are not being
322 2009-10-24 Paul Thomas <pault@gcc.gnu.org>
325 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Stop'extent'
328 2009-10-23 Janus Weil <janus@gcc.gnu.org>
331 * trans-expr.c (gfc_trans_scalar_assign): Handle CLASS variables.
333 2009-10-23 Janus Weil <janus@gcc.gnu.org>
336 * match.c (conformable_arrays): Move to resolve.c.
337 (gfc_match_allocate): Don't resolve SOURCE expr yet, and move some
338 checks to resolve_allocate_expr.
339 * resolve.c (conformable_arrays): Moved here from match.c.
340 (resolve_allocate_expr): Moved some checks here from gfc_match_allocate.
341 (resolve_code): Resolve SOURCE tag for ALLOCATE expressions.
343 2009-10-22 Janus Weil <janus@gcc.gnu.org>
346 * resolve.c (resolve_codes): Don't clear 'cs_base' for BLOCK constructs,
347 to make sure labels are treated correctly.
348 * symbol.c (gfc_get_st_label): Create labels in the right namespace.
349 For BLOCK constructs go into the parent namespace.
351 2009-10-21 Janus Weil <janus@gcc.gnu.org>
355 * match.c (select_type_set_tmp): Set flavor for temporary.
356 * resolve.c (resolve_class_typebound_call): Correctly resolve actual
359 2009-10-20 Paul Thomas <pault@gcc.gnu.org>
362 * resolve.c (resolve_arg_exprs): New function.
363 (resolve_class_compcall): Call the above.
364 (resolve_class_typebound_call): The same.
366 2009-10-19 Janus Weil <janus@gcc.gnu.org>
369 * parse.c (parse_derived): Correctly set 'alloc_comp' and 'pointer_comp'
371 * trans-array.c (structure_alloc_comps): Handle deallocation and
372 nullification of allocatable scalar components.
373 * trans-decl.c (gfc_get_symbol_decl): Remember allocatable scalars for
374 automatic deallocation.
375 (gfc_trans_deferred_vars): Automatically deallocate allocatable scalars.
377 2009-10-19 Tobias Burnus <burnus@net-b.de>
378 Steven G. Kargl <kargl@gcc.gnu.org>
381 * symbol.c (gfc_undo_symbols): Add NULL check.
382 * match.c (gfc_match_equivalence): Add check for
385 2009-10-19 Richard Guenther <rguenther@suse.de>
388 * trans-expr.c (gfc_trans_scalar_assign): Do not call
391 2009-10-17 Janus Weil <janus@gcc.gnu.org>
392 Paul Thomas <pault@gcc.gnu.org>
395 * decl.c (gfc_match_data_decl): Add BT_CLASS for undefined type
396 and empty type errors.
397 * parse.c (gfc_build_block_ns): Only set recursive if parent ns
403 * gfortran.h : Add class_ok bitfield to symbol_attr.
404 * decl.c (build_sym): Set attr.class_ok if dummy, pointer or
406 (build_struct): Use gfc_try 't' to carry errors past the call
407 to encapsulate_class_symbol.
408 (attr_decl1): For a CLASS object, apply the new attribute to
410 * match.c (gfc_match_select_type): Set attr.class_ok for an
412 * resolve.c (resolve_fl_variable_derived): Check a CLASS object
413 is dummy, pointer or allocatable by testing the class_ok and
414 the use_assoc attribute.
416 2009-10-16 Janus Weil <janus@gcc.gnu.org>
419 * resolve.c (resolve_ordinary_assign): Reject intrinsic assignments
420 to polymorphic variables.
422 2009-10-16 Paul Thomas <pault@gcc.gnu.org>
426 * trans-expr.c (select_class_proc): Convert the expression for the
427 vindex, carried on the first member of the esym list.
428 * gfortran.h : Add the vindex field to the esym_list structure.
429 and eliminate the class_object field.
430 * resolve.c (check_class_members): Remove the setting of the
432 (vindex_expr): New function.
433 (get_class_from_expr): New function.
434 (resolve_class_compcall): Call the above to find the ultimate
435 class or derived component. If derived, do not generate the
436 esym list. Add and expression for the vindex to the esym list
437 by calling the above.
438 (resolve_class_typebound_call): The same.
440 2009-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
443 * intrinsic.texi: Explicitly state that ETIME and DTIME take
444 REAL(4) arguments. Fix nearby typographically errors where
445 /leq was used instead of \leq.
447 2009-10-13 Janus Weil <janus@gcc.gnu.org>
450 * decl.c (encapsulate_class_symbol): Add new component '$size'.
451 * resolve.c (resolve_allocate_expr): Move CLASS handling to
453 (resolve_class_assign): Replaced by gfc_trans_class_assign.
454 (resolve_code): Remove calls to resolve_class_assign.
455 * trans.c (gfc_trans_code): Use new function gfc_trans_class_assign.
456 * trans-expr.c (get_proc_ptr_comp): Fix a memory leak.
457 (gfc_conv_procedure_call): For CLASS dummies, set the
459 (gfc_trans_class_assign): New function, replacing resolve_class_assign.
460 * trans-stmt.h (gfc_trans_class_assign): New prototype.
461 * trans-stmt.c (gfc_trans_allocate): Use correct size when allocating
462 CLASS variables. Do proper initialization. Move some code here from
463 resolve_allocate_expr.
465 2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
468 * io.c (check_format): Fix locus for error messages and fix a comment.
470 2009-10-11 Paul Thomas <pault@gcc.gnu.org>
473 * decl.c (hash_value): New function.
474 (gfc_match_derived_decl): Call it.
476 2009-10-09 Janus Weil <janus@gcc.gnu.org>
479 * decl.c (build_struct): Bugfix for CLASS components.
481 2009-10-09 Tobias Burnus <burnus@net-b.de>
484 * decl.c (encapsulate_class_symbol): Save attr.abstract.
485 * resolve.c (resolve_allocate_expr): Reject class allocate
486 without typespec or source=.
487 * trans-stmt.c (gfc_trans_allocate): Change gfc_warning
488 into gfc_error for "not yet implemented".
490 2009-10-09 Janus Weil <janus@gcc.gnu.org>
493 * gfortran.h (gfc_select_type_stack): New struct, to be used as a stack
494 for SELECT TYPE statements.
495 (select_type_stack): New global variable.
496 (type_selector,select_type_tmp): Removed.
497 * match.c (type_selector,type_selector): Removed.
498 (select_type_stack): New variable, serving as a stack for
499 SELECT TYPE statements.
500 (select_type_push,select_type_set_tmp): New functions.
501 (gfc_match_select_type): Call select_type_push.
502 (gfc_match_type_is): Call select_type_set_tmp.
503 * parse.c (select_type_pop): New function.
504 (parse_select_type_block): Call select_type_pop.
505 * symbol.c (select_type_insert_tmp): New function.
506 (gfc_find_sym_tree): Call select_type_insert_tmp.
508 2009-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
510 * arith.c (arith_power): Use mpc_pow_z.
511 * gfortran.h (HAVE_mpc_pow_z): Define.
513 2009-10-07 Daniel Kraft <d@domob.eu>
516 * resolve.c (resolve_contained_fntype): Clarify error message for
517 invalid assumed-length character result on module procedures.
519 2009-10-07 Janus Weil <janus@gcc.gnu.org>
521 * expr.c (gfc_check_pointer_assign): Do the correct type checking when
522 CLASS variables are involved.
523 * match.c (gfc_match_select_type): Parse associate-name in SELECT TYPE
524 statements, and set up a local namespace for the SELECT TYPE block.
525 * parse.h (gfc_build_block_ns): New prototype.
526 * parse.c (parse_select_type_block): Return from local namespace to its
527 parent after SELECT TYPE block.
528 (gfc_build_block_ns): New function for setting up the local namespace
529 for a BLOCK construct.
530 (parse_block_construct): Use gfc_build_block_ns.
531 * resolve.c (resolve_select_type): Insert assignment for the selector
532 variable, in case an associate-name is given, and put the SELECT TYPE
533 statement inside a BLOCK.
534 (resolve_code): Call resolve_class_assign after checking the assignment.
535 * symbol.c (gfc_find_sym_tree): Moved some code here from
537 (gfc_get_ha_sym_tree): Moved some code to gfc_find_sym_tree.
539 2009-10-07 Paul Thomas <pault@gcc.gnu.org>
542 * resolve.c (check_class_members): Reset compcall.assign.
544 2009-10-05 Paul Thomas <pault@gcc.gnu.org>
546 * trans-expr.c (select_class_proc): New function.
547 (conv_function_val): Deal with class methods and call above.
548 * symbol.c (gfc_type_compatible): Treat case where both ts1 and
550 gfortran.h : Add structure gfc_class_esym_list and include in
551 the structure gfc_expr.
552 * module.c (load_derived_extensions): New function.
553 (read_module): Call above.
554 (write_dt_extensions): New function.
555 (write_derived_extensions): New function.
556 (write_module): Use the above.
557 * resolve.c (resolve_typebound_call): Add a function expression
558 for class methods. This carries the chain of symbols for the
559 dynamic dispatch in select_class_proc.
560 (resolve_compcall): Add second, boolean argument to indicate if
561 a function is being handled.
562 (check_members): New function.
563 (check_class_members): New function.
564 (resolve_class_compcall): New function.
565 (resolve_class_typebound_call): New function.
566 (gfc_resolve_expr): Call above for component calls..
568 2009-10-05 Daniel Kraft <d@domob.eu>
571 * trans-stmt.c (gfc_trans_goto): Ignore statement list on assigned goto
574 2009-10-03 Richard Guenther <rguenther@suse.de>
576 * options.c (gfc_post_options): Handle -flto and -fwhopr.
578 2009-10-02 Tobias Burnus <burnus@net-b.de>
581 * trans-decl.c (gfc_init_default_dt): Check for presence of
582 the argument only if it is optional or in entry master.
583 (init_intent_out_dt): Ditto; call gfc_init_default_dt
584 for all derived types with initializers.
586 2009-10-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
589 * gfortran.h (HAVE_mpc_arc): Define.
590 * simplify.c (gfc_simplify_acos): Handle complex acos.
591 (gfc_simplify_acosh): Likewise for acosh.
592 (gfc_simplify_asin): Likewise for asin.
593 (gfc_simplify_asinh): Likewise for asinh.
594 (gfc_simplify_atan): Likewise for atan.
595 (gfc_simplify_atanh): Likewise for atanh.
597 2009-10-01 Tobias Burnus <burnus@net-b.de>
600 * decl.c (do_parm): Call add_init_expr_to_sym.
602 2009-09-30 Dennis Wassel <dennis.wassel@gmail.com>
604 * gcc/fortran/trans-array.c (gfc_trans_array_bound_check): Improved
605 bounds checking error messages. (gfc_conv_array_ref): Likewise.
606 (gfc_conv_ss_startstride): Likewise.
608 2009-09-30 Janus Weil <janus@gcc.gnu.org>
610 * resolve.c (check_typebound_baseobject): Don't check for
611 abstract types for CLASS.
612 (resolve_class_assign): Adapt for RHS being a CLASS.
613 * trans-intrinsic.c (gfc_conv_associated): Add component ref
616 2009-09-30 Janus Weil <janus@gcc.gnu.org>
618 * check.c (gfc_check_same_type_as): New function for checking
619 SAME_TYPE_AS and EXTENDS_TYPE_OF.
620 * decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class
621 container, if the contained type has it. Add an initializer for the
623 (add_init_expr_to_sym): Handle BT_CLASS.
624 (vindex_counter): New counter for setting vindices.
625 (gfc_match_derived_decl): Set vindex for all derived types, not only
626 those which are being extended.
627 * expr.c (gfc_check_assign_symbol): Handle NULL initialization of class
629 * gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and
630 GFC_ISYM_EXTENDS_TYPE_OF.
631 (gfc_type_is_extensible): New prototype.
632 * intrinsic.h (gfc_check_same_type_as): New prototype.
633 * intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF.
634 * primary.c (gfc_expr_attr): Handle CLASS-valued functions.
635 * resolve.c (resolve_structure_cons): Handle BT_CLASS.
636 (type_is_extensible): Make non-static and rename to
637 'gfc_type_is_extensible.
638 (resolve_select_type): Renamed type_is_extensible.
639 (resolve_class_assign): Handle NULL pointers.
640 (resolve_fl_variable_derived): Renamed type_is_extensible.
641 (resolve_fl_derived): Ditto.
642 * trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL
643 initialization of class pointer components.
644 (gfc_conv_structure): Handle BT_CLASS.
645 * trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of):
647 (gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF.
649 2009-09-30 Janus Weil <janus@gcc.gnu.org>
651 * gfortran.h (type_selector, select_type_tmp): New global variables.
652 * match.c (type_selector, select_type_tmp): New global variables,
653 used for SELECT TYPE statements.
654 (gfc_match_select_type): Better error handling. Remember selector.
655 (gfc_match_type_is): Create temporary variable.
656 * module.c (ab_attribute): New value 'AB_IS_CLASS'.
657 (attr_bits): New string.
658 (mio_symbol_attribute): Handle 'is_class'.
659 * resolve.c (resolve_select_type): Insert pointer assignment statement,
660 to assign temporary to selector.
661 * symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary
662 in SELECT TYPE statements.
664 2009-09-30 Janus Weil <janus@gcc.gnu.org>
666 * dump-parse-tree.c (show_code_node): Renamed 'alloc_list'.
667 * gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'.
668 (gfc_expr_to_initialize): New prototype.
669 * match.c (alloc_opt_list): Correctly check type compatibility.
670 Renamed 'alloc_list'.
671 (dealloc_opt_list): Renamed 'alloc_list'.
672 * resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize'
673 and make it non-static.
674 (resolve_allocate_expr): Set vindex for CLASS variables correctly.
675 Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'.
676 (resolve_allocate_deallocate): Renamed 'alloc_list'.
677 (check_class_pointer_assign): Rename to 'resolve_class_assign'. Change
678 argument type. Adjust to work with ordinary assignments.
679 (resolve_code): Call 'resolve_class_assign' for ordinary assignments.
680 Renamed 'check_class_pointer_assign'.
681 * st.c (gfc_free_statement): Renamed 'alloc_list'.
682 * trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle
683 size determination and initialization of CLASS variables. Bugfix for
684 ALLOCATE statements with default initialization and SOURCE block.
685 (gfc_trans_deallocate): Renamed 'alloc_list'.
687 2009-09-30 Paul Thomas <pault@gcc.gnu.org>
689 * trans-expr.c (gfc_conv_procedure_call): Convert a derived
690 type actual to a class object if the formal argument is a
693 2009-09-30 Janus Weil <janus@gcc.gnu.org>
696 * decl.c (build_struct): Handle allocatable scalar components.
697 * expr.c (gfc_add_component_ref): Correctly set typespec of expression,
698 after inserting component reference.
699 * match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no
700 variables are being used uninitialized.
701 * primary.c (gfc_match_varspec): Handle CLASS array components.
702 * resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to
704 * trans-array.c (structure_alloc_comps,gfc_trans_deferred_array):
705 Handle allocatable scalar components.
706 * trans-expr.c (gfc_conv_component_ref): Ditto.
707 * trans-types.c (gfc_get_derived_type): Ditto.
709 2009-09-30 Janus Weil <janus@gcc.gnu.org>
711 * decl.c (encapsulate_class_symbol): Modify names of class container
712 components by prefixing with '$'.
713 (gfc_match_end): Handle COMP_SELECT_TYPE.
714 * expr.c (gfc_add_component_ref): Modify names of class container
715 components by prefixing with '$'.
716 * gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and
718 (gfc_case): New field 'ts'.
719 (gfc_exec_op): Add EXEC_SELECT_TYPE.
720 (gfc_type_is_extension_of): New prototype.
721 * match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is):
723 * match.c (match_derived_type_spec): New function.
724 (match_type_spec): Use 'match_derived_type_spec'.
725 (match_case_eos): Modify error message.
726 (gfc_match_select_type): New function.
727 (gfc_match_case): Modify error message.
728 (gfc_match_type_is): New function.
729 (gfc_match_class_is): Ditto.
730 * parse.h (gfc_compile_state): Add COMP_SELECT_TYPE.
731 * parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS
733 (next_statement): Handle ST_SELECT_TYPE.
734 (gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS.
735 (parse_select_type_block): New function.
736 (parse_executable): Handle ST_SELECT_TYPE.
737 * resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of
738 class container components by prefixing with '$'.
739 (resolve_allocate_expr): Ditto.
740 (resolve_select_type): New function.
741 (gfc_resolve_blocks): Handle EXEC_SELECT_TYPE.
742 (check_class_pointer_assign): Modify names of class container
743 components by prefixing with '$'.
744 (resolve_code): Ditto.
745 * st.c (gfc_free_statement): Ditto.
746 * symbol.c (gfc_type_is_extension_of): New function.
747 (gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix.
748 * trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE.
750 2009-09-30 Janus Weil <janus@gcc.gnu.org>
751 Paul Thomas <pault@gcc.gnu.org>
753 * check.c (gfc_check_move_alloc): Arguments don't have to be arrays.
754 The second argument needs to be type-compatible with the first (not the
755 other way around, which makes a difference for CLASS entities).
756 * decl.c (encapsulate_class_symbol): New function.
757 (build_sym,build_struct): Handle BT_CLASS, call
758 'encapsulate_class_symbol'.
759 (gfc_match_decl_type_spec): Remove warning, use BT_CLASS.
760 (gfc_match_derived_decl): Set vindex;
761 * expr.c (gfc_add_component_ref): New function.
762 (gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol):
764 * dump-parse-tree.c (show_symbol): Print vindex.
765 * gfortran.h (bt): New basic type BT_CLASS.
766 (symbol_attribute): New field 'is_class'.
767 (gfc_typespec): Remove field 'is_class'.
768 (gfc_symbol): New field 'vindex'.
769 (gfc_get_ultimate_derived_super_type): New prototype.
770 (gfc_add_component_ref): Ditto.
771 * interface.c (gfc_compare_derived_types): Pointer equality check
772 moved here from gfc_compare_types.
773 (gfc_compare_types): Handle BT_CLASS and use
775 * match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call):
777 * misc.c (gfc_clear_ts): Removed is_class.
778 (gfc_basic_typename,gfc_typename): Handle BT_CLASS.
779 * module.c (bt_types,mio_typespec): Handle BT_CLASS.
780 (mio_symbol): Handle vindex.
781 * primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS.
782 * resolve.c (find_array_spec,check_typebound_baseobject):
784 (resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp'
786 (resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS.
787 (check_class_pointer_assign): New function.
788 (resolve_code): Handle BT_CLASS, call check_class_pointer_assign.
789 (resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived,
790 resolve_fl_variable): Handle BT_CLASS.
791 (check_generic_tbp_ambiguity): Add special case.
792 (resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS.
793 * symbol.c (gfc_get_ultimate_derived_super_type): New function.
794 (gfc_type_compatible): Handle BT_CLASS.
795 * trans-expr.c (conv_parent_component_references): Handle CLASS
797 (gfc_conv_initializer): Handle BT_CLASS.
798 * trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type):
801 2009-09-29 Daniel Kraft <d@domob.eu>
804 * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
805 (struct gfc_namespace): Convert flags to bit-fields and add flag
806 `construct_entities' for use with BLOCK constructs.
807 (enum gfc_exec_code): Add EXEC_BLOCK.
808 (struct gfc_code): Add namespace field to union for EXEC_BLOCK.
809 * match.h (gfc_match_block): New prototype.
810 * parse.h (enum gfc_compile_state): Add COMP_BLOCK.
811 * trans.h (gfc_process_block_locals): New prototype.
812 (gfc_trans_deferred_vars): Made public, new prototype.
813 * trans-stmt.h (gfc_trans_block_construct): New prototype.
814 * decl.c (gfc_match_end): Handle END BLOCK correctly.
815 (gfc_match_intent): Error if inside of BLOCK.
816 (gfc_match_optional), (gfc_match_value): Ditto.
817 * match.c (gfc_match_block): New routine.
818 * parse.c (decode_statement): Handle BLOCK statement.
819 (case_exec_markers): Add ST_BLOCK.
820 (case_end): Add ST_END_BLOCK.
821 (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
822 (parse_spec): Check for statements not allowed inside of BLOCK.
823 (parse_block_construct): New routine.
824 (parse_executable): Parse BLOCKs.
825 (parse_progunit): Disallow CONTAINS in BLOCK constructs.
826 * resolve.c (is_illegal_recursion): Find real container procedure and
827 don't get confused by BLOCK constructs.
828 (resolve_block_construct): New routine.
829 (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
830 * st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
831 * trans-decl.c (saved_local_decls): New static variable.
832 (add_decl_as_local): New routine.
833 (gfc_finish_var_decl): Add variable as local if inside BLOCK.
834 (gfc_trans_deferred_vars): Make public.
835 (gfc_process_block_locals): New routine.
836 * trans-stmt.c (gfc_trans_block_construct): New routine.
837 * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.
839 2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
842 * io.c (format_token): Add enumerators for rounding format specifiers.
843 (format_lex): Tokenize the rounding format specifiers.
844 (gfc_match_open): Enable rounding modes in OPEN statement.
846 2009-09-28 Richard Henderson <rth@redhat.com>
848 * f95-lang.c (gfc_init_builtin_functions): Update call to
849 build_common_builtin_nodes.
851 2009-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
853 * simplify.c (gfc_simplify_acos, gfc_simplify_acosh,
854 gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan,
855 gfc_simplify_atanh): Fix error message.
857 2009-09-24 Steven G. Kargl <kargl@gcc.gnu.org>
860 * error.c(gfc_warning_now): Move warnings_are_errors test to
861 after actual emitting of the warning.
862 * parse.c (next_free): Improve error locus printing.
863 (next_fixed): Change gfc_warn to gfc_warning_now, and improve
866 2009-09-16 Michael Matz <matz@suse.de>
869 * trans.h (struct lang_type): Remove nontarget_type member.
870 * trans.c (gfc_add_modify): Don't access it.
871 * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it,
872 instead set DECL_RESTRICTED_P on affected decls.
874 2009-09-14 Richard Henderson <rth@redhat.com>
876 * f95-lang.c (gfc_init_builtin_functions): Update call to
877 build_common_builtin_nodes.
878 (gfc_maybe_initialize_eh): Don't call
879 default_init_unwind_resume_libfunc.
881 2009-09-13 Richard Guenther <rguenther@suse.de>
882 Rafael Avila de Espindola <espindola@google.com>
884 * f95-lang.c (gfc_maybe_initialize_eh): Do not init
885 eh_personality_libfunc.
887 2009-09-11 Janus Weil <janus@gcc.gnu.org>
890 * resolve.c (resolve_ordinary_assign): Don't call resolve_code,
891 to avoid that subsequent codes are resolved more than once.
892 (resolve_code): Make sure that type-bound assignment operators are
896 2009-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
899 * fortran/decl.c(gfc_match_modproc): Check that module procedures
900 from a module can USEd in module procedure statements in other
901 program units. Update locus for better error message display.
902 Detect intrinsic procedures in module procedure statements.
904 2009-09-09 Richard Guenther <rguenther@suse.de>
907 * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
908 left 'tmp' unused in derived type assignment.
910 2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * resolve_c (resolve_allocate_deallocate): Complain
914 if stat or errmsg varaible is an array.
916 2009-09-05 Paul Thomas <pault@gcc.gnu.org>
919 * primary.c (gfc_match_varspec): Do not look for typebound
920 procedures unless the derived type has a f2k_derived namespace.
922 2009-09-03 Diego Novillo <dnovillo@google.com>
924 * f95-lang.c (lang_hooks): Remove const qualifier.
926 2009-09-01 Richard Guenther <rguenther@suse.de>
928 * f95-lang.c (gfc_mark_addressable): Remove.
929 (LANG_HOOKS_MARK_ADDRESSABLE): Likewise.
931 2009-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
934 * scanner.c (next_char): Fix typo in comment.
935 (gfc_get_char_literal): Warn if truncate flag is set for both fixed and
936 free form source, adjusting error locus as needed.
937 * parse.c (next_fixed): Clear the truncate flag.
938 (next_statement): Remove truncate warning.
940 2009-08-31 Janus Weil <janus@gcc.gnu.org>
941 Paul Thomas <pault@gcc.gnu.org>
944 * array.c (gfc_match_array_constructor): Rename gfc_match_type_spec.
945 * decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec,
946 and reject CLASS with -std=f95.
947 (gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix,
948 match_procedure_interface): Rename gfc_match_type_spec.
949 * gfortran.h (gfc_type_compatible): Add prototype.
950 * match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec.
951 * match.c (match_intrinsic_typespec): Rename to match_type_spec, and
952 add handling of derived types.
953 (gfc_match_allocate): Rename match_intrinsic_typespec and check
954 type compatibility of derived types.
955 * symbol.c (gfc_type_compatible): New function to check if two types
958 2009-08-31 Janus Weil <janus@gcc.gnu.org>
961 * check.c (gfc_check_allocated): Implement allocatable scalars.
962 * resolve.c (resolve_allocate_expr,resolve_fl_var_and_proc): Ditto.
963 * trans-intrinsic.c (gfc_conv_allocated): Ditto.
965 2009-08-30 Daniel Kraft <d@domob.eu>
968 * dump-parse-tree.c (show_typebound_proc): Renamed from `show_typebound'
969 and accept gfc_typebound_proc and name instead of the symtree, needed
970 for intrinsic operator output.
971 (show_typebound_symtree): New method calling `show_typebound_proc'.
972 (show_f2k_derived): Output type-bound operators also.
973 (show_symbol): Moved output of `Procedure bindings:' label to
975 * gfortran.texi (Fortran 2003 status): Mention support of
976 array-constructors with explicit type specification, type-bound
977 procedures/operators, type extension, ABSTRACT types and DEFERRED.
978 Link to Fortran 2003 wiki page.
979 (Fortran 2008 status): Fix typo. Link to Fortran 2008 wiki page.
980 * gfc-internals.texi (Type-bound Procedures): Document the new
981 members/attributes of gfc_expr.value.compcall used for type-bound
983 (Type-bound Operators): New section documenting their internals.
985 2009-08-27 Janus Weil <janus@gcc.gnu.org>
988 * expr.c (gfc_check_pointer_assign): Enable interface check for
989 pointer assignments involving procedure pointer components.
990 * gfortran.h (gfc_compare_interfaces): Modified prototype.
991 * interface.c (gfc_compare_interfaces): Add argument 'name2', to be
992 used instead of s2->name. Don't rely on the proc_pointer attribute,
993 but instead on the flags handed to this function.
994 (check_interface1,compare_parameter): Add argument for
995 gfc_compare_interfaces.
996 * resolve.c (check_generic_tbp_ambiguity): Ditto.
998 2009-08-27 Daniel Kraft <d@domob.eu>
1001 * gfortran.h (gfc_expr): Optionally store base-object in compcall value
1002 and add a new flag to distinguish assign-calls generated.
1003 (gfc_find_typebound_proc): Add locus argument.
1004 (gfc_find_typebound_user_op), (gfc_find_typebound_intrinsic_op): Ditto.
1005 (gfc_extend_expr): Return if failure was by a real error.
1006 * interface.c (matching_typebound_op): New routine.
1007 (build_compcall_for_operator): New routine.
1008 (gfc_extend_expr): Handle type-bound operators, some clean-up and
1009 return if failure was by a real error or just by not finding an
1010 appropriate operator definition.
1011 (gfc_extend_assign): Handle type-bound assignments.
1012 * module.c (MOD_VERSION): Incremented.
1013 (mio_intrinsic_op): New routine.
1014 (mio_full_typebound_tree): New routine to make typebound-procedures IO
1015 code reusable for type-bound user operators.
1016 (mio_f2k_derived): IO of type-bound operators.
1017 * primary.c (gfc_match_varspec): Initialize new fields in gfc_expr and
1018 pass locus to gfc_find_typebound_proc.
1019 * resolve.c (resolve_operator): Only output error about no matching
1020 interface if gfc_extend_expr did not already fail with an error.
1021 (extract_compcall_passed_object): Use specified base-object if present.
1022 (update_compcall_arglist): Handle ignore_pass field.
1023 (resolve_ordinary_assign): Update to handle extended code for
1024 type-bound assignments, too.
1025 (resolve_code): Handle EXEC_ASSIGN_CALL statement code.
1026 (resolve_tb_generic_targets): Pass locus to gfc_find_typebound_proc.
1027 (resolve_typebound_generic), (resolve_typebound_procedure): Ditto.
1028 (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): Ditto.
1029 (ensure_not_abstract_walker), (resolve_fl_derived): Ditto.
1030 (resolve_typebound_procedures): Remove not-implemented error.
1031 (resolve_typebound_call): Handle assign-call flag.
1032 * symbol.c (find_typebound_proc_uop): New argument to pass locus for
1033 error message about PRIVATE, verify that a found procedure is not marked
1035 (gfc_find_typebound_intrinsic_op): Ditto.
1036 (gfc_find_typebound_proc), (gfc_find_typebound_user_op): New locus arg.
1038 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net>
1041 * io.c: reverted previous patch.
1043 2009-08-25 Janne Blomqvist <jb@gcc.gnu.org>
1045 * gfortran.texi: Fix ENCODE example.
1047 2009-08-25 Janus Weil <janus@gcc.gnu.org>
1050 * primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for
1051 calls to procedure pointer components, other references to procedure
1052 pointer components are EXPR_VARIABLE.
1053 * resolve.c (resolve_actual_arglist): Bugfix (there can be calls without
1055 * trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp',
1056 removed argument 'se' and made static. Avoid inserting a temporary
1057 variable for calling the PPC.
1058 (conv_function_val): Renamed gfc_get_proc_ptr_comp.
1059 (gfc_conv_procedure_call): Distinguish functions returning a procedure
1060 pointer from calls to a procedure pointer. Distinguish calls to
1061 procedure pointer components from procedure pointer components as
1063 * trans-stmt.h (gfc_get_proc_ptr_comp): Make it static.
1065 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1068 * io.c (check_format): Fix to not error on slash after P. Fix some
1071 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1074 * io.c (check_format): Fix to not error on right paren after P.
1076 2009-08-24 Aldy Hernandez <aldyh@redhat.com>
1079 * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
1080 (transfer_array_desc): Same.
1082 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1085 * io.c (check_format): Add checks for comma and the allowed
1086 format specifiers after the 'P' specifier. Fix typo in error message
1089 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1092 * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES.
1093 (format_lex): Likewise.
1094 (token_to_string): New function.
1095 (check_format): Use the new tokens and the new function. Add
1096 check for positive width.
1098 2009-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1100 * fortran/decl.c: Disallow procedure pointers with -std=f95.
1102 2009-08-22 Steven K. kargl <kargl@gcc.gnu.org>
1103 Paul Thomas <pault@gcc.gnu.org>
1105 * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec,
1107 * fortran/gfortran.h: Add *expr3 entity to gfc_code. Add prototype
1108 for gfc_match_char_spec.
1109 * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE=
1111 * fortran/match.c (match_intrinsic_typespec): New function to match
1112 F2003 intrinsic-type-spec.
1113 (conformable_arrays): New function. Check SOURCE= and
1114 allocation-object are conformable.
1115 (gfc_match_allocate): Use new functions. Match SOURCE= tag.
1117 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net>
1120 * io.c : added variable to store original len of fmt
1121 * io.c (check_format): Consume H items using next_char
1122 in both modes to handle consecutive single quotes.
1123 Test for extra characters in fmt, issue warning.
1125 2009-08-21 Janus Weil <janus@gcc.gnu.org>
1128 * primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
1129 (gfc_expr_attr): Use gfc_variable_attr for procedure pointer components.
1130 * resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
1132 * trans-expr.c (gfc_conv_component_ref): Ditto.
1133 (gfc_conv_variable): Ditto.
1134 (gfc_conv_procedure_call): Ditto.
1135 (gfc_trans_pointer_assignment): Ditto.
1136 * trans-types.c (gfc_get_derived_type): Ditto.
1138 2009-08-20 Tobias Schlüter <tobi@gcc.gnu.org>
1140 * trans-stmt.c (gfc_trans_do): Add a few missing folds.
1142 2009-08-20 Michael Matz <matz@suse.de>
1145 * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
1146 instead of equality.
1148 2009-08-20 Janus Weil <janus@gcc.gnu.org>
1151 * resolve.c (resolve_symbol): Don't resolve formal_ns of intrinsic
1154 2009-08-18 Michael Matz <matz@suse.de>
1156 * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early,
1157 change order of length calculation to (end - start) + 1.
1158 (gfc_get_interface_mapping_array): Adjust call to
1159 gfc_get_nodesc_array_type.
1160 * trans-array.c (gfc_trans_create_temp_array,
1161 gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto.
1162 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
1163 * trans.c (gfc_add_modify): Assignment between base type and nontarget
1164 type are equal enough.
1165 (gfc_call_malloc): Use prvoid_type_node for return value of
1167 (gfc_allocate_with_status): Ditto.
1168 * trans-types.c (gfc_array_descriptor_base): Double size of this array.
1169 (gfc_init_types): Build prvoid_type_node.
1170 (gfc_build_array_type): New bool parameter "restricted".
1171 (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers,
1173 (gfc_get_array_descriptor_base): Ditto.
1174 (gfc_get_array_type_bounds): Ditto.
1175 (gfc_sym_type): Use symbol attributes to feed calls to above functions.
1176 (gfc_get_derived_type): Ditto.
1177 * trans.h (struct lang_type): Add nontarget_type member.
1178 * trans-types.h (prvoid_type_node): Declare.
1179 (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new
1181 * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be
1182 aliased a type with a different alias set than the base type.
1183 (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type.
1185 2009-08-18 Janus Weil <janus@gcc.gnu.org>
1186 Paul Thomas <pault@gcc.gnu.org>
1189 * trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl
1190 using the interface symbol. Character types are returned by reference.
1191 (gfc_get_derived_type): Prevent infinite recursion loop
1192 if a PPC has a derived-type formal arg.
1194 2008-08-17 Paul Thomas <pault@gcc.gnu.org>
1197 * trans-decl.c (gfc_trans_use_stmts): Keep going through use
1198 list if symbol is not use associated.
1200 2009-08-17 Daniel Kraft <d@domob.eu>
1203 * resolve.c (get_checked_tb_operator_target): New routine to do checks
1204 on type-bound operators in common between intrinsic and user operators.
1205 (resolve_typebound_intrinsic_op): Call it.
1206 (resolve_typebound_user_op): Ditto.
1208 2009-08-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1211 * scanner.c (gfc_next_char_literal): Add comment to improve
1213 * io.c (enum format_token): Add FMT_STAR. (format_lex): Add case
1214 for '*'. (check_format): Check for left paren after '*'. Change
1215 format checks to use %L to improve format string error locus.
1217 2009-08-17 Janus Weil <janus@gcc.gnu.org>
1220 * array.c (gfc_resolve_character_array_constructor): Add NULL argument
1222 * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1223 gfc_match_implicit): Ditto.
1224 * expr.c (simplify_const_ref): Fix memory leak.
1225 (gfc_simplify_expr): Add NULL argument to gfc_new_charlen.
1226 * gfortran.h (gfc_new_charlen): Modified prototype.
1227 * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Add NULL
1228 argument to gfc_new_charlen.
1229 * module.c (mio_charlen): Ditto.
1230 * resolve.c (gfc_resolve_substring_charlen,
1231 gfc_resolve_character_operator,fixup_charlen): Ditto.
1232 (resolve_fl_derived,resolve_symbol): Add argument to gfc_charlen.
1233 * symbol.c (gfc_new_charlen): Add argument 'old_cl' (to make a copy of
1234 an existing charlen).
1235 (gfc_set_default_type,generate_isocbinding_symbol): Fix memory leak.
1236 (gfc_copy_formal_args_intr): Add NULL argument to gfc_new_charlen.
1237 * trans-decl.c (create_function_arglist): Fix memory leak.
1239 2009-08-17 Richard Guenther <rguenther@suse.de>
1241 * trans-expr.c (gfc_trans_scalar_assign): Replace hack with
1244 2009-08-15 Tobias Burnus <burnus@net-b.de>
1247 * gfortranspec.c (lookup_option): Remove gfortran-specific
1248 version of -dumpversion.
1250 2009-08-14 Janus Weil <janus@gcc.gnu.org>
1253 * resolve.c (resolve_structure_cons): Make sure that ts.u.derived is
1254 only used if type is BT_DERIVED.
1256 2009-08-13 Janus Weil <janus@gcc.gnu.org>
1259 * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union.
1260 * decl.c (build_struct): Make sure 'cl' is only used
1261 if type is BT_CHARACTER.
1262 * symbol.c (gfc_set_default_type): Ditto.
1263 * resolve.c (resolve_symbol, resolve_fl_derived): Ditto.
1264 (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived'
1265 is only used if type is BT_DERIVED.
1266 * trans-io.c (transfer_expr): Make sure 'derived' is only used if type
1267 is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR).
1268 * array.c: Mechanical replacements to accomodate union in gfc_typespec.
1272 * dump-parse-tree.c: Ditto.
1274 * interface.c: Ditto.
1275 * iresolve.c: Ditto.
1283 * simplify.c: Ditto.
1285 * target-memory.c: Ditto.
1286 * trans-array.c: Ditto.
1287 * trans-common.c: Ditto.
1288 * trans-const.c: Ditto.
1289 * trans-decl.c: Ditto.
1290 * trans-expr.c: Ditto.
1291 * trans-intrinsic.c: Ditto.
1292 * trans-io.c: Ditto.
1293 * trans-stmt.c: Ditto.
1294 * trans-types.c: Ditto.
1296 2009-08-13 Janus Weil <janus@gcc.gnu.org>
1299 * resolve.c (resolve_symbol): Move some checking code to
1300 resolve_intrinsic, and call this from here.
1301 (resolve_intrinsic): Some checking code moved here from resolve_symbol.
1302 Make sure each intrinsic is only resolved once.
1304 2009-08-12 Tobias Burnus <burnus@net-b.de>
1307 * symbol.c (gfc_copy_attr): Merge bits instead of replace
1308 bits in gfc_copy_attr.
1309 * gfc_check_pointer_assign (gfc_check_pointer_assign):
1310 Initialize ext_attr bits by zero.
1312 2009-08-11 Richard Guenther <rguenther@suse.de>
1314 * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
1316 2009-08-11 Janus Weil <janus@gcc.gnu.org>
1319 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
1320 components as actual arguments.
1322 2009-08-10 Daniel Kraft <d@domob.eu>
1325 * gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op.
1326 (gfc_find_typebound_user_op): New routine.
1327 (gfc_find_typebound_intrinsic_op): Ditto.
1328 (gfc_check_operator_interface): Now public routine.
1329 * decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=).
1330 * interface.c (check_operator_interface): Made public, renamed to
1331 `gfc_check_operator_interface' accordingly and hand in the interface
1332 as gfc_symbol rather than gfc_interface so it is useful for type-bound
1333 operators, too. Return boolean result.
1334 (gfc_check_interfaces): Adapt call to `check_operator_interface'.
1335 * symbol.c (gfc_get_namespace): Initialize new field `tb_op'.
1336 (gfc_free_namespace): Free `tb_uop_root'-based tree.
1337 (find_typebound_proc_uop): New helper function.
1338 (gfc_find_typebound_proc): Use it.
1339 (gfc_find_typebound_user_op): New method.
1340 (gfc_find_typebound_intrinsic_op): Ditto.
1341 * resolve.c (resolve_tb_generic_targets): New helper function.
1342 (resolve_typebound_generic): Use it.
1343 (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New.
1344 (resolve_typebound_procedures): Resolve operators, too.
1345 (check_uop_procedure): New, code from gfc_resolve_uops.
1346 (gfc_resolve_uops): Moved main code to new `check_uop_procedure'.
1348 2009-08-10 Janus Weil <janus@gcc.gnu.org>
1351 * decl.c (gfc_match_type_spec): Match CLASS statement and warn about
1352 missing polymorphism.
1353 * gfortran.h (gfc_typespec): Add field 'is_class'.
1354 * misc.c (gfc_clear_ts): Initialize 'is_class' to zero.
1355 * resolve.c (type_is_extensible): New function to check if a derived
1357 (resolve_fl_variable_derived): Add error checks for CLASS variables.
1358 (resolve_typebound_procedure): Disallow non-polymorphic passed-object
1359 dummy arguments, turning warning into error.
1360 (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic
1361 passed-object dummy arguments for procedure pointer components,
1362 turning warning into error. Add error check for CLASS components.
1364 2009-08-05 Tobias Burnus <burnus@net-b.de>
1367 * gfortran.h (ext_attr_id_t): Add typedef for this enum.
1368 (gfc_add_ext_attribute): Use it.
1369 * decl.c (gfc_match_gcc_attributes): Ditto.
1370 * expr.c (gfc_check_pointer_assign): Ditto.
1371 * symbol.c (gfc_add_ext_attribute): Ditto.
1372 (gfc_copy_attr): Copy also ext_attr.
1373 * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
1374 * module.c (mio_symbol_attribute): Save ext_attr in the mod file.
1376 2009-08-05 Tobias Burnus <burnus@net-b.de>
1380 2009-08-04 Tobias Burnus <burnus@net-b.de>
1383 * trans-types.c (gfc_get_function_type): Fix typelist of
1384 functions without argument.
1386 2009-08-05 Paul Thomas <pault@gcc.gnu.org>
1389 * iresolve.c (gfc_resolve_transfer): Correct error in 'mold'
1390 character length for case where length expresson is NULL.
1392 2009-08-04 Tobias Burnus <burnus@net-b.de>
1395 * trans-types.c (gfc_get_function_type): Fix typelist of
1396 functions without argument.
1398 2009-08-04 Paul Thomas <pault@gcc.gnu.org>
1401 * decl.c (add_init_expr_to_sym): Character symbols can only be
1402 initialized with character expressions.
1404 2009-08-02 Janus Weil <janus@gcc.gnu.org>
1407 * decl.c (match_char_length): Warn about old-style character length
1409 * match.c (match_arithmetic_if,gfc_match_if): Modify warning message
1411 (gfc_match_goto): Warn about computed gotos.
1412 (gfc_match_return): Warn about alternate return.
1413 (gfc_match_st_function): Warn about statement functions.
1414 * resolve.c (resolve_fl_procedure): Modify warning message for
1415 assumed-length character functions.
1417 2009-08-01 Paul Thomas <pault@gcc.gnu.org>
1420 * error.c : Add static flag 'warnings_not_errors'.
1421 (gfc_error): If 'warnings_not_errors' is set, branch to code
1423 (gfc_clear_error): Reset 'warnings_not_errors'.
1424 (gfc_errors_to_warnings): New function.
1425 * options.c (gfc_post_options): If pedantic and flag_whole_file
1426 change the latter to a value of 2.
1427 * parse.c (parse_module): Add module namespace to gsymbol.
1428 (resolve_all_program_units): New function.
1429 (clean_up_modules): New function.
1430 (translate_all_program_units): New function.
1431 (gfc_parse_file): If whole_file, do not clean up module right
1432 away and add derived types to namespace derived types. In
1433 addition, call the three new functions above.
1434 * resolve.c (not_in_recursive): New function.
1435 (not_entry_self_reference): New function.
1436 (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN,
1437 procedure must not be in the course of being resolved and
1438 must return false for the two new functions. Pack away the
1439 current derived type list before calling gfc_resolve for the
1440 gsymbol namespace. It is unconditionally an error if the ranks
1441 of the reference and ther procedure do not match. Convert
1442 errors to warnings during call to gfc_procedure_use if not
1444 (gfc_resolve): Set namespace resolved flag to -1 during
1445 resolution and store current cs_base.
1446 * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation
1447 substitute a use associated variable, if it is available in a
1449 (gfc_get_extern_function_decl): If the procedure is use assoc,
1450 do not attempt to find it in a gsymbol because it could be an
1451 interface. If the symbol exists in a module namespace, return
1453 * trans-expr.c (gfc_trans_scalar_assign): If a derived type
1454 assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs.
1455 * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a
1456 boolean argument. Copy component backend_decls directly if the
1457 components are derived types and from_gsym is true.
1458 (gfc_get_derived_type): If whole_file copy the derived type from
1459 the module if it is use associated, otherwise, if can be found
1460 in another gsymbol namespace, use the existing derived type as
1461 the TYPE_CANONICAL and build normally.
1462 * gfortran.h : Add derived_types and resolved fields to
1463 gfc_namespace. Include prototype for gfc_errors_to_warnings.
1465 2009-07-29 Tobias Burnus <burnus@net-b.de>
1468 * trans-types.c (gfc_get_function_type): Do not add hidden
1469 string-length argument for BIND(C) procedures.
1470 * trans-decl.c (create_function_arglist): Skip over nonexisting
1471 string-length arguments for BIND(C) procedures.
1473 2009-07-28 Jakub Jelinek <jakub@redhat.com>
1476 * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of
1477 gfc_error to diagnose invalid COLLAPSE arguments.
1479 2009-07-28 Janus Weil <janus@gcc.gnu.org>
1482 * trans-types.c (gfc_get_ppc_type): For derived types, directly use the
1483 backend_decl, instead of calling gfc_typenode_for_spec, to avoid
1485 (gfc_get_derived_type): Correctly handle PPCs returning derived types,
1486 avoiding infinite recursion.
1488 2009-07-27 Janus Weil <janus@gcc.gnu.org>
1491 * interface.c (gfc_compare_interfaces): Call 'count_types_test' before
1492 'generic_correspondence', and only if checking a generic interface.
1494 2009-07-27 Tobias Burnus <burnus@net-b.de>
1497 * resolve.c (resolve_symbol): Do not initialize pointer derived-types.
1498 * trans-decl.c (init_intent_out_dt): Ditto.
1499 (generate_local_decl): No need to set attr.referenced for DT pointers.
1501 2009-07-26 Tobias Burnus <burnus@net-b.de>
1504 * intrinsic.c (make_generic): Remove assert as "atan" can be
1505 both ISYM_ATAN and ISYM_ATAN2.
1506 (add_functions): Add two-argument variant of ATAN.
1507 * intrinsic.h (gfc_check_atan_2): Add check for it.
1508 * intrinsic.texi (ATAN2): Correct and enhance description.
1509 (ATAN): Describe two-argument variant of ATAN.
1511 2009-07-25 Tobias Burnus <burnus@net-b.de>
1512 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1515 * intrinsic.c (add_functions): Support complex arguments for
1516 acos,acosh,asin,asinh,atan,atanh.
1517 * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support
1519 * simplify.c (gfc_simplify_acos,gfc_simplify_acosh,
1520 gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan,
1521 gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh,
1522 gfc_simplify_acosh,gfc_simplify_atanh): Support
1525 2009-07-25 Richard Guenther <rguenther@suse.de>
1528 * trans-types.c (gfc_get_array_type_bounds): Use
1529 build_distinct_type_copy with a proper TYPE_CANONICAL and
1530 re-use the type-decl of the original type.
1531 * trans-decl.c (build_entry_thunks): Signal cgraph we may not
1533 (create_main_function): Likewise.
1534 (gfc_generate_function_code): Likewise.
1535 * trans-expr.c (gfc_trans_subcomponent_assign): Do not use
1536 fold_convert on record types.
1538 2009-07-25 Janus Weil <janus@gcc.gnu.org>
1541 * decl.c (match_ppc_decl): Implement the PASS attribute for procedure
1543 (match_binding_attributes): Ditto.
1544 * gfortran.h (gfc_component): Add member 'tb'.
1545 (gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const.
1546 * module.c (MOD_VERSION): Bump module version.
1547 (binding_ppc): New string constants.
1548 (mio_component): Only use formal args if component is a procedure
1549 pointer and add 'tb' member.
1550 (mio_typebound_proc): Include pass_arg and take care of procedure
1552 * resolve.c (update_arglist_pass): Add argument 'name' and take care of
1554 (extract_ppc_passed_object): New function, analogous to
1555 extract_compcall_passed_object, but for procedure pointer components.
1556 (update_ppc_arglist): New function, analogous to
1557 update_compcall_arglist, but for procedure pointer components.
1558 (resolve_typebound_generic_call): Added argument to update_arglist_pass.
1559 (resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute.
1560 (resolve_fl_derived): Check the PASS argument for procedure pointer
1562 * symbol.c (verify_bind_c_derived_type): Reject procedure pointer
1563 components in BIND(C) types.
1565 2009-07-24 Janus Weil <janus@gcc.gnu.org>
1568 * array.c (gfc_resolve_character_array_constructor): Use new function
1570 * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1571 gfc_match_implicit): Ditto.
1572 * expr.c (gfc_simplify_expr): Ditto.
1573 * gfortran.h (gfc_new_charlen): New prototype.
1574 * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
1575 function gfc_new_charlen.
1576 * module.c (mio_charlen): Ditto.
1577 * resolve.c (gfc_resolve_substring_charlen,
1578 gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
1579 resolve_symbol): Ditto.
1580 * symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
1581 structure and add it to a namespace.
1582 (gfc_copy_formal_args_intr): Make sure ts.cl is present
1583 for CHARACTER variables.
1585 2009-07-24 Jakub Jelinek <jakub@redhat.com>
1589 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
1590 gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
1592 * trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
1593 * trans-array.h (gfc_trans_scalarized_loop_end): New prototype.
1595 2009-07-23 Jakub Jelinek <jakub@redhat.com>
1598 * io.c (gfc_resolve_dt): Add LOC argument. Fail if
1599 dt->io_unit is NULL. Return FAILURE after issuing error about
1600 negative UNIT number.
1601 (match_io_element): Don't segfault if current_dt->io_unit is NULL.
1602 * gfortran.h (gfc_resolve_dt): Adjust prototype.
1603 * resolve.c (resolve_code): Adjust caller.
1605 2009-07-22 Paul Thomas <pault@gcc.gnu.org>
1608 * trans-decl.c (generate_local_decl): Unreferenced result
1609 variables with allocatable components should be treated like
1610 INTENT_OUT dummy variables.
1612 2009-07-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1614 * trans.h (gfc_set_decl_assembler_name): New prototype.
1615 * trans-decl.c (gfc_set_decl_assembler_name): New function.
1616 (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1617 build_function_decl): Use gfc_set_decl_assembler_name instead of
1618 SET_DECL_ASSEMBLER_NAME.
1619 * trans-common.c (build_common_decl): Use
1620 gfc_set_decl_assembler_name instead of SET_DECL_ASSEMBLER_NAME.
1622 2009-07-21 Richard Guenther <rguenther@suse.de>
1625 * trans-decl.c (gfc_get_extern_function_decl): Do not set
1626 DECL_IS_MALLOC for pointer valued functions.
1627 (build_function_decl): The same.
1629 2009-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
1632 * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that
1633 the optional second argument isn't of COMPLEX type.
1635 2009-07-17 Richard Guenther <rguenther@suse.de>
1638 * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
1639 * trans-decl.c (gfc_gimplify_function): Remove.
1640 (build_entry_thunks): Do not gimplify here.
1641 (create_main_function): Likewise.
1642 (gfc_generate_function_code): Likewise.
1644 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
1645 Manuel López-Ibáñez <manu@gcc.gnu.org>
1648 * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
1649 trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
1650 argument to fold_{unary,binary,ternary}, fold_build[123],
1651 build_call_expr, build_size_arg, build_fold_addr_expr,
1652 build_call_array, non_lvalue, size_diffop,
1653 fold_build1_initializer, fold_build2_initializer,
1654 fold_build3_initializer, fold_build_call_array,
1655 fold_build_call_array_initializer, fold_single_bit_test,
1656 omit_one_operand, omit_two_operands, invert_truthvalue,
1657 fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
1658 combine_comparisons, fold_builtin_*, fold_call_expr,
1659 build_range_check, maybe_fold_offset_to_address, round_up,
1662 2009-07-15 Janus Weil <janus@gcc.gnu.org>
1665 * resolve.c (resolve_symbol): Don't resolve the formal namespace of a
1666 contained procedure.
1668 2009-07-14 Taras Glek <tglek@mozilla.com>
1669 Rafael Espindola <espindola@google.com>
1671 * Make-lang.in (fortran.install-plugin): New target for
1672 installing plugin headers.
1674 2009-07-13 H.J. Lu <hongjiu.lu@intel.com>
1676 * module.c (mio_symbol): Remove the unused variable, formal.
1678 2009-07-13 Janus Weil <janus@gcc.gnu.org>
1681 * module.c (mio_symbol): If the symbol has formal arguments,
1682 the formal namespace will be present.
1683 * resolve.c (resolve_actual_arglist): Correctly handle 'called'
1684 procedure pointer components as actual arguments.
1685 (resolve_fl_derived,resolve_symbol): Make sure the formal namespace
1687 * trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal
1688 arguments of procedure pointer components.
1690 2009-07-12 Tobias Burnus <burnus@net-b.de>
1691 Philippe Marguinaud <philippe.marguinaud@meteo.fr>
1694 * primary.c (match_charkind_name): Fix condition for $ matching.
1697 * libgfortran.h: Typedef the GFC_DTYPE_* enum.
1699 2009-07-11 Tobias Burnus <burnus@net-b.de>
1702 * check.c (gfc_check_fn_rc2008): New function.
1703 * intrinsic.h (gfc_check_fn_rc2008): New prototype.
1704 * intrinsic.c (add_functions): Add complex tan, cosh, sinh,
1707 2009-07-10 Paul Thomas <pault@gcc.gnu.org>
1710 * primary.c (match_kind_param): Return MATCH_NO if the symbol
1713 2008-07-09 Paul Thomas <pault@gcc.gnu.org>
1716 * resolve.c (check_host_association): Use the existing
1717 accessible symtree and treat function expressions with
1718 symbols that have procedure flavor.
1720 2009-07-09 Janus Weil <janus@gcc.gnu.org>
1723 * dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'.
1724 * expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1725 (gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'.
1726 (replace_comp,gfc_expr_replace_comp): New functions, analogous
1727 to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components
1729 * gfortran.h (gfc_expr_replace_comp): New prototype.
1730 (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1731 * interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'.
1732 * match.c (gfc_match_pointer_assignment): Ditto.
1733 * primary.c (gfc_match_varspec): Handle array-valued procedure pointers
1734 and procedure pointer components. Renamed 'is_proc_ptr_comp'.
1735 * resolve.c (resolve_fl_derived): Correctly handle interfaces with
1736 RESULT statement, and handle array-valued procedure pointer components.
1737 (resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed
1739 * trans-array.c (gfc_walk_function_expr): Ditto.
1740 * trans-decl.c (gfc_get_symbol_decl): Security check for presence of
1742 * trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure
1743 pointer components. Renamed 'is_proc_ptr_comp'.
1744 (conv_function_val,gfc_trans_arrayfunc_assign): Renamed
1746 (gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead
1748 * trans-io.c (gfc_trans_transfer): Handle array-valued procedure
1751 2009-07-09 Tobias Burnus <burnus@net-b.de>
1754 * intrinsic.c (gfc_convert_type_warn): Set sym->result.
1755 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1756 for optional arguments.
1758 2009-07-08 Tobias Burnus <burnus@net-b.de>
1761 * simplify.c (gfc_simplify_sign): Handle signed zero correctly.
1762 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Support
1764 * invoke.texi (-fno-sign-zero): Add text regarding SIGN intrinsic.
1766 2008-07-08 Paul Thomas <pault@gcc.gnu.org>
1769 * decl.c (match_procedure_interface): Correct the association
1770 or creation of the interface procedure's symbol.
1772 2009-07-04 Jakub Jelinek <jakub@redhat.com>
1774 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer
1775 maxloc initialize limit to -huge-1 rather than just -huge.
1777 2009-07-04 Janus Weil <janus@gcc.gnu.org>
1780 * interface.c (compare_actual_formal): Take care of proc-pointer-valued
1781 functions as actual arguments.
1782 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1783 * resolve.c (resolve_specific_f0): Use the correct ts.
1785 2009-07-02 Michael Matz <matz@suse.de>
1788 * trans-array.c (gfc_conv_descriptor_stride_get): Return
1789 constant one for strides in the first dimension of ALLOCATABLE
1792 2009-06-30 Janus Weil <janus@gcc.gnu.org>
1795 * trans-types.c (gfc_get_derived_type): Bugfix, reverting one hunk from
1798 2009-06-29 Tobias Burnus <burnus@net-b.de>
1801 * trans-expr.c (gfc_conv_procedure_call): Add -fcheck=pointer check.
1802 * libgfortran.h: Add GFC_RTCHECK_POINTER.
1803 * invoke.texi (-fcheck): Document new pointer option.
1804 * options.c (gfc_handle_runtime_check_option): Handle pointer option.
1806 * gfortran.texi (C Binding): Improve wording.
1807 * iso-c-binding.def: Remove obsolete comment.
1809 2009-06-29 Paul Thomas <pault@gcc.gnu.org>
1812 * dependency.h : Add second bool* argument to prototype of
1813 gfc_full_array_ref_p.
1814 * dependency.c (gfc_full_array_ref_p): If second argument is
1815 present, return true if last dimension of reference is an
1816 element or has unity stride.
1817 * trans-array.c : Add NULL second argument to references to
1818 gfc_full_array_ref_p.
1819 * trans-expr.c : The same, except for;
1820 (gfc_trans_arrayfunc_assign): Return fail if lhs reference
1821 is not a full array or a contiguous section.
1823 2009-06-28 Tobias Burnus <burnus@net-b.de>
1824 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1827 * symbol.c (gfc_add_ext_attribute): New function.
1828 (gfc_get_sym_tree): New argument allow_subroutine.
1829 (gfc_get_symbol,gfc_get_ha_sym_tree,gen_cptr_param,gen_fptr_param
1830 gen_shape_param,generate_isocbinding_symbol): Use it.
1831 * decl.c (find_special): New argument allow_subroutine.
1832 (add_init_expr_to_sym,add_hidden_procptr_result,attr_decl1,
1833 match_procedure_in_type,gfc_match_final_decl): Use it.
1834 (gfc_match_gcc_attributes): New function.
1835 * gfortran.texi (Mixed-Language Programming): New section
1836 "GNU Fortran Compiler Directives".
1837 * gfortran.h (ext_attr_t): New struct.
1838 (symbol_attributes): Use it.
1839 (gfc_add_ext_attribute): New prototype.
1840 (gfc_get_sym_tree): Update pototype.
1841 * expr.c (gfc_check_pointer_assign): Check whether call
1842 convention is the same.
1843 * module.c (import_iso_c_binding_module, create_int_parameter,
1844 use_iso_fortran_env_module): Update gfc_get_sym_tree call.
1845 * scanner.c (skip_gcc_attribute): New function.
1846 (skip_free_comments,skip_fixed_comments): Use it.
1847 (gfc_next_char_literal): Support !GCC$ lines.
1848 * resolve.c (check_host_association): Update
1849 gfc_get_sym_tree call.
1850 * match.c (gfc_match_sym_tree,gfc_match_call): Update
1851 gfc_get_sym_tree call.
1852 * trans-decl.c (add_attributes_to_decl): New function.
1853 (gfc_get_symbol_decl,get_proc_pointer_decl,
1854 gfc_get_extern_function_decl,build_function_decl: Use it.
1855 * match.h (gfc_match_gcc_attributes): Add prototype.
1856 * parse.c (decode_gcc_attribute): New function.
1857 (next_free,next_fixed): Support !GCC$ lines.
1858 * primary.c (match_actual_arg,check_for_implicit_index,
1859 gfc_match_rvalue,gfc_match_rvalue): Update
1860 gfc_get_sym_tree call.
1862 2009-06-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1864 * gfortran.h: Define HAVE_mpc_pow.
1865 * arith.c (complex_reciprocal, complex_pow): If HAVE_mpc_pow,
1866 don't define these functions.
1867 (arith_power): If HAVE_mpc_pow, use mpc_pow.
1869 2009-06-26 Janus Weil <janus@gcc.gnu.org>
1873 * decl.c (add_hidden_procptr_result): Copy the typespec to the hidden
1875 * expr.c (gfc_check_pointer_assign): Enable interface check for
1876 procedure pointer assignments where the rhs is a function returning a
1878 * resolve.c (resolve_symbol): If an external procedure with unspecified
1879 return type can not be implicitly typed, it must be a subroutine.
1881 2009-06-24 Janus Weil <janus@gcc.gnu.org>
1884 * gfortran.h (gfc_component): New member 'formal_ns'.
1885 (gfc_copy_formal_args_ppc,void gfc_ppc_use): New.
1886 * interface.c (gfc_ppc_use): New function, analogous to
1887 gfc_procedure_use, but for procedure pointer components.
1888 * module.c (MOD_VERSION): Bump module version.
1889 (mio_component): Treat formal arguments.
1890 (mio_formal_arglist): Changed argument from gfc_symbol to
1892 (mio_symbol): Changed argument of mio_formal_arglist.
1893 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Call gfc_ppc_use,
1894 to check actual arguments and treat formal args correctly.
1895 (resolve_fl_derived): Copy formal args of procedure pointer components
1896 from their interface.
1897 * symbol.c (gfc_copy_formal_args_ppc): New function, analogous to
1898 gfc_copy_formal_args, but for procedure pointer components.
1900 2009-06-22 Janus Weil <janus@gcc.gnu.org>
1904 * interface.c (compare_parameter): Set implicit type for function
1905 actual arguments with BT_UNKNOWN.
1907 2009-06-22 Tobias Burnus <burnus@net-b.de>
1911 * simplify.c (gfc_simplify_spread): Fix the case that source=
1914 2009-06-22 Paul Thomas <pault@gcc.gnu.org>
1917 * interface.c (gfc_search_interface): Hold back a match to an
1918 elementary procedure until all other possibilities are
1921 2009-06-22 Paul Thomas <pault@gcc.gnu.org>
1924 * simplify.c (gfc_simplify_spread): Restrict the result size to
1925 the limit for an array constructor.
1927 2009-06-21 Janus Weil <janus@gcc.gnu.org>
1930 * interface.c (gfc_compare_interfaces): Take care of implicit typing
1931 when checking the function attribute. Plus another bugfix.
1932 (compare_parameter): Set attr.function and attr.subroutine according
1933 to the usage of a procedure as actual argument.
1935 2009-06-20 Tobias Burnus <burnus@net-b.de>
1938 * trans-decl.c (add_argument_checking): Disable bounds check
1939 for allowed argument storage association.
1941 2009-06-19 Paul Thomas <pault@gcc.gnu.org>
1944 * trans-expr.c (gfc_conv_procedure_call): Do not deallocate
1945 allocatable components if the argument is a pointer.
1947 2009-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1949 * gfortran.h (gfc_expr): Use mpc_t to represent complex numbers.
1951 * arith.c, dump-parse-tree.c, expr.c, module.c, resolve.c,
1952 simplify.c, target-memory.c, target-memory.h, trans-const.c,
1953 trans-expr.c: Convert to mpc_t throughout.
1955 2009-06-19 Ian Lance Taylor <iant@google.com>
1957 * cpp.c (struct gfc_cpp_option_data): Give this struct, used for
1958 the global variable gfc_cpp_option, a name.
1960 2009-06-19 Janus Weil <janus@gcc.gnu.org>
1963 * trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr
1964 to a procedure pointer actual argument, if it is not itself a
1967 2009-06-18 Janus Weil <janus@gcc.gnu.org>
1970 * resolve.c (resolve_contained_fntype): Prevent implicit typing for
1971 procedures with explicit interface.
1972 * symbol.c (gfc_check_function_type): Ditto.
1974 2009-06-16 Ian Lance Taylor <iant@google.com>
1976 * decl.c (build_struct): Rewrite loop over constructor elements.
1978 2009-06-16 Janus Weil <janus@gcc.gnu.org>
1982 * expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with
1984 * gfortran.h (gfc_compare_interfaces): Additional argument.
1985 * interface.c (operator_correspondence): Removed.
1986 (gfc_compare_interfaces): Additional argument to return error message.
1987 Directly use the code from 'operator_correspondence' instead of calling
1988 the function. Check for OPTIONAL. Some rearrangements.
1989 (check_interface1): Call 'gfc_compare_interfaces' without error message.
1990 (compare_parameter): Call 'gfc_compare_interfaces' with error message.
1991 * resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces'
1992 without error message.
1994 2009-06-16 Tobias Burnus <burnus@net-b.de>
1997 * trans-decl.c (create_function_arglist): Copy formal charlist to
1998 have a proper passed_length for -fcheck=bounds.
2000 2009-06-12 Steven G. Kargl <kargls@comcast.net>
2002 * arith.c (gfc_enum_initializer): Move function ...
2003 * decl.c: ... here. Remove gfc_ prefix and make static.
2004 (enumerator_decl): Update function call.
2005 * gfortran.h: Remove gfc_enum_initializer prototype.
2007 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
2009 * trans-array.c (gfc_trans_allocate_array_storage): Pass
2011 (gfc_trans_array_constructor_value): Same.
2012 (gfc_trans_scalarized_loop_end): Same.
2013 (gfc_conv_ss_startstride): Same.
2014 (gfc_trans_g77_array): Same.
2015 (gfc_trans_dummy_array_bias): Same.
2016 (gfc_conv_array_parameter): Same.
2017 (structure_alloc_comps): Same.
2018 * trans-expr.c (gfc_conv_function_call): Same.
2019 (fill_with_spaces): Same.
2020 (gfc_trans_string_copy): Same.
2021 (gfc_trans_scalar_assign): Same.
2022 * trans-stmt.c (gfc_trans_goto): Same.
2023 (gfc_trans_if_1): Same.
2024 (gfc_trans_simple_do): Same.
2025 (gfc_trans_do): Same.
2026 (gfc_trans_do_while): Same.
2027 (gfc_trans_logical_select): Same.
2028 (gfc_trans_select): Same.
2029 (gfc_trans_forall_loop): Same.
2030 (gfc_trans_nested_forall_loop): Same.
2031 (generate_loop_for_temp_to_lhs): Same.
2032 (generate_loop_for_rhs_to_temp): Same.
2033 (gfc_trans_forall_1): Same.
2034 (gfc_trans_where_assign): Same.
2035 (gfc_trans_where_3): Same.
2036 (gfc_trans_allocate): Same.
2037 * trans.c (gfc_finish_block): Same.
2038 (gfc_trans_runtime_check): Same.
2039 (gfc_call_malloc): Same.
2040 (gfc_allocate_with_status): Same.
2041 (gfc_call_free): Same.
2042 (gfc_deallocate_with_status): Same.
2043 (gfc_call_realloc): Same.
2044 (gfc_trans_code): Same.
2045 * trans-decl.c (gfc_init_default_dt): Same.
2046 (gfc_generate_constructors): Same.
2047 * trans-io.c (gfc_trans_io_runtime_check): Same.
2048 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
2049 (gfc_conv_intrinsic_fdate): Same.
2050 (gfc_conv_intrinsic_ttynam): Same.
2051 (gfc_conv_intrinsic_minmax): Same.
2052 (gfc_conv_intrinsic_minmax_char): Same.
2053 (gfc_conv_intrinsic_anyall): Same.
2054 (gfc_conv_intrinsic_count): Same.
2055 (gfc_conv_intrinsic_arith): Same.
2056 (gfc_conv_intrinsic_minmaxloc): Same.
2057 (gfc_conv_intrinsic_minmaxval): Same.
2058 (gfc_conv_intrinsic_rrspacing): Same.
2059 (gfc_conv_intrinsic_array_transfer): Same.
2060 (gfc_conv_intrinsic_trim): Same.
2061 (gfc_conv_intrinsic_repeat): Same.
2063 2009-06-12 Janus Weil <janus@gcc.gnu.org>
2066 * resolve.c (resolve_symbol): Additional error check, preventing an
2069 2009-06-11 Paul Thomas <pault@gcc.gnu.org>
2072 * resolve.c (next_data_value): It is an error if the value is
2075 2009-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2078 * intrinsic.c (add_functions): Add simplifiers for ISNAN,
2079 IS_IOSTAT_END and IS_IOSTAT_EOR.
2080 * intrinsic.h (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
2081 gfc_simplify_isnan): New prototypes.
2082 * intrinsic.c (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
2083 gfc_simplify_isnan): New functions.
2085 2009-06-11 Jakub Jelinek <jakub@redhat.com>
2087 * interface.c (fold_unary): Rename to...
2088 (fold_unary_intrinsic): ... this.
2089 (gfc_extend_expr): Adjust caller.
2090 (gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE
2092 * expr.c (gfc_simplify_expr): Initialize start and end before calling
2095 2009-06-10 Dave Korn <dave.korn.cygwin@gmail.com>
2097 * trans-decl.c (create_main_function): Don't build main decl twice.
2099 2009-06-09 Tobias Burnus <burnus@net-b.de>
2101 * trans-decl.c (gfc_generate_function_code): Use gfc_option.rtcheck
2102 instead of flag_bounds_check.
2103 * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and
2106 2009-06-08 Paul Thomas <pault@gcc.gnu.org>
2108 * trans-array.h : Replace prototypes for
2109 gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
2110 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
2111 prototypes of the same names with _get or _set appended.
2112 * trans-array.c : Make the originals of the above static and
2113 new functions for the _get and _set functions. Update all the
2114 references to these descriptor access functions.
2115 * trans-expr.c : Update references to the above descriptor
2117 * trans-intrinsic.c : The same.
2118 * trans-openmp.c : The same.
2119 * trans-stmt.c : The same.
2121 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
2123 * options.c (gfc_post_options): Disable dump_parse_tree
2124 during -fcompare-debug-second.
2126 2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2129 * gfortran.h (gfc_open): Add newunit expression to structure.
2130 * io.c (io_tag): Add new unit tag and fix whitespace.
2131 (match_open_element): Add matching for newunit.
2132 (gfc_free_open): Free the newunit expression.
2133 (gfc_resolve_open): Add newunit to resolution and check constraints.
2134 (gfc_resolve_close): Add check for non-negative unit.
2135 (gfc_resolve_filepos): Likewise.
2136 (gfc_resolve_dt): Likewise.
2137 * trans-io.c (set_parameter_value): Build runtime checks for unit
2138 numbers within range of kind=4 integer. (gfc_trans_open) Set the
2140 * ioparm.def (IOPARM): Define the newunit parameter as a pointer
2141 to GFC_INTEGER_4, pint4.
2143 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2147 * array.c (gfc_append_constructor): Added NULL-check.
2148 * check.c (gfc_check_spread): Check DIM.
2149 (gfc_check_unpack): Check that the ARRAY arguments provides enough
2151 * intrinsic.h (gfc_simplify_spread): New prototype.
2152 (gfc_simplify_unpack): Likewise.
2153 * intrinsic.c (add_functions): Added new simplifier callbacks.
2154 * simplify.c (gfc_simplify_spread): New.
2155 (gfc_simplify_unpack): New.
2156 * expr.c (check_transformational): Allow additional transformational
2157 intrinsics in initialization expression.
2159 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2163 * check.c (gfc_check_all_any): Check rank of DIM.
2164 (gfc_check_count): Likewise.
2165 * intrinsic.h (gfc_simplify_all): New prototype.
2166 (gfc_simplify_any): Likewise.
2167 (gfc_simplify_count): Likewise.
2168 (gfc_simplify_sum): Likewise.
2169 (gfc_simplify_product): Likewise.
2170 * intrinsic.c (add_functions): Added new simplifier callbacks.
2171 * simplify.c (transformational_result): New.
2172 (simplify_transformation_to_scalar): New.
2173 (simplify_transformation_to_array): New.
2175 (gfc_simplify_all): New.
2176 (gfc_simplify_any): New.
2177 (gfc_simplify_count): New.
2178 (gfc_simplify_sum): New.
2179 (gfc_simplify_product): New.
2180 * expr.c (check_transformational): Allow additional transformational
2181 intrinsics in initialization expression.
2183 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2185 * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
2186 (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
2187 (gfc_check_minloc_maxloc): Likewise.
2188 (check_reduction): Likewise.
2189 (gfc_check_size): Likewise.
2190 (gfc_check_ubound): Likewise.
2191 (gfc_check_cshift): Added missing shape-conformance checks.
2192 (gfc_check_eoshift): Likewise.
2193 * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
2194 * expr.c (gfc_check_conformance): Accept error-message chunks in
2195 printf-style. Changed all callers.
2198 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
2202 * intrinsic.h (gfc_simplify_dot_product): New prototype.
2203 (gfc_simplify_matmul): Likewise.
2204 (gfc_simplify_transpose): Likewise.
2205 * intrinsic.c (add_functions): Added new simplifier callbacks.
2206 * simplify.c (init_result_expr): New.
2207 (compute_dot_product): New.
2208 (gfc_simplify_dot_product): New.
2209 (gfc_simplify_matmul): New.
2210 (gfc_simplify_transpose): New.
2211 * expr.c (check_transformational): Allow transformational intrinsics
2212 with simplifier in initialization expression.
2214 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
2217 * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
2220 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
2223 * intrinsic.h (gfc_simplify_pack): New prototype.
2224 * intrinsic.c (add_functions): Added
2225 simplifier-callback to PACK.
2226 * simplify.c (is_constant_array_expr): Moved
2227 to beginning of file.
2228 (gfc_simplify_pack): New.
2229 * check.c (gfc_check_pack): Check that VECTOR has enough elements.
2230 Added safeguards for empty arrays.
2232 2009-06-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2234 * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
2235 instead of MPC_RE/MPC_IM.
2237 2009-06-05 Alexandre Oliva <aoliva@redhat.com>
2239 * trans-decl.c (gfc_build_qualified_array): Don't skip generation
2241 * trans.h (struct lang_type): Add base_decls.
2242 (GFC_TYPE_ARRAY_BASE_DECL): New.
2243 * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
2244 proactively and excessively.
2245 (gfc_get_array_descr_info): Use existing base decls if available.
2247 2009-06-04 Daniel Franke <franke.daniel@gmail.com>
2250 * check.c (gfc_check_reshape): Additional checks for the
2251 SHAPE and ORDER arguments.
2252 * simplify.c (gfc_simplify_reshape): Converted argument checks
2255 2009-06-03 Tobias Burnus <burnus@net-b.de>
2257 * gfortran.texi: Add mixed-language programming, mention
2258 varying string lengths, some clean up of introduction parts.
2259 * intrinsic.texi (instrinsic modules): Create @menu for subsections.
2260 (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
2261 * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
2262 * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
2264 2009-06-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2265 Tobias Burnus <burnus@net-b.de>
2267 * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
2268 * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
2270 2009-06-03 Alexandre Oliva <aoliva@redhat.com>
2272 * module.c (mio_f2k_derived): Initialize cur.
2274 2009-06-01 Tobias Burnus <burnus@net-b.de>
2277 * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
2278 (create_main_function): Set main_identifier_node.
2280 2009-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2283 * trans-types.c (gfc_build_uint_type): Make nonstatic.
2284 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
2285 * trans-types.h (gfc_build_uint_type): Add prototype.
2286 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2287 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
2288 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
2289 gfc_conv_intrinsic_trailz): Call the right builtins or library
2290 functions, and cast arguments to unsigned types first.
2291 * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
2293 2009-05-27 Ian Lance Taylor <iant@google.com>
2295 * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
2297 (f951$(exeext)): Likewise.
2299 2009-05-27 Tobias Burnus <burnus@net-b.de>
2302 * trans-decl.c (create_main_function): Mark MAIN__ and
2303 argc/argv as TREE_USED and push/pop function_decl context
2306 2009-05-26 Tobias Burnus <burnus@net-b.de>
2309 * gfortranspec.c (lang_specific_driver): Stop linking
2311 * trans-decl.c (gfc_build_builtin_function_decls): Stop
2312 making MAIN__ publicly visible.
2313 (gfc_build_builtin_function_decls): Add
2314 gfor_fndecl_set_args.
2315 (create_main_function) New function.
2316 (gfc_generate_function_code): Use it.
2318 2009-05-26 Tobias Burnus <burnus@net-b.de>
2321 * match.c (gfc_match_nullify): NULLify freed pointer.
2323 2009-05-26 Ian Lance Taylor <iant@google.com>
2325 * Make-lang.in (gfortranspec.o): Use $(COMPILER).
2326 (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
2328 2009-05-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2330 * gfortran.h (GFC_MPC_RND_MODE): New.
2331 * simplify.c (call_mpc_func): New helper function.
2332 (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
2333 gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
2335 2009-05-25 Janus Weil <janus@gcc.gnu.org>
2338 * primary.c (gfc_match_varspec): Handle procedure pointer components
2339 with array return value.
2340 * resolve.c (resolve_expr_ppc): Ditto.
2341 (resolve_symbol): Make sure the interface of a procedure pointer has
2343 * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
2344 components with array return value.
2345 * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
2346 gfc_trans_arrayfunc_assign): Ditto.
2347 (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
2348 where the rhs is a dummy argument.
2349 * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
2350 procedure pointer components with array return value.
2352 2009-05-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2357 * trans-array.c (gfc_conv_ss_startstride): Add one to index.
2359 2009-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2362 * module.c (read_md5_from_module_file): Close file before returning.
2364 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2367 * primary.c (gfc_match_rvalue): Handle procedure pointer components in
2369 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
2371 (resolve_fl_derived): Procedure pointer components are not required to
2372 have constant array bounds in their return value.
2374 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2376 * intrinsic.c (add_sym): Fix my last commit (r147655),
2377 which broke bootstrap.
2379 2009-05-18 Richard Guenther <rguenther@suse.de>
2382 * trans-expr.c (gfc_trans_zero_assign): For local array
2383 destinations use an assignment from an empty constructor.
2385 2009-05-18 Janus Weil <janus@gcc.gnu.org>
2389 * expr.c (gfc_check_pointer_assign): Check intents when comparing
2391 * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
2392 (gfc_compare_interfaces): Additional argument.
2393 * interface.c (operator_correspondence): Add check for equality of
2394 intents, and new argument 'intent_check'.
2395 (gfc_compare_interfaces): New argument 'intent_check', which is passed
2396 on to operator_correspondence.
2397 (check_interface1): Don't check intents when comparing interfaces.
2398 (compare_parameter): Do check intents when comparing interfaces.
2399 * intrinsic.c (add_sym): Add intents for arguments of intrinsic
2401 (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
2402 add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
2404 (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
2405 : New functions to add intrinsic symbols, specifying custom intents.
2406 (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
2407 (add_functions,add_subroutines): Add intents for various intrinsics.
2408 * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
2409 comparing interfaces.
2410 * symbol.c (gfc_copy_formal_args_intr): Copy intent.
2412 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2414 * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
2416 * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
2417 gfc_get_real_kind_from_width_isofortranenv): New prototypes.
2418 * iso-c-binding.def: Update definitions for the INT*_T,
2419 INT_LEAST*_T and INT_FAST*_T named parameters.
2420 * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
2421 gfc_get_real_kind_from_width_isofortranenv): New functions.
2423 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2426 * intrinsic.c (add_functions, add_subroutines): Fix argument
2427 names and wrap long lines.
2428 * intrinsic.texi: Fix documentation and argument names of
2429 LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
2430 GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
2431 SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
2432 SELECTED_REAL_KIND and XOR.
2434 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2437 * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
2438 * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
2439 * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
2440 gfc_simplify_erfc_scaled): New functions.
2442 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2445 * resolve.c (resolve_substring): Don't allow too large substring
2447 (gfc_resolve_substring_charlen): Fix typo.
2448 (gfc_resolve_character_operator): Fix typo.
2449 (resolve_charlen): Catch unreasonably large string lengths.
2450 * simplify.c (gfc_simplify_len): Don't error out on LEN
2453 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2456 * decl.c (set_enum_kind): Use global short-enums flag.
2457 * gfortran.h (gfc_option_t): Remove short_enums flag.
2458 * lang.opt (-fshort-enums): Refer to C documentation.
2459 * options.c (gfc_init_options, gfc_handle_option): Use global
2462 2009-05-15 Tobias Burnus <burnus@net-b.de>
2465 * f95-lang.c: Add gfc_maybe_initialize_eh.
2466 * gfortran.h: Add gfc_maybe_initialize_eh prototype.
2467 * Make-lang.in: Add new .h dendencies for f95-lang.c
2468 * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
2469 * misc.c (gfc_free): Avoid #define trickery for free.
2471 2009-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
2473 * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
2474 of allocate and deallocate statements.
2476 2009-05-14 Ian Lance Taylor <iant@google.com>
2478 * decl.c (match_attr_spec): Change d to unsigned int.
2479 * dump-parse-tree.c (show_namespace): Change op to int. Add cast.
2480 * interface.c (gfc_check_interfaces): Change i to int. Add casts.
2481 * module.c (read_module): Change i to int. Add cast.
2482 (write_module): Change i to int.
2483 * symbol.c (gfc_get_namespace): Change in to int.
2484 (gfc_free_namespace): Change i to int.
2485 * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
2486 unsigned int. Add cast.
2487 * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
2490 2009-05-14 Daniel Kraft <d@domob.eu>
2493 * dump-parse-tree.c (show_typebound): Fix missing adaption to new
2494 type-bound procedure storage structure.
2496 2009-05-14 Janus Weil <janus@gcc.gnu.org>
2499 * decl.c (gfc_match_function_decl): Use gfc_add_type.
2500 * symbol.c (gfc_add_type): Better checking for duplicate types in
2501 function declarations. And: Always give an error for duplicte types,
2502 not just a warning with -std=gnu.
2504 2009-05-14 Jakub Jelinek <jakub@redhat.com>
2507 * io.c (resolve_tag_format): CHARACTER array in FMT= argument
2508 isn't an extension. Reject non-CHARACTER array element of
2509 assumed shape or pointer or assumed size array.
2510 * trans-array.c (array_parameter_size): New function.
2511 (gfc_conv_array_parameter): Add size argument. Call
2512 array_parameter_size if it is non-NULL.
2513 * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
2514 * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
2516 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
2517 * trans-io.c (gfc_convert_array_to_string): Rewritten.
2519 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
2521 * gfortran.h (gfc_code): Rename struct member expr to expr1.
2522 * openmp.c (resolve_omp_atomic): Update expr to expr1.
2523 * interface.c (gfc_extend_assign): Ditto.
2524 * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
2525 gfc_trans_init_assign): Ditto.
2526 * dump-parse-tree.c (show_code_node): Ditto.
2527 * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
2528 * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
2529 gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
2530 gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
2531 gfc_trans_logical_select, gfc_trans_character_select
2532 forall_make_variable_temp, check_forall_dependencies
2533 gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
2534 gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
2535 * io.c (match_io_element, gfc_match_inquire): Ditto.
2536 * resolve.c (resolve_typebound_call, resolve_ppc_call,
2537 resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
2538 resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
2539 gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
2540 * st.c (gfc_free_statement): Ditto.
2541 * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
2542 match_arithmetic_if, gfc_match_if, gfc_match_elseif
2543 gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
2544 gfc_match_nullify, match_typebound_call, gfc_match_call
2545 gfc_match_select, match_simple_where, gfc_match_where
2546 gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
2547 * trans-io.c (gfc_trans_transfer): Ditto.
2548 * parse.c (parse_where_block, parse_if_block): Ditto.
2550 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
2552 * gfortran.h (gfc_code): Rename struct member label to label1.
2553 * dump-parse-tree.c (show_code_node): Update symbol.
2554 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
2555 gfc_trans_arithmetic_if): Ditto.
2556 * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
2557 * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
2558 gfc_match_assign, gfc_match_goto): Ditto.
2559 * parse.c (parse_do_block): Ditto.
2561 2009-05-13 Tobias Burnus <burnus@net-b.de>
2564 * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
2565 * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
2566 * trans.c (gfc_trans_code): Ditto.
2567 * resolve.c (resolve_code): Ditto.
2568 * st.c (gfc_free_statement): Ditto.
2569 * parse.c (accept_statement): Ditto.
2571 2009-05-12 Tobias Burnus <burnus@net-b.de>
2574 * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
2576 2009-05-11 Steve Ellcey <sje@cup.hp.com>
2578 * resolve.c (check_host_association): Initialize tail.
2580 2009-05-11 Janus Weil <janus@gcc.gnu.org>
2583 * resolve.c (resolve_fl_derived): Only return FAILURE if
2584 gfc_notify_std fails.
2586 2009-05-10 Ian Lance Taylor <iant@google.com>
2588 * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
2590 (enum gfc_omp_default_sharing): Likewise.
2591 * module.c (enum gfc_rsym_state): New enum, broken out of
2593 (enum gfc_wsym_state): Likewise.
2594 * parse.c (enum state_order): New enum, broken out of st_state.
2596 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
2599 * trans-array.c (gfc_trans_array_constructor_value): Fold
2600 convert numeric constants.
2601 (gfc_build_constant_array_constructor): The same.
2603 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
2606 * trans-expr.c (gfc_conv_operator_assign): Remove function.
2607 * trans.h : Remove prototype for gfc_conv_operator_assign.
2608 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
2609 derivde types with intent(out).
2610 (gfc_trans_call): Add mask, count1 and invert arguments. Add
2611 code to use mask for WHERE assignments.
2612 (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
2613 (gfc_trans_where_assign): The gfc_symbol argument is replaced
2614 by the corresponding code. If this has a resolved_sym, then
2615 gfc_trans_call is called. The call to gfc_conv_operator_assign
2617 (gfc_trans_where_2): Change the last argument in the call to
2618 gfc_trans_where_assign.
2619 * trans-stmt.h : Modify prototype for gfc_trans_call.
2620 * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
2622 2009-05-08 Janus Weil <janus@gcc.gnu.org>
2625 * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
2626 the symbol is a module procedure.
2628 2009-05-08 Tobias Burnus <burnus@net-b.de>
2630 * invoke.texi: Add do/recursion to the -fcheck= summary.
2632 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2635 * gfortran.texi: Document that we don't support variable FORMAT
2638 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2641 * error.c (error_print): Add missing break statement.
2643 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2646 * invoke.texi: Document that -fdollar-ok does not allow $ to be
2647 used in IMPLICIT statement.
2649 2009-05-06 Janus Weil <janus@gcc.gnu.org>
2650 Paul Thomas <pault@gcc.gnu.org>
2653 * decl.c (match_procedure_interface): New function to match the
2654 interface for a PROCEDURE statement.
2655 (match_procedure_decl): Call match_procedure_interface.
2656 (match_ppc_decl): New function to match the declaration of a
2657 procedure pointer component.
2658 (gfc_match_procedure): Call match_ppc_decl.
2659 (match_binding_attributes): Add new argument 'ppc' and handle the
2660 POINTER attribute for procedure pointer components.
2661 (match_procedure_in_type,gfc_match_generic): Added new argument to
2662 match_binding_attributes.
2663 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
2664 procedure pointer components.
2665 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
2666 (gfc_check_pointer_assign): Handle procedure pointer components, but no
2668 (is_proc_ptr_comp): New function to determine if an expression is a
2669 procedure pointer component.
2670 * gfortran.h (expr_t): Add EXPR_PPC.
2671 (symbol_attribute): Add new member 'proc_pointer_comp'.
2672 (gfc_component): Add new member 'formal'.
2673 (gfc_exec_op): Add EXEC_CALL_PPC.
2674 (gfc_get_default_type): Changed first argument.
2675 (is_proc_ptr_comp): Add prototype.
2676 (gfc_match_varspec): Add new argument.
2677 * interface.c (compare_actual_formal): Handle procedure pointer
2679 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
2680 procedure pointer components.
2681 * module.c (mio_expr): Handle EXPR_PPC.
2682 * parse.c (parse_derived): Handle procedure pointer components.
2683 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
2684 procedure pointer components.
2685 (gfc_variable_attr): Handle procedure pointer components.
2686 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
2687 first argument of gfc_get_default_type.
2688 (match_variable): Added new argument to gfc_match_varspec.
2689 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
2690 first argument of gfc_get_default_type.
2691 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
2693 (resolve_ppc_call): New function to resolve a call to a procedure
2694 pointer component (subroutine).
2695 (resolve_expr_ppc): New function to resolve a call to a procedure
2696 pointer component (function).
2697 (gfc_resolve_expr): Handle EXPR_PPC.
2698 (resolve_code): Handle EXEC_CALL_PPC.
2699 (resolve_fl_derived): Copy the interface for a procedure pointer
2701 (resolve_symbol): Fix overlong line.
2702 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
2703 * symbol.c (gfc_get_default_type): Changed first argument.
2704 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
2705 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
2706 * trans.h (gfc_conv_function_call): Renamed.
2707 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
2708 * trans-expr.c (gfc_conv_component_ref): Ditto.
2709 (gfc_conv_function_val): Rename to 'conv_function_val', add new
2710 argument 'expr' and handle procedure pointer components.
2711 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
2712 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
2713 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
2714 argument 'expr' and handle procedure pointer components.
2715 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
2716 procedure pointer component.
2717 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
2718 (gfc_conv_structure): Handle procedure pointer components.
2719 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
2720 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
2721 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
2722 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
2723 * trans-types.h (gfc_get_ppc_type): Add prototype.
2724 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
2725 for a procedure pointer component.
2726 (gfc_get_derived_type): Handle procedure pointer components.
2728 2009-05-06 Tobias Burnus <burnus@net-b.de>
2731 * resolve.c (resolve_symbol): Print no warning for implicitly
2732 typed intrinsic functions.
2734 2009-05-05 Janus Weil <janus@gcc.gnu.org>
2737 * expr.c (gfc_check_pointer_assign): Check for statement functions and
2738 internal procedures in procedure pointer assignments.
2740 2009-04-28 Janus Weil <janus@gcc.gnu.org>
2743 * resolve.c (resolve_symbol): Correctly copy the interface of a
2744 PROCEDURE statement if the interface involves a RESULT variable.
2746 2009-04-28 Janus Weil <janus@gcc.gnu.org>
2750 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
2752 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
2754 2009-04-28 Paul Thomas <pault@gcc.gnu.org>
2757 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
2758 type parentheses argument if it is a variable with allocatable
2761 2009-04-27 Ian Lance Taylor <iant@google.com>
2763 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
2765 * trans-io.c (st_parameter_field): Add casts to enum type.
2767 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
2770 fortran/data.c (gfc_assign_data_value): If the lvalue is an
2771 assumed character length entity in a data statement, then
2772 return FAILURE to prevent segmentation fault.
2774 2009-04-26 Jakub Jelinek <jakub@redhat.com>
2776 * trans-decl.c: Include pointer-set.h.
2777 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
2778 (gfc_nonlocal_dummy_array_decl): New function.
2779 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
2781 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
2782 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
2783 chain it to outermost block's vars, destroy it afterwards.
2784 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
2786 2009-04-25 Janus Weil <janus@gcc.gnu.org>
2789 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
2790 They differ if the symbol has been use-renamed.
2792 2009-04-24 Ian Lance Taylor <iant@google.com>
2794 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
2795 out of struct gfc_symbol.
2796 (struct gfc_symbol): Use enum gfc_symbol_type.
2797 (enum gfc_array_ref_dimen_type): New named enum type, broken out
2798 of struct gfc_array_ref).
2799 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
2800 (mod_pointee_as): Update declaration.
2801 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
2802 (gfc_mod_pointee_as): Change return type to "match".
2803 * module.c (mio_array_ref): Add cast to enum type.
2804 (mio_symbol): Likewise.
2805 * resolve.c (resolve_global_procedure): Change type to enum
2807 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
2810 2009-04-24 Daniel Kraft <d@domob.eu>
2812 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
2813 (struct gfc_symtree): Moved "typebound" member inside union.
2814 (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
2815 type-bound procedures there.
2816 (gfc_get_tbp_symtree): New procedure.
2817 * symbol.c (tentative_tbp_list): New global.
2818 (gfc_get_namespace): NULL new "tb_sym_root" member.
2819 (gfc_new_symtree): Removed initialization of "typebound" member.
2820 (gfc_undo_symbols): Process list of tentative tbp's.
2821 (gfc_commit_symbols): Ditto.
2822 (free_tb_tree): New method.
2823 (gfc_free_namespace): Call it.
2824 (gfc_get_typebound_proc): New method.
2825 (gfc_get_tbp_symtree): New method.
2826 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
2827 and gfc_namespace with regards to tbp's.
2828 * dump-parse-tree.c (show_typebound): Ditto.
2829 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
2830 as it isn't a symbol any longer.
2831 * module.c (mio_typebound_symtree): Adapt to changes.
2832 (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
2833 rather than "gfc_get_sym_tree".
2834 (mio_f2k_derived): Ditto.
2835 * decl.c (match_procedure_in_type): Ditto.
2836 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
2837 * resolve.c (check_typebound_override): Adapt to changes.
2838 (resolve_typebound_generic): Ditto.
2839 (resolve_typebound_procedures): Ditto.
2840 (ensure_not_abstract_walker): Ditto.
2841 (ensure_not_abstract): Ditto.
2842 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
2843 instance, through removed tentative ones).
2844 * gfc-internals.texi (Type-bound procedures): Document changes.
2846 2009-04-24 Janus Weil <janus@gcc.gnu.org>
2850 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
2851 for the formal arguments.
2853 2009-04-21 Taras Glek <tglek@mozilla.com>
2855 * f95-lang.c: Update GTY annotations to new syntax.
2856 * trans-intrinsic.c: Likewise.
2857 * trans-io.c: Likewise.
2858 * trans.h: Likewise.
2860 2009-04-22 Janus Weil <janus@gcc.gnu.org>
2863 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
2864 (match_procedure_decl): Set if_source.
2865 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
2866 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
2867 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
2868 add documentation. Rename copy_formal_args and copy_formal_args_intr.
2869 * interface.c (gfc_compare_interfaces): Check for return types,
2870 handle IFSRC_UNKNOWN.
2871 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
2872 (gfc_procedure_use): Modified handling of intrinsics.
2873 * intrinsic.c (add_functions): Bugfix for "dim".
2874 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
2875 which copies the interface from isym to sym.
2876 (resolve_procedure_expression,resolve_function): Use new function
2877 'resolve_intrinsic'.
2878 (resolve_symbol): Add function attribute for externals with return type
2879 and use new function 'resolve_intrinsic'.
2880 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
2881 (copy_formal_args): Renamed to gfc_copy_formal_args.
2882 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
2883 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
2885 2009-04-21 Joseph Myers <joseph@codesourcery.com>
2887 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
2888 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
2889 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
2890 copyright and license notices.
2891 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
2892 ChangeLog-2008: Correct dates.
2894 2009-04-20 Tobias Burnus <burnus@net-b.de>
2897 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
2899 2009-04-20 Paul Thomas <pault@gcc.gnu.org>
2902 * resolve.c (is_sym_host_assoc): New function.
2903 (resolve_fl_derived): Call it when checking PRIVATE components
2904 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
2906 (resolve_fl_namelist): Call it twice to check for host
2909 2009-04-20 Ian Lance Taylor <iant@google.com>
2911 * module.c (import_iso_c_binding_module): Add casts to enum type.
2912 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
2914 (gfc_conv_intrinsic_anyall): Likewise.
2915 (gfc_conv_intrinsic_arith): Likewise.
2916 (gfc_conv_intrinsic_minmaxloc): Likewise.
2917 (gfc_conv_intrinsic_minmaxval): Likewise.
2918 (gfc_conv_intrinsic_bitop): Likewise.
2919 (gfc_conv_intrinsic_singlebitop): Likewise.
2920 (gfc_conv_intrinsic_strcmp): Likewise.
2922 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
2923 Jakub Jelinek <jakub@redhat.com>
2926 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
2927 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
2928 (ompws_flags): New extern decl.
2929 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
2930 for the outer dimension if ompws_flags allow it.
2931 * trans.c (gfc_generate_code): Clear ompws_flags.
2932 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
2933 array assignments inside of !$omp workshare.
2934 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
2936 * trans-openmp.c (ompws_flags): New variable.
2937 (gfc_trans_omp_workshare): Rewritten.
2939 2009-04-11 Daniel Kraft <d@domob.eu>
2942 * gfortran.h (struct gfc_charlen): New field "passed_length" to store
2943 the actual passed string length for dummy arguments.
2944 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
2945 assertion, moved a local variable into the innermost block it is needed.
2946 (create_function_arglist): Removed TODO about the check being
2947 implemented and initialize cl->passed_length here.
2948 (add_argument_checking): New method.
2949 (gfc_generate_function_code): Call the argument checking method.
2951 2009-04-11 Janus Weil <janus@gcc.gnu.org>
2954 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
2956 2009-04-11 Daniel Franke <franke.daniel@gmail.com>
2958 * resolve.c (resolve_global_procedure): Enable whole-file checking for
2959 procedures that are declared later in the file.
2961 2009-04-10 Paolo Bonzini <bonzini@gnu.org>
2964 * trans.c (gfc_allocate_with_status): Fix type mismatches
2967 2009-04-10 Daniel Franke <franke.daniel@gmail.com>
2970 * expr.c (find_array_section): Leave early on zero-sized arrays.
2972 2009-04-09 Janus Weil <janus@gcc.gnu.org>
2975 * decl.c (add_hidden_procptr_result): New function for handling
2976 procedure pointer return values by adding a hidden result variable.
2977 (variable_decl,match_procedure_decl,gfc_match_function_decl,
2978 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
2980 * parse.c (parse_interface): Add EXTERNAL attribute only after
2981 FUNCTION/SUBROUTINE declaration is complete.
2982 * primary.c (replace_hidden_procptr_result): New function for replacing
2983 function symbol by hidden result variable.
2984 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
2986 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
2987 resolve_symbol): Allow for procedure pointer function results.
2988 (resolve_fl_procedure): Conflict detection moved here from
2990 * symbol.c (gfc_check_function_type): Allow for procedure pointer
2992 (check_conflict): Move some conflict detection to resolution stage.
2993 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
2996 2009-04-08 Jakub Jelinek <jakub@redhat.com>
2998 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
2999 contain TYPE_STRING_FLAG types.
3001 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
3004 * invoke.texi (fdollar-ok): Fix typo.
3006 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
3009 * invoke.texi (fdollar-ok): Clarify limitations.
3011 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
3014 * trans-array.c (gfc_trans_deferred_array): Return if this
3015 is a result variable.
3017 2009-04-07 Janus Weil <janus@gcc.gnu.org>
3020 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
3021 procedure pointer decls.
3023 2009-04-07 Janus Weil <janus@gcc.gnu.org>
3026 * expr.c (gfc_check_pointer_assign): Enable interface check for
3028 * gfortran.h: Add copy_formal_args_intr.
3029 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
3030 if second argument is an intrinsic.
3031 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
3033 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
3034 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
3035 intrinsic interfaces here. Must happen earlier.
3036 (resolve_symbol): Resolution of intrinsic interfaces moved here from
3037 resolve_specific_..., and formal args are now copied from intrinsic
3039 * symbol.c (copy_formal_args_intr): New function to copy the formal
3040 arguments from an intinsic procedure.
3042 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
3045 * dependency.c (ref_same_as_full_array): New function.
3046 (gfc_dep_resolver): Call it.
3048 2009-04-06 Janus Weil <janus@gcc.gnu.org>
3051 * decl.c (match_procedure_decl): Fix double declaration problems with
3052 PROCEDURE statements.
3053 * symbol.c (gfc_add_type): Ditto.
3055 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
3058 * trans-array.c (gfc_conv_array_ref): If the symbol has the
3059 temporary attribute use the array_spec for the bounds.
3060 * gfortran.h : Add the temporary field to the structure
3062 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
3063 temporary attribute.
3065 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
3068 * trans-array.c (gfc_trans_array_constructor_value): Shadow
3069 implied do-loop variable to avoid spurious middle-end warnings.
3071 2009-04-04 Tobias Burnus <burnus@net-b.de>
3074 * trans-decl.c (gfc_generate_function_code): Move recursive
3075 check to the right position.
3077 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
3080 * trans-common.c (translate_common): Do not offset the whole
3083 2009-04-03 Tobias Burnus <burnus@net-b.de>
3086 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
3087 if it is not a procedure pointer.
3088 * primary.c (match_actual_arg): Ditto.
3090 2009-03-31 Joseph Myers <joseph@codesourcery.com>
3092 PR preprocessor/15638
3093 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
3095 2009-03-30 Steven G. Kargl <kargls@comcast.net>
3098 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
3099 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
3100 comments. Minor whitespace cleanup.
3101 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
3102 (resolve_deallocate_expr (gfc_expr *e): Update error message.
3103 (resolve_allocate_expr): Remove dead code. Update error message.
3104 Move error checking to ...
3105 (resolve_allocate_deallocate): ... here. Add additional error
3106 checking for STAT, ERRMSG, and allocate-objects.
3107 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
3108 Check for redundant uses of STAT and ERRMSG. Reword error message
3109 and add checking for pointer, allocatable, and proc_pointer attributes.
3111 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
3116 * symbol.c : Add gfc_global_ns_list.
3117 * decl.c (add_global_entry): Set the namespace ('ns') field.
3118 * gfortran.h : Add the resolved field to gfc_namespace. Add the
3119 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
3120 gfc_option_t. Add the prototype for gfc_free_dt_list.
3121 * lang.opt : Add the whole-file option.
3122 * invoke.texi : Document the whole-file option.
3123 * resolve.c (resolve_global_procedure): If the fwhole-file
3124 option is set, reorder gsymbols to ensure that translation is
3125 in the right order. Resolve the gsymbol's namespace if that
3126 has not occurred and then check interfaces.
3127 (resolve_function): Move call to resolve_global_procedure.
3128 (resolve_call): The same.
3129 (resolve_codes): Store the current labels_obstack.
3130 (gfc_resolve) : Return if the namespace is already resolved.
3131 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
3132 option is selected, use the backend_decl of a gsymbol, if it is
3134 parse.c (add_global_procedure, add_global_program): If the flag
3135 whole-file is set, add the namespace to the gsymbol.
3136 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
3137 the global namespace list. Rearrange to do resolution of all
3138 the procedures in a file, followed by their translation.
3139 * options.c (gfc_init_options): Add -fwhole-file.
3140 (gfc_handle_option): The same.
3142 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3144 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
3145 family of intrinsics instead of BUILT_IN_INF family.
3146 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
3147 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
3149 2009-03-30 Jakub Jelinek <jakub@redhat.com>
3151 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
3152 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
3154 2009-03-30 Joseph Myers <joseph@codesourcery.com>
3156 PR rtl-optimization/323
3157 * options.c (gfc_post_options): Set
3158 flag_excess_precision_cmdline. Give an error for
3159 -fexcess-precision=standard for processors where the option is
3162 2009-03-29 Joseph Myers <joseph@codesourcery.com>
3164 PR preprocessor/34695
3165 * cpp.c (cb_cpp_error): New.
3166 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
3167 Don't check cpp_errors (cpp_in).
3168 (gfc_cpp_init_0): Set cb->error.
3170 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
3173 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
3174 expr.c (gfc_match_init_expr): Add global variable init_flag to
3175 flag matching an initialization expression.
3176 (check_intrinsic_op): Move no longer reachable error message to ...
3177 * arith.c (arith_power): ... here. Remove gfc_ prefix in
3178 gfc_arith_power. Use init_flag. Allow constant folding of x**y
3179 when y is REAL or COMPLEX.
3180 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
3181 for constant folding.
3182 * gfc_power: Update gfc_arith_power to arith_power
3184 2009-03-29 Daniel Kraft <d@domob.eu>
3187 * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
3188 added a comment explaining DEFERRED binding handling.
3189 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
3190 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
3191 and do some validity checks for DEFERRED and this construct.
3192 * module.c (binding_overriding): New string constant for DEFERRED.
3193 (mio_typebound_proc): Module-IO DEFERRED flag.
3194 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
3195 binding is not overridden by a DEFERRED one.
3196 (resolve_typebound_procedure): Allow abstract interfaces as targets
3197 for DEFERRED bindings.
3198 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
3199 (resolve_fl_derived): Use new "ensure_not_abstract" method for
3200 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
3201 binding is overridden.
3202 (check_typebound_baseobject): New method.
3203 (resolve_compcall), (resolve_typebound_call): Check base-object of
3204 the type-bound procedure call.
3205 * gfc-internals.texi (Type-bound procedures): Document a little bit
3206 about internal handling of DEFERRED bindings.
3208 2009-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3211 * gfortran.h (gfc_st_label): Fix comment.
3212 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
3213 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
3214 END SELECT with labels.
3215 (check_do_closure): Fix formatting.
3216 (parse_do_block): Fix typo in error message.
3217 * resolve.c (code_stack): Remove tail member. Update comment to
3218 new use of reachable_labels.
3219 (reachable_labels): Rename to ...
3220 (find_reachable_labels): ... this. Overhaul. Update preceding
3222 (resolve_branch): Fix comment preceding function. Rewrite.
3223 (resolve_code): Update call to find_reachable_labels. Add code to
3224 deal with EXEC_END_BLOCK.
3225 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
3226 Add 2009 to copyright years.
3227 * trans.c (gfc_trans_code): Likewise on both counts.
3229 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
3232 * expr.c (gfc_check_assign): Allow pointer components when
3236 * resolve.c (check_data_variable): Treat pointer arrays with
3239 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
3242 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
3243 have a string_length.
3245 2009-03-28 Tobias Burnus <burnus@net-b.de>
3248 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
3249 Add GFC_RTCHECK_DO support.
3250 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
3251 * invoke.texi (-fcheck): Document "do" option.
3253 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
3256 * trans-array.c (get_elemental_fcn_charlen): Remove.
3257 (get_array_charlen): New function to replace previous.
3259 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
3262 * parse.c (parse_derived): Do not break on finding pointer,
3263 allocatable or private components.
3265 2009-03-28 Tobias Burnus <burnus@net-b.de>
3268 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
3269 * trans-decl.c (gfc_generate_function_code): Add recursion check.
3270 * invoke.texi (-fcheck): Add recursive option.
3272 2009-03-28 Tobias Burnus <burnus@net-b.de>
3275 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
3277 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3278 Paul Thomas <pault@gcc.gnu.org>
3279 Tobias Burnus <burnus@net-b.de>
3281 * gfortran.h (gfc_option_t): Add rtcheck.
3282 * lang.opt: New option -fcheck.
3283 * libgfortran.h: Add GFC_RTCHECK_* constants.
3284 * invoke.texi: Document -fcheck.
3285 * options.c (gfc_handle_runtime_check_option): New function.
3286 (gfc_init_options,gfc_post_options,gfc_handle_option):
3289 2009-03-27 Richard Guenther <rguenther@suse.de>
3291 * trans-array.c (gfc_conv_descriptor_data_addr): Use
3292 gfc_build_addr_expr instead of build_fold_addr_expr.
3293 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
3294 gfc_trans_constant_array_constructor, gfc_conv_array_data,
3295 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
3296 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
3297 gfc_conv_function_val, gfc_conv_operator_assign,
3298 gfc_conv_subref_array_arg, gfc_conv_function_call,
3299 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
3300 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
3301 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3302 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
3303 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
3304 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
3305 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3306 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
3307 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
3308 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
3309 build_filepos, gfc_trans_inquire, gfc_trans_wait,
3310 nml_get_addr_expr, transfer_namelist_element, build_dt,
3311 gfc_trans_dt_end, transfer_array_component, transfer_expr,
3312 transfer_array_desc, gfc_trans_transfer): Likewise.
3313 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
3314 * trans.c (gfc_build_addr_expr): Mark the base of the address
3317 2009-03-27 Tobias Burnus <burnus@net-b.de>
3319 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
3320 (gfc_expr): Add is_snan.
3321 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
3322 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
3323 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
3324 * resolve.c (build_default_init_expr): Update call.
3325 * target-memory.c (encode_float): Ditto.
3326 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
3328 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3330 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
3333 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
3335 * simplify.c (gfc_simplify_transfer): Zero-initialize the
3338 2009-02-27 Tobias Burnus <burnus@net-b.de>
3341 * module.c (read_md5_from_module_file): Add missing quote.
3343 2009-02-27 Tobias Burnus <burnus@net-b.de>
3346 * module.c (read_md5_from_module_file): Include mod version
3347 in had-changed test.
3349 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
3352 * interface.c (compare_type_rank_if): Return 1 if the symbols
3353 are the same and deal with external procedures where one is
3354 identified to be a function or subroutine by usage but the
3357 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
3360 * trans-array.c (gfc_conv_array_initializer): Convert all
3361 expressions rather than ICEing.
3363 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3366 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
3367 make global. Change function name in error messages.
3368 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
3369 (gfc_array_ref_shape): Likewise.
3370 * gfortran.h: Add prototype for gfc_ref_dimen_size.
3371 * simplify.c (simplify_bound_dim): Add ref argument.
3372 If the reference isn't a full array, return one for
3373 the lower bound and the extent for the upper bound.
3374 (simplify_bound): For array sections, take as from the
3375 argument. Add reference to all to simplify_bound_dim.
3377 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
3379 * scanner.c (load_line): At end of line, skip '\r' without setting
3380 the truncation flag.
3382 2009-02-18 Daniel Kraft <d@domob.eu>
3384 * gfortran.texi: New chapter about compiler characteristics.
3385 (Compiler Characteristics): Document KIND type parameters here.
3387 2009-02-18 Tobias Burnus <burnus@net-b.de>
3389 * intrinsic.texi (MALLOC): Make example more portable.
3391 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
3394 * module.c (gfc_dump_module,gfc_use_module): Add module
3397 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
3401 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
3402 function references to ensure that a valid expression is used.
3403 (gfc_conv_function_call): Pass Cray pointers to procedures.
3405 2009-02-03 Jakub Jelinek <jakub@redhat.com>
3407 * gfortranspec.c (lang_specific_driver): Update copyright notice
3410 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
3414 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
3415 descriptor ubound for UBOUND, when the array lbound == 1.
3417 2009-01-27 Daniel Kraft <d@domob.eu>
3420 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
3421 for the real type needed to make it work for subcomponent-references.
3423 2009-01-21 Daniel Kraft <d@domob.eu>
3425 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
3427 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
3430 * resolve.c (check_host_association): Remove the matching to
3431 correct an incorrect host association and use manipulation of
3432 the expression instead.
3434 2009-01-20 Tobias Burnus <burnus@net-b.de>
3436 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
3438 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
3441 * simplify.c (simplify_bound): Don't use array specification
3442 if variable or component has subsequent references.
3444 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3447 * module.c (write_common_0): Add argument 'this_module' and
3448 check that non-use associated common blocks are written first.
3449 (write_common): Call write_common_0 twice, once with true and
3452 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3455 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
3456 been absorbed into gfc_conv_intrinsic_transfer. All
3457 references to it in trans-intrinsic.c have been changed
3458 accordingly. PR fixed by using a temporary for scalar
3459 character transfer, when the source is shorter than the
3462 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
3465 * module.c (write_common_0): Revert patch of 2009-01-05.
3467 2009-01-16 Janus Weil <janus@gcc.gnu.org>
3470 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
3472 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
3473 Enable procedure pointers as module variables.
3475 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
3477 * ChangeLog-2007: Clean out svn merge droppings.
3479 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
3482 * target-memory.c (encode_derived): Encode NULL.
3484 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
3487 * resolve.c (check_host_association): Use the symtree name to
3488 search for a potential contained procedure, since this is the
3489 name by which it would be referenced.
3491 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3494 * interface.c (gfc_procedure_use): Don't warn about functions
3496 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
3499 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
3502 * module.c (write_common_0): Use the name of the symtree rather
3503 than the common block, to determine if the common has been
3506 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
3509 * check.c (gfc_check_random_seed): Added size check for GET
3510 dummy argument, reworded error messages to follow common pattern.
3512 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
3515 * trans-types.c (gfc_get_derived_type): Check for the
3516 presence of derived->ns->proc_name before
3517 accessing derived->ns->proc_name->attr.flavor .
3518 * resolve.c (resolve_symbol): Likewise.
3520 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
3523 * gfortran.h : Add bit to gfc_expr 'user_operator'
3524 * interface.c (gfc_extend_expr): Set the above if the operator
3525 is substituted by a function.
3526 * resolve.c (check_host_association): Return if above is set.
3528 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
3531 * ChangeLog-2008: Fix function name.
3534 * dependency.c (gfc_check_argument_var_dependency):
3535 Move the check for pointerness inside the if block
3536 so that it doesn't affect the return value.
3539 * trans-stmt.c (gfc_trans_call):
3540 Add the dependency code after the loop bounds calculation one.
3542 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
3544 * intrinsic.c (do_simplify): Removed already implemented TODO.
3546 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
3549 * simplify.c (gfc_simplify_merge): New.
3550 * intrinsic.h (gfc_simplify_merge): New prototype.
3551 * intrinsic.c (add_functions): Added simplification for MERGE.
3553 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
3556 * gfortran.h (gfc_is_data_pointer): Added prototype
3557 * resolve.c (gfc_iso_c_func_interface):
3558 Use gfc_is_data_pointer to test for pointer attribute.
3559 * dependency.c (gfc_is_data_pointer):
3560 Support pointer-returning functions.
3562 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
3564 * symbol.c (save_symbol): Don't SAVE function results.
3566 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
3569 * resolve.c (resolve_call): When searching for proper host
3570 association, use symtree rather than symbol. For everything
3571 except generic subroutines, substitute the symtree in the call
3572 rather than the symbol.
3575 Copyright (C) 2009 Free Software Foundation, Inc.
3577 Copying and distribution of this file, with or without modification,
3578 are permitted in any medium without royalty provided the copyright
3579 notice and this notice are preserved.