1 2012-01-01 Jakub Jelinek <jakub@redhat.com>
3 * gfortranspec.c (lang_specific_driver): Update copyright notice
6 2011-12-31 Thomas König <tkoenig@gcc.gnu.org>
9 * expr.c (gfc_check_vardef_context): When determining
10 implicit pure status, also check for variable definition
11 context. Walk up namespaces until a procedure is
12 found to reset the implict pure attribute.
13 * resolve.c (gfc_implicit_pure): Walk up namespaces
14 until a procedure is found.
16 2011-12-29 Thomas Koenig <tkoenig@gcc.gnu.org>
18 * dependency.c (gfc_dep_compare_functions): Document
19 new behavior for REALs and complex. Add comment to cases
20 where only INTEGERs are handled. Compare REAL and COMPLEX
21 constants, returning 0 and -2 only. Add assert to make
22 sure that only integer constants are compared.
24 2011-12-19 Tobias Burnus <burnus@net-b.de>
27 * parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as
30 2011-12-19 Tobias Burnus <burnus@net-b.de>
33 * match.c (gfc_match_select_type): Handle
34 scalar polymophic coarrays.
35 (select_type_set_tmp, ): Ditto; avoid segfault if !class_ok.
36 * primary.c (gfc_match_rvalue): Avoid segfault if !class_ok.
37 * resolve.c (resolve_select_type): Ditto.
38 (resolve_assoc_var): Fix setting the TARGET attribute for
39 polymorphic selectors which are pointers.
41 2011-12-19 Tobias Burnus <burnus@net-b.de>
43 * check.c (coarray_check): Add class ref if needed.
44 * resolve.c (resolve_fl_var_and_proc,
45 resolve_fl_derived0, resolve_symbol): Fix checking
48 2011-12-15 Paul Thomas <pault@gcc.gnu.org>
50 * trans-expr.c (gfc_walk_function_expr): Detect elemental
51 procedure components as well as elemental procedures.
52 * trans-array.c (gfc_conv_procedure_call): Ditto.
53 * trans-decl.c (gfc_trans_deferred_vars): Correct erroneous
54 break for class pointers to continue.
56 2011-12-15 Toon Moene <toon@moene.org>
59 * resolve.c (build_default_init_expr): Allow non-allocatable,
60 non-compile-time-constant-shape arrays to have a default
62 * invoke.texi: Delete the restriction on automatic arrays not
63 being initialized by -finit-<type>=<constant>.
65 2011-12-15 Tobias Burnus <burnus@net-b.de>
71 * resolve.c (resolve_fl_derived0): Print not-implemented error
72 for deferred-length character components.
74 2011-12-15 Tobias Burnus <burnus@net-b.de>
76 * primary.c (gfc_match_varspec): Match array spec for
78 (gfc_match_rvalue): If a symbol of unknown flavor has a
79 codimension, mark it as a variable.
80 * simplify.c (gfc_simplify_image_index): Directly call
82 * trans-intrinsic.c (trans_this_image): Fix handling of
85 2011-12-15 Jakub Jelinek <jakub@redhat.com>
88 * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span.
89 (gfc_trans_deferred_vars): Instead add its runtime initialization
92 2011-12-11 Tobias Burnus <burnus@net-b.de>
95 * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
96 if the front end has printed a warning.
97 (gfc_generate_function_code): Fix unset-result warning.
99 2011-12-11 Paul Thomas <pault@gcc.gnu.org>
100 Tobias Burnus <burnus@gcc.gnu.org>
109 * interface.c (symbol_rank): Return the rank of the _data
110 component of class objects.
111 (compare_parameter): Also compare the derived type of the class
112 _data component for type mismatch. Similarly, return 1 if the
113 formal and _data ranks match.
114 (compare_actual_formal): Do not compare storage sizes for class
115 expressions. It is an error if an actual class array, passed to
116 a formal class array is not full.
117 * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get,
118 gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get,
119 gfc_vtable_extends_get, gfc_vtable_def_init_get,
120 gfc_vtable_copy_get): New functions for class API.
121 (gfc_conv_derived_to_class): For an array reference in an
122 elemental procedure call retain the ss to provide the
123 scalarized array reference. Moved in file.
124 (gfc_conv_class_to_class): New function.
125 (gfc_conv_subref_array_arg): Use the type of the
126 class _data component as a basetype.
127 (gfc_conv_procedure_call): Ensure that class array expressions
128 have both the _data reference and an array reference. Use
129 gfc_conv_class_to_class to handle class arrays for elemental
130 functions in scalarized loops, class array elements and full
131 class arrays. Use a call to gfc_conv_subref_array_arg in order
132 that the copy-in/copy-out for passing class arrays to derived
133 type arrays occurs correctly.
134 (gfc_conv_expr): If it is missing, add the _data component
135 between a class object or component and an array reference.
136 (gfc_trans_class_array_init_assign): New function.
137 (gfc_trans_class_init_assign): Call it for array expressions.
138 * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for
139 class scalars since their size will depend on the dynamic type.
140 (build_class_array_ref): New function.
141 (gfc_conv_scalarized_array_ref): Call build_class_array_ref.
142 (gfc_array_init_size): Add extra argument, expr3, that represents
143 the SOURCE argument. If present,use this for the element size.
144 (gfc_array_allocate): Also add argument expr3 and use it when
145 calling gfc_array_init_size.
146 (structure_alloc_comps): Enable class arrays.
147 * class.c (gfc_add_component_ref): Carry over the derived type
148 of the _data component.
149 (gfc_add_class_array_ref): New function.
150 (class_array_ref_detected): New static function.
151 (gfc_is_class_array_ref): New function that calls previous.
152 (gfc_is_class_scalar_expr): New function.
153 (gfc_build_class_symbol): Throw not implemented error for
154 assumed size class arrays. Remove error that prevents
156 (gfc_build_class_symbol): Prevent pointer/allocatable conflict.
157 Also unset codimension.
158 (gfc_find_derived_vtab): Make 'copy' elemental and set the
159 intent of the arguments accordingly.:
160 * trans-array.h: Update prototype for gfc_array_allocate.
161 * array.c (gfc_array_dimen_size): Return failure if class expr.
162 (gfc_array_size): Likewise.
163 * gfortran.h: New prototypes for gfc_add_class_array_ref,
164 gfc_is_class_array_ref and gfc_is_class_scalar_expr.
165 * trans-stmt.c (trans_associate_var): Exclude class targets
166 from test. Move the allocation of the _vptr to an earlier time
168 (trans_associate_var): Assign the descriptor directly for class
170 (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments.
171 Convert array element references into sections. Do not invoke
172 gfc_conv_procedure_call, use gfc_trans_call instead.
173 * expr.c (gfc_get_corank): Fix for BT_CLASS.
174 (gfc_is_simply_contiguous): Exclude class from test.
175 * trans.c (gfc_build_array_ref): Include class array refs.
176 * trans.h: Include prototypes for class API functions that are
177 new in trans-expr. Define GFC_DECL_CLASS(node).
178 * resolve.c (check_typebound_baseobject ): Remove error for
179 non-scalar base object.
180 (resolve_allocate_expr): Ensure that class _data component is
181 present. If array, call gfc_expr_to_intialize.
182 (resolve_select): Remove scalar error for SELECT statement as a
184 (resolve_assoc_var): Update 'target' (aka 'selector') as
185 needed. Ensure that the target expression has the right rank.
186 (resolve_select_type): Ensure that target expressions have a
188 (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS.
189 * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where
191 (gfc_trans_deferred_vars): Get class arrays right.
192 * match.c(select_type_set_tmp): Add array spec to temporary.
193 (gfc_match_select_type): Allow class arrays.
194 * check.c (array_check): Ensure that class arrays have refs.
195 (dim_corank_check, dim_rank_check): Retrun success if class.
196 * primary.c (gfc_match_varspec): Fix for class arrays and
197 co-arrays. Make sure that class _data is present.
198 (gfc_match_rvalue): Handle class arrays.
199 *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array
201 (gfc_conv_allocated): Add _data component to class expressions.
202 (gfc_add_intrinsic_ss_code): ditto.
203 * simplify.c (simplify_cobound): Fix for BT_CLASS.
204 (simplify_bound): Return NULL for class arrays.
205 (simplify_cobound): Obtain correct array_spec. Use cotype as
206 appropriate. Use arrayspec for bounds.
208 2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
211 * frontend-passes.c (in_omp_workshare): New variable.
212 (cfe_expr_0): Don't eliminiate common function if it would put
213 the variable immediately into a WORKSHARE construct.
214 (optimize_namespace): Set in_omp_workshare.
215 (gfc_code_walker): Keep track of OMP PARALLEL and OMP WORKSHARE
218 2011-12-10 Tobias Burnus <burnus@net-b.de>
220 * trans-decl.c (add_argument_checking): Fix syntax.
222 2011-12-10 Tobias Burnus <burnus@net-b.de>
223 Kai Tietz <ktietz@redhat.com>
225 * trans-decl.c (add_argument_checking): Check ts.deferred earlier.
226 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long.
228 2011-12-08 Tobias Burnus <burnus@net-b.de>
231 * trans-decl.c (add_argument_checking): Skip bound checking
232 for deferred-length strings.
234 2011-12-08 Tobias Burnus <burnus@net-b.de>
237 * symbol.c (gfc_find_component): Fix access check of parent
240 2011-12-08 Tobias Burnus <burnus@net-b.de>
243 * io/transfer.c (require_numeric_type): New function.
244 (formatted_transfer_scalar_read, formatted_transfer_scalar_write):
245 Use it, allow BOZ edit descriptors with F2008.
247 2011-12-08 Tobias Burnus <burnus@net-b.de>
250 * fortran/trans-array.c (get_std_lbound): Fix handling of
251 conversion functions.
253 2011-12-08 Toon Moene <toon@moene.org>
256 * invoke.texi: Itemize the cases for which
257 -finit-<type>=<constant> doesn't work.
259 2011-12-06 Tobias Burnus <burnus@net-b.de>
262 * expr.c (gfc_has_default_initializer): Fix handling of
263 DT with initialized pointer components.
265 2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>
268 * dependency.c (are_identical_variables): Handle case where
269 end fields of substring references are NULL.
271 2011-12-04 Tobias Burnus <burnus@net-b.de>
274 * resolve.c (find_array_spec): Use ref->u.c.component
275 directly without starting from ts.u.derived.
277 2011-12-03 Tobias Burnus <burnus@net-b.de>
280 * match.c (select_type_set_tmp): Don't set allocatable/pointer
282 * class.c (gfc_build_class_symbol): Handle
283 attr.select_type_temporary.
285 2011-12-03 Tobias Burnus <burnus@net-b.de>
288 * check.c (variable_check): Fix intent(in) check.
290 2011-12-03 Tobias Burnus <burnus@net-b.de>
292 * check.c (gfc_check_move_alloc): Allow nonpolymorphic
293 FROM with polymorphic TO.
294 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
295 nonpolymorphic FROM with polymorphic TO.
297 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
299 * module.c (dt_lower_string): Make static.
300 (dt_upper_string): Likewise.
302 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
305 * module.c (parse_string): Read string into resizable array
306 instead of parsing twice and seeking.
307 (peek_atom): New implementation avoiding seeks.
308 (require_atom): Save and set column and line explicitly for error
311 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
313 * misc.c (gfc_open_file): Don't call stat.
315 2011-11-29 Thomas Koenig <tkoenig@gcc.gnu.org>
318 * module.c (prev_module_line): New variable.
319 (prev_module_column): New variable.
320 (prev_character): New variable.
321 (module_char): Update the new variables.
322 (module_unget_char): New function.
323 (parse_string): Use module_unget_char.
324 (parse_integer): Likewise.
325 (parse_name): Likewise.
327 2011-11-29 Tobias Burnus <burnus@net-b.de>
331 * check.c (gfc_check_move_alloc): Make sure that from/to
332 are both polymorphic or neither.
333 * trans-intrinsic.c (conv_intrinsic_move_alloc): Cleanup,
334 generate inline code.
336 2011-11-28 Tobias Burnus <burnus@net-b.de>
337 Steven G. Kargl <kargl@gcc.gnu.org>
340 * symbol.c (check_conflict): Ignore BIND(C) + PARAMETER
341 conflicts for ISO_C_BINDING variables.
342 (gen_special_c_interop_ptr): Don't mark c_ptr_null/c_funptr_null
345 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
347 * trans-array.c (set_loop_bounds): Remove dead conditions.
349 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
353 * trans-array.c (gfc_trans_create_temp_array): Get dimension from
354 the right gfc_ss struct.
356 2011-11-25 Tobias Burnus <burnus@net-b.de>
359 * trans-decl.c (gfc_get_module_backend_decl): Also copy
360 ts.u.derived from the gsym if the ts.type is BT_CLASS.
361 (gfc_get_extern_function_decl): Copy also the backend_decl
362 for the symbol's ts.u.{derived,cl} from the gsym.
363 * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
364 return if "from" and "to" are the same.
366 2011-11-25 Tobias Burnus <burnus@net-b.de>
369 * trans-stmt.c (gfc_trans_simple_do): Add a fold_convert.
371 2011-11-24 Tobias Burnus <burnus@net-b.de>
374 * resolve.c (pure_subroutine): If called subroutine is
375 impure, unset implicit_pure.
376 (resolve_function): Move impure check to simplify code.
378 2011-11-19 Tobias Burnus <burnus@net-b.de>
381 * class.c (gfc_find_derived_vtab): Mark __def_init as PARAMETER
382 and hence as TREE_READONLY; add subroutine attribute to
386 * trans.h (GFC_DECL_PUSH_TOPLEVEL): New DECL_LANG_FLAG_7.
387 * trans-decl.c (gfc_get_symbol_decl): Mark __def_init and vtab as
388 GFC_DECL_PUSH_TOPLEVEL.
389 (gfc_generate_function_code): If GFC_DECL_PUSH_TOPLEVEL, push it there.
390 (build_function_decl): Push __copy_ procedure to the toplevel.
392 2011-11-16 Tobias Burnus <burnus@net-b.de>
396 * decl.c (match_data_constant, match_data_constant, variable_decl,
397 gfc_match_decl_type_spec, access_attr_decl,
398 check_extended_derived_type, gfc_match_derived_decl,
399 gfc_match_derived_decl, gfc_match_derived_decl) Modified to deal
400 with DT constructors.
401 * gfortran.h (gfc_find_dt_in_generic,
402 gfc_convert_to_structure_constructor): New function prototypes.
403 * interface.c (check_interface0, check_interface1,
404 gfc_search_interface): Ignore DT constructors in generic list.
405 * match.h (gfc_match_structure_constructor): Update prototype.
406 * match.c (match_derived_type_spec): Ensure that one uses the DT
407 not the generic function.
408 * module.c (MOD_VERSION): Bump.
409 (dt_lower_string, dt_upper_string): New functions.
410 (find_use_name_n, find_use_operator, compare_true_names,
411 find_true_name, add_true_name, fix_mio_expr, load_needed,
412 read_module, write_dt_extensions, write_symbol): Changes to deal with
413 different symtree vs. sym names.
414 (create_derived_type): Create also generic procedure.
415 * parse.c (gfc_fixup_sibling_symbols): Don't regard DT and generic
416 function as the same.
417 * primary.c (gfc_convert_to_structure_constructor): New function.
418 (gfc_match_structure_constructor): Restructured; calls
419 gfc_convert_to_structure_constructor.
420 (build_actual_constructor, gfc_match_rvalue): Update for DT generic
422 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
423 is_illegal_recursion, resolve_generic_f, resolve_variable,
424 resolve_fl_variable_derived, resolve_fl_derived0,
425 resolve_symbol): Handle DT and DT generic constructors.
426 * symbol.c (gfc_use_derived, gfc_undo_symbols,
427 gen_special_c_interop_ptr, gen_cptr_param,
428 generate_isocbinding_symbol, gfc_get_derived_super_type): Handle
429 derived-types, which are hidden in the generic type.
430 (gfc_find_dt_in_generic): New function
431 * trans-array.c (gfc_conv_array_initializer): Replace FL_PARAMETER
432 expr by actual value.
433 * trans-decl.c (gfc_get_module_backend_decl, gfc_trans_use_stmts):
434 Ensure that we use the DT and not the generic function.
435 * trans-types.c (gfc_get_derived_type): Ensure that we use the DT
436 and not the generic procedure.
438 2011-11-14 Tobias Burnus <burnus@net-b.de>
441 * trans-decl.c (generate_coarray_sym_init): Handle zero-sized arrays.
443 2011-11-09 Tobias Burnus <burnus@net-b.de>
445 * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
446 (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
447 (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.
449 2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
452 * gfortran.texi (Data consistency and durability): New section.
454 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
457 * resolve.c (resolve_forall_iterators): Transform internal errors
460 2011-11-09 Janus Weil <janus@gcc.gnu.org>
463 * class.c (gfc_find_derived_vtab): Make the vtab symbols FL_PARAMETER.
464 * expr.c (gfc_simplify_expr): Prevent vtabs from being replaced with
466 * resolve.c (resolve_values): Use-associated symbols do not need to
468 (resolve_fl_parameter): Make sure the symbol has a value.
470 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
473 * intrinsic.c (add_functions): Allow dreal simplification.
474 * intrinsic.h (gfc_simplify_dreal): New prototype.
475 * simplify.c (gfc_simplify_dreal): New function.
477 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
480 * trans-types.c (gfc_get_dtype): Issue a fatal error instead of
483 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
486 * io.c (gfc_resolve_close): CLOSE requires a UNIT.
488 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
491 * expr.c (gfc_simplify_expr): Substrings can't have negative
494 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
497 * invoke.texi (-finit-*): Document interaction with
500 2011-11-07 François-Xavier Coudert <fxcoudert@gcc.gnu.org>
504 * invoke.texi: Fix documentation of fsign-zero option. Remove
506 * intrinsic.texi: Fix ATAN2 documentation for signed zeros.
508 * gfortran.texi: Remove contractions.
510 2011-11-07 Janus Weil <janus@gcc.gnu.org>
513 * class.c (add_proc_comp): Don't add non-overridable procedures to the
515 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
516 Don't generate a dynamic _vptr call for non-overridable procedures.
518 2011-11-07 Janne Blomqvist <jb@gcc.gnu.org>
520 * intrinsic.texi (MCLOCK, MCLOCK8, TIME, TIME8): Functions clock
521 and time are part of the C standard library.
523 2011-11-06 Janus Weil <janus@gcc.gnu.org>
525 * gfortran.h (gfc_extend_expr): Modified prototype.
526 * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'.
527 Remove argument 'real_error'.
528 * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'.
530 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
531 Aldy Hernandez <aldyh@redhat.com>
533 Merged from cxx-mem-model.
535 * types.def: (BT_SIZE, BT_CONST_VOLATILE_PTR, BT_FN_VOID_INT,
536 BT_FN_I{1,2,4,8,16}_CONST_VPTR_INT, BT_FN_VOID_VPTR_INT,
537 BT_FN_BOOL_VPTR_INT, BT_FN_BOOL_SIZE_CONST_VPTR,
538 BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT, BT_FN_VOID_SIZE_VPTR_PTR_INT,
539 BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT,
540 BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT,
541 BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New types.
543 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
546 * trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
547 case in the assertion.
548 * trans-intrinsic (enter_nested_loop): New function.
549 (gfc_conv_intrinsic_arith): Support non-scalar cases.
550 (nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
551 (walk_inline_intrinsic_function): Handle sum and product.
552 (gfc_inline_intrinsic_function_p): Ditto.
553 * trans.h (gfc_get_loopinfo): New macro.
555 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
557 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
558 expression variable. Use it.
560 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
562 * trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
565 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
567 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Small argument handling
570 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
572 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Update conditions.
574 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
576 * frontend-passes.c (cfe_register_funcs): Return early in the case
577 of an inline intrinsic function.
578 (optimize_binop_array_assignment): Skip optimization in the case of
579 an inline intrinsic function.
581 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
583 * array.c (match_subscript): Skip whitespaces before setting locus.
584 * matchexp.c (match_level_1): Ditto.
586 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
588 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's
589 temporary rank to the loop rank. Mark ss chains for multiple loop
590 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
593 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
595 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's
596 temporary rank to the loop rank. Mark ss chains for multiple loop
597 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
600 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
602 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Don't calculate
603 offset twice in generated code.
605 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
607 * trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
608 arguments to elemental calls.
609 * trans-stmt.c (replace_ss): New function.
610 (gfc_conv_elemental_dependencies): Remove temporary loop handling.
611 Create a new ss for the temporary and replace the original one with it.
612 Remove fake array references. Recalculate all offsets.
614 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
616 * trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
617 * trans-array.c (gfc_free_ss): Remove forward declaration.
619 (set_delta, gfc_set_delta): Remove forward declaration.
620 Make non-static and rename the former to the later. Update uses.
622 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
624 * trans.h (gfc_inline_intrinsic_function_p): Move prototype...
625 * gfortran.h (gfc_inline_intrinsic_function_p): ... here.
626 * dependency.c (gfc_check_argument_var_dependency): Check dependencies
627 of inline intrinsics' arguments.
629 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
631 * trans-array.c (gfc_trans_preloop_setup): New pointers to outer
632 dimension's ss and loop. Use them.
634 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
636 * trans-array.c (outermost_loop): New function.
637 (gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
638 gfc_add_loop_ss_code): Put generated code out of the outermost loop.
640 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
642 * trans-array.c (constant_array_constructor_loop_size):
643 Handle multiple loops.
645 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
647 * trans-array.c (get_rank, get_loop_upper_bound_for_array):
649 (gfc_trans_array_constructor): Handle multiple loops.
651 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
653 * trans.h (struct gfc_loopinfo): New field parent.
654 * trans-array.c (gfc_cleanup_loop): Free nested loops.
655 (gfc_add_ss_to_loop): Set nested_loop's parent loop.
656 (gfc_trans_array_constructor): Update assertion.
657 (gfc_conv_loop_setup): Ditto.
659 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
661 * trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
662 Call recursively gfc_add_loop_ss_code for all the nested loops.
663 (gfc_conv_ss_startstride): Only get the descriptor for the outermost
664 ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
665 (set_loop_bounds): Call recursively for all the nested loops.
668 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
670 * trans.h (struct gfc_loopinfo): New fields nested and next.
671 * trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
672 ss has non-null nested_ss field.
674 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
676 * trans-array.c (gfc_trans_create_temp_array): Loop over the parents.
678 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
680 * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
681 Rename the former to the latter and loop over the parents.
682 (innermost_ss): New function.
683 (get_array_ref_dim_for_loop_dim): New function.
684 (gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
685 (set_loop_bounds): Use get_array_dim_for_loop_dim).
687 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
689 * trans.h (struct gfc_ss): New field nested_ss.
690 * trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
692 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
694 * trans-array.c (set_vector_loop_bounds): Loop over the parents.
696 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
698 * trans-array.c (gfc_trans_array_constructor): Loop over the parents.
700 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
702 * trans-array.c (gfc_set_loop_bounds_from_array_spec): Loop over the
705 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
707 * trans.h (struct gfc_ss): New field parent.
708 * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
710 * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
713 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
715 * trans-array.h (gfc_trans_create_temp_array): Remove loop argument.
716 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get loop from ss.
717 Update reference to loop. Remove loop argument.
718 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update calls to
719 gfc_trans_create_temp_array.
720 * trans-expr.c (gfc_conv_procedure_call): Ditto.
721 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
722 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
723 Set loop before calling gfc_trans_create_temp_array.
725 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
727 * trans-array.c (gfc_trans_create_temp_array): New variable total_dim.
728 Set total_dim to loop's rank. Replace usages of loop's rank.
730 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
732 * trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
733 Rename the former to the later. Get loop from ss.
734 Remove loop argument.
735 (gfc_add_loop_ss_code): Update call.
737 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
739 * trans-array.c (gfc_set_vector_loop_bounds): Get loop from ss.
740 Remove loop argument.
741 (gfc_add_loop_ss_code): Update call.
743 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
745 * trans.h (struct gfc_ss): New field loop.
746 * trans-array.c (set_ss_loop): New function.
747 (gfc_add_ss_to_loop): Call set_ss_loop.
749 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
751 * trans.h (struct gfc_ss_info): New field refcount.
752 * trans-array.c (free_ss_info): Decrement refcount. Return early if
754 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
757 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
759 * trans-array.c (gfc_trans_create_temp_array): Move invariant condition
760 out of the containing loop.
762 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
764 * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array):
765 Move specloop arrays clearing from the former to the latter.
767 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
769 * trans-array.c (set_loop_bounds): Separate the beginning of
770 gfc_conv_loop_setup into a function of its own.
771 (set_delta): Separate the end of gfc_conv_loop_setup into a function
773 (gfc_conv_loop_setup): Call set_loop_bounds and set delta.
774 (set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
775 pointer to the specloop field from the loop struct.
777 2011-11-03 Tobias Burnus <burnus@net-b.de>
780 * interface.c (gfc_compare_derived_types): Fix check for BIND(C).
782 2011-11-03 Tobias Burnus <burnus@net-b.de>
785 * trans-decl.c (gfc_finish_var_decl): Mark PARAMETER as TREE_READONLY.
787 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
789 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
790 gfc_ss::where into gfc_ss_info.
791 * trans-array.c (gfc_add_loop_ss_code):
792 Update reference chains.
793 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
795 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
797 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
798 gfc_ss::useflags into gfc_ss_info.
799 * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
800 gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
801 Update reference chains.
802 * trans-expr.c (gfc_conv_procedure_call): Ditto.
803 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
805 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
807 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
808 gfc_ss::data::info into gfc_ss_info::data and remove empty union
810 * trans-array.c (gfc_free_ss, gfc_trans_create_temp_array,
811 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
812 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
813 gfc_conv_ss_descriptor, gfc_trans_array_bound_check,
814 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
815 add_array_offset, gfc_trans_preloop_setup,
816 gfc_trans_scalarized_boundary, gfc_conv_section_startstride,
817 gfc_conv_ss_startstride, gfc_could_be_alias,
818 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
819 gfc_alloc_allocatable_for_assignment, gfc_walk_array_ref):
820 Update reference chains and factor them where possible.
821 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
822 gfc_conv_procedure_call, gfc_trans_subarray_assign): Updata reference
824 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
825 * trans-io.c (transfer_array_component): Ditto.
826 * trans-stmt.c (gfc_conv_elemental_dependencies,
827 gfc_trans_pointer_assign_need_temp): Ditto.
829 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
831 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
832 gfc_ss::data::temp into gfc_ss_info::data.
833 * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference
836 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
838 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
839 gfc_ss::data::scalar into newly created union gfc_ss_info::data,
840 and rename subfield expr to value.
841 * trans-array.c (gfc_add_loop_ss_code, gfc_conv_array_index_offset,
842 gfc_conv_expr_descriptor): Update reference chains.
843 * trans-const.c (gfc_conv_constant): Ditto.
844 * trans-expr.c (gfc_conv_expr): Ditto.
846 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
848 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
849 string_length from the former struct to the latter.
851 (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
852 gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
853 gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
854 gfc_conv_expr_descriptor): Update references to string_length and
855 factor common reference chains where possible.
856 * trans-const.c (gfc_conv_constant): Ditto.
857 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
858 gfc_conv_expr): Ditto.
860 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
862 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from
863 the former struct to the latter.
865 (gfc_get_array_ss, gfc_get_scalar_ss,
866 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
867 gfc_add_loop_ss_code, gfc_conv_ss_descriptor,
868 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
869 gfc_conv_scalarized_array_ref, gfc_conv_ss_startstride,
870 gfc_could_be_alias, gfc_conv_resolve_dependencies,
871 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
872 gfc_alloc_allocatable_for_assignment): Update references to expr and
873 factor common reference chains where possible.
874 * trans-const.c (gfc_conv_constant): Ditto.
875 * trans-expr.c (gfc_conv_variable, gfc_conv_procedure_call,
876 gfc_conv_array_constructor_expr, gfc_conv_expr,
877 gfc_conv_expr_reference): Ditto.
878 * trans-intrinsic.c (trans_this_image, gfc_conv_intrinsic_bound,
879 gfc_conv_intrinsic_cobound, gfc_conv_intrinsic_funcall,
880 gfc_add_intrinsic_ss_code): Ditto.
881 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
883 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
885 * trans.h (struct gfc_ss_info): New struct.
886 (gfc_get_ss_info): New macro.
887 (struct gfc_ss): Move type field to struct gfc_ss_info.
888 Add an info field of type gfc_ss_info.
889 * trans-array.c (free_ss_info): New function.
890 (gfc_free_ss): Call free_ss_info.
891 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss):
892 Allocate gfc_ss_info field.
893 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss,
894 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
895 gfc_conv_array_index_offset, gfc_trans_preloop_setup,
896 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
897 gfc_conv_ss_startstride, gfc_conv_resolve_dependencies,
898 gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor,
899 gfc_walk_elemental_function_args): Update references to type.
900 * trans-const.c (gfc_conv_constant): Factor common reference chains
901 and update reference to type.
902 * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1):
903 Update reference to type.
904 (gfc_conv_array_constructor_expr, gfc_conv_expr,
905 gfc_conv_expr_reference): Ditto. Factor common reference chains.
906 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references
908 * trans-stmt.c (gfc_trans_where_assign): Ditto.
910 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
912 * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
913 from the former struct to the latter.
914 * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
915 Update field references.
916 * trans-expr.c (gfc_trans_subarray_assign): Update field references
917 and factor common reference chains.
918 * trans-io.c (transfer_array_component): Ditto.
920 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
922 * trans.h (struct gfc_array_info): Move dim and dimen fields...
923 (struct gfc_ss): ... here. Remove gfc_ss::data::temp::dimen field.
924 * trans-array.c (gfc_conv_loop_setup): Remove temp_ss dim array
926 (gfc_get_temp_ss): Initialize dim and dimen.
927 (gfc_free_ss, gfc_get_array_ss, gfc_get_temp_ss,
928 gfc_set_loop_bounds_from_array_spec, get_array_ref_dim,
929 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
930 gfc_set_vector_loop_bounds, gfc_conv_scalarized_array_ref,
931 gfc_trans_preloop_setup, gfc_conv_ss_startstride,
932 gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims,
933 gfc_conv_expr_descriptor, gfc_alloc_allocatable_for_assignment,
934 gfc_walk_array_ref): Update field references.
935 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
937 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Ditto.
938 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
940 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
942 * trans.h (struct gfc_ss_info, struct gfc_array_info):
943 Rename the former to the latter.
944 * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
945 get_array_ref_dim, gfc_trans_create_temp_array,
946 gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
947 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
948 add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
949 gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
950 gfc_conv_expr_descriptor): Update all uses.
951 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
953 * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
954 walk_inline_intrinsic_transpose): Ditto.
955 * trans-stmt.c (gfc_conv_elemental_dependencies,
956 gfc_trans_pointer_assign_need_temp): Ditto.
958 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
960 * trans-array.c (dim_ok, transposed_dims): Rename the former to the
961 latter. Change argument type. Invert return value.
962 (gfc_conv_expr_descriptor): Update calls.
964 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
966 * trans-array.c (get_array_ref_dim): Change argument type and name.
967 Obtain previous argument from the new argument in the body.
968 (gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
970 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
972 * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
973 Rename the former to the latter. Change type and name of argument.
974 Get previous argument from the new one.
975 (gfc_add_loop_ss_code): Update call.
977 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
979 * trans-array.h (gfc_trans_create_temp_array): Replace info argument
981 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
982 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
983 gfc_trans_create_temp_array.
984 * trans-expr.c (gfc_conv_procedure_call): Ditto.
985 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
986 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
988 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
990 * trans-array.c (gfc_trans_array_bound_check): Use ss argument
993 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
995 * trans-array.c (gfc_trans_array_bound_check,
996 trans_array_bound_check): Rename the former to the latter.
997 Replace descriptor argument with ss argument. Get descriptor from ss.
998 (gfc_conv_array_index_offset, conv_array_index_offset): Rename the
999 former to the latter. Update call to trans_array_bound_check.
1000 Replace info argument with ss argument. Get info from ss.
1001 (gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
1002 (add_array_offset): Ditto
1004 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1006 * trans-array.c (gfc_trans_constant_array_constructor,
1007 trans_constant_array_constructor): Rename the former to the latter.
1008 Don't set the rank of the temporary for the loop. Remove then unused
1010 (gfc_trans_array_constructor): Update call.
1012 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1014 * trans-array.c (gfc_trans_scalarizing_loops): Stop loop before end
1015 marker, not after it.
1017 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1019 * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays.
1021 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1023 * trans-array.c (gfc_conv_ss_startstride): Access array bounds along
1024 array dimensions instead of loop dimensions.
1026 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1028 * trans-array.c (gfc_trans_preloop_setup): Assertify one condition.
1030 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1032 * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions.
1034 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1036 * trans-array.c (get_array_ref_dim): Remove redundant condition.
1038 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1040 * trans-array.c (gfc_trans_preloop_setup): Move common code...
1041 (add_array_offset): ...into that new function.
1043 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1045 * trans-array.c (gfc_trans_preloop_setup): Use loop's dimension instead
1046 of array's dimention. Check that it is indeed the same.
1048 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1050 * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
1051 Special case outermost loop.
1053 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1055 * trans-array.c (gfc_trans_preloop_setup): Factor loop index
1058 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1060 * trans-array.c (gfc_trans_preloop_setup): Move code earlier.
1062 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1064 * trans-array.c (gfc_trans_preloop_setup): Move array reference
1065 initialisation earlier. Factor subsequent array references.
1067 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1069 * Makef-lang.in (gfortranspec.o): Pass SHLIB instead of SHLIB_LINK.
1071 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
1074 * check.c (gfc_check_dshift): Update argument checking for BOZ.
1075 Update checking SHIFT against BITSIZE of I or J.
1076 * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR.
1078 2011-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
1080 * check.c (gfc_check_atan_2): Typo in comment.
1081 (gfc_check_nearest): If 's' is constant, check that it is not 0.
1082 * simplify.c (simplify_dshift, gfc_simplify_ibclr, gfc_simplify_ibits,
1083 gfc_simplify_ibset, simplify_shift, gfc_simplify_ishftc,
1084 gfc_simplify_nearest): Remove dead code.
1086 2011-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1088 * simplify.c (simplify_transformation_to_array): Fix memory leak.
1090 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1093 * check.c (gfc_check_ishftc): Check args are constant before
1094 extracting the integer.
1096 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1099 * check.c (less_than_bitsize1): Check |shift| <= bit_size(i).
1100 (gfc_check_ishftc): Check |shift| <= bit_size(i) and check
1101 that size is positive.
1103 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1106 * resolve.c (resolve_ref): Check return value of resolve_substring().
1108 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1110 * io.c (match_dt_format): Match a user-defined operator or a kind
1111 type prefixed string.
1113 2011-10-19 Janus Weil <janus@gcc.gnu.org>
1116 * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF.
1117 * intrinsinc.texi (SIZEOF): Document it.
1118 (STORAGE_SIZE): Fix special characters. Fix line breaks.
1120 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1123 * trans.c (gfc_build_array_ref): If type is not an array, check that
1124 there is nothing to do, and do nothing.
1126 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1129 * trans-types.c (gfc_build_array_type): Don't force lower bound to one
1130 in the deferred case.
1132 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1135 * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
1136 Don't set already set array ref.
1138 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1140 * array.c (gfc_find_array_ref): Remove coarray-specific handling.
1142 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1145 * check.c (dim_corank_check): Use gfc_get_corank to get corank.
1147 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1150 * trans-intrinsic.c (walk_coarray): Change AR_ELEMENT to AR_SECTION.
1153 * trans-intrinsic.c (walk_coarray): Use gfc_walk_array_ref for
1154 the scalarization chain initialization.
1156 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1159 * trans-intrinsic.c (walk_coarray): Allow subreferences after a
1160 coarray object reference.
1162 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1165 * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
1166 if they are coarrays.
1168 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1170 * trans-array.h (gfc_walk_array_ref): New prototype.
1171 * trans-array.c (gfc_walk_array_ref): New function, containing
1172 all but the beginning of gfc_walk_variable_expr's code.
1173 (gfc_walk_variable_expr): Use gfc_walk_array_ref.
1175 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1178 * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
1179 ndim for the descriptor's rank.
1181 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1184 * trans-array.c (gfc_conv_expr_descriptor): Count codimensions starting
1185 from zero, and add then the relevant offset (either ndim or loop.dimen)
1186 depending on context.
1188 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1190 * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
1192 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1194 * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
1197 2011-10-18 Janus Weil <janus@gcc.gnu.org>
1200 * decl.c (verify_c_interop_param): Renamed to
1201 'gfc_verify_c_interop_param'. Add error message for polymorphic
1203 (verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
1204 polymorphic variables.
1205 (verify_bind_c_sym): Renamed 'verify_c_interop'.
1206 * gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
1207 * check.c (gfc_check_sizeof): Ditto.
1208 * resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
1209 * symbol.c (verify_bind_c_derived_type): Ditto.
1211 2011-10-15 Tom Tromey <tromey@redhat.com>
1212 Dodji Seketeli <dodji@redhat.com>
1214 * cpp.c (print_line, cb_define): Adjust to avoid using internals
1215 of struct line_map. Use the public API instead.
1217 2011-10-17 Janus Weil <janus@gcc.gnu.org>
1221 * primary.c (match_kind_param): Avoid segfault.
1223 2011-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1225 * frontend-passes.c (current_ns): Make static.
1226 (create_var): Note parent of newly created namespace.
1227 (optimize_namespace): Don't wak sibling namespaces
1228 if they are EXEC_BLOCK because this is handled...
1229 (gfc_code_walker): ... here. Also walk ASSOCIATE lists.
1231 2011-10-16 Janus Weil <janus@gcc.gnu.org>
1234 * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
1235 (get_kind): Pass on 'is_iso_c' flag.
1236 (match_integer_constant,match_real_constant,match_logical_constant):
1237 Set 'ts.is_c_interop'.
1239 2011-10-16 Janus Weil <janus@gcc.gnu.org>
1242 * resolve.c (resolve_formal_arglist): Remove unneeded error message.
1245 2011-10-15 Tobias Burnus <burnus@net-b.de>
1247 * gfortran.texi (Fortran 2008 status, TS 29113 status,
1248 Further Interoperability of Fortran with C): Update implementation
1249 status, change references from TR 29113 to TS 29113.
1250 * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
1251 * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
1252 * lang.opt (std=): Ditto.
1253 * options.c (gfc_handle_option, set_default_std_flags): Ditto and
1254 change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
1255 * libgfortran.h: Ditto.
1256 * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
1257 * decl.c (verify_c_interop_param): Ditto.
1259 2011-10-14 Janus Weil <janus@gcc.gnu.org>
1262 * expr.c (gfc_check_vardef_context): Don't throw an error on
1263 non-pointer assignments involving an intent(in) pointer dummy.
1265 2011-10-14 Tobias Burnus <burnus@net-b.de>
1268 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1269 for dummy arguments with VALUE attribute.
1271 2011-10-11 Tobias Burnus <burnus@net-b.de>
1272 Janus Weil <janus@gcc.gnu.org>
1274 * invoke.texi (-fwhole-file): Update wording since -fwhole-file
1275 is now enabled by default.
1277 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1279 * trans-expr.c (gfc_conv_power_op): Delete old interface with two
1280 parallel arrays to hold standard builtin declarations, and replace
1281 it with a function based interface that can support creating
1282 builtins on the fly in the future. Change all uses, and poison
1283 the old names. Make sure 0 is not a legitimate builtin index.
1284 (fill_with_spaces): Ditto.
1285 (gfc_trans_string_copy): Ditto.
1286 (gfc_trans_zero_assign): Ditto.
1287 (gfc_build_memcpy_call): Ditto.
1288 (alloc_scalar_allocatable_for_assignment): Ditto.
1289 * trans-array.c (gfc_trans_array_constructor_value): Ditto.
1290 (duplicate_allocatable): Ditto.
1291 (gfc_alloc_allocatable_for_assignment): Ditto.
1292 * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
1293 (gfc_omp_clause_assign_op): Ditto.
1294 (gfc_trans_omp_atomic): Ditto.
1295 (gfc_trans_omp_do): Ditto.
1296 (gfc_trans_omp_task): Ditto.
1297 * trans-stmt.c (gfc_trans_stop): Ditto.
1298 (gfc_trans_sync): Ditto.
1299 (gfc_trans_allocate): Ditto.
1300 (gfc_trans_deallocate): Ditto.
1301 * trans.c (gfc_call_malloc): Ditto.
1302 (gfc_allocate_using_malloc): Ditto.
1303 (gfc_call_free): Ditto.
1304 (gfc_deallocate_with_status): Ditto.
1305 (gfc_deallocate_scalar_with_status): Ditto.
1306 * f95-lang.c (gfc_define_builtin): Ditto.
1307 (gfc_init_builtin_functions): Ditto.
1308 * trans-decl.c (create_main_function): Ditto.
1309 * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
1311 2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1314 * frontend-passes (forall_level): New variable.
1315 (cfe_register_funcs): Don't register functions if we
1316 are within a forall loop.
1317 (optimize_namespace): Set forall_level to 0 before entry.
1318 (gfc_code_walker): Increase/decrease forall_level.
1320 2011-10-09 Tobias Burnus <burnus@net-b.de>
1323 * trans-common.c (translate_common): Fix -Walign-commons check.
1325 2011-10-09 Mikael Morin <mikael.morin@sfr.fr>
1327 * interface.c (check_dummy_characteristics): Count dimensions starting
1328 from one in diagnostic.
1330 2011-10-09 Tobias Burnus <burnus@net-b.de>
1332 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1333 dependency on iso-c-binding.def and iso-fortran-env.def.
1334 * module.c (import_iso_c_binding_module): Add error when
1335 explicitly importing a nonstandard symbol; extend standard-
1337 * iso-c-binding.def: Add c_float128 and c_float128_complex
1338 integer parameters (for -std=gnu).
1339 * intrinsic.texi (ISO_C_Binding): Document them.
1340 * symbol.c (generate_isocbinding_symbol): Change macros
1341 to ignore GFC_STD_* data.
1342 * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
1343 nonstatic and renamed from "init_c_interop_kinds".
1344 (gfc_init_kinds): Don't call it
1345 * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
1346 * f95-lang.c (gfc_init_decl_processing): Call it.
1348 2011-10-09 Janus Weil <janus@gcc.gnu.org>
1351 * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
1353 2011-10-08 Paul Thomas <pault@gcc.gnu.org>
1356 * trans-array.c (gfc_conv_array_index_offset): Use descriptor
1357 stride for pointer function results.
1359 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1361 * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
1363 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1365 * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
1367 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1369 * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
1370 Remove conditions on coarray.
1371 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1372 (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
1374 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1376 * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
1377 argument. Remove condition on coarray_last.
1378 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1379 (gfc_conv_expr_descriptor): Ditto.
1381 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1383 * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
1384 handling. Don't reset array ref's corank and codimensions' types
1385 in the full array ref case. Update loop upper limit.
1386 Remove DIMEN_THIS_IMAGE case. Remove unnecessary conditions.
1388 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1390 * trans.h (gfc_ss_info): Remove codimen field.
1391 * trans-array.c (gfc_get_array_ss): Don't set codimen field.
1392 (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
1393 (gfc_trans_constant_array_constructor): Update loop upper limit.
1394 (gfc_conv_ss_startstride): Don't set codimen field.
1395 Don't get descriptor's cobounds.
1396 (gfc_walk_variable_expr): Update dimension index.
1397 * trans-intrinsic.c (trans_this_image, trans_image_index,
1398 conv_intrinsic_cobound): Don't set codimen field
1400 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1402 * trans.h (gfc_loopinfo): Remove codimen field.
1403 * trans-array.c (gfc_set_vector_loop_bounds,
1404 gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
1406 (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
1408 (gfc_start_scalarized_body): Update loop lower limit.
1409 (gfc_conv_ss_startstride): Don't set loop's codimen field.
1410 (gfc_conv_loop_setup): Remove unnecessary condition.
1411 (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
1413 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1415 * trans.h (gfc_ss): Remove data.temp.codimen field.
1416 * trans-array.c (gfc_conv_resolve_dependencies,
1417 gfc_conv_expr_descriptor): Don't set temp's codimen field.
1419 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1421 * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
1422 associated dimen_type) in the full array ref case.
1424 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1426 * trans-intrinsic.c (walk_coarray): New function.
1427 (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
1428 (trans-this_image, trans_image_index, conv_intrinsic_cobound):
1431 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1433 * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
1434 cobounds evaluation.
1436 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1438 * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
1440 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1442 * trans-array.c (gfc_conv_section_startstride): Move code to
1443 evaluate_bound. Use evaluate_bound.
1444 (evaluate_bound): New function.
1446 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1448 * trans-array.c (gfc_conv_section_startstride): Update assertion to
1449 also accept coarrays.
1451 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1453 * trans-array.c (gfc_conv_section_startstride): Factor common
1454 array ref references.
1456 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1458 * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
1459 loop.codimen as argument to gfc_get_array_type_bounds.
1461 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1463 * trans-array.h (struct gfc_se): New flag want_coarray.
1464 * trans-intrinsic.c (trans_this_image, trans_image_index,
1465 conv_intrinsic_cobound): Set want_coarray.
1466 * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
1467 earlier and without relying on the scalarizer.
1469 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1471 * expr.c (gfc_get_corank): Return 0 if input expression is not a
1474 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1476 * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
1477 descriptor setup code.
1479 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1481 * resolve.c (compare_spec_to_ref): Move coarray ref initialization
1483 (resolve_array_ref): ... here.
1485 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1487 * check.c (is_coarray): Remove.
1488 (coarray_check): Use gfc_is_coarray.
1490 2011-10-07 Janus Weil <janus@gcc.gnu.org>
1493 * class.c (gfc_build_class_symbol): Fix whitespace.
1494 * module.c (mio_symbol): Set 'class_ok' attribute.
1495 * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
1496 been built for class symbols.
1498 2011-10-04 Janus Weil <janus@gcc.gnu.org>
1501 * interface.c (check_dummy_characteristics): Check the array shape.
1503 2011-10-01 Janus Weil <janus@gcc.gnu.org>
1506 * interface.c (get_expr_storage_size): Check if 'length' component is
1509 2011-09-29 Janus Weil <janus@gcc.gnu.org>
1512 * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
1516 * symbol.c (check_conflict): Forbid TARGET attribute for statement
1519 2011-09-27 Jakub Jelinek <jakub@redhat.com>
1521 * trans-types.c (gfc_type_for_size): Return wider type
1522 if no suitable narrower type has been found.
1523 (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
1524 returned type doesn't have expected TYPE_MODE.
1526 2011-09-26 Janus Weil <janus@gcc.gnu.org>
1529 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
1532 * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
1534 2011-09-22 Janus Weil <janus@gcc.gnu.org>
1537 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
1539 * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
1540 for PURE and ELEMENTAL attributes.
1541 (compare_actual_formal): Remove pureness check here.
1543 2011-09-20 Steven G. Kargl <kargl@gcc.gnu.org>
1545 * check.c (gfc_check_c_sizeof): Remove redundant word.
1547 2011-09-20 Simon Baldwin <simonb@google.com>
1549 * module.c (gfc_dump_module): Omit timestamp from output.
1551 2011-09-17 Janus Weil <janus@gcc.gnu.org>
1554 * symbol.c (gfc_use_derived): Fix coding style.
1556 2011-09-15 Janus Weil <janus@gcc.gnu.org>
1559 * resolve.c (resolve_transfer): Check if component 'ref' is defined.
1562 * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
1564 2011-09-14 Tobias Burnus <burnus@net-b.de>
1568 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
1569 * resolve.c (resolve_transfer): Reject NULL without MOLD.
1570 * interface.c (gfc_procedure_use): Reject NULL without MOLD
1571 if no explicit interface is known.
1572 (gfc_search_interface): Reject NULL without MOLD if it would
1575 2011-09-13 Janus Weil <janus@gcc.gnu.org>
1578 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
1581 2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1584 * frontend-passes.c (dummy_expr_callback): New function.
1585 (convert_do_while): New function.
1586 (optimize_namespace): Call code walker to convert do while loops.
1588 2011-09-11 Janus Weil <janus@gcc.gnu.org>
1592 * interface.c (check_dummy_characteristics): New function to check the
1593 characteristics of dummy arguments.
1594 (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
1596 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1598 * trans-array.c (gfc_trans_constant_array_constructor): Remove
1599 superfluous initialisation of DIM field.
1600 (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
1601 (gfc_conv_expr_descriptor): Ditto.
1602 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1604 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1606 * trans-array.h (gfc_get_scalar_ss): New prototype.
1607 * trans-array.c (gfc_get_scalar_ss): New function.
1608 (gfc_walk_variable_expr, gfc_walk_op_expr,
1609 gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
1610 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1611 (gfc_trans_assignment_1): Ditto.
1612 * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
1613 gfc_trans_where_3): Ditto.
1615 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1617 * trans-array.h (gfc_get_temp_ss): New prototype.
1618 * trans-array.c (gfc_get_temp_ss): New function.
1619 (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
1620 (gfc_conv_expr_descriptor): Ditto.
1621 * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
1623 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1625 * trans-array.h (gfc_get_array_ss): New prototype.
1626 * trans-array.c (gfc_get_array_ss): New function.
1627 (gfc_walk_variable_expr, gfc_walk_function_expr,
1628 gfc_walk_array_constructor): Re-use gfc_get_array_ss.
1629 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1630 * trans-intrinsic.c (gfc_walk_intrinsic_bound,
1631 gfc_walk_intrinsic_libfunc): Ditto.
1632 * trans-io.c (transfer_array_component): Ditto.
1634 2011-09-08 Tobias Burnus <burnus@net-b.de>
1637 * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
1638 * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
1639 * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
1640 * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
1641 lock_unlock_statement, sync_statement, gfc_match_allocate,
1642 gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
1643 (gfc_match_do): Match DO CONCURRENT.
1644 (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
1645 match_forall_iterator, match_forall_header, match_simple_forall,
1646 gfc_match_forall): Move up in the file.
1647 * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
1648 * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
1649 * resolve.c (do_concurrent_flag): New global variable.
1650 (resolve_function, pure_subroutine, resolve_branch,
1651 gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
1653 * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
1654 * trans-stmt.c (gfc_trans_do_concurrent): New function.
1655 (gfc_trans_forall_1): Handle do concurrent.
1656 * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
1657 * trans.c (trans_code): Call it.
1658 * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
1660 2011-09-07 Janus Weil <janus@gcc.gnu.org>
1663 * primary.c (gfc_match_structure_constructor): Handle parsing of
1664 procedure pointers components in structure constructors.
1665 * resolve.c (resolve_structure_cons): Check interface of procedure
1666 pointer components. Changed wording of some error messages.
1668 2011-09-04 Janus Weil <janus@gcc.gnu.org>
1671 * trans-types.c (gfc_sym_type): Check for proc_name.
1673 2011-08-30 Tobias Burnus <burnus@net-b.de>
1676 * trans-common.c (build_common_decl): Warn if named common
1677 block's size is not everywhere the same.
1679 2011-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1682 * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
1684 2011-08-29 Janus Weil <janus@gcc.gnu.org>
1687 * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
1688 allocatable function results.
1690 2011-08-29 Tobias Burnus <burnus@net-b.de>
1692 * trans-decl.c (generate_coarray_sym_init): Use
1693 GFC_CAF_COARRAY_STATIC for static coarrays.
1695 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1697 * scanner.c (load_file): Don't abuse LC_RENAME reason while
1698 (indirectly) calling linemap_add.
1700 2011-08-26 Jakub Jelinek <jakub@redhat.com>
1702 * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
1704 * symbol.c (check_conflict): Allow threadprivate attribute with
1705 FL_PROCEDURE if proc_pointer.
1707 2011-08-25 Mikael Morin <mikael@gcc.gnu.org>
1710 * expr.c (gfc_free_shape): Do nothing if shape is NULL.
1711 (free_expr0): Remove redundant NULL shape check.
1712 * resolve.c (check_host_association): Ditto.
1713 * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
1715 * trans-io.c (transfer_array_component): Ditto.
1717 2011-08-25 Tobias Burnus <burnus@net-b.de>
1719 * trans-array.c (gfc_conv_descriptor_token): Add assert.
1720 * trans-decl.c (gfc_build_qualified_array,
1721 create_function_arglist): Handle assumed-shape arrays.
1722 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1723 * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
1724 add "caf_token" to assumed-shape descriptors, new akind argument.
1725 (gfc_get_array_type_bounds): Pass akind.
1726 * trans.h (lang_decl): New elements caf_offset and token.
1727 (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
1729 2011-08-25 Tobias Burnus <burnus@net-b.de>
1731 * trans-array.c (structure_alloc_comps): Fix for allocatable
1732 scalar coarray components.
1733 * trans-expr.c (gfc_conv_component_ref): Ditto.
1734 * trans-type.c (gfc_get_derived_type): Ditto.
1736 2011-08-24 Tobias Burnus <burnus@net-b.de>
1739 * expr.c (check_init_expr): Return when an error occured.
1741 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1743 * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
1745 2011-08-23 Tobias Burnus <burnus@net-b.de>
1748 * symbol.c (gfc_add_type): Better diagnostic if redefining
1749 use-associated symbol.
1750 * module.c (gfc_use_module): Use module name as locus.
1752 2011-08-22 Gabriel Charette <gchare@google.com>
1754 * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
1755 defined in cpp_define_builtins.
1757 2011-08-22 Mikael Morin <mikael@gcc.gnu.org>
1760 * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
1761 * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
1762 (free_expr0): Re-use gfc_free_shape.
1763 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1764 * trans-io.c (transfer_array_component): Ditto.
1765 * resolve.c (check_host_association): Ditto.
1766 (gfc_expr_to_initialize): Don't force the rank value and free the shape
1767 after updating the expression. Recalculate shape and rank.
1768 (resolve_where_shape): Re-use gfc_clear_shape.
1769 * array.c (gfc_array_ref_shape): Ditto.
1771 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1774 * expr.c (gfc_check_assign): Check for type conversions when the
1775 right-hand side is a constant REAL/COMPLEX contstant the left-hand
1776 side is also REAL/COMPLEX. Don't warn when a narrowing conversion
1777 for REAL does not change the value of the constant.
1779 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1782 * resolve.c (resolve_array_ref): Don't calculate upper bound
1783 if the stride is zero.
1785 2011-08-20 Janus Weil <janus@gcc.gnu.org>
1788 * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
1789 (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
1791 * frontend-passes.c (optimize_comparison): Ditto.
1792 * interface.c (gfc_check_typebound_override): Ditto.
1794 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1797 * parse.c (parse_where): Undo changes after emitting an error.
1799 2011-08-19 Jakub Jelinek <jakub@redhat.com>
1802 * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
1803 bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
1804 lhs needs reallocation.
1805 * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
1806 code is NULL, emit a barrier if workshare emitted no code at all
1807 and NOWAIT clause isn't present.
1809 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1812 * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
1813 * parse.c (check_statement_label): Accept ST_END_BLOCK and
1814 ST_END_ASSOCIATE as valid branch target.
1815 (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
1816 Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
1817 * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
1818 EXEC_END_NESTED_BLOCK.
1819 (resolve_branch): Ditto.
1820 (resolve_code): Add EXEC_END_NESTED_BLOCK case.
1821 * st.c (gfc_free_statement): Ditto.
1822 * trans.c (trans_code): Ditto.
1824 2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
1827 * symbol.c (gfc_get_st_label): Use the derived type namespace when
1828 we are parsing a derived type definition.
1830 2011-08-18 Tobias Burnus <burnus@net-b.de>
1833 * parse.c (parse_derived): Add lock_type
1834 checks, improve coarray_comp handling.
1835 * resolve.c (resolve_allocate_expr,
1836 resolve_lock_unlock, resolve_symbol): Fix lock_type
1839 2011-08-17 Tobias Burnus <burnus@net-b.de>
1842 * trans-decl.c (generate_local_decl): Warn about
1843 unused explicitly imported module variables/parameters.
1845 2011-08-17 Janus Weil <janus@gcc.gnu.org>
1848 * resolve.c (resolve_fl_variable): Reject non-constant character lengths
1849 in COMMON variables.
1851 2011-08-16 Tobias Burnus <burnus@net-b.de>
1852 Dominique Dhumieres <dominiq@lps.ens.fr>
1855 * resolve.c (resolve_symbol): Fix stupid typo.
1857 2011-08-15 Tobias Burnus <burnus@net-b.de>
1859 * resolve.c (resolve_symbol): Fix coarray result-var check.
1861 2011-08-14 Steven G. Kargl <kargl@gcc.gnu.org>
1863 * module.c (use_iso_fortran_env_module): Spell 'referrenced' correctly.
1865 2011-08-14 Janus Weil <janus@gcc.gnu.org>
1868 * decl.c (check_function_name): New function, separated off from
1869 'variable_decl' and slightly extended.
1870 (variable_decl,attr_decl1): Call it.
1872 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1874 * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
1876 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1877 Thomas Koenig <tkoenig@gcc.gnu.org>
1880 * dependency.c (are_identical_variables): For dummy arguments only
1881 check for equal names, not equal symbols.
1882 * interface.c (gfc_check_typebound_override): Add checking for rank
1883 and character length.
1885 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1888 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
1890 * dependency.c (gfc_are_identical_variables,are_identical_variables):
1891 Renamed the former to the latter and made static.
1892 (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
1893 commutativity of multiplication.
1894 (gfc_is_same_range,is_same_range): Renamed the former to the latter,
1895 made static and removed argument 'def'.
1896 (check_section_vs_section): Renamed 'gfc_is_same_range'.
1897 * gfortran.h (gfc_check_typebound_override): New prototype.
1898 * interface.c (gfc_check_typebound_override): Moved here from ...
1899 * resolve.c (check_typebound_override): ... here (and renamed).
1900 (resolve_typebound_procedure): Renamed 'check_typebound_override'.
1902 2011-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1905 * target-memory.c (gfc_target_expr-size): Don't clobber typespec
1907 * simplify.c (gfc_simplify_transfer): Don't calculate source_size
1910 2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1913 * gfortran.h (gfc_calculate_transfer_sizes): Add prototype.
1914 * target-memory.h (gfc_target_interpret_expr): Add boolean
1915 argument wether to convert wide characters.
1916 * target-memory.c (gfc_target_expr_size): Also return length
1917 of characters for non-constant expressions if these can be
1918 determined from the cl.
1919 (interpret_array): Add argument for gfc_target_interpret_expr.
1920 (gfc_interpret_derived): Likewise.
1921 (gfc_target_interpret_expr): Likewise.
1922 * check.c: Include target-memory.h.
1923 (gfc_calculate_transfer_sizes): New function.
1924 (gfc_check_transfer): When -Wsurprising is in force, calculate
1925 sizes and warn if result is larger than size (check moved from
1926 gfc_simplify_transfer).
1927 * simplify.c (gfc_simplify_transfer): Use
1928 gfc_calculate_transfer_sizes. Remove warning.
1930 2011-08-04 Richard Guenther <rguenther@suse.de>
1933 * trans-array.c (add_to_offset): New function.
1934 (gfc_conv_array_ref): Build the array index expression in optimally
1936 (gfc_walk_variable_expr): Adjust for the backward walk.
1938 2011-08-02 Daniel Kraft <d@domob.eu>
1941 * trans-array.c (gfc_trans_auto_array_allocation): Change
1942 gfc_start_block to gfc_init_block to avoid spurious extra-scope.
1944 2011-08-02 Tobias Burnus <burnus@net-b.de>
1946 * trans-array.c (gfc_array_allocate): Pass token to
1947 gfc_allocate_allocatable for -fcoarray=lib.
1948 * trans-stmt.c (gfc_trans_allocate): Update
1949 gfc_allocate_allocatable call.
1950 * trans.h (gfc_allocate_allocatable): Update prototype.
1951 (gfc_allocate_using_lib): Remove.
1952 * trans.c (gfc_allocate_using_lib): Make static, handle token.
1953 (gfc_allocate_allocatable): Ditto.
1955 2011-08-02 Jakub Jelinek <jakub@redhat.com>
1958 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
1959 * openmp.c (gfc_free_omp_clauses): Free also final_expr.
1960 (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
1961 (gfc_match_omp_clauses): Handle parsing final and mergeable
1963 (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
1964 (gfc_match_omp_taskyield): New function.
1965 (resolve_omp_clauses): Resolve final clause. Allow POINTERs and
1966 Cray pointers in clauses other than REDUCTION.
1967 (gfc_match_omp_atomic): Match optional
1968 read/write/update/capture keywords after !$omp atomic.
1969 (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1970 * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
1971 print final and mergeable clauses.
1972 (show_code_node): Handle EXEC_OMP_TASKYIELD.
1973 * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
1975 (gfc_trans_omp_taskyield): New function.
1976 (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
1977 (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1978 (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
1979 (gfc_omp_predetermined_sharing): Adjust comment.
1980 * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
1982 (gfc_omp_clauses): Add final_expr and mergeable fields.
1983 (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
1984 (gfc_omp_atomic_op): New enum typedef.
1985 (struct gfc_code): Add ext.omp_atomic.
1986 * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
1987 * frontend-passes.c (gfc_code_walker): Also walk final_expr.
1988 * resolve.c (gfc_resolve_blocks, resolve_code): Handle
1990 * st.c (gfc_free_statement): Likewise.
1991 * match.h (gfc_match_omp_taskyield): New prototype.
1992 * parse.c (decode_omp_directive): Handle taskyield directive.
1993 Handle !$omp end atomic.
1994 (case_executable): Add ST_OMP_TASKYIELD case.
1995 (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
1996 (parse_omp_atomic): Return gfc_statement instead of void.
1997 For !$omp atomic capture parse two assignments instead of
1998 just one and require !$omp end atomic afterwards, for
1999 other !$omp atomic forms just allow !$omp end atomic at the
2001 (parse_omp_structured_block, parse_executable): Adjust
2002 parse_omp_atomic callers.
2004 2011-08-02 Tobias Burnus <burnus@net-b.de>
2006 * intrinsic.c (OMP_LIB): Updated openmp_version's
2008 * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
2009 * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
2010 remove deleted omp_integer_kind and omp_logical_kind constants.
2012 2011-07-31 Janus Weil <janus@gcc.gnu.org>
2015 * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
2016 only call 'resolve_fl_derived0'.
2017 (resolve_typebound_procedures): Resolve typebound procedures of
2019 (resolve_fl_derived0): New function, which does a part of the work
2020 for 'resolve_fl_derived'.
2021 (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
2024 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2027 * expr.c (gfc_simplify_expr): If end of a string is less
2028 than zero, set it to zero.
2030 2011-07-28 Jakub Jelinek <jakub@redhat.com>
2033 * frontend-passes.c (optimize_minmaxloc): New function.
2034 (optimize_expr): Call it.
2036 2011-07-27 Tobias Burnus <burnus@net-b.de>
2039 * trans-types.c (gfc_get_derived_type): Ensure that pointer
2040 component types are marked as nonrestricted.
2042 2011-07-27 Daniel Carrera <dcarrera@gmail.com>
2045 * trans.c (gfc_allocate_using_malloc): Change function signature.
2046 Return nothing. New parameter "pointer". Eliminate temorary variables.
2047 (gfc_allocate_using_lib): Ditto.
2048 (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
2049 and gfc_allocate_using_malloc. Do not free and then reallocate a
2050 variable that is already allocated.
2051 (gfc_likely): New function. Basedon gfc_unlikely.
2052 * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
2053 Instructions to modify the array descriptor are stored in this block
2054 while other instructions continue to be stored in "pblock".
2055 (gfc_array_allocate): Update call to gfc_array_init_size. Move the
2056 descriptor_block so that the array descriptor is only updated if
2057 the array was allocated successfully.
2058 Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2059 * trans.h (gfc_allocate_allocatable): Change function signature.
2060 Function now returns void.
2061 (gfc_allocate_using_lib): Ditto, and new function parameter.
2062 (gfc_allocate_using_malloc): Ditto.
2063 * trans-openmp.c (gfc_omp_clause_default_ctor,
2064 gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
2065 to gfc_allocate_allocatable with gfc_allocate_using_malloc.
2066 * trans-stmt.c (gfc_trans_allocate): Update function calls for
2067 gfc_allocate_allocatable and gfc_allocate_using_malloc.
2069 2011-07-26 Tobias Burnus <burnus@net-b.de>
2071 * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
2072 (gfc_conv_descriptor_token): New function.
2073 * trans-array.h (gfc_conv_descriptor_token): New prototype.
2074 * trans-types.c (gfc_get_array_descriptor_base): For coarrays
2075 with -fcoarray=lib, append "void *token" to the array descriptor.
2076 (gfc_array_descriptor_base_caf): New static variable.
2077 * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
2078 when passing a descriptor coarray to a nondescriptor dummy.
2080 2011-07-23 Tobias Burnus <burnus@net-b.de>
2082 * resolve.c (resolve_symbol): Fix coarray var decl check.
2084 2011-07-21 Daniel Carrera <dcarrera@gmail.com>
2086 * trans.c (gfc_allocate_with_status): Split into two functions
2087 gfc_allocate_using_malloc and gfc_allocate_usig_lib.
2088 (gfc_allocate_using_malloc): The status parameter is now the
2089 actual status rather than a pointer. Code cleanup.
2090 (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
2091 errlen. Pass these to the coarray lib.
2092 * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
2093 gfc_allocate_allocatable.
2094 (gfc_omp_clause_copy_ctor): Ditto.
2095 (gfc_trans_omp_array_reduction): Ditto.
2096 * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
2097 gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
2098 fuctions. If using coarray lib, pass errmsg and errlen to the allocate
2099 functions. Move error checking outside the if (!gfc_array_allocate)
2100 block so that it also affects trees produced by gfc_array_allocate.
2101 * trans-array.c (gfc_array_allocate): Add new parameters errmsg
2102 and errlen. Replace parameter pstat by status. Code cleanup. Update
2103 calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2104 * trans-array.h (gfc_array_allocate): Update signature of
2107 2011-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
2109 * gfortran.texi: Remove a duplicate word.
2111 2011-07-21 Tobias Burnus <burnus@net-b.de>
2113 * check.c (gfc_check_present): Allow coarrays.
2114 * trans-array.c (gfc_conv_array_ref): Avoid casting
2115 when a pointer is wanted.
2116 * trans-decl.c (create_function_arglist): For -fcoarray=lib,
2117 handle hidden token and offset arguments for nondescriptor
2119 * trans-expr.c (get_tree_for_caf_expr): New function.
2120 (gfc_conv_procedure_call): For -fcoarray=lib pass the
2121 token and offset for nondescriptor coarray dummies.
2122 * trans.h (lang_type): Add caf_offset tree.
2123 (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
2125 2011-07-19 Tobias Burnus <burnus@net-b.de>
2127 * expr.c (gfc_is_coarray): New function.
2128 * gfortran.h (gfc_is_coarray): New prototype.
2129 * interface.c (compare_parameter): Use it.
2131 2011-07-19 Richard Guenther <rguenther@suse.de>
2133 * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
2134 (gfc_trans_string_copy): Likewise.
2135 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
2136 * trans-types.c (gfc_get_array_descr_info): Likewise.
2137 * trans.c (gfc_build_array_ref): Likewise.
2139 2011-07-19 Janus Weil <janus@gcc.gnu.org>
2142 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
2144 2011-07-18 Tobias Burnus <burnus@net-b.de>
2146 * trans-decl.c (gfc_build_qualified_array): Make coarray's
2147 token TYPE_QUAL_RESTRICT.
2149 2011-07-18 Tobias Burnus <burnus@net-b.de>
2151 * resolve.c (resolve_transfer): Mention defined I/O
2152 in the diagnostic for alloc_comp/pointer_comp.
2154 2011-07-17 Tobias Burnus <burnus@net-b.de>
2157 * module.c (check_for_ambiguous): Check whether the name is matches
2158 the current program unit.
2160 2011-07-17 Tobias Burnus <burnus@net-b.de>
2163 * expr.c (gfc_check_pointer_assign): Fix checking for invalid
2166 2011-07-16 Tobias Burnus <burnus@net-b.de>
2168 * expr.c (gfc_ref_this_image): New function.
2169 (gfc_is_coindexed): Use it.
2170 * gfortran.h (gfc_ref_this_image): New prototype.
2171 * resolve.c (resolve_deallocate_expr,
2172 resolve_allocate_expr): Support alloc scalar coarrays.
2173 * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
2174 gfc_conv_descriptor_cosize, gfc_array_allocate,
2175 gfc_trans_deferred_array): Ditto.
2176 * trans-expr.c (gfc_conv_variable) Ditto.:
2177 * trans-stmt.c (gfc_trans_deallocate): Ditto.
2178 * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
2179 gfc_get_array_descr_info): Ditto.
2180 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2182 2011-07-11 Jakub Jelinek <jakub@redhat.com>
2185 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
2186 inner_size to gfc_index_one_node instead of integer_one_node.
2188 2011-07-10 Tobias Burnus <burnus@net-b.de>
2191 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
2193 2011-07-09 Uros Bizjak <ubizjak@gmail.com>
2196 * expr.c (gfc_get_corank): Change return value to int.
2197 * gfortran.h (gfc_get_corank): Update function prototype.
2199 2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
2202 * resolve.c (resolve_symbol): Force resolution of function result's
2203 array specification.
2205 2011-07-07 Tobias Burnus <burnus@net-b.de>
2207 * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
2208 with NULL arguments for (new) stat=/errmsg= arguments.
2210 2011-07-06 Daniel Carrera <dcarrera@gmail.com>
2212 * trans-array.c (gfc_array_allocate): Rename allocatable_array to
2213 allocatable. Rename function gfc_allocate_array_with_status to
2214 gfc_allocate_allocatable_with_status. Update function call for
2215 gfc_allocate_with_status.
2216 * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
2217 gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
2218 * trans-stmt.c (gfc_trans_allocate): Update function call for
2219 gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
2220 to gfc_allocate_allocatable_with_status.
2221 * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
2222 so it uses the library for memory allocation when -fcoarray=lib.
2223 (gfc_allocate_allocatable_with_status): Renamed from
2224 gfc_allocate_array_with_status.
2225 (gfc_allocate_allocatable_with_status): Update function call for
2226 gfc_allocate_with_status.
2227 * trans.h (gfc_coarray_type): New enum.
2228 (gfc_allocate_with_status): Update prototype.
2229 (gfc_allocate_allocatable_with_status): Renamed from
2230 gfc_allocate_array_with_status.
2231 * trans-decl.c (generate_coarray_sym_init): Use the new constant
2232 GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
2234 2011-07-06 Richard Guenther <rguenther@suse.de>
2236 * f95-lang.c (gfc_init_decl_processing):
2237 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2239 2011-07-04 Jakub Jelinek <jakub@redhat.com>
2242 * gfortranspec.c (lang_specific_driver): Ignore options with
2243 CL_ERR_MISSING_ARG errors.
2245 2011-07-02 Janus Weil <janus@gcc.gnu.org>
2248 * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
2250 2011-06-30 Jakub Jelinek <jakub@redhat.com>
2253 * gfortran.h (gfc_constructor): Add repeat field.
2254 * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
2255 * array.c (current_expand): Add repeat field.
2256 (expand_constructor): Copy repeat.
2257 * constructor.c (node_free, node_copy, gfc_constructor_get,
2258 gfc_constructor_lookup): Handle repeat field.
2259 (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
2260 * data.h (gfc_assign_data_value): Add mpz_t * argument.
2261 (gfc_assign_data_value_range): Removed.
2262 * constructor.h (gfc_constructor_advance): Removed.
2263 (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
2264 * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
2265 also handle overwriting a range with a single entry.
2266 (gfc_assign_data_value_range): Removed.
2267 * resolve.c (check_data_variable): Adjust gfc_assign_data_value
2268 call. Use gfc_assign_data_value instead of
2269 gfc_assign_data_value_expr.
2271 2011-06-27 Janus Weil <janus@gcc.gnu.org>
2274 * trans-array.c (structure_alloc_comps): Make sure sub-components
2275 and extended types are correctly deallocated.
2277 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
2279 * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
2280 * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
2281 * trans-decl.c: Add sync_ or SYNC__ to builtin names.
2283 2011-06-21 Janus Weil <janus@gcc.gnu.org>
2286 * class.c (gfc_find_derived_vtab): Make vtab and default initialization
2287 symbols SAVE_IMPLICIT.
2289 2011-06-20 Tobias Burnus <burnus@net-b.de>
2292 * gfortran.h (gfc_check_vardef_context): Update prototype.
2293 (iso_fortran_env_symbol): Handle derived types.
2294 (symbol_attribute): Add lock_comp.
2295 * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
2296 * interface.c (compare_parameter, gfc_procedure_use): Handle
2298 (compare_actual_formal): Update
2299 gfc_check_vardef_context call.
2300 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
2301 * intrinsic.c (check_arglist): Ditto.
2302 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
2303 * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
2304 * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
2305 * module.c (mio_symbol_attribute): Handle lock_comp.
2306 (create_derived_type): New function.
2307 (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
2308 * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
2309 * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
2310 checks for LOCK_TYPE.
2311 (gfc_resolve_iterator, resolve_deallocate_expr,
2312 resolve_allocate_expr, resolve_code, resolve_transfer): Update
2313 gfc_check_vardef_context call.
2314 * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
2315 * trans-stmt.c (gfc_trans_lock_unlock): New function.
2316 * trans.c (trans_code): Handle LOCK and UNLOCK.
2318 2011-06-18 Janus Weil <janus@gcc.gnu.org>
2321 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
2324 2011-06-17 Janus Weil <janus@gcc.gnu.org>
2327 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
2328 make sure the vtab is present.
2330 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2333 * interface.c (gfc_extend_assign): Propagate the locus from the
2334 assignment to the type-bound procedure call.
2336 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2339 * module.c (mio_component): Make sure the 'class_ok' attribute is set
2340 for use-associated CLASS components.
2341 * parse.c (parse_derived): Check for 'class_ok' attribute.
2342 * resolve.c (resolve_fl_derived): Ditto.
2344 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2346 * frontend-passes.c (remove_trim): New function.
2347 (optimize_assignment): Use it.
2348 (optimize_comparison): Likewise. Return correct status
2349 for previous change.
2351 2011-06-12 Tobias Burnus
2354 * trans-expr.c (gfc_trans_assignment_1): Tell
2355 gfc_trans_scalar_assign to also deep-copy RHS nonvariables
2356 with allocatable components.
2357 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
2359 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2361 * frontend-passes.c (optimize_assignment): Follow chains
2362 of concatenation operators to the end for removing trailing
2363 TRIMS for assignments.
2365 2011-06-10 Daniel Carrera <dcarrera@gmail.com>
2367 * trans-decl.c (gfc_build_builtin_function_decls):
2368 Updated declaration of caf_sync_all and caf_sync_images.
2369 * trans-stmt.c (gfc_trans_sync): Function
2370 can now handle a "stat" variable that has an integer type
2371 different from integer_type_node.
2373 2011-06-09 Richard Guenther <rguenther@suse.de>
2375 * trans.c (gfc_allocate_array_with_status): Mark error path
2378 2011-06-08 Tobias Burnus <burnus@net-b.de>
2381 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
2382 (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
2383 (gfc_code): Add expr4.
2384 * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
2385 * match.c (gfc_match_lock, gfc_match_unlock,
2386 lock_unlock_statement): New functions.
2387 (sync_statement): Bug fix, avoiding double freeing.
2388 (gfc_match_if): Handle LOCK/UNLOCK statement.
2389 * parse.c (decode_statement, next_statement,
2390 gfc_ascii_statement): Ditto.
2391 * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
2392 * resolve.c (resolve_lock_unlock): New function.
2393 (resolve_code): Call it.
2394 * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
2396 2011-06-07 Richard Guenther <rguenther@suse.de>
2398 * f95-lang.c (gfc_init_decl_processing): Do not set
2399 size_type_node or call set_sizetype.
2401 2011-06-05 Tobias Burnus <burnus@net-b.de>
2404 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
2407 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net>
2408 Thomas Koenig <tkoenig@gcc.gnu.org>
2410 * dump-parse-tree.c (show_symbol): Don't dump namespace
2411 for ENTRY to avoid infinite recursion.
2413 2011-06-02 Asher Langton <langton2@llnl.gov>
2416 * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
2417 pointees as AS_EXPLICIT.
2419 2011-06-02 Asher Langton <langton2@llnl.gov>
2422 * decl.c (variable_decl): Merge current_as before copying to cp_as.
2424 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
2427 * decl.c (gfc_match_modproc): Allow for a double colon in a module
2428 procedure statement.
2429 * parse.c ( decode_statement): Deal with whitespace around :: in
2432 2011-05-31 Tobias Burnus <burnus@net-b.de>
2435 * intrinsic.c (klass): Add CLASS_ATOMIC.
2436 (add_subroutines): Add atomic_ref/atomic_define.
2437 * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
2438 * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
2439 gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
2440 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
2441 and GFC_ISYM_ATOMIC_REF.
2442 (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
2443 * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
2445 * check.c (gfc_check_atomic, gfc_check_atomic_def,
2446 gfc_check_atomic_ref): New functions.
2447 * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
2448 ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
2449 * trans-intrinsic.c (conv_intrinsic_atomic_def,
2450 conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
2452 (conv_intrinsic_move_alloc) Renamed from
2453 gfc_conv_intrinsic_move_alloc - and made static.
2454 * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
2455 (gfc_conv_intrinsic_subroutine) Add prototype.
2456 * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
2457 * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
2459 (gfc_init_kinds): Set them.
2461 2011-05-31 Tobias Burnus <burnus@net-b.de>
2464 * trans-array.c (gfc_trans_dummy_array_bias): Handle
2465 cobounds of assumed-shape arrays.
2467 2011-05-31 Tobias Burnus <burnus@net-b.de>
2470 * resolve.c (resolve_fl_variable): Handle static coarrays
2471 with non-constant cobounds.
2473 2011-05-29 Janus Weil <janus@gcc.gnu.org>
2476 * module.c (mio_component_ref): Handle components of extended types.
2477 * symbol.c (gfc_find_component): Return is sym is NULL.
2479 2011-05-29 Tobias Burnus <burnus@net-b.de>
2482 * interface.c (compare_parameter): Add check for passing coarray
2483 to allocatable noncoarray dummy.
2485 2011-05-29 Tobias Burnus <burnus@net-b.de>
2486 Richard Guenther <rguenther@suse.de>
2489 * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
2490 the type's TREE_TYPE.
2491 * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
2492 * trans.c (gfc_build_array_ref): Ditto.
2494 2011-05-27 Tobias Burnus <burnus@net-b.de>
2497 * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
2498 * match.c (gfc_match_nullify): Ditto.
2499 * resolve.c (resolve_deallocate_expr): Ditto.
2500 * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
2503 2011-05-27 Tobias Burnus <burnus@net-b.de>
2506 * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
2507 * intrinsic.c (add_functions): Add rank intrinsic.
2508 (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
2509 * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
2510 * simplify.c (gfc_simplify_rank): New function.
2511 * intrinsic.texi (RANK): Add description for rank intrinsic.
2512 * check.c (gfc_check_rank): New function.
2514 2011-05-26 Paul Thomas <pault@gcc.gnu.org>
2515 Thomas Koenig <tkoenig@gcc.gnu.org>
2518 * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
2519 changed to GFC_ENABLE_REVERSE.
2520 * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
2521 to GFC_INHIBIT_REVERSE.
2522 * gfortran.h: Enum gfc_reverse is now GFC_ENABLE_REVERSE,
2523 GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
2524 * dependency.c (gfc_dep_resolver): Change names for elements of
2525 gfc_reverse as necessary. Change the logic so that forward
2526 dependences are remembered as well as backward ones. When both
2527 have appeared, force a temporary.
2529 2011-05-26 Tobias Burnus <burnus@net-b.de>
2532 * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
2533 * trans-decl.c (has_coarray_vars, caf_init_block,
2534 gfor_fndecl_caf_register): New file-global variables.
2535 (gfc_finish_var_decl): Make sure that coarrays in main are static.
2536 (gfc_build_qualified_array): Generate coarray token variable.
2537 (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
2538 (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
2539 (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
2541 (generate_local_decl): Check for local coarrays.
2542 (create_main_function): SYNC ALL before calling MAIN.
2543 (generate_coarray_sym_init): Register static coarray.
2544 (generate_coarray_init): Generate CAF registering constructor
2546 (gfc_generate_function_code): Call it, if needed, do not create
2548 (gfc_generate_module_vars, gfc_process_block_locals): Call
2549 generate_coarray_init.
2550 * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
2552 * trans.h (gfor_fndecl_caf_register): New variable.
2553 (lang_type): New element caf_token.
2554 (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
2556 2011-05-24 Joseph Myers <joseph@codesourcery.com>
2558 * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
2559 (gfortran$(exeext)): Use libcommon-target.a.
2561 2011-05-22 Thomas Koenig <tkoenig@gcc.gnu.org>
2563 * frontend-passes.c (cfe_register_funcs): Also register
2564 character functions if their charlens are known and constant.
2565 Also register allocatable functions.
2567 2011-05-21 Janus Weil <janus@gcc.gnu.org>
2570 * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
2571 selector is ALLOCATABLE.
2573 2011-05-20 Janus Weil <janus@gcc.gnu.org>
2576 * module.c (write_dt_extensions): Do not write extended types which
2577 are local to a subroutine.
2579 2011-05-20 Joseph Myers <joseph@codesourcery.com>
2581 * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
2583 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
2585 * gfortran.texi (set_fpe): Update documentation.
2586 * invoke.texi (-ffpe-trap): Likewise.
2587 * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
2588 * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
2589 precision an alias for it.
2591 2011-05-19 Tobias Burnus <burnus@net-b.de>
2594 * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
2595 (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
2597 * trans.c (gfc_build_array_ref): Return original type not variant
2598 copy for scalar coarrays.
2599 * trans-array.c (gfc_conv_array_ref): Ditto.
2601 2011-05-18 Janus Weil <janus@gcc.gnu.org>
2604 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
2605 argument to avoid memory leaks.
2607 2011-05-16 Tobias Burnus <burnus@net-b.de>
2609 * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
2610 (Fortran 2008 status): Multi-image support for coarrays.
2611 (TR 19113 status): New section.
2613 2011-05-15 Tobias Burnus <burnus@net-b.de>
2616 actual argument is not an array; rank mismatch is diagnosted later.
2617 * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
2619 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2621 2011-05-15 Joern Rennecke <amylaar@spamcop.net>
2624 * trans-types.c: Include "tm.h".
2625 [0] (c_size_t_size): Remove.
2627 2011-05-15 Janne Blomqvist <jb@gcc.gnu.org>
2630 * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
2631 is now the default, the library defaults to backtracing disabled.
2633 2011-05-14 Tobias Burnus <burnus@net-b.de>
2635 * lang.opt (fdump-core): Re-add as ignored option
2636 for backward compatibility.
2638 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2641 * gfortran.texi: Update mixed-language programming section
2642 reflecting the removal of the fdump-core option, and that
2643 -fbacktrace is now enabled by default.
2645 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2648 * frontend-passes.c (cfe_register_funcs): Also register functions
2649 for potential elimination if the rank is > 0, the shape is unknown
2650 and reallocate on assignment is active.
2651 (create_var): For rank > 0 functions with unknown shape, create
2652 an allocatable temporary.
2654 2011-05-14 Tobias Burnus <burnus@net-b.de>
2657 * interface.c (compare_parameter): Skip diagnostic if
2658 actual argument is not an array; rank mismatch is diagnosted later.
2660 2011-05-14 Tobias Burnus <burnus@net-b.de>
2662 * options.c (gfc_init_options, gfc_post_options): Enable
2663 -fstack-arrays by default if -Ofast is used.
2664 * invoke.texi (-fstack-arrays): Document this.
2666 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2669 * gfortran.h (gfc_option_t): Remove flag_dump_core.
2670 * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
2671 (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
2672 * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
2673 * invoke.texi: Remove -fdump-core, document that -fbacktrace is
2675 * lang.opt: Remove -fdump-core.
2676 * options.c (gfc_init_options): Make backtrace default to enabled,
2678 (gfc_handle_option): Remove OPT_fdump-core.
2679 * trans-decl.c: Pass a 0 to preserve ABI.
2681 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2683 * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
2685 2011-05-13 Tobias Burnus <burnus@net-b.de>
2688 * io.c (resolve_tag_format, resolve_tag): Make sure
2689 that the string is of default kind.
2690 (gfc_resolve_inquire): Also resolve decimal tag.
2692 2011-05-12 Tobias Burnus <burnus@net-b.de>
2695 * resolve.c (resolve_intrinsic): Don't resolve module
2696 intrinsics multiple times.
2698 2011-05-11 Tobias Burnus <burnus@net-b.de>
2701 * expr.c (gfc_is_constant_expr): Use e->value.function.esym
2702 instead of e->symtree->n.sym, if available.
2704 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2706 * f95-lang.c (global_bindings_p): Return bool and simplify.
2708 2011-05-07 Tobias Burnus <burnus@net-b.de>
2712 * trans.h: Move gfc_init_coarray_decl prototype ...
2713 * gfortran.h: ... to here.
2714 * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
2715 (gfc_parse_file): Update translate_all_program_units call.
2716 * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
2717 new argument whether DECL_EXTERNAL should be used.
2718 (create_main_function): Update gfc_init_coarray_decl call.
2719 * trans-intrinsic.c (trans_this_image, trans_image_index,
2720 conv_intrinsic_cobound): Ditto.
2722 2011-05-06 Tobias Burnus <burnus@net-b.de>
2725 * trans-array.c (gfc_walk_variable_expr): Continue walking
2726 for scalar coarrays.
2727 * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
2728 (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
2729 (trans_this_image): Fix algorithm.
2730 * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
2731 gfc_sym_type): Handle scalar coarrays.
2733 2011-05-06 Tobias Burnus <burnus@net-b.de>
2737 * lang.opt (std=f2008tr): New.
2738 * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
2739 * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
2740 procedures for -std=f2008tr/gnu/legacy.
2741 (gfc_match_import): Set sym to NULL.
2742 * options.c (set_default_std_flags,gfc_handle_option): Handle
2744 * invoke.texi (-std=): Document -std=f2008tr.
2746 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2748 * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
2749 * trans-io.c (add_case): Likewise.
2750 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2751 (gfc_trans_character_select): Likewise.
2753 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2755 * trans-decl.c (trans_function_start): Do not set
2756 dont_save_pending_sizes_p.
2758 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2760 * trans.h (gfc_chainon_list): Delete.
2761 * trans.c (gfc_chainon_list): Delete.
2763 2011-05-04 Tobias Burnus <burnus@net-b.de>
2766 * invoke.texi (fno-protect-parens): Document
2767 that -Ofast implies -fno-protect-parens.
2768 * options.c (gfc_init_options, gfc_post_options):
2769 Make -Ofast imply -fno-protect-parens.
2771 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2773 * trans-decl.c (build_library_function_decl_1): Call
2774 build_function_type_vec. Adjust argument list building accordingly.
2775 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
2776 * trans-types.c (gfc_get_function_type): Likewise.
2778 2011-05-04 Richard Guenther <rguenther@suse.de>
2780 * trans-array.c (gfc_trans_array_constructor_value): Use
2781 size_int for bounds of range types.
2782 (gfc_trans_array_constructor_value): Use size_type_node
2783 for memcpy argument.
2784 * trans-common.c (build_field): Use gfc_charlen_type_node
2786 * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
2787 as type to build_int_cst.
2788 * trans-const.c (gfc_build_string_const): Use size_int
2789 for bounds of range types.
2790 (gfc_build_wide_string_const): Likewise.
2791 * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
2793 (gfc_trans_character_select): Likewise.
2794 (gfc_trans_character_select): Do not pass NULL
2795 as type to build_int_cst.
2796 (gfc_trans_character_select): Use size_int for bounds of range types.
2797 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2798 (add_case): Do not pass NULL as type to build_int_cst.
2799 (transfer_expr): Likewise.
2800 (transfer_array_desc): Likewise.
2801 * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
2803 (gfc_trans_assign_aux_var): Likewise.
2804 (create_main_function): Use size_int for bounds of range types.
2805 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
2806 NULL as type to build_int_cst.
2807 (gfc_conv_intrinsic_spacing): Likewise.
2808 (gfc_conv_intrinsic_rrspacing): Likewise.
2809 (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
2811 2011-05-04 Richard Guenther <rguenther@suse.de>
2813 * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
2814 argument to int_const_binop.
2816 2011-05-03 Tobias Burnus <burnus@net-b.de>
2819 * trans-intrinsic.c (trans_this_image): Implement version with
2821 (conv_intrinsic_cobound): Simplify code.
2822 (gfc_conv_intrinsic_function): Call trans_this_image for
2823 this_image(coarray) except for -fcoarray=single.
2825 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
2828 * gfortran.texi: Document the 'Q' exponent-letter extension.
2829 * invoke.texi: Document -Wreal-q-constant.
2830 * lang.opt: Add -Wreal-q-constant option.
2831 * gfortran.h: Add warn_real_q_constant to option struct.
2832 * primary.c (match_real_constant): Use it. Accept 'Q' as
2833 exponent-letter for REAL(16) real-literal-constant with a
2834 fallback to REAL(10) or error if REAL(10) is not available.
2835 * options.c (gfc_init_options, set_Wall) Set it.
2836 (gfc_handle_option): Handle new option.
2838 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2840 * dump-prase-tree.c (show_code_node): Set the current
2841 namespace to the BLOCK before displaying it; restore
2844 2011-04-30 Tobias Burnus <burnus@net-b.de>
2847 * decl.c (gfc_match_import): Don't try to find the
2848 symbol if already found.
2850 2011-04-30 Paul Thomas <pault@gcc.gnu.org>
2853 * trans-expr.c (fcncall_realloc_result): Set the bounds and the
2854 offset so that the lbounds are one.
2855 (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
2857 2011-04-29 Paul Thomas <pault@gcc.gnu.org>
2860 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
2861 automatic reallocation when the lhs is a target.
2864 * trans-expr.c (fcncall_realloc_result): Make sure that the
2865 result dtype field is set before the function call.
2867 2011-04-29 Tobias Burnus <burnus@net-b.de>
2870 * resolve.c (resolve_typebound_generic_call): Don't check access
2871 flags of the specific function.
2874 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
2875 to AS_ASSUMED_SHAPE for function results.
2876 (resolve_fl_var_and_proc): Print also for function results with
2877 AS_DEFERRED an error, if they are not a pointer or allocatable.
2878 (resolve_types): Make sure arguments of procedures in interface
2879 blocks are resolved.
2881 2011-04-29 Michael Matz <matz@suse.de>
2883 * options.c (options.c): Set warn_maybe_uninitialized.
2885 2011-04-28 Tobias Burnus <burnus@net-b.de>
2888 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
2889 function results only once.
2890 (resolve_symbol): Always resolve function results.
2893 * expr.c (gfc_check_vardef_context): Fix handling of generic
2895 * interface.c (check_interface0): Reject internal functions
2896 in generic interfaces, unless -std=gnu.
2898 2011-04-27 Tobias Burnus <burnus@net-b.de>
2901 * resolve.c (resolve_global_procedure): Error recovery -
2902 avoid segfault for (non)character-returning functions.
2904 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2906 * decl.c (gfc_match_end): Check that the block name starts
2908 * parse.c (gfc_build_block_ns): Make block names unique by
2911 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2913 * frontend-passes.c (inserted_block): New variable.
2914 (changed_statement): Likewise.
2915 (create_var): Encase statement to be operated on in a BLOCK.
2916 Adjust code insertion for BLOCK.
2917 (cfe_code): Set inserted_block and changed_statement to NULL.
2919 2011-04-23 Tobias Burnus <burnus@net-b.de>
2922 * module.c (mio_array_spec): Set as->cotype on reading.
2923 * resolve.c (resolve_allocate_expr): Fix allocating coarray
2926 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2929 * frontend_passes (cfe_register_funcs): Remove workaround for DO
2931 (gfc_code_walker): Make sure the pointer to the current
2932 statement doen't change when other statements are inserted.
2934 2011-04-21 Tobias Burnus <burnus@net-b.de>
2937 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
2939 2011-04-20 Jim Meyering <meyering@redhat.com>
2941 * expr.c (free_expr0): Remove useless if-before-free.
2942 * gfortranspec.c (lang_specific_pre_link): Likewise.
2943 * interface.c (gfc_extend_expr): Likewise.
2944 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2946 2011-04-19 Tobias Burnus <burnus@net-b.de>
2951 * module.c (fix_mio_expr): Commit created symbol.
2953 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2955 * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
2957 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2959 * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
2962 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2964 * misc.c (gfc_getmem): Remove function.
2965 * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
2966 usage with XCNEW or XCNEWVEC.
2967 * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
2969 * options.c (gfc_handle_module_path_options)
2970 (gfc_get_option_string): Likewise.
2971 * resolve.c (gfc_resolve_forall): Likewise.
2972 * simplify.c (simplify_transformation_to_array): Likewise.
2973 * target-memory.c (gfc_target_interpret_expr): Likewise.
2974 * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
2975 (get_init_field): Likewise.
2976 * trans-expr.c (gfc_conv_statement_function): Likewise.
2977 * trans-io.c (nml_full_name): Likewise.
2978 * trans-stmt.c (gfc_trans_forall_1): Likewise.
2979 * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
2981 2011-04-19 Tobias Burnus <burnus@net-b.de>
2984 * parse.c (resolve_all_program_units): Skip modules.
2985 (translate_all_program_units): Handle modules.
2986 (gfc_parse_file): Defer code generation for modules.
2988 2011-04-19 Martin Jambor <mjambor@suse.cz>
2990 * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
2991 instead of cgraph_get_create_node.
2993 2011-04-18 Jim Meyering <meyering@redhat.com>
2995 remove now-unused definition of gfc_free
2996 * misc.c (gfc_free): Remove function.
2997 * gfortran.h (gfc_free): Remove its prototype.
2999 2011-04-18 Jim Meyering <meyering@redhat.com>
3001 convert each use of gfc_free (p) to free (p)
3002 Do that by running this command:
3003 perl -pi -e 's/\bgfc_free ?\(/free (/' \
3004 $(git grep -El '\bgfc_free ?\(')
3005 which also corrects the few uses that lacked a space between
3006 the function name and the open parenthesis.
3007 Manually undo the change to the function definition itself
3008 and its prototype. They'll be removed next.
3009 * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
3010 * constructor.c (node_free): Likewise.
3011 * cpp.c (dump_queued_macros): Likewise.
3012 * data.c (gfc_assign_data_value): Likewise.
3013 * decl.c (free_variable, free_value, gfc_free_data): Likewise.
3014 (gfc_free_data_all, match_old_style_init): Likewise.
3015 (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
3017 (gfc_match_modproc): Likewise.
3018 * dependency.c (check_section_vs_section): Likewise.
3019 * error.c (gfc_pop_error, gfc_free_error): Likewise.
3020 * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
3021 (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
3022 (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
3024 * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
3025 (strip_function_call, optimize_comparison): Likewise.
3026 * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
3027 (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
3029 * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
3030 (gfc_convert_chartype): Likewise.
3031 * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
3033 (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
3034 * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
3035 (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
3037 (free_case, gfc_free_forall_iterator): Likewise.
3039 * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
3040 (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
3041 (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
3042 (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
3043 (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
3044 (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
3045 * openmp.c (gfc_free_omp_clauses): Likewise.
3046 * options.c (gfc_post_options): Likewise.
3047 * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
3048 * primary.c (gfc_free_structure_ctor_component): Likewise.
3049 * resolve.c (resolve_structure_cons, check_host_association): Likewise.
3050 (gfc_resolve_forall, resolve_equivalence): Likewise.
3051 * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
3052 (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
3053 (load_file, gfc_read_orig_filename): Likewise.
3054 * simplify.c (simplify_transformation_to_array): Likewise.
3055 (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
3057 (gfc_simplify_compiler_options): Likewise.
3058 * st.c (gfc_free_statement, gfc_free_statements): Likewise.
3059 (gfc_free_association_list): Likewise.
3060 * symbol.c (free_components, gfc_free_st_label, free_st_labels):
3062 (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
3063 (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
3064 (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
3065 (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
3067 (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
3068 (gfc_free_namespace): Likewise.
3069 * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
3070 (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
3071 (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
3072 * trans-common.c (get_init_field, create_common): Likewise.
3073 * trans-const.c (gfc_build_wide_string_const): Likewise.
3074 (gfc_conv_string_init): Likewise.
3075 * trans-decl.c (gfc_generate_function_code): Likewise.
3076 * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
3078 (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
3079 (gfc_trans_subarray_assign): Likewise.
3080 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
3081 * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
3082 (transfer_namelist_element, transfer_array_component): Likewise.
3083 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
3084 * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
3085 * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
3088 2011-04-15 Jim Meyering <meyering@redhat.com>
3090 gfortran: remove cpp definition of free, ...
3091 in preparation for the s/gfc_free/free/ transformation.
3092 * gfortran.h (free): Remove macro definition that would otherwise
3093 prevent direct use of the function.
3095 2011-04-18 Tobias Burnus <burnus@net-b.de>
3098 * array.c (gfc_match_array_ref): Check for too many codimensions.
3099 * check.c (gfc_check_image_index): Check number of elements
3101 * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
3103 2011-04-18 Tobias Burnus <burnus@net-b.de>
3106 * iresolve.c (gfc_resolve_image_index): Set ts.type.
3107 * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
3108 are not known at compile time and handle -fcoarray=lib.
3109 * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
3111 (conv_intrinsic_cobound): Fix comment typo.
3112 (trans_this_image): New function.
3113 * trans-array.c (gfc_unlikely): Move to trans.c.
3114 * trans.c (gfc_unlikely): Function moved from trans-array.c.
3115 (gfc_trans_runtime_check): Use it.
3116 * trans-io.c (gfc_trans_io_runtime_check): Ditto.
3117 * trans.h (gfc_unlikely): Add prototype.
3119 2011-04-18 Paul Thomas <pault@gcc.gnu.org>
3122 * trans-expr.c (fcncall_realloc_result): Renamed version of
3123 realloc_lhs_bounds_for_intrinsic_call that does not touch the
3124 descriptor bounds anymore but makes a temporary descriptor to
3126 (gfc_trans_arrayfunc_assign): Modify the reference to above
3129 2011-05-17 Tobias Burnus <burnus@net-b.de>
3132 * trans-decl.c (gfc_get_extern_function_decl): Fix decl
3133 for external procedures with proc arguments.
3135 2011-04-15 Michael Matz <matz@suse.de>
3137 * trans-array.c (toplevel): Include gimple.h.
3138 (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
3139 properly expand variable length arrays.
3140 (gfc_trans_auto_array_allocation): If flag_stack_arrays create
3141 variable length decls and associate them with their scope.
3142 * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
3143 * options.c (gfc_init_options): Handle -fstack_arrays option.
3144 * lang.opt (fstack-arrays): Add option.
3145 * invoke.texi (Code Gen Options): Document it.
3146 * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
3148 2011-04-15 Tobias Burnus <burnus@net-b.de>
3151 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
3152 code which is also causing an ICE.
3154 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3156 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
3158 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3160 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
3163 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
3167 * trans-array.c (get_std_lbound): For derived type variables
3168 return array valued component lbound.
3170 2011-04-12 Martin Jambor <mjambor@suse.cz>
3172 * trans-decl.c (gfc_generate_function_code): Call
3173 cgraph_get_create_node instead of cgraph_node.
3175 2011-04-11 Tobias Burnus <burnus@net-b.de>
3178 * simplify.c (simplify_bound_dim): Exit for
3179 ucobound's last dimension unless -fcoarray=single.
3180 * trans-array (gfc_conv_descriptor_size_1): Renamed from
3181 gfc_conv_descriptor_size, made static, has now from_dim and
3183 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
3184 (gfc_conv_descriptor_cosize): New function.
3185 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
3186 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
3187 and handle last codim of ucobound for when -fcoarray is not "single".
3189 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3192 * gfortran.h (gfc_option_t): Add warn_function_elimination and
3193 flag_frontend_optimize.
3194 * lang.opt (Wfunction-elimination): Add.
3195 (ffrontend-optimize): Add.
3196 * invoke.texi: Add documentation for -Wfunction-elimination
3197 and -ffrontend-optimize. Add -faggressive-function-elimination
3198 to list of code generation options.
3199 * frontend-passes.c (gfc_run_passes): Run optimizations if
3200 flag_frontend_optimize is set.
3201 (warn_function_elimination): New function.
3202 (cfe_expr_0): Call it if requested to do so.
3203 * options.c (gfc_init_options): Initiate warn_function_elimination
3204 and flag_frontend_optimize.
3205 (gfc_post_options): Set flag_frontend_optimize if not specified
3206 by user, depending on the optimization level.
3207 (gfc_handle_option): Handle -Wfunction-elimination and
3208 -ffrontend-optimize.
3210 2011-04-06 Tobias Burnus <burnus@net-b.de>
3213 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
3214 call for this_image.
3216 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
3218 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
3219 build_function_type_list instead of build_function_type. Correct
3220 argument order for func_frexp and func_scalbn.
3222 2011-04-05 Duncan Sands <baldrick@free.fr>
3224 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
3226 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
3228 * frontend-passes: (optimize_lexical_comparison): New function.
3229 (optimize_expr): Call it.
3230 (optimize_comparison): Also handle lexical comparison functions.
3231 Return false instad of -2 for unequal comparison.
3233 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
3236 * frontend-passes (cfe_expr_0): Reverse the order of going
3239 2011-04-04 Tobias Burnus <burnus@net-b.de>
3240 Mikael Morin <mikael.morin@sfr.fr>
3243 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
3244 * expr.c (gfc_is_coindexed): Ditto.
3245 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
3246 * interface.c (compare_parameter): Use gfc_expr_attr and
3248 * resolve.c (check_dimension, compare_spec_to_ref,
3249 resolve_allocate_expr, check_data_variable): Update for
3251 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
3252 gfc_simplify_ucobound): Allow non-constant bounds.
3253 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
3254 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
3255 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
3256 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
3257 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
3258 gfc_conv_ss_startstride, gfc_conv_loop_setup,
3259 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
3260 gfc_walk_variable_expr): Handle codimen.
3261 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
3262 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
3263 (conv_intrinsic_cobound): New function.
3264 (gfc_conv_intrinsic_function): Call it.
3265 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
3266 ucobound, lcobound, this_image.
3267 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
3268 (gfc_get_dtype): Honour corank.
3269 (gfc_get_nodesc_array_type): Save corank and codimensions.
3270 (gfc_get_array_type_bounds): Save cobound.
3271 * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
3272 (gfc_array_kind): Add corank item.
3273 (GFC_TYPE_ARRAY_CORANK): New macro.
3275 2011-04-03 Kai Tietz <ktietz@redhat.com>
3278 * Make-lang.in (f95-lang.o): Add some missing dependencies.
3280 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3283 * frontend-passes (cfe_register_funcs): Don't
3284 register functions if they appear as iterators in DO loops.
3286 2011-03-30 Michael Matz <matz@suse.de>
3289 * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
3290 don't use local variable.
3291 (gfc_trans_arrayfunc_assign): Adjust caller.
3293 2011-03-29 Janus Weil <janus@gcc.gnu.org>
3296 * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
3297 * module.c (MOD_VERSION): Bump.
3298 (mio_typespec): Read/write 'interface' field.
3299 * primary.c (match_string_constant,match_logical_constant): Remove
3301 (match_complex_constant): Make sure to clear the typespec.
3303 2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
3305 * frontend-passes.c (create_var): Warn about creating an
3306 array temporary if requested.
3308 2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3311 * frontend-passes.c (optimize_trim): Also follow references, except
3312 when they are substring references or array references.
3314 2011-03-27 Tobias Burnus <burnus@net-b.de>
3317 * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
3318 GFC_ISYM_NUM_IMAGES.
3319 (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
3320 * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
3322 * invoke.texi (-fcoarray=): Document "lib" argument.
3323 * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
3324 * libgfortran.h (libgfortran_stat_codes): Add comments.
3325 * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
3326 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
3327 Handle GFC_FCOARRAY_LIB.
3328 * trans.h (gfc_init_coarray_decl): New prototype.
3329 (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
3330 gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
3331 gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
3332 gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
3333 gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
3334 New global variables.
3335 * trans-decl.c: Declare several CAF functions (cf. above).
3336 (gfc_build_builtin_function_decls): Initialize those.
3337 (gfc_init_coarray_decl): New function.
3338 (create_main_function): Call CAF init/finalize functions.
3339 * trans-intrinsic.c (trans_this_image, trans_num_images): New.
3340 (gfc_conv_intrinsic_function): Call those.
3341 * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
3342 Add code for GFC_FCOARRAY_LIB.
3344 2011-03-26 Janus Weil <janus@gcc.gnu.org>
3347 * class.c (get_unique_hashed_string): Adjust maximum allowable length
3348 for unique type string.
3350 2011-03-25 Kai Tietz <ktietz@redhat.com>
3352 * scanner.c (preprocessor_line): Use filename_cmp
3355 2011-03-25 Tobias Burnus <burnus@net-b.de>
3359 * trans-types.c (gfc_get_function_type): Don't use varargs if the
3360 procedure is known to have no arguments.
3362 2011-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3365 * gfortran.h (gfc_option_t): Add
3366 flag_aggressive_function_elimination.
3367 (gfc_dep_compare_functions): Add prototype.
3368 * lang.opt: Add faggressive-function-elimination.
3369 * invoke.texi: Document -faggressive-function-elimination.
3370 * frontend_passes (expr_array): New static variable.
3371 (expr_size): Likewise.
3372 (expr_count): Likewise.
3373 (current_code): Likewise.
3374 (current_ns): Likewise.
3375 (gfc_run_passes): Allocate and free space for expressions.
3376 (cfe_register_funcs): New function.
3377 (create_var): New function.
3378 (cfc_expr_0): New function.
3379 (cfe_code): New function.
3380 (optimize_namespace): Invoke gfc_code_walker with cfe_code
3382 * dependency.c (gfc_dep_compare_functions): New function.
3383 (gfc_dep_compare_expr): Use it.
3384 * options.c (gfc_init_options): Handle
3385 flag_aggressive_function_elimination.
3386 (gfc_handle_option): Likewise.
3388 2011-03-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3390 * arith.c (arith_power): Plug memory leak.
3392 2011-03-12 Janus Weil <janus@gcc.gnu.org>
3395 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
3396 for polymorphic arguments.
3398 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3401 * intrinsic.texi: Clarify doc of logarithm functions.
3403 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3406 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
3407 the string length variable.
3409 2011-03-11 Janus Weil <janus@gcc.gnu.org>
3412 * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
3413 (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
3415 2011-03-06 Paul Thomas <pault@gcc.gnu.org>
3416 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3419 * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
3420 the expression has an iterator. Otherwise, iterate through the
3421 array, checking for constant expressions for each element.
3423 2011-03-04 Janne Blomqvist <jb@gcc.gnu.org>
3426 * intrinsic.texi: Update CTIME and FDATE documentation.
3428 2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3430 * invoke.texi (Option Summary, Fortran Dialect Options)
3431 (Preprocessing Options, Runtime Options, Code Gen Options):
3432 Fix vertical list spacing by using @itemx for additinoal
3433 items, empty line before @table. Fix typos.
3435 2011-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3438 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
3440 2011-02-26 Tobias Burnus <burnus@net-b.de>
3443 * trans-stmt.c (gfc_trans_allocate): Fix allocation with
3444 type-spec of deferred-length strings.
3446 2011-02-26 Tobias Burnus <burnus@net-b.de>
3449 * openmp.c (gfc_resolve_omp_directive): Resolve if()
3450 condition of OpenMP's task.
3452 2011-02-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3455 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
3457 2011-02-24 Tobias Burnus <burnus@net-b.de>
3460 * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
3461 multitable for linebreak between different syntax variants.
3463 2011-02-24 Richard Guenther <rguenther@suse.de>
3466 * f95-lang.c (pushdecl): For externs in non-global scope push
3467 a copy of the decl into the BLOCK.
3469 2011-02-23 Mikael Morin <mikael@gcc.gnu.org>
3472 * trans.c (gfc_prepend_expr_to_block): New function.
3473 * trans.h (gfc_prepend_expr_to_block): Declare.
3474 * trans-array.c (gfc_conv_array_parameter): Replace
3475 gfc_add_expr_to_block with gfc_prepend_expr_to_block.
3477 2011-02-22 Paul Thomas <pault@gcc.gnu.org>
3480 * trans-decl.c (gfc_get_extern_function_decl): Don't use the
3481 gsymbol backend_decl if the procedure has a formal argument
3482 that is a procedure.
3484 2011-02-22 Tobias Burnus <burnus@net-b.de>
3487 * trans-stmt.c (gfc_trans_if_1): Use correct line for
3488 expressions in the if condition.
3490 2011-02-20 Tobias Burnus <burnus@net-b.de>
3493 * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
3494 gfc_restore_backend_locus to have better debug locations.
3495 * trans-array.c (gfc_trans_deferred_array): Ditto.
3497 2011-02-20 Paul Thomas <pault@gcc.gnu.org>
3501 * trans-types.c (gfc_get_derived_type): Remove code that looks
3502 for decls in gsym and add call to gfc_get_module_backend_decl.
3503 * trans.h: Add prototype for gfc_get_module_backend_decl.
3504 * trans-decl.c (gfc_get_module_backend_decl): New function.
3505 (gfc_get_symbol_decl): Call it.
3507 2011-02-19 Paul Thomas <pault@gcc.gnu.org>
3510 * trans-array.c (get_array_ctor_all_strlen): Move up in file.
3511 (get_array_ctor_var_strlen): Add block dummy and add call to
3512 get_array_ctor_all_strlen instead of giving up on substrings.
3513 Call gcc_unreachable for default case.
3514 (get_array_ctor_strlen): Add extra argument to in call to
3515 get_array_ctor_var_strlen.
3517 2011-02-18 Janus Weil <janus@gcc.gnu.org>
3520 * primary.c (gfc_match_structure_constructor): Handle empty parent
3523 2011-02-18 Tobias Burnus
3526 * trans-expr.c (arrayfunc_assign_needs_temporary): Use
3527 esym to check whether the specific procedure returns an
3528 allocatable or pointer.
3530 2011-02-18 Michael Matz <matz@suse.de>
3533 * gfortran.h (struct gfc_component): Add norestrict_decl member.
3534 * trans.h (struct lang_type): Add nonrestricted_type member.
3535 * trans-expr.c (gfc_conv_component_ref): Search fields with correct
3537 * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
3538 (gfc_sym_type): Use it.
3540 2011-02-18 Janus Weil <janus@gcc.gnu.org>
3543 * resolve.c (resolve_transfer): Reject variables with procedure pointer
3546 2011-02-18 Janus Weil <janus@gcc.gnu.org>
3549 * gfortran.h (gfc_check_access): Removed prototype.
3550 (gfc_check_symbol_access): Added prototype.
3551 * module.c (gfc_check_access): Renamed to 'check_access', made static.
3552 (gfc_check_symbol_access): New function, basically a shortcut for
3554 (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
3555 'gfc_check_symbol_access'.
3556 (write_operator,write_module): Renamed 'gfc_check_access'.
3557 * resolve.c (resolve_fl_procedure,resolve_fl_derived,
3558 resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
3559 'gfc_check_symbol_access'.
3561 2011-02-16 Janus Weil <janus@gcc.gnu.org>
3564 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
3565 * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
3566 'gfc_build_class_symbol'.
3567 (gfc_match_decl_type_spec): Reject unlimited polymorphism.
3568 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
3569 * match.c (select_type_set_tmp): Move setting of 'class_ok' into
3570 'gfc_build_class_symbol'.
3571 * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
3573 2011-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
3576 . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
3578 2011-02-14 Janus Weil <janus@gcc.gnu.org>
3581 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
3583 2011-02-14 Janus Weil <janus@gcc.gnu.org>
3586 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
3588 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
3591 2011-02-14 Janus Weil <janus@gcc.gnu.org>
3594 * interface.c (get_expr_storage_size): Handle derived-type components.
3596 2011-02-13 Tobias Burnus <burnus@net-b.de>
3599 * interface.c (compare_parameter): Avoid ICE with
3600 character components.
3602 2011-02-12 Janus Weil <janus@gcc.gnu.org>
3604 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
3605 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
3606 'gfc_build_class_symbol'.
3608 2011-02-12 Michael Matz <matz@suse.de>
3609 Janus Weil <janus@gcc.gnu.org>
3610 Tobias Burnus <burnus@net-b.de>
3613 * trans-expr.c (conv_parent_component_references): Avoid unintendent
3614 skipping of parent compounds.
3616 2011-02-11 Tobias Burnus <burnus@net-b.de>
3619 * resolve.c (resolve_formal_arglist): PURE with VALUE
3620 and no INTENT: Add -std= diagnostics.
3622 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3625 * resolve.c (resolve_procedure_interface): If interface has a result
3626 variable, copy the typespec and set result pointer to self.
3628 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3631 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
3633 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3636 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
3638 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3640 * io.c (match_io_element): Do not set dt if not inquire.
3642 2011-02-08 Janus Weil <janus@gcc.gnu.org>
3645 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
3646 initialization target.
3648 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
3649 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3651 * gfortran.texi (Thread-safety): texinfo styling fixes.
3652 * intrinsic.texi: Likewise.
3654 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3656 * gfortran.texi (Compiler Characteristics): Add reference to
3657 thread-safety section.
3659 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3661 * gfortran.texi (Thread-safety): New section.
3662 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
3664 (GET_ENVIRONMENT_VARIABLE): Likewise.
3667 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
3670 * trans-stmt.c (gfc_trans_allocate): For deferred character
3671 length allocations with SOURCE, store to the values and string
3672 length to avoid calculating twice. Replace gfc_start_block
3673 with gfc_init_block to avoid unnecessary contexts and to keep
3674 declarations of temporaries where they should be. Tidy up the
3677 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
3680 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
3682 2011-02-02 Janus Weil <janus@gcc.gnu.org>
3683 Paul Thomas <pault@gcc.gnu.org>
3686 * trans-expr.c (gfc_trans_class_init_assign): Add call to
3687 gfc_get_derived_type.
3688 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
3691 2011-02-02 Janus Weil <janus@gcc.gnu.org>
3694 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
3696 2011-02-01 Janus Weil <janus@gcc.gnu.org>
3699 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
3700 pointer components with allocatable result.
3702 2011-01-31 Janus Weil <janus@gcc.gnu.org>
3705 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
3706 with pointer or allocatable result.
3708 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
3711 * trans-stmt.c (gfc_trans_allocate): Improve handling of
3712 deferred character lengths with SOURCE.
3713 * iresolve.c (gfc_resolve_repeat): Calculate character
3714 length from source length and ncopies.
3715 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
3716 expressions for ALLOCATE.
3718 2011-01-31 Janus Weil <janus@gcc.gnu.org>
3721 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
3722 an argument of a typebound assignment being a component.
3724 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3726 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
3727 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
3729 2011-01-31 Tobias Burnus <burnus@net-b.de>
3732 * resolve.c (resolve_fl_procedure): Reject stmt functions
3733 with pointer/allocatable attribute.
3735 2011-01-31 Tobias Burnus <burnus@net-b.de>
3738 * interface.c (gfc_procedure_use): Add explicit interface check for
3739 pointer/allocatable functions.
3741 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
3744 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
3745 expr and is assigned to a deferred character length scalar,
3746 make sure that the function is called before reallocation,
3747 so that the length is available. Include procedure pointer
3748 and procedure pointer component rhs as well.
3753 * gfortran.dg/allocatable_function_5.f90: New test not added by
3754 mistake on 2011-01-28.
3756 2011-01-29 Tobias Burnus <burnus@net-b.de>
3759 * check.c (gfc_check_shape): Support kind argument in SHAPE.
3760 * intrinsic.c (add_functions): Ditto.
3761 * resolve.c (gfc_resolve_shape): Ditto.
3762 * simplify.c (gfc_simplify_shape): Ditto.
3763 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
3764 gfc_simplify_shape): Update prototypes.
3765 * intrinisc.text (SHAPE): Document kind argument.
3767 2011-01-28 Tobias Burnus <burnus@net-b.de>
3770 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
3771 attribute also without INTENT.
3773 2011-01-28 Tobias Burnus <burnus@net-b.de>
3775 * gfortran.texi (Fortran 2003 status): Mention support for
3776 nonconstant namelist variables.
3778 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
3779 Tobias Burnus <burnus@gcc.gnu.org>
3784 * interface.c (compare_actual_formal): An allocatable or pointer
3785 deferred length actual is only allowed if the formal argument
3786 is also deferred length. Clean up whitespace.
3787 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
3788 deferred character length formal arguments by reference. Do the
3789 same for function results.
3790 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
3791 and rhs character lengths, if deferred length lhs. In this case
3792 set the lhs character length to that of the rhs.
3793 (gfc_conv_string_parameter): Remove assert that string length is
3795 (is_scalar_reallocatable_lhs): New function.
3796 (alloc_scalar_allocatable_for_assignment): New function.
3797 (gfc_trans_assignment_1): Call above new function. If the rhs is
3798 a deferred character length itself, makes ure that the function
3799 is called before reallocation, so that the length is available.
3800 (gfc_trans_asssignment): Remove error about assignment to
3801 deferred length character variables.
3802 * gfortran.texi: Update entry about (re)allocation on
3804 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
3805 length character variables.
3806 * module.c (mio_typespec): Transfer deferred characteristic.
3807 * trans-types.c (gfc_get_function_type): New code to generate
3808 hidden typelist, so that those character lengths that are
3809 passed by reference get the right type.
3810 * resolve.c (resolve_contained_fntype): Supress error for
3811 deferred character length functions.
3812 (resolve_function, resolve_fl_procedure) The same.
3813 (check_symbols): Remove the error that support for
3814 entity with deferred type parameter is not yet implemented.
3815 (resolve_fl_derived): The same.
3816 match.c (alloc_opt_list): Allow MOLD for deferred length object.
3817 * trans-decl.c (gfc_get_symbol_decl): For deferred character
3818 length dummies, generate a local variable for string length.
3819 (create_function_arglist): Hidden length can be a pointer.
3820 (gfc_trans_deferred_vars): For deferred character length
3821 results and dummies, assign the string length to the local
3822 variable from the hidden argument on entry and the other way
3823 round on exit, as appropriate.
3825 2011-01-27 Tobias Burnus <burnus@net-b.de>
3828 * trans-decl.c (gfc_generate_function_code): Fix init
3829 of allocatable result variable with allocatable components.
3831 2011-01-27 Tobias Burnus <burnus@net-b.de>
3834 * options.c (gfc_handle_module_path_options): Save
3835 module path without trailing slash as include path.
3837 2011-01-25 Tobias Burnus <burnus@net-b.de>
3840 * interface.c (gfc_check_operator_interface): Fix
3841 defined-assignment check.
3843 2011-01-23 Tobias Burnus <burnus@net-b.de>
3846 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
3847 scalar allocatable dummy arguments.
3849 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3852 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
3853 check for array sections followed by component references
3854 which are illegal. Also check for coindexed arguments.
3856 2011-01-22 Tobias Burnus <burnus@net-b.de>
3859 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
3862 2011-01-21 Tobias Burnus <burnus@net-b.de>
3865 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
3866 Use defined instead of magic number exit status codes.
3867 * scanner.c (include_line, gfc_new_file): Ditto.
3869 2011-01-21 Tobias Burnus <burnus@net-b.de>
3872 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
3873 without pointer attribute.
3875 2011-01-18 Janus Weil <janus@gcc.gnu.org>
3878 * resolve.c (expression_rank): Fix rank of procedure poiner components.
3879 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
3880 pointer components as actual arguments.
3882 2011-01-17 Jakub Jelinek <jakub@redhat.com>
3885 * gfortran.h (struct gfc_omp_saved_state): New type.
3886 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
3887 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
3889 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
3892 2011-01-17 Tobias Burnus <burnus@net-b.de>
3895 * invoke.texi (Options to request or suppress errors
3896 and warnings): Fix cross link.
3898 2011-01-15 Tobias Burnus <burnus@net-b.de>
3900 * gfortran.texi: Update Fortran 2003 Status section.
3903 * invoke.texi: Add missing "-E" to the -dM example.
3905 2011-01-13 Tobias Burnus <burnus@net-b.de>
3908 * intrinsic.texi (get_command_argument, get_environment_variable):
3909 Mark arguments as optional in the Arguments section.
3911 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
3912 Tobias Burnus <burnus@net-b.de>
3915 * trans-decl.c (gfc_get_extern_function_decl,
3916 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
3917 calling decl_attributes.
3919 2011-01-13 Tobias Burnus <burnus@net-b.de>
3920 Mikael Morin <mikael@gcc.gnu.org>
3924 * gfortran.h (gfc_code): Move union ext's case_list into
3926 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
3928 * frontend-passes.c (gfc_code_walker): Ditto.
3929 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
3930 gfc_match_type_is, gfc_match_class_is): Ditto.
3931 * resolve.c (resolve_select, resolve_select_type): Ditto.
3932 * st.c (gfc_free_statement): Ditto.
3933 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
3934 gfc_trans_character_select): Ditto.
3935 * parse.c (resolve_all_program_units): For error recovery, avoid
3936 segfault is proc_name is NULL.
3938 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
3941 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
3942 to be standard compliant by testing for shape rather than size
3943 before skipping reallocation. Improve comments.
3945 2011-01-09 Janus Weil <janus@gcc.gnu.org>
3948 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
3951 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
3954 * resolve.c (is_scalar_expr_ptr): For a substring reference,
3955 use gfc_dep_compare_expr to compare start and end expession.
3956 Add FIXME for using gfc_deb_compare_expr elsewhere.
3958 2011-01-09 Janus Weil <janus@gcc.gnu.org>