1 2012-01-02 Tobias Burnus <burnus@net-b.de>
4 * trans-intrinsic.c (trans_this_image, trans_image_index,
5 trans_num_images, conv_intrinsic_cobound): Fold_convert the
6 caf_num_images/caf_this_images variables to the correct int kind.
8 2012-01-01 Jakub Jelinek <jakub@redhat.com>
10 * gfortranspec.c (lang_specific_driver): Update copyright notice
13 2011-12-31 Thomas König <tkoenig@gcc.gnu.org>
16 * expr.c (gfc_check_vardef_context): When determining
17 implicit pure status, also check for variable definition
18 context. Walk up namespaces until a procedure is
19 found to reset the implict pure attribute.
20 * resolve.c (gfc_implicit_pure): Walk up namespaces
21 until a procedure is found.
23 2011-12-29 Thomas Koenig <tkoenig@gcc.gnu.org>
25 * dependency.c (gfc_dep_compare_functions): Document
26 new behavior for REALs and complex. Add comment to cases
27 where only INTEGERs are handled. Compare REAL and COMPLEX
28 constants, returning 0 and -2 only. Add assert to make
29 sure that only integer constants are compared.
31 2011-12-19 Tobias Burnus <burnus@net-b.de>
34 * parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as
37 2011-12-19 Tobias Burnus <burnus@net-b.de>
40 * match.c (gfc_match_select_type): Handle
41 scalar polymophic coarrays.
42 (select_type_set_tmp, ): Ditto; avoid segfault if !class_ok.
43 * primary.c (gfc_match_rvalue): Avoid segfault if !class_ok.
44 * resolve.c (resolve_select_type): Ditto.
45 (resolve_assoc_var): Fix setting the TARGET attribute for
46 polymorphic selectors which are pointers.
48 2011-12-19 Tobias Burnus <burnus@net-b.de>
50 * check.c (coarray_check): Add class ref if needed.
51 * resolve.c (resolve_fl_var_and_proc,
52 resolve_fl_derived0, resolve_symbol): Fix checking
55 2011-12-15 Paul Thomas <pault@gcc.gnu.org>
57 * trans-expr.c (gfc_walk_function_expr): Detect elemental
58 procedure components as well as elemental procedures.
59 * trans-array.c (gfc_conv_procedure_call): Ditto.
60 * trans-decl.c (gfc_trans_deferred_vars): Correct erroneous
61 break for class pointers to continue.
63 2011-12-15 Toon Moene <toon@moene.org>
66 * resolve.c (build_default_init_expr): Allow non-allocatable,
67 non-compile-time-constant-shape arrays to have a default
69 * invoke.texi: Delete the restriction on automatic arrays not
70 being initialized by -finit-<type>=<constant>.
72 2011-12-15 Tobias Burnus <burnus@net-b.de>
78 * resolve.c (resolve_fl_derived0): Print not-implemented error
79 for deferred-length character components.
81 2011-12-15 Tobias Burnus <burnus@net-b.de>
83 * primary.c (gfc_match_varspec): Match array spec for
85 (gfc_match_rvalue): If a symbol of unknown flavor has a
86 codimension, mark it as a variable.
87 * simplify.c (gfc_simplify_image_index): Directly call
89 * trans-intrinsic.c (trans_this_image): Fix handling of
92 2011-12-15 Jakub Jelinek <jakub@redhat.com>
95 * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span.
96 (gfc_trans_deferred_vars): Instead add its runtime initialization
99 2011-12-11 Tobias Burnus <burnus@net-b.de>
102 * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
103 if the front end has printed a warning.
104 (gfc_generate_function_code): Fix unset-result warning.
106 2011-12-11 Paul Thomas <pault@gcc.gnu.org>
107 Tobias Burnus <burnus@gcc.gnu.org>
116 * interface.c (symbol_rank): Return the rank of the _data
117 component of class objects.
118 (compare_parameter): Also compare the derived type of the class
119 _data component for type mismatch. Similarly, return 1 if the
120 formal and _data ranks match.
121 (compare_actual_formal): Do not compare storage sizes for class
122 expressions. It is an error if an actual class array, passed to
123 a formal class array is not full.
124 * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get,
125 gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get,
126 gfc_vtable_extends_get, gfc_vtable_def_init_get,
127 gfc_vtable_copy_get): New functions for class API.
128 (gfc_conv_derived_to_class): For an array reference in an
129 elemental procedure call retain the ss to provide the
130 scalarized array reference. Moved in file.
131 (gfc_conv_class_to_class): New function.
132 (gfc_conv_subref_array_arg): Use the type of the
133 class _data component as a basetype.
134 (gfc_conv_procedure_call): Ensure that class array expressions
135 have both the _data reference and an array reference. Use
136 gfc_conv_class_to_class to handle class arrays for elemental
137 functions in scalarized loops, class array elements and full
138 class arrays. Use a call to gfc_conv_subref_array_arg in order
139 that the copy-in/copy-out for passing class arrays to derived
140 type arrays occurs correctly.
141 (gfc_conv_expr): If it is missing, add the _data component
142 between a class object or component and an array reference.
143 (gfc_trans_class_array_init_assign): New function.
144 (gfc_trans_class_init_assign): Call it for array expressions.
145 * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for
146 class scalars since their size will depend on the dynamic type.
147 (build_class_array_ref): New function.
148 (gfc_conv_scalarized_array_ref): Call build_class_array_ref.
149 (gfc_array_init_size): Add extra argument, expr3, that represents
150 the SOURCE argument. If present,use this for the element size.
151 (gfc_array_allocate): Also add argument expr3 and use it when
152 calling gfc_array_init_size.
153 (structure_alloc_comps): Enable class arrays.
154 * class.c (gfc_add_component_ref): Carry over the derived type
155 of the _data component.
156 (gfc_add_class_array_ref): New function.
157 (class_array_ref_detected): New static function.
158 (gfc_is_class_array_ref): New function that calls previous.
159 (gfc_is_class_scalar_expr): New function.
160 (gfc_build_class_symbol): Throw not implemented error for
161 assumed size class arrays. Remove error that prevents
163 (gfc_build_class_symbol): Prevent pointer/allocatable conflict.
164 Also unset codimension.
165 (gfc_find_derived_vtab): Make 'copy' elemental and set the
166 intent of the arguments accordingly.:
167 * trans-array.h: Update prototype for gfc_array_allocate.
168 * array.c (gfc_array_dimen_size): Return failure if class expr.
169 (gfc_array_size): Likewise.
170 * gfortran.h: New prototypes for gfc_add_class_array_ref,
171 gfc_is_class_array_ref and gfc_is_class_scalar_expr.
172 * trans-stmt.c (trans_associate_var): Exclude class targets
173 from test. Move the allocation of the _vptr to an earlier time
175 (trans_associate_var): Assign the descriptor directly for class
177 (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments.
178 Convert array element references into sections. Do not invoke
179 gfc_conv_procedure_call, use gfc_trans_call instead.
180 * expr.c (gfc_get_corank): Fix for BT_CLASS.
181 (gfc_is_simply_contiguous): Exclude class from test.
182 * trans.c (gfc_build_array_ref): Include class array refs.
183 * trans.h: Include prototypes for class API functions that are
184 new in trans-expr. Define GFC_DECL_CLASS(node).
185 * resolve.c (check_typebound_baseobject ): Remove error for
186 non-scalar base object.
187 (resolve_allocate_expr): Ensure that class _data component is
188 present. If array, call gfc_expr_to_intialize.
189 (resolve_select): Remove scalar error for SELECT statement as a
191 (resolve_assoc_var): Update 'target' (aka 'selector') as
192 needed. Ensure that the target expression has the right rank.
193 (resolve_select_type): Ensure that target expressions have a
195 (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS.
196 * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where
198 (gfc_trans_deferred_vars): Get class arrays right.
199 * match.c(select_type_set_tmp): Add array spec to temporary.
200 (gfc_match_select_type): Allow class arrays.
201 * check.c (array_check): Ensure that class arrays have refs.
202 (dim_corank_check, dim_rank_check): Retrun success if class.
203 * primary.c (gfc_match_varspec): Fix for class arrays and
204 co-arrays. Make sure that class _data is present.
205 (gfc_match_rvalue): Handle class arrays.
206 *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array
208 (gfc_conv_allocated): Add _data component to class expressions.
209 (gfc_add_intrinsic_ss_code): ditto.
210 * simplify.c (simplify_cobound): Fix for BT_CLASS.
211 (simplify_bound): Return NULL for class arrays.
212 (simplify_cobound): Obtain correct array_spec. Use cotype as
213 appropriate. Use arrayspec for bounds.
215 2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
218 * frontend-passes.c (in_omp_workshare): New variable.
219 (cfe_expr_0): Don't eliminiate common function if it would put
220 the variable immediately into a WORKSHARE construct.
221 (optimize_namespace): Set in_omp_workshare.
222 (gfc_code_walker): Keep track of OMP PARALLEL and OMP WORKSHARE
225 2011-12-10 Tobias Burnus <burnus@net-b.de>
227 * trans-decl.c (add_argument_checking): Fix syntax.
229 2011-12-10 Tobias Burnus <burnus@net-b.de>
230 Kai Tietz <ktietz@redhat.com>
232 * trans-decl.c (add_argument_checking): Check ts.deferred earlier.
233 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long.
235 2011-12-08 Tobias Burnus <burnus@net-b.de>
238 * trans-decl.c (add_argument_checking): Skip bound checking
239 for deferred-length strings.
241 2011-12-08 Tobias Burnus <burnus@net-b.de>
244 * symbol.c (gfc_find_component): Fix access check of parent
247 2011-12-08 Tobias Burnus <burnus@net-b.de>
250 * io/transfer.c (require_numeric_type): New function.
251 (formatted_transfer_scalar_read, formatted_transfer_scalar_write):
252 Use it, allow BOZ edit descriptors with F2008.
254 2011-12-08 Tobias Burnus <burnus@net-b.de>
257 * fortran/trans-array.c (get_std_lbound): Fix handling of
258 conversion functions.
260 2011-12-08 Toon Moene <toon@moene.org>
263 * invoke.texi: Itemize the cases for which
264 -finit-<type>=<constant> doesn't work.
266 2011-12-06 Tobias Burnus <burnus@net-b.de>
269 * expr.c (gfc_has_default_initializer): Fix handling of
270 DT with initialized pointer components.
272 2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>
275 * dependency.c (are_identical_variables): Handle case where
276 end fields of substring references are NULL.
278 2011-12-04 Tobias Burnus <burnus@net-b.de>
281 * resolve.c (find_array_spec): Use ref->u.c.component
282 directly without starting from ts.u.derived.
284 2011-12-03 Tobias Burnus <burnus@net-b.de>
287 * match.c (select_type_set_tmp): Don't set allocatable/pointer
289 * class.c (gfc_build_class_symbol): Handle
290 attr.select_type_temporary.
292 2011-12-03 Tobias Burnus <burnus@net-b.de>
295 * check.c (variable_check): Fix intent(in) check.
297 2011-12-03 Tobias Burnus <burnus@net-b.de>
299 * check.c (gfc_check_move_alloc): Allow nonpolymorphic
300 FROM with polymorphic TO.
301 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
302 nonpolymorphic FROM with polymorphic TO.
304 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
306 * module.c (dt_lower_string): Make static.
307 (dt_upper_string): Likewise.
309 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
312 * module.c (parse_string): Read string into resizable array
313 instead of parsing twice and seeking.
314 (peek_atom): New implementation avoiding seeks.
315 (require_atom): Save and set column and line explicitly for error
318 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
320 * misc.c (gfc_open_file): Don't call stat.
322 2011-11-29 Thomas Koenig <tkoenig@gcc.gnu.org>
325 * module.c (prev_module_line): New variable.
326 (prev_module_column): New variable.
327 (prev_character): New variable.
328 (module_char): Update the new variables.
329 (module_unget_char): New function.
330 (parse_string): Use module_unget_char.
331 (parse_integer): Likewise.
332 (parse_name): Likewise.
334 2011-11-29 Tobias Burnus <burnus@net-b.de>
338 * check.c (gfc_check_move_alloc): Make sure that from/to
339 are both polymorphic or neither.
340 * trans-intrinsic.c (conv_intrinsic_move_alloc): Cleanup,
341 generate inline code.
343 2011-11-28 Tobias Burnus <burnus@net-b.de>
344 Steven G. Kargl <kargl@gcc.gnu.org>
347 * symbol.c (check_conflict): Ignore BIND(C) + PARAMETER
348 conflicts for ISO_C_BINDING variables.
349 (gen_special_c_interop_ptr): Don't mark c_ptr_null/c_funptr_null
352 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
354 * trans-array.c (set_loop_bounds): Remove dead conditions.
356 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
360 * trans-array.c (gfc_trans_create_temp_array): Get dimension from
361 the right gfc_ss struct.
363 2011-11-25 Tobias Burnus <burnus@net-b.de>
366 * trans-decl.c (gfc_get_module_backend_decl): Also copy
367 ts.u.derived from the gsym if the ts.type is BT_CLASS.
368 (gfc_get_extern_function_decl): Copy also the backend_decl
369 for the symbol's ts.u.{derived,cl} from the gsym.
370 * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
371 return if "from" and "to" are the same.
373 2011-11-25 Tobias Burnus <burnus@net-b.de>
376 * trans-stmt.c (gfc_trans_simple_do): Add a fold_convert.
378 2011-11-24 Tobias Burnus <burnus@net-b.de>
381 * resolve.c (pure_subroutine): If called subroutine is
382 impure, unset implicit_pure.
383 (resolve_function): Move impure check to simplify code.
385 2011-11-19 Tobias Burnus <burnus@net-b.de>
388 * class.c (gfc_find_derived_vtab): Mark __def_init as PARAMETER
389 and hence as TREE_READONLY; add subroutine attribute to
393 * trans.h (GFC_DECL_PUSH_TOPLEVEL): New DECL_LANG_FLAG_7.
394 * trans-decl.c (gfc_get_symbol_decl): Mark __def_init and vtab as
395 GFC_DECL_PUSH_TOPLEVEL.
396 (gfc_generate_function_code): If GFC_DECL_PUSH_TOPLEVEL, push it there.
397 (build_function_decl): Push __copy_ procedure to the toplevel.
399 2011-11-16 Tobias Burnus <burnus@net-b.de>
403 * decl.c (match_data_constant, match_data_constant, variable_decl,
404 gfc_match_decl_type_spec, access_attr_decl,
405 check_extended_derived_type, gfc_match_derived_decl,
406 gfc_match_derived_decl, gfc_match_derived_decl) Modified to deal
407 with DT constructors.
408 * gfortran.h (gfc_find_dt_in_generic,
409 gfc_convert_to_structure_constructor): New function prototypes.
410 * interface.c (check_interface0, check_interface1,
411 gfc_search_interface): Ignore DT constructors in generic list.
412 * match.h (gfc_match_structure_constructor): Update prototype.
413 * match.c (match_derived_type_spec): Ensure that one uses the DT
414 not the generic function.
415 * module.c (MOD_VERSION): Bump.
416 (dt_lower_string, dt_upper_string): New functions.
417 (find_use_name_n, find_use_operator, compare_true_names,
418 find_true_name, add_true_name, fix_mio_expr, load_needed,
419 read_module, write_dt_extensions, write_symbol): Changes to deal with
420 different symtree vs. sym names.
421 (create_derived_type): Create also generic procedure.
422 * parse.c (gfc_fixup_sibling_symbols): Don't regard DT and generic
423 function as the same.
424 * primary.c (gfc_convert_to_structure_constructor): New function.
425 (gfc_match_structure_constructor): Restructured; calls
426 gfc_convert_to_structure_constructor.
427 (build_actual_constructor, gfc_match_rvalue): Update for DT generic
429 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
430 is_illegal_recursion, resolve_generic_f, resolve_variable,
431 resolve_fl_variable_derived, resolve_fl_derived0,
432 resolve_symbol): Handle DT and DT generic constructors.
433 * symbol.c (gfc_use_derived, gfc_undo_symbols,
434 gen_special_c_interop_ptr, gen_cptr_param,
435 generate_isocbinding_symbol, gfc_get_derived_super_type): Handle
436 derived-types, which are hidden in the generic type.
437 (gfc_find_dt_in_generic): New function
438 * trans-array.c (gfc_conv_array_initializer): Replace FL_PARAMETER
439 expr by actual value.
440 * trans-decl.c (gfc_get_module_backend_decl, gfc_trans_use_stmts):
441 Ensure that we use the DT and not the generic function.
442 * trans-types.c (gfc_get_derived_type): Ensure that we use the DT
443 and not the generic procedure.
445 2011-11-14 Tobias Burnus <burnus@net-b.de>
448 * trans-decl.c (generate_coarray_sym_init): Handle zero-sized arrays.
450 2011-11-09 Tobias Burnus <burnus@net-b.de>
452 * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
453 (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
454 (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.
456 2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
459 * gfortran.texi (Data consistency and durability): New section.
461 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
464 * resolve.c (resolve_forall_iterators): Transform internal errors
467 2011-11-09 Janus Weil <janus@gcc.gnu.org>
470 * class.c (gfc_find_derived_vtab): Make the vtab symbols FL_PARAMETER.
471 * expr.c (gfc_simplify_expr): Prevent vtabs from being replaced with
473 * resolve.c (resolve_values): Use-associated symbols do not need to
475 (resolve_fl_parameter): Make sure the symbol has a value.
477 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
480 * intrinsic.c (add_functions): Allow dreal simplification.
481 * intrinsic.h (gfc_simplify_dreal): New prototype.
482 * simplify.c (gfc_simplify_dreal): New function.
484 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
487 * trans-types.c (gfc_get_dtype): Issue a fatal error instead of
490 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
493 * io.c (gfc_resolve_close): CLOSE requires a UNIT.
495 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
498 * expr.c (gfc_simplify_expr): Substrings can't have negative
501 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
504 * invoke.texi (-finit-*): Document interaction with
507 2011-11-07 François-Xavier Coudert <fxcoudert@gcc.gnu.org>
511 * invoke.texi: Fix documentation of fsign-zero option. Remove
513 * intrinsic.texi: Fix ATAN2 documentation for signed zeros.
515 * gfortran.texi: Remove contractions.
517 2011-11-07 Janus Weil <janus@gcc.gnu.org>
520 * class.c (add_proc_comp): Don't add non-overridable procedures to the
522 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
523 Don't generate a dynamic _vptr call for non-overridable procedures.
525 2011-11-07 Janne Blomqvist <jb@gcc.gnu.org>
527 * intrinsic.texi (MCLOCK, MCLOCK8, TIME, TIME8): Functions clock
528 and time are part of the C standard library.
530 2011-11-06 Janus Weil <janus@gcc.gnu.org>
532 * gfortran.h (gfc_extend_expr): Modified prototype.
533 * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'.
534 Remove argument 'real_error'.
535 * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'.
537 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
538 Aldy Hernandez <aldyh@redhat.com>
540 Merged from cxx-mem-model.
542 * types.def: (BT_SIZE, BT_CONST_VOLATILE_PTR, BT_FN_VOID_INT,
543 BT_FN_I{1,2,4,8,16}_CONST_VPTR_INT, BT_FN_VOID_VPTR_INT,
544 BT_FN_BOOL_VPTR_INT, BT_FN_BOOL_SIZE_CONST_VPTR,
545 BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT, BT_FN_VOID_SIZE_VPTR_PTR_INT,
546 BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT,
547 BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT,
548 BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New types.
550 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
553 * trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
554 case in the assertion.
555 * trans-intrinsic (enter_nested_loop): New function.
556 (gfc_conv_intrinsic_arith): Support non-scalar cases.
557 (nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
558 (walk_inline_intrinsic_function): Handle sum and product.
559 (gfc_inline_intrinsic_function_p): Ditto.
560 * trans.h (gfc_get_loopinfo): New macro.
562 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
564 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
565 expression variable. Use it.
567 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
569 * trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
572 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
574 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Small argument handling
577 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
579 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Update conditions.
581 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
583 * frontend-passes.c (cfe_register_funcs): Return early in the case
584 of an inline intrinsic function.
585 (optimize_binop_array_assignment): Skip optimization in the case of
586 an inline intrinsic function.
588 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
590 * array.c (match_subscript): Skip whitespaces before setting locus.
591 * matchexp.c (match_level_1): Ditto.
593 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
595 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): 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): Set loop's
603 temporary rank to the loop rank. Mark ss chains for multiple loop
604 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
607 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
609 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Don't calculate
610 offset twice in generated code.
612 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
614 * trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
615 arguments to elemental calls.
616 * trans-stmt.c (replace_ss): New function.
617 (gfc_conv_elemental_dependencies): Remove temporary loop handling.
618 Create a new ss for the temporary and replace the original one with it.
619 Remove fake array references. Recalculate all offsets.
621 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
623 * trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
624 * trans-array.c (gfc_free_ss): Remove forward declaration.
626 (set_delta, gfc_set_delta): Remove forward declaration.
627 Make non-static and rename the former to the later. Update uses.
629 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
631 * trans.h (gfc_inline_intrinsic_function_p): Move prototype...
632 * gfortran.h (gfc_inline_intrinsic_function_p): ... here.
633 * dependency.c (gfc_check_argument_var_dependency): Check dependencies
634 of inline intrinsics' arguments.
636 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
638 * trans-array.c (gfc_trans_preloop_setup): New pointers to outer
639 dimension's ss and loop. Use them.
641 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
643 * trans-array.c (outermost_loop): New function.
644 (gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
645 gfc_add_loop_ss_code): Put generated code out of the outermost loop.
647 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
649 * trans-array.c (constant_array_constructor_loop_size):
650 Handle multiple loops.
652 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
654 * trans-array.c (get_rank, get_loop_upper_bound_for_array):
656 (gfc_trans_array_constructor): Handle multiple loops.
658 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
660 * trans.h (struct gfc_loopinfo): New field parent.
661 * trans-array.c (gfc_cleanup_loop): Free nested loops.
662 (gfc_add_ss_to_loop): Set nested_loop's parent loop.
663 (gfc_trans_array_constructor): Update assertion.
664 (gfc_conv_loop_setup): Ditto.
666 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
668 * trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
669 Call recursively gfc_add_loop_ss_code for all the nested loops.
670 (gfc_conv_ss_startstride): Only get the descriptor for the outermost
671 ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
672 (set_loop_bounds): Call recursively for all the nested loops.
675 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
677 * trans.h (struct gfc_loopinfo): New fields nested and next.
678 * trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
679 ss has non-null nested_ss field.
681 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
683 * trans-array.c (gfc_trans_create_temp_array): Loop over the parents.
685 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
687 * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
688 Rename the former to the latter and loop over the parents.
689 (innermost_ss): New function.
690 (get_array_ref_dim_for_loop_dim): New function.
691 (gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
692 (set_loop_bounds): Use get_array_dim_for_loop_dim).
694 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
696 * trans.h (struct gfc_ss): New field nested_ss.
697 * trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
699 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
701 * trans-array.c (set_vector_loop_bounds): Loop over the parents.
703 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
705 * trans-array.c (gfc_trans_array_constructor): Loop over the parents.
707 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
709 * trans-array.c (gfc_set_loop_bounds_from_array_spec): Loop over the
712 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
714 * trans.h (struct gfc_ss): New field parent.
715 * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
717 * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
720 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
722 * trans-array.h (gfc_trans_create_temp_array): Remove loop argument.
723 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get loop from ss.
724 Update reference to loop. Remove loop argument.
725 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update calls to
726 gfc_trans_create_temp_array.
727 * trans-expr.c (gfc_conv_procedure_call): Ditto.
728 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
729 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
730 Set loop before calling gfc_trans_create_temp_array.
732 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
734 * trans-array.c (gfc_trans_create_temp_array): New variable total_dim.
735 Set total_dim to loop's rank. Replace usages of loop's rank.
737 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
739 * trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
740 Rename the former to the later. Get loop from ss.
741 Remove loop argument.
742 (gfc_add_loop_ss_code): Update call.
744 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
746 * trans-array.c (gfc_set_vector_loop_bounds): Get loop from ss.
747 Remove loop argument.
748 (gfc_add_loop_ss_code): Update call.
750 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
752 * trans.h (struct gfc_ss): New field loop.
753 * trans-array.c (set_ss_loop): New function.
754 (gfc_add_ss_to_loop): Call set_ss_loop.
756 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
758 * trans.h (struct gfc_ss_info): New field refcount.
759 * trans-array.c (free_ss_info): Decrement refcount. Return early if
761 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
764 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
766 * trans-array.c (gfc_trans_create_temp_array): Move invariant condition
767 out of the containing loop.
769 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
771 * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array):
772 Move specloop arrays clearing from the former to the latter.
774 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
776 * trans-array.c (set_loop_bounds): Separate the beginning of
777 gfc_conv_loop_setup into a function of its own.
778 (set_delta): Separate the end of gfc_conv_loop_setup into a function
780 (gfc_conv_loop_setup): Call set_loop_bounds and set delta.
781 (set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
782 pointer to the specloop field from the loop struct.
784 2011-11-03 Tobias Burnus <burnus@net-b.de>
787 * interface.c (gfc_compare_derived_types): Fix check for BIND(C).
789 2011-11-03 Tobias Burnus <burnus@net-b.de>
792 * trans-decl.c (gfc_finish_var_decl): Mark PARAMETER as TREE_READONLY.
794 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
796 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
797 gfc_ss::where into gfc_ss_info.
798 * trans-array.c (gfc_add_loop_ss_code):
799 Update reference chains.
800 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
802 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
804 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
805 gfc_ss::useflags into gfc_ss_info.
806 * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
807 gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
808 Update reference chains.
809 * trans-expr.c (gfc_conv_procedure_call): Ditto.
810 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
812 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
814 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
815 gfc_ss::data::info into gfc_ss_info::data and remove empty union
817 * trans-array.c (gfc_free_ss, gfc_trans_create_temp_array,
818 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
819 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
820 gfc_conv_ss_descriptor, gfc_trans_array_bound_check,
821 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
822 add_array_offset, gfc_trans_preloop_setup,
823 gfc_trans_scalarized_boundary, gfc_conv_section_startstride,
824 gfc_conv_ss_startstride, gfc_could_be_alias,
825 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
826 gfc_alloc_allocatable_for_assignment, gfc_walk_array_ref):
827 Update reference chains and factor them where possible.
828 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
829 gfc_conv_procedure_call, gfc_trans_subarray_assign): Updata reference
831 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
832 * trans-io.c (transfer_array_component): Ditto.
833 * trans-stmt.c (gfc_conv_elemental_dependencies,
834 gfc_trans_pointer_assign_need_temp): Ditto.
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::temp into gfc_ss_info::data.
840 * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference
843 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
845 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
846 gfc_ss::data::scalar into newly created union gfc_ss_info::data,
847 and rename subfield expr to value.
848 * trans-array.c (gfc_add_loop_ss_code, gfc_conv_array_index_offset,
849 gfc_conv_expr_descriptor): Update reference chains.
850 * trans-const.c (gfc_conv_constant): Ditto.
851 * trans-expr.c (gfc_conv_expr): Ditto.
853 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
855 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
856 string_length from the former struct to the latter.
858 (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
859 gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
860 gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
861 gfc_conv_expr_descriptor): Update references to string_length and
862 factor common reference chains where possible.
863 * trans-const.c (gfc_conv_constant): Ditto.
864 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
865 gfc_conv_expr): Ditto.
867 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
869 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from
870 the former struct to the latter.
872 (gfc_get_array_ss, gfc_get_scalar_ss,
873 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
874 gfc_add_loop_ss_code, gfc_conv_ss_descriptor,
875 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
876 gfc_conv_scalarized_array_ref, gfc_conv_ss_startstride,
877 gfc_could_be_alias, gfc_conv_resolve_dependencies,
878 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
879 gfc_alloc_allocatable_for_assignment): Update references to expr and
880 factor common reference chains where possible.
881 * trans-const.c (gfc_conv_constant): Ditto.
882 * trans-expr.c (gfc_conv_variable, gfc_conv_procedure_call,
883 gfc_conv_array_constructor_expr, gfc_conv_expr,
884 gfc_conv_expr_reference): Ditto.
885 * trans-intrinsic.c (trans_this_image, gfc_conv_intrinsic_bound,
886 gfc_conv_intrinsic_cobound, gfc_conv_intrinsic_funcall,
887 gfc_add_intrinsic_ss_code): Ditto.
888 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
890 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
892 * trans.h (struct gfc_ss_info): New struct.
893 (gfc_get_ss_info): New macro.
894 (struct gfc_ss): Move type field to struct gfc_ss_info.
895 Add an info field of type gfc_ss_info.
896 * trans-array.c (free_ss_info): New function.
897 (gfc_free_ss): Call free_ss_info.
898 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss):
899 Allocate gfc_ss_info field.
900 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss,
901 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
902 gfc_conv_array_index_offset, gfc_trans_preloop_setup,
903 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
904 gfc_conv_ss_startstride, gfc_conv_resolve_dependencies,
905 gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor,
906 gfc_walk_elemental_function_args): Update references to type.
907 * trans-const.c (gfc_conv_constant): Factor common reference chains
908 and update reference to type.
909 * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1):
910 Update reference to type.
911 (gfc_conv_array_constructor_expr, gfc_conv_expr,
912 gfc_conv_expr_reference): Ditto. Factor common reference chains.
913 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references
915 * trans-stmt.c (gfc_trans_where_assign): Ditto.
917 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
919 * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
920 from the former struct to the latter.
921 * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
922 Update field references.
923 * trans-expr.c (gfc_trans_subarray_assign): Update field references
924 and factor common reference chains.
925 * trans-io.c (transfer_array_component): Ditto.
927 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
929 * trans.h (struct gfc_array_info): Move dim and dimen fields...
930 (struct gfc_ss): ... here. Remove gfc_ss::data::temp::dimen field.
931 * trans-array.c (gfc_conv_loop_setup): Remove temp_ss dim array
933 (gfc_get_temp_ss): Initialize dim and dimen.
934 (gfc_free_ss, gfc_get_array_ss, gfc_get_temp_ss,
935 gfc_set_loop_bounds_from_array_spec, get_array_ref_dim,
936 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
937 gfc_set_vector_loop_bounds, gfc_conv_scalarized_array_ref,
938 gfc_trans_preloop_setup, gfc_conv_ss_startstride,
939 gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims,
940 gfc_conv_expr_descriptor, gfc_alloc_allocatable_for_assignment,
941 gfc_walk_array_ref): Update field references.
942 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
944 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Ditto.
945 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
947 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
949 * trans.h (struct gfc_ss_info, struct gfc_array_info):
950 Rename the former to the latter.
951 * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
952 get_array_ref_dim, gfc_trans_create_temp_array,
953 gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
954 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
955 add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
956 gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
957 gfc_conv_expr_descriptor): Update all uses.
958 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
960 * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
961 walk_inline_intrinsic_transpose): Ditto.
962 * trans-stmt.c (gfc_conv_elemental_dependencies,
963 gfc_trans_pointer_assign_need_temp): Ditto.
965 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
967 * trans-array.c (dim_ok, transposed_dims): Rename the former to the
968 latter. Change argument type. Invert return value.
969 (gfc_conv_expr_descriptor): Update calls.
971 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
973 * trans-array.c (get_array_ref_dim): Change argument type and name.
974 Obtain previous argument from the new argument in the body.
975 (gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
977 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
979 * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
980 Rename the former to the latter. Change type and name of argument.
981 Get previous argument from the new one.
982 (gfc_add_loop_ss_code): Update call.
984 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
986 * trans-array.h (gfc_trans_create_temp_array): Replace info argument
988 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
989 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
990 gfc_trans_create_temp_array.
991 * trans-expr.c (gfc_conv_procedure_call): Ditto.
992 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
993 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
995 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
997 * trans-array.c (gfc_trans_array_bound_check): Use ss argument
1000 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1002 * trans-array.c (gfc_trans_array_bound_check,
1003 trans_array_bound_check): Rename the former to the latter.
1004 Replace descriptor argument with ss argument. Get descriptor from ss.
1005 (gfc_conv_array_index_offset, conv_array_index_offset): Rename the
1006 former to the latter. Update call to trans_array_bound_check.
1007 Replace info argument with ss argument. Get info from ss.
1008 (gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
1009 (add_array_offset): Ditto
1011 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1013 * trans-array.c (gfc_trans_constant_array_constructor,
1014 trans_constant_array_constructor): Rename the former to the latter.
1015 Don't set the rank of the temporary for the loop. Remove then unused
1017 (gfc_trans_array_constructor): Update call.
1019 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1021 * trans-array.c (gfc_trans_scalarizing_loops): Stop loop before end
1022 marker, not after it.
1024 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1026 * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays.
1028 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1030 * trans-array.c (gfc_conv_ss_startstride): Access array bounds along
1031 array dimensions instead of loop dimensions.
1033 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1035 * trans-array.c (gfc_trans_preloop_setup): Assertify one condition.
1037 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1039 * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions.
1041 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1043 * trans-array.c (get_array_ref_dim): Remove redundant condition.
1045 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1047 * trans-array.c (gfc_trans_preloop_setup): Move common code...
1048 (add_array_offset): ...into that new function.
1050 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1052 * trans-array.c (gfc_trans_preloop_setup): Use loop's dimension instead
1053 of array's dimention. Check that it is indeed the same.
1055 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1057 * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
1058 Special case outermost loop.
1060 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1062 * trans-array.c (gfc_trans_preloop_setup): Factor loop index
1065 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1067 * trans-array.c (gfc_trans_preloop_setup): Move code earlier.
1069 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1071 * trans-array.c (gfc_trans_preloop_setup): Move array reference
1072 initialisation earlier. Factor subsequent array references.
1074 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1076 * Makef-lang.in (gfortranspec.o): Pass SHLIB instead of SHLIB_LINK.
1078 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
1081 * check.c (gfc_check_dshift): Update argument checking for BOZ.
1082 Update checking SHIFT against BITSIZE of I or J.
1083 * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR.
1085 2011-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
1087 * check.c (gfc_check_atan_2): Typo in comment.
1088 (gfc_check_nearest): If 's' is constant, check that it is not 0.
1089 * simplify.c (simplify_dshift, gfc_simplify_ibclr, gfc_simplify_ibits,
1090 gfc_simplify_ibset, simplify_shift, gfc_simplify_ishftc,
1091 gfc_simplify_nearest): Remove dead code.
1093 2011-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1095 * simplify.c (simplify_transformation_to_array): Fix memory leak.
1097 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1100 * check.c (gfc_check_ishftc): Check args are constant before
1101 extracting the integer.
1103 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1106 * check.c (less_than_bitsize1): Check |shift| <= bit_size(i).
1107 (gfc_check_ishftc): Check |shift| <= bit_size(i) and check
1108 that size is positive.
1110 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1113 * resolve.c (resolve_ref): Check return value of resolve_substring().
1115 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1117 * io.c (match_dt_format): Match a user-defined operator or a kind
1118 type prefixed string.
1120 2011-10-19 Janus Weil <janus@gcc.gnu.org>
1123 * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF.
1124 * intrinsinc.texi (SIZEOF): Document it.
1125 (STORAGE_SIZE): Fix special characters. Fix line breaks.
1127 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1130 * trans.c (gfc_build_array_ref): If type is not an array, check that
1131 there is nothing to do, and do nothing.
1133 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1136 * trans-types.c (gfc_build_array_type): Don't force lower bound to one
1137 in the deferred case.
1139 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1142 * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
1143 Don't set already set array ref.
1145 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1147 * array.c (gfc_find_array_ref): Remove coarray-specific handling.
1149 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1152 * check.c (dim_corank_check): Use gfc_get_corank to get corank.
1154 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1157 * trans-intrinsic.c (walk_coarray): Change AR_ELEMENT to AR_SECTION.
1160 * trans-intrinsic.c (walk_coarray): Use gfc_walk_array_ref for
1161 the scalarization chain initialization.
1163 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1166 * trans-intrinsic.c (walk_coarray): Allow subreferences after a
1167 coarray object reference.
1169 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1172 * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
1173 if they are coarrays.
1175 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1177 * trans-array.h (gfc_walk_array_ref): New prototype.
1178 * trans-array.c (gfc_walk_array_ref): New function, containing
1179 all but the beginning of gfc_walk_variable_expr's code.
1180 (gfc_walk_variable_expr): Use gfc_walk_array_ref.
1182 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1185 * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
1186 ndim for the descriptor's rank.
1188 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1191 * trans-array.c (gfc_conv_expr_descriptor): Count codimensions starting
1192 from zero, and add then the relevant offset (either ndim or loop.dimen)
1193 depending on context.
1195 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1197 * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
1199 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1201 * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
1204 2011-10-18 Janus Weil <janus@gcc.gnu.org>
1207 * decl.c (verify_c_interop_param): Renamed to
1208 'gfc_verify_c_interop_param'. Add error message for polymorphic
1210 (verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
1211 polymorphic variables.
1212 (verify_bind_c_sym): Renamed 'verify_c_interop'.
1213 * gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
1214 * check.c (gfc_check_sizeof): Ditto.
1215 * resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
1216 * symbol.c (verify_bind_c_derived_type): Ditto.
1218 2011-10-15 Tom Tromey <tromey@redhat.com>
1219 Dodji Seketeli <dodji@redhat.com>
1221 * cpp.c (print_line, cb_define): Adjust to avoid using internals
1222 of struct line_map. Use the public API instead.
1224 2011-10-17 Janus Weil <janus@gcc.gnu.org>
1228 * primary.c (match_kind_param): Avoid segfault.
1230 2011-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1232 * frontend-passes.c (current_ns): Make static.
1233 (create_var): Note parent of newly created namespace.
1234 (optimize_namespace): Don't wak sibling namespaces
1235 if they are EXEC_BLOCK because this is handled...
1236 (gfc_code_walker): ... here. Also walk ASSOCIATE lists.
1238 2011-10-16 Janus Weil <janus@gcc.gnu.org>
1241 * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
1242 (get_kind): Pass on 'is_iso_c' flag.
1243 (match_integer_constant,match_real_constant,match_logical_constant):
1244 Set 'ts.is_c_interop'.
1246 2011-10-16 Janus Weil <janus@gcc.gnu.org>
1249 * resolve.c (resolve_formal_arglist): Remove unneeded error message.
1252 2011-10-15 Tobias Burnus <burnus@net-b.de>
1254 * gfortran.texi (Fortran 2008 status, TS 29113 status,
1255 Further Interoperability of Fortran with C): Update implementation
1256 status, change references from TR 29113 to TS 29113.
1257 * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
1258 * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
1259 * lang.opt (std=): Ditto.
1260 * options.c (gfc_handle_option, set_default_std_flags): Ditto and
1261 change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
1262 * libgfortran.h: Ditto.
1263 * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
1264 * decl.c (verify_c_interop_param): Ditto.
1266 2011-10-14 Janus Weil <janus@gcc.gnu.org>
1269 * expr.c (gfc_check_vardef_context): Don't throw an error on
1270 non-pointer assignments involving an intent(in) pointer dummy.
1272 2011-10-14 Tobias Burnus <burnus@net-b.de>
1275 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1276 for dummy arguments with VALUE attribute.
1278 2011-10-11 Tobias Burnus <burnus@net-b.de>
1279 Janus Weil <janus@gcc.gnu.org>
1281 * invoke.texi (-fwhole-file): Update wording since -fwhole-file
1282 is now enabled by default.
1284 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1286 * trans-expr.c (gfc_conv_power_op): Delete old interface with two
1287 parallel arrays to hold standard builtin declarations, and replace
1288 it with a function based interface that can support creating
1289 builtins on the fly in the future. Change all uses, and poison
1290 the old names. Make sure 0 is not a legitimate builtin index.
1291 (fill_with_spaces): Ditto.
1292 (gfc_trans_string_copy): Ditto.
1293 (gfc_trans_zero_assign): Ditto.
1294 (gfc_build_memcpy_call): Ditto.
1295 (alloc_scalar_allocatable_for_assignment): Ditto.
1296 * trans-array.c (gfc_trans_array_constructor_value): Ditto.
1297 (duplicate_allocatable): Ditto.
1298 (gfc_alloc_allocatable_for_assignment): Ditto.
1299 * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
1300 (gfc_omp_clause_assign_op): Ditto.
1301 (gfc_trans_omp_atomic): Ditto.
1302 (gfc_trans_omp_do): Ditto.
1303 (gfc_trans_omp_task): Ditto.
1304 * trans-stmt.c (gfc_trans_stop): Ditto.
1305 (gfc_trans_sync): Ditto.
1306 (gfc_trans_allocate): Ditto.
1307 (gfc_trans_deallocate): Ditto.
1308 * trans.c (gfc_call_malloc): Ditto.
1309 (gfc_allocate_using_malloc): Ditto.
1310 (gfc_call_free): Ditto.
1311 (gfc_deallocate_with_status): Ditto.
1312 (gfc_deallocate_scalar_with_status): Ditto.
1313 * f95-lang.c (gfc_define_builtin): Ditto.
1314 (gfc_init_builtin_functions): Ditto.
1315 * trans-decl.c (create_main_function): Ditto.
1316 * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
1318 2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1321 * frontend-passes (forall_level): New variable.
1322 (cfe_register_funcs): Don't register functions if we
1323 are within a forall loop.
1324 (optimize_namespace): Set forall_level to 0 before entry.
1325 (gfc_code_walker): Increase/decrease forall_level.
1327 2011-10-09 Tobias Burnus <burnus@net-b.de>
1330 * trans-common.c (translate_common): Fix -Walign-commons check.
1332 2011-10-09 Mikael Morin <mikael.morin@sfr.fr>
1334 * interface.c (check_dummy_characteristics): Count dimensions starting
1335 from one in diagnostic.
1337 2011-10-09 Tobias Burnus <burnus@net-b.de>
1339 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1340 dependency on iso-c-binding.def and iso-fortran-env.def.
1341 * module.c (import_iso_c_binding_module): Add error when
1342 explicitly importing a nonstandard symbol; extend standard-
1344 * iso-c-binding.def: Add c_float128 and c_float128_complex
1345 integer parameters (for -std=gnu).
1346 * intrinsic.texi (ISO_C_Binding): Document them.
1347 * symbol.c (generate_isocbinding_symbol): Change macros
1348 to ignore GFC_STD_* data.
1349 * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
1350 nonstatic and renamed from "init_c_interop_kinds".
1351 (gfc_init_kinds): Don't call it
1352 * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
1353 * f95-lang.c (gfc_init_decl_processing): Call it.
1355 2011-10-09 Janus Weil <janus@gcc.gnu.org>
1358 * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
1360 2011-10-08 Paul Thomas <pault@gcc.gnu.org>
1363 * trans-array.c (gfc_conv_array_index_offset): Use descriptor
1364 stride for pointer function results.
1366 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1368 * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
1370 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1372 * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
1374 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1376 * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
1377 Remove conditions on coarray.
1378 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1379 (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
1381 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1383 * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
1384 argument. Remove condition on coarray_last.
1385 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1386 (gfc_conv_expr_descriptor): Ditto.
1388 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1390 * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
1391 handling. Don't reset array ref's corank and codimensions' types
1392 in the full array ref case. Update loop upper limit.
1393 Remove DIMEN_THIS_IMAGE case. Remove unnecessary conditions.
1395 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1397 * trans.h (gfc_ss_info): Remove codimen field.
1398 * trans-array.c (gfc_get_array_ss): Don't set codimen field.
1399 (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
1400 (gfc_trans_constant_array_constructor): Update loop upper limit.
1401 (gfc_conv_ss_startstride): Don't set codimen field.
1402 Don't get descriptor's cobounds.
1403 (gfc_walk_variable_expr): Update dimension index.
1404 * trans-intrinsic.c (trans_this_image, trans_image_index,
1405 conv_intrinsic_cobound): Don't set codimen field
1407 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1409 * trans.h (gfc_loopinfo): Remove codimen field.
1410 * trans-array.c (gfc_set_vector_loop_bounds,
1411 gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
1413 (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
1415 (gfc_start_scalarized_body): Update loop lower limit.
1416 (gfc_conv_ss_startstride): Don't set loop's codimen field.
1417 (gfc_conv_loop_setup): Remove unnecessary condition.
1418 (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
1420 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1422 * trans.h (gfc_ss): Remove data.temp.codimen field.
1423 * trans-array.c (gfc_conv_resolve_dependencies,
1424 gfc_conv_expr_descriptor): Don't set temp's codimen field.
1426 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1428 * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
1429 associated dimen_type) in the full array ref case.
1431 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1433 * trans-intrinsic.c (walk_coarray): New function.
1434 (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
1435 (trans-this_image, trans_image_index, conv_intrinsic_cobound):
1438 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1440 * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
1441 cobounds evaluation.
1443 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1445 * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
1447 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1449 * trans-array.c (gfc_conv_section_startstride): Move code to
1450 evaluate_bound. Use evaluate_bound.
1451 (evaluate_bound): New function.
1453 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1455 * trans-array.c (gfc_conv_section_startstride): Update assertion to
1456 also accept coarrays.
1458 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1460 * trans-array.c (gfc_conv_section_startstride): Factor common
1461 array ref references.
1463 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1465 * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
1466 loop.codimen as argument to gfc_get_array_type_bounds.
1468 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1470 * trans-array.h (struct gfc_se): New flag want_coarray.
1471 * trans-intrinsic.c (trans_this_image, trans_image_index,
1472 conv_intrinsic_cobound): Set want_coarray.
1473 * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
1474 earlier and without relying on the scalarizer.
1476 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1478 * expr.c (gfc_get_corank): Return 0 if input expression is not a
1481 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1483 * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
1484 descriptor setup code.
1486 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1488 * resolve.c (compare_spec_to_ref): Move coarray ref initialization
1490 (resolve_array_ref): ... here.
1492 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1494 * check.c (is_coarray): Remove.
1495 (coarray_check): Use gfc_is_coarray.
1497 2011-10-07 Janus Weil <janus@gcc.gnu.org>
1500 * class.c (gfc_build_class_symbol): Fix whitespace.
1501 * module.c (mio_symbol): Set 'class_ok' attribute.
1502 * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
1503 been built for class symbols.
1505 2011-10-04 Janus Weil <janus@gcc.gnu.org>
1508 * interface.c (check_dummy_characteristics): Check the array shape.
1510 2011-10-01 Janus Weil <janus@gcc.gnu.org>
1513 * interface.c (get_expr_storage_size): Check if 'length' component is
1516 2011-09-29 Janus Weil <janus@gcc.gnu.org>
1519 * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
1523 * symbol.c (check_conflict): Forbid TARGET attribute for statement
1526 2011-09-27 Jakub Jelinek <jakub@redhat.com>
1528 * trans-types.c (gfc_type_for_size): Return wider type
1529 if no suitable narrower type has been found.
1530 (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
1531 returned type doesn't have expected TYPE_MODE.
1533 2011-09-26 Janus Weil <janus@gcc.gnu.org>
1536 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
1539 * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
1541 2011-09-22 Janus Weil <janus@gcc.gnu.org>
1544 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
1546 * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
1547 for PURE and ELEMENTAL attributes.
1548 (compare_actual_formal): Remove pureness check here.
1550 2011-09-20 Steven G. Kargl <kargl@gcc.gnu.org>
1552 * check.c (gfc_check_c_sizeof): Remove redundant word.
1554 2011-09-20 Simon Baldwin <simonb@google.com>
1556 * module.c (gfc_dump_module): Omit timestamp from output.
1558 2011-09-17 Janus Weil <janus@gcc.gnu.org>
1561 * symbol.c (gfc_use_derived): Fix coding style.
1563 2011-09-15 Janus Weil <janus@gcc.gnu.org>
1566 * resolve.c (resolve_transfer): Check if component 'ref' is defined.
1569 * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
1571 2011-09-14 Tobias Burnus <burnus@net-b.de>
1575 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
1576 * resolve.c (resolve_transfer): Reject NULL without MOLD.
1577 * interface.c (gfc_procedure_use): Reject NULL without MOLD
1578 if no explicit interface is known.
1579 (gfc_search_interface): Reject NULL without MOLD if it would
1582 2011-09-13 Janus Weil <janus@gcc.gnu.org>
1585 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
1588 2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1591 * frontend-passes.c (dummy_expr_callback): New function.
1592 (convert_do_while): New function.
1593 (optimize_namespace): Call code walker to convert do while loops.
1595 2011-09-11 Janus Weil <janus@gcc.gnu.org>
1599 * interface.c (check_dummy_characteristics): New function to check the
1600 characteristics of dummy arguments.
1601 (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
1603 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1605 * trans-array.c (gfc_trans_constant_array_constructor): Remove
1606 superfluous initialisation of DIM field.
1607 (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
1608 (gfc_conv_expr_descriptor): Ditto.
1609 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1611 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1613 * trans-array.h (gfc_get_scalar_ss): New prototype.
1614 * trans-array.c (gfc_get_scalar_ss): New function.
1615 (gfc_walk_variable_expr, gfc_walk_op_expr,
1616 gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
1617 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1618 (gfc_trans_assignment_1): Ditto.
1619 * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
1620 gfc_trans_where_3): Ditto.
1622 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1624 * trans-array.h (gfc_get_temp_ss): New prototype.
1625 * trans-array.c (gfc_get_temp_ss): New function.
1626 (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
1627 (gfc_conv_expr_descriptor): Ditto.
1628 * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
1630 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1632 * trans-array.h (gfc_get_array_ss): New prototype.
1633 * trans-array.c (gfc_get_array_ss): New function.
1634 (gfc_walk_variable_expr, gfc_walk_function_expr,
1635 gfc_walk_array_constructor): Re-use gfc_get_array_ss.
1636 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1637 * trans-intrinsic.c (gfc_walk_intrinsic_bound,
1638 gfc_walk_intrinsic_libfunc): Ditto.
1639 * trans-io.c (transfer_array_component): Ditto.
1641 2011-09-08 Tobias Burnus <burnus@net-b.de>
1644 * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
1645 * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
1646 * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
1647 * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
1648 lock_unlock_statement, sync_statement, gfc_match_allocate,
1649 gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
1650 (gfc_match_do): Match DO CONCURRENT.
1651 (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
1652 match_forall_iterator, match_forall_header, match_simple_forall,
1653 gfc_match_forall): Move up in the file.
1654 * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
1655 * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
1656 * resolve.c (do_concurrent_flag): New global variable.
1657 (resolve_function, pure_subroutine, resolve_branch,
1658 gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
1660 * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
1661 * trans-stmt.c (gfc_trans_do_concurrent): New function.
1662 (gfc_trans_forall_1): Handle do concurrent.
1663 * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
1664 * trans.c (trans_code): Call it.
1665 * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
1667 2011-09-07 Janus Weil <janus@gcc.gnu.org>
1670 * primary.c (gfc_match_structure_constructor): Handle parsing of
1671 procedure pointers components in structure constructors.
1672 * resolve.c (resolve_structure_cons): Check interface of procedure
1673 pointer components. Changed wording of some error messages.
1675 2011-09-04 Janus Weil <janus@gcc.gnu.org>
1678 * trans-types.c (gfc_sym_type): Check for proc_name.
1680 2011-08-30 Tobias Burnus <burnus@net-b.de>
1683 * trans-common.c (build_common_decl): Warn if named common
1684 block's size is not everywhere the same.
1686 2011-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1689 * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
1691 2011-08-29 Janus Weil <janus@gcc.gnu.org>
1694 * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
1695 allocatable function results.
1697 2011-08-29 Tobias Burnus <burnus@net-b.de>
1699 * trans-decl.c (generate_coarray_sym_init): Use
1700 GFC_CAF_COARRAY_STATIC for static coarrays.
1702 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1704 * scanner.c (load_file): Don't abuse LC_RENAME reason while
1705 (indirectly) calling linemap_add.
1707 2011-08-26 Jakub Jelinek <jakub@redhat.com>
1709 * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
1711 * symbol.c (check_conflict): Allow threadprivate attribute with
1712 FL_PROCEDURE if proc_pointer.
1714 2011-08-25 Mikael Morin <mikael@gcc.gnu.org>
1717 * expr.c (gfc_free_shape): Do nothing if shape is NULL.
1718 (free_expr0): Remove redundant NULL shape check.
1719 * resolve.c (check_host_association): Ditto.
1720 * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
1722 * trans-io.c (transfer_array_component): Ditto.
1724 2011-08-25 Tobias Burnus <burnus@net-b.de>
1726 * trans-array.c (gfc_conv_descriptor_token): Add assert.
1727 * trans-decl.c (gfc_build_qualified_array,
1728 create_function_arglist): Handle assumed-shape arrays.
1729 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1730 * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
1731 add "caf_token" to assumed-shape descriptors, new akind argument.
1732 (gfc_get_array_type_bounds): Pass akind.
1733 * trans.h (lang_decl): New elements caf_offset and token.
1734 (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
1736 2011-08-25 Tobias Burnus <burnus@net-b.de>
1738 * trans-array.c (structure_alloc_comps): Fix for allocatable
1739 scalar coarray components.
1740 * trans-expr.c (gfc_conv_component_ref): Ditto.
1741 * trans-type.c (gfc_get_derived_type): Ditto.
1743 2011-08-24 Tobias Burnus <burnus@net-b.de>
1746 * expr.c (check_init_expr): Return when an error occured.
1748 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1750 * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
1752 2011-08-23 Tobias Burnus <burnus@net-b.de>
1755 * symbol.c (gfc_add_type): Better diagnostic if redefining
1756 use-associated symbol.
1757 * module.c (gfc_use_module): Use module name as locus.
1759 2011-08-22 Gabriel Charette <gchare@google.com>
1761 * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
1762 defined in cpp_define_builtins.
1764 2011-08-22 Mikael Morin <mikael@gcc.gnu.org>
1767 * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
1768 * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
1769 (free_expr0): Re-use gfc_free_shape.
1770 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1771 * trans-io.c (transfer_array_component): Ditto.
1772 * resolve.c (check_host_association): Ditto.
1773 (gfc_expr_to_initialize): Don't force the rank value and free the shape
1774 after updating the expression. Recalculate shape and rank.
1775 (resolve_where_shape): Re-use gfc_clear_shape.
1776 * array.c (gfc_array_ref_shape): Ditto.
1778 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1781 * expr.c (gfc_check_assign): Check for type conversions when the
1782 right-hand side is a constant REAL/COMPLEX contstant the left-hand
1783 side is also REAL/COMPLEX. Don't warn when a narrowing conversion
1784 for REAL does not change the value of the constant.
1786 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1789 * resolve.c (resolve_array_ref): Don't calculate upper bound
1790 if the stride is zero.
1792 2011-08-20 Janus Weil <janus@gcc.gnu.org>
1795 * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
1796 (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
1798 * frontend-passes.c (optimize_comparison): Ditto.
1799 * interface.c (gfc_check_typebound_override): Ditto.
1801 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1804 * parse.c (parse_where): Undo changes after emitting an error.
1806 2011-08-19 Jakub Jelinek <jakub@redhat.com>
1809 * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
1810 bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
1811 lhs needs reallocation.
1812 * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
1813 code is NULL, emit a barrier if workshare emitted no code at all
1814 and NOWAIT clause isn't present.
1816 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1819 * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
1820 * parse.c (check_statement_label): Accept ST_END_BLOCK and
1821 ST_END_ASSOCIATE as valid branch target.
1822 (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
1823 Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
1824 * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
1825 EXEC_END_NESTED_BLOCK.
1826 (resolve_branch): Ditto.
1827 (resolve_code): Add EXEC_END_NESTED_BLOCK case.
1828 * st.c (gfc_free_statement): Ditto.
1829 * trans.c (trans_code): Ditto.
1831 2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
1834 * symbol.c (gfc_get_st_label): Use the derived type namespace when
1835 we are parsing a derived type definition.
1837 2011-08-18 Tobias Burnus <burnus@net-b.de>
1840 * parse.c (parse_derived): Add lock_type
1841 checks, improve coarray_comp handling.
1842 * resolve.c (resolve_allocate_expr,
1843 resolve_lock_unlock, resolve_symbol): Fix lock_type
1846 2011-08-17 Tobias Burnus <burnus@net-b.de>
1849 * trans-decl.c (generate_local_decl): Warn about
1850 unused explicitly imported module variables/parameters.
1852 2011-08-17 Janus Weil <janus@gcc.gnu.org>
1855 * resolve.c (resolve_fl_variable): Reject non-constant character lengths
1856 in COMMON variables.
1858 2011-08-16 Tobias Burnus <burnus@net-b.de>
1859 Dominique Dhumieres <dominiq@lps.ens.fr>
1862 * resolve.c (resolve_symbol): Fix stupid typo.
1864 2011-08-15 Tobias Burnus <burnus@net-b.de>
1866 * resolve.c (resolve_symbol): Fix coarray result-var check.
1868 2011-08-14 Steven G. Kargl <kargl@gcc.gnu.org>
1870 * module.c (use_iso_fortran_env_module): Spell 'referrenced' correctly.
1872 2011-08-14 Janus Weil <janus@gcc.gnu.org>
1875 * decl.c (check_function_name): New function, separated off from
1876 'variable_decl' and slightly extended.
1877 (variable_decl,attr_decl1): Call it.
1879 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1881 * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
1883 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1884 Thomas Koenig <tkoenig@gcc.gnu.org>
1887 * dependency.c (are_identical_variables): For dummy arguments only
1888 check for equal names, not equal symbols.
1889 * interface.c (gfc_check_typebound_override): Add checking for rank
1890 and character length.
1892 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1895 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
1897 * dependency.c (gfc_are_identical_variables,are_identical_variables):
1898 Renamed the former to the latter and made static.
1899 (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
1900 commutativity of multiplication.
1901 (gfc_is_same_range,is_same_range): Renamed the former to the latter,
1902 made static and removed argument 'def'.
1903 (check_section_vs_section): Renamed 'gfc_is_same_range'.
1904 * gfortran.h (gfc_check_typebound_override): New prototype.
1905 * interface.c (gfc_check_typebound_override): Moved here from ...
1906 * resolve.c (check_typebound_override): ... here (and renamed).
1907 (resolve_typebound_procedure): Renamed 'check_typebound_override'.
1909 2011-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1912 * target-memory.c (gfc_target_expr-size): Don't clobber typespec
1914 * simplify.c (gfc_simplify_transfer): Don't calculate source_size
1917 2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1920 * gfortran.h (gfc_calculate_transfer_sizes): Add prototype.
1921 * target-memory.h (gfc_target_interpret_expr): Add boolean
1922 argument wether to convert wide characters.
1923 * target-memory.c (gfc_target_expr_size): Also return length
1924 of characters for non-constant expressions if these can be
1925 determined from the cl.
1926 (interpret_array): Add argument for gfc_target_interpret_expr.
1927 (gfc_interpret_derived): Likewise.
1928 (gfc_target_interpret_expr): Likewise.
1929 * check.c: Include target-memory.h.
1930 (gfc_calculate_transfer_sizes): New function.
1931 (gfc_check_transfer): When -Wsurprising is in force, calculate
1932 sizes and warn if result is larger than size (check moved from
1933 gfc_simplify_transfer).
1934 * simplify.c (gfc_simplify_transfer): Use
1935 gfc_calculate_transfer_sizes. Remove warning.
1937 2011-08-04 Richard Guenther <rguenther@suse.de>
1940 * trans-array.c (add_to_offset): New function.
1941 (gfc_conv_array_ref): Build the array index expression in optimally
1943 (gfc_walk_variable_expr): Adjust for the backward walk.
1945 2011-08-02 Daniel Kraft <d@domob.eu>
1948 * trans-array.c (gfc_trans_auto_array_allocation): Change
1949 gfc_start_block to gfc_init_block to avoid spurious extra-scope.
1951 2011-08-02 Tobias Burnus <burnus@net-b.de>
1953 * trans-array.c (gfc_array_allocate): Pass token to
1954 gfc_allocate_allocatable for -fcoarray=lib.
1955 * trans-stmt.c (gfc_trans_allocate): Update
1956 gfc_allocate_allocatable call.
1957 * trans.h (gfc_allocate_allocatable): Update prototype.
1958 (gfc_allocate_using_lib): Remove.
1959 * trans.c (gfc_allocate_using_lib): Make static, handle token.
1960 (gfc_allocate_allocatable): Ditto.
1962 2011-08-02 Jakub Jelinek <jakub@redhat.com>
1965 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
1966 * openmp.c (gfc_free_omp_clauses): Free also final_expr.
1967 (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
1968 (gfc_match_omp_clauses): Handle parsing final and mergeable
1970 (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
1971 (gfc_match_omp_taskyield): New function.
1972 (resolve_omp_clauses): Resolve final clause. Allow POINTERs and
1973 Cray pointers in clauses other than REDUCTION.
1974 (gfc_match_omp_atomic): Match optional
1975 read/write/update/capture keywords after !$omp atomic.
1976 (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1977 * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
1978 print final and mergeable clauses.
1979 (show_code_node): Handle EXEC_OMP_TASKYIELD.
1980 * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
1982 (gfc_trans_omp_taskyield): New function.
1983 (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
1984 (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1985 (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
1986 (gfc_omp_predetermined_sharing): Adjust comment.
1987 * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
1989 (gfc_omp_clauses): Add final_expr and mergeable fields.
1990 (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
1991 (gfc_omp_atomic_op): New enum typedef.
1992 (struct gfc_code): Add ext.omp_atomic.
1993 * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
1994 * frontend-passes.c (gfc_code_walker): Also walk final_expr.
1995 * resolve.c (gfc_resolve_blocks, resolve_code): Handle
1997 * st.c (gfc_free_statement): Likewise.
1998 * match.h (gfc_match_omp_taskyield): New prototype.
1999 * parse.c (decode_omp_directive): Handle taskyield directive.
2000 Handle !$omp end atomic.
2001 (case_executable): Add ST_OMP_TASKYIELD case.
2002 (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
2003 (parse_omp_atomic): Return gfc_statement instead of void.
2004 For !$omp atomic capture parse two assignments instead of
2005 just one and require !$omp end atomic afterwards, for
2006 other !$omp atomic forms just allow !$omp end atomic at the
2008 (parse_omp_structured_block, parse_executable): Adjust
2009 parse_omp_atomic callers.
2011 2011-08-02 Tobias Burnus <burnus@net-b.de>
2013 * intrinsic.c (OMP_LIB): Updated openmp_version's
2015 * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
2016 * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
2017 remove deleted omp_integer_kind and omp_logical_kind constants.
2019 2011-07-31 Janus Weil <janus@gcc.gnu.org>
2022 * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
2023 only call 'resolve_fl_derived0'.
2024 (resolve_typebound_procedures): Resolve typebound procedures of
2026 (resolve_fl_derived0): New function, which does a part of the work
2027 for 'resolve_fl_derived'.
2028 (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
2031 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2034 * expr.c (gfc_simplify_expr): If end of a string is less
2035 than zero, set it to zero.
2037 2011-07-28 Jakub Jelinek <jakub@redhat.com>
2040 * frontend-passes.c (optimize_minmaxloc): New function.
2041 (optimize_expr): Call it.
2043 2011-07-27 Tobias Burnus <burnus@net-b.de>
2046 * trans-types.c (gfc_get_derived_type): Ensure that pointer
2047 component types are marked as nonrestricted.
2049 2011-07-27 Daniel Carrera <dcarrera@gmail.com>
2052 * trans.c (gfc_allocate_using_malloc): Change function signature.
2053 Return nothing. New parameter "pointer". Eliminate temorary variables.
2054 (gfc_allocate_using_lib): Ditto.
2055 (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
2056 and gfc_allocate_using_malloc. Do not free and then reallocate a
2057 variable that is already allocated.
2058 (gfc_likely): New function. Basedon gfc_unlikely.
2059 * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
2060 Instructions to modify the array descriptor are stored in this block
2061 while other instructions continue to be stored in "pblock".
2062 (gfc_array_allocate): Update call to gfc_array_init_size. Move the
2063 descriptor_block so that the array descriptor is only updated if
2064 the array was allocated successfully.
2065 Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2066 * trans.h (gfc_allocate_allocatable): Change function signature.
2067 Function now returns void.
2068 (gfc_allocate_using_lib): Ditto, and new function parameter.
2069 (gfc_allocate_using_malloc): Ditto.
2070 * trans-openmp.c (gfc_omp_clause_default_ctor,
2071 gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
2072 to gfc_allocate_allocatable with gfc_allocate_using_malloc.
2073 * trans-stmt.c (gfc_trans_allocate): Update function calls for
2074 gfc_allocate_allocatable and gfc_allocate_using_malloc.
2076 2011-07-26 Tobias Burnus <burnus@net-b.de>
2078 * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
2079 (gfc_conv_descriptor_token): New function.
2080 * trans-array.h (gfc_conv_descriptor_token): New prototype.
2081 * trans-types.c (gfc_get_array_descriptor_base): For coarrays
2082 with -fcoarray=lib, append "void *token" to the array descriptor.
2083 (gfc_array_descriptor_base_caf): New static variable.
2084 * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
2085 when passing a descriptor coarray to a nondescriptor dummy.
2087 2011-07-23 Tobias Burnus <burnus@net-b.de>
2089 * resolve.c (resolve_symbol): Fix coarray var decl check.
2091 2011-07-21 Daniel Carrera <dcarrera@gmail.com>
2093 * trans.c (gfc_allocate_with_status): Split into two functions
2094 gfc_allocate_using_malloc and gfc_allocate_usig_lib.
2095 (gfc_allocate_using_malloc): The status parameter is now the
2096 actual status rather than a pointer. Code cleanup.
2097 (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
2098 errlen. Pass these to the coarray lib.
2099 * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
2100 gfc_allocate_allocatable.
2101 (gfc_omp_clause_copy_ctor): Ditto.
2102 (gfc_trans_omp_array_reduction): Ditto.
2103 * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
2104 gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
2105 fuctions. If using coarray lib, pass errmsg and errlen to the allocate
2106 functions. Move error checking outside the if (!gfc_array_allocate)
2107 block so that it also affects trees produced by gfc_array_allocate.
2108 * trans-array.c (gfc_array_allocate): Add new parameters errmsg
2109 and errlen. Replace parameter pstat by status. Code cleanup. Update
2110 calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2111 * trans-array.h (gfc_array_allocate): Update signature of
2114 2011-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
2116 * gfortran.texi: Remove a duplicate word.
2118 2011-07-21 Tobias Burnus <burnus@net-b.de>
2120 * check.c (gfc_check_present): Allow coarrays.
2121 * trans-array.c (gfc_conv_array_ref): Avoid casting
2122 when a pointer is wanted.
2123 * trans-decl.c (create_function_arglist): For -fcoarray=lib,
2124 handle hidden token and offset arguments for nondescriptor
2126 * trans-expr.c (get_tree_for_caf_expr): New function.
2127 (gfc_conv_procedure_call): For -fcoarray=lib pass the
2128 token and offset for nondescriptor coarray dummies.
2129 * trans.h (lang_type): Add caf_offset tree.
2130 (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
2132 2011-07-19 Tobias Burnus <burnus@net-b.de>
2134 * expr.c (gfc_is_coarray): New function.
2135 * gfortran.h (gfc_is_coarray): New prototype.
2136 * interface.c (compare_parameter): Use it.
2138 2011-07-19 Richard Guenther <rguenther@suse.de>
2140 * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
2141 (gfc_trans_string_copy): Likewise.
2142 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
2143 * trans-types.c (gfc_get_array_descr_info): Likewise.
2144 * trans.c (gfc_build_array_ref): Likewise.
2146 2011-07-19 Janus Weil <janus@gcc.gnu.org>
2149 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
2151 2011-07-18 Tobias Burnus <burnus@net-b.de>
2153 * trans-decl.c (gfc_build_qualified_array): Make coarray's
2154 token TYPE_QUAL_RESTRICT.
2156 2011-07-18 Tobias Burnus <burnus@net-b.de>
2158 * resolve.c (resolve_transfer): Mention defined I/O
2159 in the diagnostic for alloc_comp/pointer_comp.
2161 2011-07-17 Tobias Burnus <burnus@net-b.de>
2164 * module.c (check_for_ambiguous): Check whether the name is matches
2165 the current program unit.
2167 2011-07-17 Tobias Burnus <burnus@net-b.de>
2170 * expr.c (gfc_check_pointer_assign): Fix checking for invalid
2173 2011-07-16 Tobias Burnus <burnus@net-b.de>
2175 * expr.c (gfc_ref_this_image): New function.
2176 (gfc_is_coindexed): Use it.
2177 * gfortran.h (gfc_ref_this_image): New prototype.
2178 * resolve.c (resolve_deallocate_expr,
2179 resolve_allocate_expr): Support alloc scalar coarrays.
2180 * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
2181 gfc_conv_descriptor_cosize, gfc_array_allocate,
2182 gfc_trans_deferred_array): Ditto.
2183 * trans-expr.c (gfc_conv_variable) Ditto.:
2184 * trans-stmt.c (gfc_trans_deallocate): Ditto.
2185 * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
2186 gfc_get_array_descr_info): Ditto.
2187 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2189 2011-07-11 Jakub Jelinek <jakub@redhat.com>
2192 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
2193 inner_size to gfc_index_one_node instead of integer_one_node.
2195 2011-07-10 Tobias Burnus <burnus@net-b.de>
2198 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
2200 2011-07-09 Uros Bizjak <ubizjak@gmail.com>
2203 * expr.c (gfc_get_corank): Change return value to int.
2204 * gfortran.h (gfc_get_corank): Update function prototype.
2206 2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
2209 * resolve.c (resolve_symbol): Force resolution of function result's
2210 array specification.
2212 2011-07-07 Tobias Burnus <burnus@net-b.de>
2214 * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
2215 with NULL arguments for (new) stat=/errmsg= arguments.
2217 2011-07-06 Daniel Carrera <dcarrera@gmail.com>
2219 * trans-array.c (gfc_array_allocate): Rename allocatable_array to
2220 allocatable. Rename function gfc_allocate_array_with_status to
2221 gfc_allocate_allocatable_with_status. Update function call for
2222 gfc_allocate_with_status.
2223 * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
2224 gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
2225 * trans-stmt.c (gfc_trans_allocate): Update function call for
2226 gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
2227 to gfc_allocate_allocatable_with_status.
2228 * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
2229 so it uses the library for memory allocation when -fcoarray=lib.
2230 (gfc_allocate_allocatable_with_status): Renamed from
2231 gfc_allocate_array_with_status.
2232 (gfc_allocate_allocatable_with_status): Update function call for
2233 gfc_allocate_with_status.
2234 * trans.h (gfc_coarray_type): New enum.
2235 (gfc_allocate_with_status): Update prototype.
2236 (gfc_allocate_allocatable_with_status): Renamed from
2237 gfc_allocate_array_with_status.
2238 * trans-decl.c (generate_coarray_sym_init): Use the new constant
2239 GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
2241 2011-07-06 Richard Guenther <rguenther@suse.de>
2243 * f95-lang.c (gfc_init_decl_processing):
2244 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2246 2011-07-04 Jakub Jelinek <jakub@redhat.com>
2249 * gfortranspec.c (lang_specific_driver): Ignore options with
2250 CL_ERR_MISSING_ARG errors.
2252 2011-07-02 Janus Weil <janus@gcc.gnu.org>
2255 * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
2257 2011-06-30 Jakub Jelinek <jakub@redhat.com>
2260 * gfortran.h (gfc_constructor): Add repeat field.
2261 * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
2262 * array.c (current_expand): Add repeat field.
2263 (expand_constructor): Copy repeat.
2264 * constructor.c (node_free, node_copy, gfc_constructor_get,
2265 gfc_constructor_lookup): Handle repeat field.
2266 (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
2267 * data.h (gfc_assign_data_value): Add mpz_t * argument.
2268 (gfc_assign_data_value_range): Removed.
2269 * constructor.h (gfc_constructor_advance): Removed.
2270 (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
2271 * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
2272 also handle overwriting a range with a single entry.
2273 (gfc_assign_data_value_range): Removed.
2274 * resolve.c (check_data_variable): Adjust gfc_assign_data_value
2275 call. Use gfc_assign_data_value instead of
2276 gfc_assign_data_value_expr.
2278 2011-06-27 Janus Weil <janus@gcc.gnu.org>
2281 * trans-array.c (structure_alloc_comps): Make sure sub-components
2282 and extended types are correctly deallocated.
2284 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
2286 * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
2287 * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
2288 * trans-decl.c: Add sync_ or SYNC__ to builtin names.
2290 2011-06-21 Janus Weil <janus@gcc.gnu.org>
2293 * class.c (gfc_find_derived_vtab): Make vtab and default initialization
2294 symbols SAVE_IMPLICIT.
2296 2011-06-20 Tobias Burnus <burnus@net-b.de>
2299 * gfortran.h (gfc_check_vardef_context): Update prototype.
2300 (iso_fortran_env_symbol): Handle derived types.
2301 (symbol_attribute): Add lock_comp.
2302 * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
2303 * interface.c (compare_parameter, gfc_procedure_use): Handle
2305 (compare_actual_formal): Update
2306 gfc_check_vardef_context call.
2307 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
2308 * intrinsic.c (check_arglist): Ditto.
2309 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
2310 * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
2311 * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
2312 * module.c (mio_symbol_attribute): Handle lock_comp.
2313 (create_derived_type): New function.
2314 (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
2315 * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
2316 * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
2317 checks for LOCK_TYPE.
2318 (gfc_resolve_iterator, resolve_deallocate_expr,
2319 resolve_allocate_expr, resolve_code, resolve_transfer): Update
2320 gfc_check_vardef_context call.
2321 * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
2322 * trans-stmt.c (gfc_trans_lock_unlock): New function.
2323 * trans.c (trans_code): Handle LOCK and UNLOCK.
2325 2011-06-18 Janus Weil <janus@gcc.gnu.org>
2328 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
2331 2011-06-17 Janus Weil <janus@gcc.gnu.org>
2334 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
2335 make sure the vtab is present.
2337 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2340 * interface.c (gfc_extend_assign): Propagate the locus from the
2341 assignment to the type-bound procedure call.
2343 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2346 * module.c (mio_component): Make sure the 'class_ok' attribute is set
2347 for use-associated CLASS components.
2348 * parse.c (parse_derived): Check for 'class_ok' attribute.
2349 * resolve.c (resolve_fl_derived): Ditto.
2351 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2353 * frontend-passes.c (remove_trim): New function.
2354 (optimize_assignment): Use it.
2355 (optimize_comparison): Likewise. Return correct status
2356 for previous change.
2358 2011-06-12 Tobias Burnus
2361 * trans-expr.c (gfc_trans_assignment_1): Tell
2362 gfc_trans_scalar_assign to also deep-copy RHS nonvariables
2363 with allocatable components.
2364 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
2366 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2368 * frontend-passes.c (optimize_assignment): Follow chains
2369 of concatenation operators to the end for removing trailing
2370 TRIMS for assignments.
2372 2011-06-10 Daniel Carrera <dcarrera@gmail.com>
2374 * trans-decl.c (gfc_build_builtin_function_decls):
2375 Updated declaration of caf_sync_all and caf_sync_images.
2376 * trans-stmt.c (gfc_trans_sync): Function
2377 can now handle a "stat" variable that has an integer type
2378 different from integer_type_node.
2380 2011-06-09 Richard Guenther <rguenther@suse.de>
2382 * trans.c (gfc_allocate_array_with_status): Mark error path
2385 2011-06-08 Tobias Burnus <burnus@net-b.de>
2388 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
2389 (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
2390 (gfc_code): Add expr4.
2391 * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
2392 * match.c (gfc_match_lock, gfc_match_unlock,
2393 lock_unlock_statement): New functions.
2394 (sync_statement): Bug fix, avoiding double freeing.
2395 (gfc_match_if): Handle LOCK/UNLOCK statement.
2396 * parse.c (decode_statement, next_statement,
2397 gfc_ascii_statement): Ditto.
2398 * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
2399 * resolve.c (resolve_lock_unlock): New function.
2400 (resolve_code): Call it.
2401 * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
2403 2011-06-07 Richard Guenther <rguenther@suse.de>
2405 * f95-lang.c (gfc_init_decl_processing): Do not set
2406 size_type_node or call set_sizetype.
2408 2011-06-05 Tobias Burnus <burnus@net-b.de>
2411 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
2414 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net>
2415 Thomas Koenig <tkoenig@gcc.gnu.org>
2417 * dump-parse-tree.c (show_symbol): Don't dump namespace
2418 for ENTRY to avoid infinite recursion.
2420 2011-06-02 Asher Langton <langton2@llnl.gov>
2423 * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
2424 pointees as AS_EXPLICIT.
2426 2011-06-02 Asher Langton <langton2@llnl.gov>
2429 * decl.c (variable_decl): Merge current_as before copying to cp_as.
2431 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
2434 * decl.c (gfc_match_modproc): Allow for a double colon in a module
2435 procedure statement.
2436 * parse.c ( decode_statement): Deal with whitespace around :: in
2439 2011-05-31 Tobias Burnus <burnus@net-b.de>
2442 * intrinsic.c (klass): Add CLASS_ATOMIC.
2443 (add_subroutines): Add atomic_ref/atomic_define.
2444 * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
2445 * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
2446 gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
2447 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
2448 and GFC_ISYM_ATOMIC_REF.
2449 (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
2450 * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
2452 * check.c (gfc_check_atomic, gfc_check_atomic_def,
2453 gfc_check_atomic_ref): New functions.
2454 * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
2455 ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
2456 * trans-intrinsic.c (conv_intrinsic_atomic_def,
2457 conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
2459 (conv_intrinsic_move_alloc) Renamed from
2460 gfc_conv_intrinsic_move_alloc - and made static.
2461 * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
2462 (gfc_conv_intrinsic_subroutine) Add prototype.
2463 * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
2464 * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
2466 (gfc_init_kinds): Set them.
2468 2011-05-31 Tobias Burnus <burnus@net-b.de>
2471 * trans-array.c (gfc_trans_dummy_array_bias): Handle
2472 cobounds of assumed-shape arrays.
2474 2011-05-31 Tobias Burnus <burnus@net-b.de>
2477 * resolve.c (resolve_fl_variable): Handle static coarrays
2478 with non-constant cobounds.
2480 2011-05-29 Janus Weil <janus@gcc.gnu.org>
2483 * module.c (mio_component_ref): Handle components of extended types.
2484 * symbol.c (gfc_find_component): Return is sym is NULL.
2486 2011-05-29 Tobias Burnus <burnus@net-b.de>
2489 * interface.c (compare_parameter): Add check for passing coarray
2490 to allocatable noncoarray dummy.
2492 2011-05-29 Tobias Burnus <burnus@net-b.de>
2493 Richard Guenther <rguenther@suse.de>
2496 * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
2497 the type's TREE_TYPE.
2498 * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
2499 * trans.c (gfc_build_array_ref): Ditto.
2501 2011-05-27 Tobias Burnus <burnus@net-b.de>
2504 * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
2505 * match.c (gfc_match_nullify): Ditto.
2506 * resolve.c (resolve_deallocate_expr): Ditto.
2507 * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
2510 2011-05-27 Tobias Burnus <burnus@net-b.de>
2513 * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
2514 * intrinsic.c (add_functions): Add rank intrinsic.
2515 (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
2516 * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
2517 * simplify.c (gfc_simplify_rank): New function.
2518 * intrinsic.texi (RANK): Add description for rank intrinsic.
2519 * check.c (gfc_check_rank): New function.
2521 2011-05-26 Paul Thomas <pault@gcc.gnu.org>
2522 Thomas Koenig <tkoenig@gcc.gnu.org>
2525 * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
2526 changed to GFC_ENABLE_REVERSE.
2527 * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
2528 to GFC_INHIBIT_REVERSE.
2529 * gfortran.h: Enum gfc_reverse is now GFC_ENABLE_REVERSE,
2530 GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
2531 * dependency.c (gfc_dep_resolver): Change names for elements of
2532 gfc_reverse as necessary. Change the logic so that forward
2533 dependences are remembered as well as backward ones. When both
2534 have appeared, force a temporary.
2536 2011-05-26 Tobias Burnus <burnus@net-b.de>
2539 * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
2540 * trans-decl.c (has_coarray_vars, caf_init_block,
2541 gfor_fndecl_caf_register): New file-global variables.
2542 (gfc_finish_var_decl): Make sure that coarrays in main are static.
2543 (gfc_build_qualified_array): Generate coarray token variable.
2544 (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
2545 (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
2546 (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
2548 (generate_local_decl): Check for local coarrays.
2549 (create_main_function): SYNC ALL before calling MAIN.
2550 (generate_coarray_sym_init): Register static coarray.
2551 (generate_coarray_init): Generate CAF registering constructor
2553 (gfc_generate_function_code): Call it, if needed, do not create
2555 (gfc_generate_module_vars, gfc_process_block_locals): Call
2556 generate_coarray_init.
2557 * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
2559 * trans.h (gfor_fndecl_caf_register): New variable.
2560 (lang_type): New element caf_token.
2561 (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
2563 2011-05-24 Joseph Myers <joseph@codesourcery.com>
2565 * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
2566 (gfortran$(exeext)): Use libcommon-target.a.
2568 2011-05-22 Thomas Koenig <tkoenig@gcc.gnu.org>
2570 * frontend-passes.c (cfe_register_funcs): Also register
2571 character functions if their charlens are known and constant.
2572 Also register allocatable functions.
2574 2011-05-21 Janus Weil <janus@gcc.gnu.org>
2577 * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
2578 selector is ALLOCATABLE.
2580 2011-05-20 Janus Weil <janus@gcc.gnu.org>
2583 * module.c (write_dt_extensions): Do not write extended types which
2584 are local to a subroutine.
2586 2011-05-20 Joseph Myers <joseph@codesourcery.com>
2588 * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
2590 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
2592 * gfortran.texi (set_fpe): Update documentation.
2593 * invoke.texi (-ffpe-trap): Likewise.
2594 * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
2595 * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
2596 precision an alias for it.
2598 2011-05-19 Tobias Burnus <burnus@net-b.de>
2601 * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
2602 (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
2604 * trans.c (gfc_build_array_ref): Return original type not variant
2605 copy for scalar coarrays.
2606 * trans-array.c (gfc_conv_array_ref): Ditto.
2608 2011-05-18 Janus Weil <janus@gcc.gnu.org>
2611 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
2612 argument to avoid memory leaks.
2614 2011-05-16 Tobias Burnus <burnus@net-b.de>
2616 * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
2617 (Fortran 2008 status): Multi-image support for coarrays.
2618 (TR 19113 status): New section.
2620 2011-05-15 Tobias Burnus <burnus@net-b.de>
2623 actual argument is not an array; rank mismatch is diagnosted later.
2624 * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
2626 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2628 2011-05-15 Joern Rennecke <amylaar@spamcop.net>
2631 * trans-types.c: Include "tm.h".
2632 [0] (c_size_t_size): Remove.
2634 2011-05-15 Janne Blomqvist <jb@gcc.gnu.org>
2637 * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
2638 is now the default, the library defaults to backtracing disabled.
2640 2011-05-14 Tobias Burnus <burnus@net-b.de>
2642 * lang.opt (fdump-core): Re-add as ignored option
2643 for backward compatibility.
2645 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2648 * gfortran.texi: Update mixed-language programming section
2649 reflecting the removal of the fdump-core option, and that
2650 -fbacktrace is now enabled by default.
2652 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2655 * frontend-passes.c (cfe_register_funcs): Also register functions
2656 for potential elimination if the rank is > 0, the shape is unknown
2657 and reallocate on assignment is active.
2658 (create_var): For rank > 0 functions with unknown shape, create
2659 an allocatable temporary.
2661 2011-05-14 Tobias Burnus <burnus@net-b.de>
2664 * interface.c (compare_parameter): Skip diagnostic if
2665 actual argument is not an array; rank mismatch is diagnosted later.
2667 2011-05-14 Tobias Burnus <burnus@net-b.de>
2669 * options.c (gfc_init_options, gfc_post_options): Enable
2670 -fstack-arrays by default if -Ofast is used.
2671 * invoke.texi (-fstack-arrays): Document this.
2673 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2676 * gfortran.h (gfc_option_t): Remove flag_dump_core.
2677 * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
2678 (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
2679 * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
2680 * invoke.texi: Remove -fdump-core, document that -fbacktrace is
2682 * lang.opt: Remove -fdump-core.
2683 * options.c (gfc_init_options): Make backtrace default to enabled,
2685 (gfc_handle_option): Remove OPT_fdump-core.
2686 * trans-decl.c: Pass a 0 to preserve ABI.
2688 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2690 * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
2692 2011-05-13 Tobias Burnus <burnus@net-b.de>
2695 * io.c (resolve_tag_format, resolve_tag): Make sure
2696 that the string is of default kind.
2697 (gfc_resolve_inquire): Also resolve decimal tag.
2699 2011-05-12 Tobias Burnus <burnus@net-b.de>
2702 * resolve.c (resolve_intrinsic): Don't resolve module
2703 intrinsics multiple times.
2705 2011-05-11 Tobias Burnus <burnus@net-b.de>
2708 * expr.c (gfc_is_constant_expr): Use e->value.function.esym
2709 instead of e->symtree->n.sym, if available.
2711 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2713 * f95-lang.c (global_bindings_p): Return bool and simplify.
2715 2011-05-07 Tobias Burnus <burnus@net-b.de>
2719 * trans.h: Move gfc_init_coarray_decl prototype ...
2720 * gfortran.h: ... to here.
2721 * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
2722 (gfc_parse_file): Update translate_all_program_units call.
2723 * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
2724 new argument whether DECL_EXTERNAL should be used.
2725 (create_main_function): Update gfc_init_coarray_decl call.
2726 * trans-intrinsic.c (trans_this_image, trans_image_index,
2727 conv_intrinsic_cobound): Ditto.
2729 2011-05-06 Tobias Burnus <burnus@net-b.de>
2732 * trans-array.c (gfc_walk_variable_expr): Continue walking
2733 for scalar coarrays.
2734 * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
2735 (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
2736 (trans_this_image): Fix algorithm.
2737 * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
2738 gfc_sym_type): Handle scalar coarrays.
2740 2011-05-06 Tobias Burnus <burnus@net-b.de>
2744 * lang.opt (std=f2008tr): New.
2745 * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
2746 * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
2747 procedures for -std=f2008tr/gnu/legacy.
2748 (gfc_match_import): Set sym to NULL.
2749 * options.c (set_default_std_flags,gfc_handle_option): Handle
2751 * invoke.texi (-std=): Document -std=f2008tr.
2753 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2755 * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
2756 * trans-io.c (add_case): Likewise.
2757 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2758 (gfc_trans_character_select): Likewise.
2760 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2762 * trans-decl.c (trans_function_start): Do not set
2763 dont_save_pending_sizes_p.
2765 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2767 * trans.h (gfc_chainon_list): Delete.
2768 * trans.c (gfc_chainon_list): Delete.
2770 2011-05-04 Tobias Burnus <burnus@net-b.de>
2773 * invoke.texi (fno-protect-parens): Document
2774 that -Ofast implies -fno-protect-parens.
2775 * options.c (gfc_init_options, gfc_post_options):
2776 Make -Ofast imply -fno-protect-parens.
2778 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2780 * trans-decl.c (build_library_function_decl_1): Call
2781 build_function_type_vec. Adjust argument list building accordingly.
2782 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
2783 * trans-types.c (gfc_get_function_type): Likewise.
2785 2011-05-04 Richard Guenther <rguenther@suse.de>
2787 * trans-array.c (gfc_trans_array_constructor_value): Use
2788 size_int for bounds of range types.
2789 (gfc_trans_array_constructor_value): Use size_type_node
2790 for memcpy argument.
2791 * trans-common.c (build_field): Use gfc_charlen_type_node
2793 * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
2794 as type to build_int_cst.
2795 * trans-const.c (gfc_build_string_const): Use size_int
2796 for bounds of range types.
2797 (gfc_build_wide_string_const): Likewise.
2798 * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
2800 (gfc_trans_character_select): Likewise.
2801 (gfc_trans_character_select): Do not pass NULL
2802 as type to build_int_cst.
2803 (gfc_trans_character_select): Use size_int for bounds of range types.
2804 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2805 (add_case): Do not pass NULL as type to build_int_cst.
2806 (transfer_expr): Likewise.
2807 (transfer_array_desc): Likewise.
2808 * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
2810 (gfc_trans_assign_aux_var): Likewise.
2811 (create_main_function): Use size_int for bounds of range types.
2812 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
2813 NULL as type to build_int_cst.
2814 (gfc_conv_intrinsic_spacing): Likewise.
2815 (gfc_conv_intrinsic_rrspacing): Likewise.
2816 (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
2818 2011-05-04 Richard Guenther <rguenther@suse.de>
2820 * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
2821 argument to int_const_binop.
2823 2011-05-03 Tobias Burnus <burnus@net-b.de>
2826 * trans-intrinsic.c (trans_this_image): Implement version with
2828 (conv_intrinsic_cobound): Simplify code.
2829 (gfc_conv_intrinsic_function): Call trans_this_image for
2830 this_image(coarray) except for -fcoarray=single.
2832 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
2835 * gfortran.texi: Document the 'Q' exponent-letter extension.
2836 * invoke.texi: Document -Wreal-q-constant.
2837 * lang.opt: Add -Wreal-q-constant option.
2838 * gfortran.h: Add warn_real_q_constant to option struct.
2839 * primary.c (match_real_constant): Use it. Accept 'Q' as
2840 exponent-letter for REAL(16) real-literal-constant with a
2841 fallback to REAL(10) or error if REAL(10) is not available.
2842 * options.c (gfc_init_options, set_Wall) Set it.
2843 (gfc_handle_option): Handle new option.
2845 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2847 * dump-prase-tree.c (show_code_node): Set the current
2848 namespace to the BLOCK before displaying it; restore
2851 2011-04-30 Tobias Burnus <burnus@net-b.de>
2854 * decl.c (gfc_match_import): Don't try to find the
2855 symbol if already found.
2857 2011-04-30 Paul Thomas <pault@gcc.gnu.org>
2860 * trans-expr.c (fcncall_realloc_result): Set the bounds and the
2861 offset so that the lbounds are one.
2862 (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
2864 2011-04-29 Paul Thomas <pault@gcc.gnu.org>
2867 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
2868 automatic reallocation when the lhs is a target.
2871 * trans-expr.c (fcncall_realloc_result): Make sure that the
2872 result dtype field is set before the function call.
2874 2011-04-29 Tobias Burnus <burnus@net-b.de>
2877 * resolve.c (resolve_typebound_generic_call): Don't check access
2878 flags of the specific function.
2881 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
2882 to AS_ASSUMED_SHAPE for function results.
2883 (resolve_fl_var_and_proc): Print also for function results with
2884 AS_DEFERRED an error, if they are not a pointer or allocatable.
2885 (resolve_types): Make sure arguments of procedures in interface
2886 blocks are resolved.
2888 2011-04-29 Michael Matz <matz@suse.de>
2890 * options.c (options.c): Set warn_maybe_uninitialized.
2892 2011-04-28 Tobias Burnus <burnus@net-b.de>
2895 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
2896 function results only once.
2897 (resolve_symbol): Always resolve function results.
2900 * expr.c (gfc_check_vardef_context): Fix handling of generic
2902 * interface.c (check_interface0): Reject internal functions
2903 in generic interfaces, unless -std=gnu.
2905 2011-04-27 Tobias Burnus <burnus@net-b.de>
2908 * resolve.c (resolve_global_procedure): Error recovery -
2909 avoid segfault for (non)character-returning functions.
2911 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2913 * decl.c (gfc_match_end): Check that the block name starts
2915 * parse.c (gfc_build_block_ns): Make block names unique by
2918 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2920 * frontend-passes.c (inserted_block): New variable.
2921 (changed_statement): Likewise.
2922 (create_var): Encase statement to be operated on in a BLOCK.
2923 Adjust code insertion for BLOCK.
2924 (cfe_code): Set inserted_block and changed_statement to NULL.
2926 2011-04-23 Tobias Burnus <burnus@net-b.de>
2929 * module.c (mio_array_spec): Set as->cotype on reading.
2930 * resolve.c (resolve_allocate_expr): Fix allocating coarray
2933 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2936 * frontend_passes (cfe_register_funcs): Remove workaround for DO
2938 (gfc_code_walker): Make sure the pointer to the current
2939 statement doen't change when other statements are inserted.
2941 2011-04-21 Tobias Burnus <burnus@net-b.de>
2944 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
2946 2011-04-20 Jim Meyering <meyering@redhat.com>
2948 * expr.c (free_expr0): Remove useless if-before-free.
2949 * gfortranspec.c (lang_specific_pre_link): Likewise.
2950 * interface.c (gfc_extend_expr): Likewise.
2951 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2953 2011-04-19 Tobias Burnus <burnus@net-b.de>
2958 * module.c (fix_mio_expr): Commit created symbol.
2960 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2962 * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
2964 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2966 * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
2969 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2971 * misc.c (gfc_getmem): Remove function.
2972 * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
2973 usage with XCNEW or XCNEWVEC.
2974 * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
2976 * options.c (gfc_handle_module_path_options)
2977 (gfc_get_option_string): Likewise.
2978 * resolve.c (gfc_resolve_forall): Likewise.
2979 * simplify.c (simplify_transformation_to_array): Likewise.
2980 * target-memory.c (gfc_target_interpret_expr): Likewise.
2981 * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
2982 (get_init_field): Likewise.
2983 * trans-expr.c (gfc_conv_statement_function): Likewise.
2984 * trans-io.c (nml_full_name): Likewise.
2985 * trans-stmt.c (gfc_trans_forall_1): Likewise.
2986 * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
2988 2011-04-19 Tobias Burnus <burnus@net-b.de>
2991 * parse.c (resolve_all_program_units): Skip modules.
2992 (translate_all_program_units): Handle modules.
2993 (gfc_parse_file): Defer code generation for modules.
2995 2011-04-19 Martin Jambor <mjambor@suse.cz>
2997 * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
2998 instead of cgraph_get_create_node.
3000 2011-04-18 Jim Meyering <meyering@redhat.com>
3002 remove now-unused definition of gfc_free
3003 * misc.c (gfc_free): Remove function.
3004 * gfortran.h (gfc_free): Remove its prototype.
3006 2011-04-18 Jim Meyering <meyering@redhat.com>
3008 convert each use of gfc_free (p) to free (p)
3009 Do that by running this command:
3010 perl -pi -e 's/\bgfc_free ?\(/free (/' \
3011 $(git grep -El '\bgfc_free ?\(')
3012 which also corrects the few uses that lacked a space between
3013 the function name and the open parenthesis.
3014 Manually undo the change to the function definition itself
3015 and its prototype. They'll be removed next.
3016 * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
3017 * constructor.c (node_free): Likewise.
3018 * cpp.c (dump_queued_macros): Likewise.
3019 * data.c (gfc_assign_data_value): Likewise.
3020 * decl.c (free_variable, free_value, gfc_free_data): Likewise.
3021 (gfc_free_data_all, match_old_style_init): Likewise.
3022 (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
3024 (gfc_match_modproc): Likewise.
3025 * dependency.c (check_section_vs_section): Likewise.
3026 * error.c (gfc_pop_error, gfc_free_error): Likewise.
3027 * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
3028 (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
3029 (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
3031 * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
3032 (strip_function_call, optimize_comparison): Likewise.
3033 * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
3034 (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
3036 * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
3037 (gfc_convert_chartype): Likewise.
3038 * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
3040 (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
3041 * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
3042 (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
3044 (free_case, gfc_free_forall_iterator): Likewise.
3046 * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
3047 (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
3048 (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
3049 (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
3050 (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
3051 (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
3052 * openmp.c (gfc_free_omp_clauses): Likewise.
3053 * options.c (gfc_post_options): Likewise.
3054 * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
3055 * primary.c (gfc_free_structure_ctor_component): Likewise.
3056 * resolve.c (resolve_structure_cons, check_host_association): Likewise.
3057 (gfc_resolve_forall, resolve_equivalence): Likewise.
3058 * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
3059 (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
3060 (load_file, gfc_read_orig_filename): Likewise.
3061 * simplify.c (simplify_transformation_to_array): Likewise.
3062 (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
3064 (gfc_simplify_compiler_options): Likewise.
3065 * st.c (gfc_free_statement, gfc_free_statements): Likewise.
3066 (gfc_free_association_list): Likewise.
3067 * symbol.c (free_components, gfc_free_st_label, free_st_labels):
3069 (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
3070 (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
3071 (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
3072 (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
3074 (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
3075 (gfc_free_namespace): Likewise.
3076 * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
3077 (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
3078 (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
3079 * trans-common.c (get_init_field, create_common): Likewise.
3080 * trans-const.c (gfc_build_wide_string_const): Likewise.
3081 (gfc_conv_string_init): Likewise.
3082 * trans-decl.c (gfc_generate_function_code): Likewise.
3083 * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
3085 (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
3086 (gfc_trans_subarray_assign): Likewise.
3087 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
3088 * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
3089 (transfer_namelist_element, transfer_array_component): Likewise.
3090 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
3091 * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
3092 * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
3095 2011-04-15 Jim Meyering <meyering@redhat.com>
3097 gfortran: remove cpp definition of free, ...
3098 in preparation for the s/gfc_free/free/ transformation.
3099 * gfortran.h (free): Remove macro definition that would otherwise
3100 prevent direct use of the function.
3102 2011-04-18 Tobias Burnus <burnus@net-b.de>
3105 * array.c (gfc_match_array_ref): Check for too many codimensions.
3106 * check.c (gfc_check_image_index): Check number of elements
3108 * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
3110 2011-04-18 Tobias Burnus <burnus@net-b.de>
3113 * iresolve.c (gfc_resolve_image_index): Set ts.type.
3114 * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
3115 are not known at compile time and handle -fcoarray=lib.
3116 * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
3118 (conv_intrinsic_cobound): Fix comment typo.
3119 (trans_this_image): New function.
3120 * trans-array.c (gfc_unlikely): Move to trans.c.
3121 * trans.c (gfc_unlikely): Function moved from trans-array.c.
3122 (gfc_trans_runtime_check): Use it.
3123 * trans-io.c (gfc_trans_io_runtime_check): Ditto.
3124 * trans.h (gfc_unlikely): Add prototype.
3126 2011-04-18 Paul Thomas <pault@gcc.gnu.org>
3129 * trans-expr.c (fcncall_realloc_result): Renamed version of
3130 realloc_lhs_bounds_for_intrinsic_call that does not touch the
3131 descriptor bounds anymore but makes a temporary descriptor to
3133 (gfc_trans_arrayfunc_assign): Modify the reference to above
3136 2011-05-17 Tobias Burnus <burnus@net-b.de>
3139 * trans-decl.c (gfc_get_extern_function_decl): Fix decl
3140 for external procedures with proc arguments.
3142 2011-04-15 Michael Matz <matz@suse.de>
3144 * trans-array.c (toplevel): Include gimple.h.
3145 (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
3146 properly expand variable length arrays.
3147 (gfc_trans_auto_array_allocation): If flag_stack_arrays create
3148 variable length decls and associate them with their scope.
3149 * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
3150 * options.c (gfc_init_options): Handle -fstack_arrays option.
3151 * lang.opt (fstack-arrays): Add option.
3152 * invoke.texi (Code Gen Options): Document it.
3153 * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
3155 2011-04-15 Tobias Burnus <burnus@net-b.de>
3158 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
3159 code which is also causing an ICE.
3161 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3163 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
3165 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3167 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
3170 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
3174 * trans-array.c (get_std_lbound): For derived type variables
3175 return array valued component lbound.
3177 2011-04-12 Martin Jambor <mjambor@suse.cz>
3179 * trans-decl.c (gfc_generate_function_code): Call
3180 cgraph_get_create_node instead of cgraph_node.
3182 2011-04-11 Tobias Burnus <burnus@net-b.de>
3185 * simplify.c (simplify_bound_dim): Exit for
3186 ucobound's last dimension unless -fcoarray=single.
3187 * trans-array (gfc_conv_descriptor_size_1): Renamed from
3188 gfc_conv_descriptor_size, made static, has now from_dim and
3190 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
3191 (gfc_conv_descriptor_cosize): New function.
3192 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
3193 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
3194 and handle last codim of ucobound for when -fcoarray is not "single".
3196 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3199 * gfortran.h (gfc_option_t): Add warn_function_elimination and
3200 flag_frontend_optimize.
3201 * lang.opt (Wfunction-elimination): Add.
3202 (ffrontend-optimize): Add.
3203 * invoke.texi: Add documentation for -Wfunction-elimination
3204 and -ffrontend-optimize. Add -faggressive-function-elimination
3205 to list of code generation options.
3206 * frontend-passes.c (gfc_run_passes): Run optimizations if
3207 flag_frontend_optimize is set.
3208 (warn_function_elimination): New function.
3209 (cfe_expr_0): Call it if requested to do so.
3210 * options.c (gfc_init_options): Initiate warn_function_elimination
3211 and flag_frontend_optimize.
3212 (gfc_post_options): Set flag_frontend_optimize if not specified
3213 by user, depending on the optimization level.
3214 (gfc_handle_option): Handle -Wfunction-elimination and
3215 -ffrontend-optimize.
3217 2011-04-06 Tobias Burnus <burnus@net-b.de>
3220 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
3221 call for this_image.
3223 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
3225 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
3226 build_function_type_list instead of build_function_type. Correct
3227 argument order for func_frexp and func_scalbn.
3229 2011-04-05 Duncan Sands <baldrick@free.fr>
3231 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
3233 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
3235 * frontend-passes: (optimize_lexical_comparison): New function.
3236 (optimize_expr): Call it.
3237 (optimize_comparison): Also handle lexical comparison functions.
3238 Return false instad of -2 for unequal comparison.
3240 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
3243 * frontend-passes (cfe_expr_0): Reverse the order of going
3246 2011-04-04 Tobias Burnus <burnus@net-b.de>
3247 Mikael Morin <mikael.morin@sfr.fr>
3250 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
3251 * expr.c (gfc_is_coindexed): Ditto.
3252 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
3253 * interface.c (compare_parameter): Use gfc_expr_attr and
3255 * resolve.c (check_dimension, compare_spec_to_ref,
3256 resolve_allocate_expr, check_data_variable): Update for
3258 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
3259 gfc_simplify_ucobound): Allow non-constant bounds.
3260 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
3261 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
3262 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
3263 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
3264 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
3265 gfc_conv_ss_startstride, gfc_conv_loop_setup,
3266 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
3267 gfc_walk_variable_expr): Handle codimen.
3268 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
3269 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
3270 (conv_intrinsic_cobound): New function.
3271 (gfc_conv_intrinsic_function): Call it.
3272 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
3273 ucobound, lcobound, this_image.
3274 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
3275 (gfc_get_dtype): Honour corank.
3276 (gfc_get_nodesc_array_type): Save corank and codimensions.
3277 (gfc_get_array_type_bounds): Save cobound.
3278 * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
3279 (gfc_array_kind): Add corank item.
3280 (GFC_TYPE_ARRAY_CORANK): New macro.
3282 2011-04-03 Kai Tietz <ktietz@redhat.com>
3285 * Make-lang.in (f95-lang.o): Add some missing dependencies.
3287 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3290 * frontend-passes (cfe_register_funcs): Don't
3291 register functions if they appear as iterators in DO loops.
3293 2011-03-30 Michael Matz <matz@suse.de>
3296 * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
3297 don't use local variable.
3298 (gfc_trans_arrayfunc_assign): Adjust caller.
3300 2011-03-29 Janus Weil <janus@gcc.gnu.org>
3303 * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
3304 * module.c (MOD_VERSION): Bump.
3305 (mio_typespec): Read/write 'interface' field.
3306 * primary.c (match_string_constant,match_logical_constant): Remove
3308 (match_complex_constant): Make sure to clear the typespec.
3310 2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
3312 * frontend-passes.c (create_var): Warn about creating an
3313 array temporary if requested.
3315 2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3318 * frontend-passes.c (optimize_trim): Also follow references, except
3319 when they are substring references or array references.
3321 2011-03-27 Tobias Burnus <burnus@net-b.de>
3324 * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
3325 GFC_ISYM_NUM_IMAGES.
3326 (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
3327 * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
3329 * invoke.texi (-fcoarray=): Document "lib" argument.
3330 * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
3331 * libgfortran.h (libgfortran_stat_codes): Add comments.
3332 * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
3333 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
3334 Handle GFC_FCOARRAY_LIB.
3335 * trans.h (gfc_init_coarray_decl): New prototype.
3336 (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
3337 gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
3338 gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
3339 gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
3340 gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
3341 New global variables.
3342 * trans-decl.c: Declare several CAF functions (cf. above).
3343 (gfc_build_builtin_function_decls): Initialize those.
3344 (gfc_init_coarray_decl): New function.
3345 (create_main_function): Call CAF init/finalize functions.
3346 * trans-intrinsic.c (trans_this_image, trans_num_images): New.
3347 (gfc_conv_intrinsic_function): Call those.
3348 * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
3349 Add code for GFC_FCOARRAY_LIB.
3351 2011-03-26 Janus Weil <janus@gcc.gnu.org>
3354 * class.c (get_unique_hashed_string): Adjust maximum allowable length
3355 for unique type string.
3357 2011-03-25 Kai Tietz <ktietz@redhat.com>
3359 * scanner.c (preprocessor_line): Use filename_cmp
3362 2011-03-25 Tobias Burnus <burnus@net-b.de>
3366 * trans-types.c (gfc_get_function_type): Don't use varargs if the
3367 procedure is known to have no arguments.
3369 2011-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3372 * gfortran.h (gfc_option_t): Add
3373 flag_aggressive_function_elimination.
3374 (gfc_dep_compare_functions): Add prototype.
3375 * lang.opt: Add faggressive-function-elimination.
3376 * invoke.texi: Document -faggressive-function-elimination.
3377 * frontend_passes (expr_array): New static variable.
3378 (expr_size): Likewise.
3379 (expr_count): Likewise.
3380 (current_code): Likewise.