1 2012-01-06 Tobias Burnus <burnus@net-b.de>
3 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
4 Update call to gfc_trans_dealloc_allocated.
5 * trans.c (gfc_allocate_using_malloc): Fix spacing.
6 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
7 label_finish when an error occurs.
8 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
9 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
11 (gfor_fndecl_caf_deregister): New tree symbol.
12 * trans-expr.c (gfc_conv_procedure_call): Update
13 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
14 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
15 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
16 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
17 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
18 gfc_trans_dealloc_allocated): Update prototypes.
19 * trans-stmt.c (gfc_trans_sync): Fix indentation.
20 (gfc_trans_allocate): Fix errmsg padding and label handling.
21 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
22 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
23 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
24 to avoid other stats accidentally matching this one.
25 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
26 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
27 and add decl for caf_deregister.
28 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
29 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
30 gfc_deallocate_with_status.
32 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
35 * resolve.c (resolve_typebound_static): If the typebound
36 procedure is 'deferred' try to find the correct specific
37 procedure in the derived type operator space itself.
39 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
42 * trans-array.h (gfc_walk_elemental_function_args): New argument.
43 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
44 * trans-stmt.c (gfc_trans_call): Ditto.
45 * trans-array.c (gfc_walk_function_expr): Ditto.
46 (gfc_walk_elemental_function_args): Get the dummy argument list
47 if possible. Check that the dummy and the actual argument are both
48 optional, and set can_be_null_ref accordingly.
50 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
53 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
54 * trans-array.c: If the reference can be NULL, save the reference
56 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
59 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
61 * trans-expr.c (gfc_conv_expr): Move address taking...
62 (gfc_conv_expr_reference): ... here.
64 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
67 * trans-common.c (create_common): Update copyright years. Mark
68 variables as used to avoid warnings about unused variables in
71 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
73 * gfortran.h (struct gfc_expr): Add missing "struct"
74 qualifier for member base_expr.
76 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
79 * trans-array.c (gfc_array_allocate): Null allocated memory of
80 newly allocted class arrays.
85 * interface.c(build_compcall_for_operator): Add a type to the
87 * trans-expr.c (conv_base_obj_fcn_val): New function.
88 (gfc_conv_procedure_call): Use base_expr to detect non-variable
89 base objects and, ensuring that there is a temporary variable,
90 build up the typebound call using conv_base_obj_fcn_val.
91 (gfc_trans_class_assign): Pick out class procedure pointer
92 assignments and do the assignment with no further prcessing.
93 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
94 gfc_trans_class_assign): Move to top of file.
95 * gfortran.h : Add 'base_expr' field to gfc_expr.
96 * resolve.c (get_declared_from_expr): Add 'types' argument to
97 switch checking of derived types on or off.
98 (resolve_typebound_generic_call): Set the new argument.
99 (resolve_typebound_function, resolve_typebound_subroutine):
100 Set 'types' argument for get_declared_from_expr appropriately.
101 Identify base expression, if not a variable, in the argument
102 list of class valued calls. Assign it to the 'base_expr' field
103 of the final expression. Strip away all references after the
104 last class reference.
106 2012-01-02 Tobias Burnus <burnus@net-b.de>
109 * trans-intrinsic.c (trans_this_image, trans_image_index,
110 trans_num_images, conv_intrinsic_cobound): Fold_convert the
111 caf_num_images/caf_this_images variables to the correct int kind.
113 2012-01-01 Jakub Jelinek <jakub@redhat.com>
115 * gfortranspec.c (lang_specific_driver): Update copyright notice
118 2011-12-31 Thomas König <tkoenig@gcc.gnu.org>
121 * expr.c (gfc_check_vardef_context): When determining
122 implicit pure status, also check for variable definition
123 context. Walk up namespaces until a procedure is
124 found to reset the implict pure attribute.
125 * resolve.c (gfc_implicit_pure): Walk up namespaces
126 until a procedure is found.
128 2011-12-29 Thomas Koenig <tkoenig@gcc.gnu.org>
130 * dependency.c (gfc_dep_compare_functions): Document
131 new behavior for REALs and complex. Add comment to cases
132 where only INTEGERs are handled. Compare REAL and COMPLEX
133 constants, returning 0 and -2 only. Add assert to make
134 sure that only integer constants are compared.
136 2011-12-19 Tobias Burnus <burnus@net-b.de>
139 * parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as
142 2011-12-19 Tobias Burnus <burnus@net-b.de>
145 * match.c (gfc_match_select_type): Handle
146 scalar polymophic coarrays.
147 (select_type_set_tmp, ): Ditto; avoid segfault if !class_ok.
148 * primary.c (gfc_match_rvalue): Avoid segfault if !class_ok.
149 * resolve.c (resolve_select_type): Ditto.
150 (resolve_assoc_var): Fix setting the TARGET attribute for
151 polymorphic selectors which are pointers.
153 2011-12-19 Tobias Burnus <burnus@net-b.de>
155 * check.c (coarray_check): Add class ref if needed.
156 * resolve.c (resolve_fl_var_and_proc,
157 resolve_fl_derived0, resolve_symbol): Fix checking
160 2011-12-15 Paul Thomas <pault@gcc.gnu.org>
162 * trans-expr.c (gfc_walk_function_expr): Detect elemental
163 procedure components as well as elemental procedures.
164 * trans-array.c (gfc_conv_procedure_call): Ditto.
165 * trans-decl.c (gfc_trans_deferred_vars): Correct erroneous
166 break for class pointers to continue.
168 2011-12-15 Toon Moene <toon@moene.org>
171 * resolve.c (build_default_init_expr): Allow non-allocatable,
172 non-compile-time-constant-shape arrays to have a default
174 * invoke.texi: Delete the restriction on automatic arrays not
175 being initialized by -finit-<type>=<constant>.
177 2011-12-15 Tobias Burnus <burnus@net-b.de>
183 * resolve.c (resolve_fl_derived0): Print not-implemented error
184 for deferred-length character components.
186 2011-12-15 Tobias Burnus <burnus@net-b.de>
188 * primary.c (gfc_match_varspec): Match array spec for
189 polymorphic coarrays.
190 (gfc_match_rvalue): If a symbol of unknown flavor has a
191 codimension, mark it as a variable.
192 * simplify.c (gfc_simplify_image_index): Directly call
194 * trans-intrinsic.c (trans_this_image): Fix handling of
197 2011-12-15 Jakub Jelinek <jakub@redhat.com>
200 * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span.
201 (gfc_trans_deferred_vars): Instead add its runtime initialization
204 2011-12-11 Tobias Burnus <burnus@net-b.de>
207 * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
208 if the front end has printed a warning.
209 (gfc_generate_function_code): Fix unset-result warning.
211 2011-12-11 Paul Thomas <pault@gcc.gnu.org>
212 Tobias Burnus <burnus@gcc.gnu.org>
221 * interface.c (symbol_rank): Return the rank of the _data
222 component of class objects.
223 (compare_parameter): Also compare the derived type of the class
224 _data component for type mismatch. Similarly, return 1 if the
225 formal and _data ranks match.
226 (compare_actual_formal): Do not compare storage sizes for class
227 expressions. It is an error if an actual class array, passed to
228 a formal class array is not full.
229 * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get,
230 gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get,
231 gfc_vtable_extends_get, gfc_vtable_def_init_get,
232 gfc_vtable_copy_get): New functions for class API.
233 (gfc_conv_derived_to_class): For an array reference in an
234 elemental procedure call retain the ss to provide the
235 scalarized array reference. Moved in file.
236 (gfc_conv_class_to_class): New function.
237 (gfc_conv_subref_array_arg): Use the type of the
238 class _data component as a basetype.
239 (gfc_conv_procedure_call): Ensure that class array expressions
240 have both the _data reference and an array reference. Use
241 gfc_conv_class_to_class to handle class arrays for elemental
242 functions in scalarized loops, class array elements and full
243 class arrays. Use a call to gfc_conv_subref_array_arg in order
244 that the copy-in/copy-out for passing class arrays to derived
245 type arrays occurs correctly.
246 (gfc_conv_expr): If it is missing, add the _data component
247 between a class object or component and an array reference.
248 (gfc_trans_class_array_init_assign): New function.
249 (gfc_trans_class_init_assign): Call it for array expressions.
250 * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for
251 class scalars since their size will depend on the dynamic type.
252 (build_class_array_ref): New function.
253 (gfc_conv_scalarized_array_ref): Call build_class_array_ref.
254 (gfc_array_init_size): Add extra argument, expr3, that represents
255 the SOURCE argument. If present,use this for the element size.
256 (gfc_array_allocate): Also add argument expr3 and use it when
257 calling gfc_array_init_size.
258 (structure_alloc_comps): Enable class arrays.
259 * class.c (gfc_add_component_ref): Carry over the derived type
260 of the _data component.
261 (gfc_add_class_array_ref): New function.
262 (class_array_ref_detected): New static function.
263 (gfc_is_class_array_ref): New function that calls previous.
264 (gfc_is_class_scalar_expr): New function.
265 (gfc_build_class_symbol): Throw not implemented error for
266 assumed size class arrays. Remove error that prevents
268 (gfc_build_class_symbol): Prevent pointer/allocatable conflict.
269 Also unset codimension.
270 (gfc_find_derived_vtab): Make 'copy' elemental and set the
271 intent of the arguments accordingly.:
272 * trans-array.h: Update prototype for gfc_array_allocate.
273 * array.c (gfc_array_dimen_size): Return failure if class expr.
274 (gfc_array_size): Likewise.
275 * gfortran.h: New prototypes for gfc_add_class_array_ref,
276 gfc_is_class_array_ref and gfc_is_class_scalar_expr.
277 * trans-stmt.c (trans_associate_var): Exclude class targets
278 from test. Move the allocation of the _vptr to an earlier time
280 (trans_associate_var): Assign the descriptor directly for class
282 (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments.
283 Convert array element references into sections. Do not invoke
284 gfc_conv_procedure_call, use gfc_trans_call instead.
285 * expr.c (gfc_get_corank): Fix for BT_CLASS.
286 (gfc_is_simply_contiguous): Exclude class from test.
287 * trans.c (gfc_build_array_ref): Include class array refs.
288 * trans.h: Include prototypes for class API functions that are
289 new in trans-expr. Define GFC_DECL_CLASS(node).
290 * resolve.c (check_typebound_baseobject ): Remove error for
291 non-scalar base object.
292 (resolve_allocate_expr): Ensure that class _data component is
293 present. If array, call gfc_expr_to_intialize.
294 (resolve_select): Remove scalar error for SELECT statement as a
296 (resolve_assoc_var): Update 'target' (aka 'selector') as
297 needed. Ensure that the target expression has the right rank.
298 (resolve_select_type): Ensure that target expressions have a
300 (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS.
301 * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where
303 (gfc_trans_deferred_vars): Get class arrays right.
304 * match.c(select_type_set_tmp): Add array spec to temporary.
305 (gfc_match_select_type): Allow class arrays.
306 * check.c (array_check): Ensure that class arrays have refs.
307 (dim_corank_check, dim_rank_check): Retrun success if class.
308 * primary.c (gfc_match_varspec): Fix for class arrays and
309 co-arrays. Make sure that class _data is present.
310 (gfc_match_rvalue): Handle class arrays.
311 *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array
313 (gfc_conv_allocated): Add _data component to class expressions.
314 (gfc_add_intrinsic_ss_code): ditto.
315 * simplify.c (simplify_cobound): Fix for BT_CLASS.
316 (simplify_bound): Return NULL for class arrays.
317 (simplify_cobound): Obtain correct array_spec. Use cotype as
318 appropriate. Use arrayspec for bounds.
320 2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
323 * frontend-passes.c (in_omp_workshare): New variable.
324 (cfe_expr_0): Don't eliminiate common function if it would put
325 the variable immediately into a WORKSHARE construct.
326 (optimize_namespace): Set in_omp_workshare.
327 (gfc_code_walker): Keep track of OMP PARALLEL and OMP WORKSHARE
330 2011-12-10 Tobias Burnus <burnus@net-b.de>
332 * trans-decl.c (add_argument_checking): Fix syntax.
334 2011-12-10 Tobias Burnus <burnus@net-b.de>
335 Kai Tietz <ktietz@redhat.com>
337 * trans-decl.c (add_argument_checking): Check ts.deferred earlier.
338 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long.
340 2011-12-08 Tobias Burnus <burnus@net-b.de>
343 * trans-decl.c (add_argument_checking): Skip bound checking
344 for deferred-length strings.
346 2011-12-08 Tobias Burnus <burnus@net-b.de>
349 * symbol.c (gfc_find_component): Fix access check of parent
352 2011-12-08 Tobias Burnus <burnus@net-b.de>
355 * io/transfer.c (require_numeric_type): New function.
356 (formatted_transfer_scalar_read, formatted_transfer_scalar_write):
357 Use it, allow BOZ edit descriptors with F2008.
359 2011-12-08 Tobias Burnus <burnus@net-b.de>
362 * fortran/trans-array.c (get_std_lbound): Fix handling of
363 conversion functions.
365 2011-12-08 Toon Moene <toon@moene.org>
368 * invoke.texi: Itemize the cases for which
369 -finit-<type>=<constant> doesn't work.
371 2011-12-06 Tobias Burnus <burnus@net-b.de>
374 * expr.c (gfc_has_default_initializer): Fix handling of
375 DT with initialized pointer components.
377 2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>
380 * dependency.c (are_identical_variables): Handle case where
381 end fields of substring references are NULL.
383 2011-12-04 Tobias Burnus <burnus@net-b.de>
386 * resolve.c (find_array_spec): Use ref->u.c.component
387 directly without starting from ts.u.derived.
389 2011-12-03 Tobias Burnus <burnus@net-b.de>
392 * match.c (select_type_set_tmp): Don't set allocatable/pointer
394 * class.c (gfc_build_class_symbol): Handle
395 attr.select_type_temporary.
397 2011-12-03 Tobias Burnus <burnus@net-b.de>
400 * check.c (variable_check): Fix intent(in) check.
402 2011-12-03 Tobias Burnus <burnus@net-b.de>
404 * check.c (gfc_check_move_alloc): Allow nonpolymorphic
405 FROM with polymorphic TO.
406 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
407 nonpolymorphic FROM with polymorphic TO.
409 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
411 * module.c (dt_lower_string): Make static.
412 (dt_upper_string): Likewise.
414 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
417 * module.c (parse_string): Read string into resizable array
418 instead of parsing twice and seeking.
419 (peek_atom): New implementation avoiding seeks.
420 (require_atom): Save and set column and line explicitly for error
423 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
425 * misc.c (gfc_open_file): Don't call stat.
427 2011-11-29 Thomas Koenig <tkoenig@gcc.gnu.org>
430 * module.c (prev_module_line): New variable.
431 (prev_module_column): New variable.
432 (prev_character): New variable.
433 (module_char): Update the new variables.
434 (module_unget_char): New function.
435 (parse_string): Use module_unget_char.
436 (parse_integer): Likewise.
437 (parse_name): Likewise.
439 2011-11-29 Tobias Burnus <burnus@net-b.de>
443 * check.c (gfc_check_move_alloc): Make sure that from/to
444 are both polymorphic or neither.
445 * trans-intrinsic.c (conv_intrinsic_move_alloc): Cleanup,
446 generate inline code.
448 2011-11-28 Tobias Burnus <burnus@net-b.de>
449 Steven G. Kargl <kargl@gcc.gnu.org>
452 * symbol.c (check_conflict): Ignore BIND(C) + PARAMETER
453 conflicts for ISO_C_BINDING variables.
454 (gen_special_c_interop_ptr): Don't mark c_ptr_null/c_funptr_null
457 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
459 * trans-array.c (set_loop_bounds): Remove dead conditions.
461 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
465 * trans-array.c (gfc_trans_create_temp_array): Get dimension from
466 the right gfc_ss struct.
468 2011-11-25 Tobias Burnus <burnus@net-b.de>
471 * trans-decl.c (gfc_get_module_backend_decl): Also copy
472 ts.u.derived from the gsym if the ts.type is BT_CLASS.
473 (gfc_get_extern_function_decl): Copy also the backend_decl
474 for the symbol's ts.u.{derived,cl} from the gsym.
475 * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
476 return if "from" and "to" are the same.
478 2011-11-25 Tobias Burnus <burnus@net-b.de>
481 * trans-stmt.c (gfc_trans_simple_do): Add a fold_convert.
483 2011-11-24 Tobias Burnus <burnus@net-b.de>
486 * resolve.c (pure_subroutine): If called subroutine is
487 impure, unset implicit_pure.
488 (resolve_function): Move impure check to simplify code.
490 2011-11-19 Tobias Burnus <burnus@net-b.de>
493 * class.c (gfc_find_derived_vtab): Mark __def_init as PARAMETER
494 and hence as TREE_READONLY; add subroutine attribute to
498 * trans.h (GFC_DECL_PUSH_TOPLEVEL): New DECL_LANG_FLAG_7.
499 * trans-decl.c (gfc_get_symbol_decl): Mark __def_init and vtab as
500 GFC_DECL_PUSH_TOPLEVEL.
501 (gfc_generate_function_code): If GFC_DECL_PUSH_TOPLEVEL, push it there.
502 (build_function_decl): Push __copy_ procedure to the toplevel.
504 2011-11-16 Tobias Burnus <burnus@net-b.de>
508 * decl.c (match_data_constant, match_data_constant, variable_decl,
509 gfc_match_decl_type_spec, access_attr_decl,
510 check_extended_derived_type, gfc_match_derived_decl,
511 gfc_match_derived_decl, gfc_match_derived_decl) Modified to deal
512 with DT constructors.
513 * gfortran.h (gfc_find_dt_in_generic,
514 gfc_convert_to_structure_constructor): New function prototypes.
515 * interface.c (check_interface0, check_interface1,
516 gfc_search_interface): Ignore DT constructors in generic list.
517 * match.h (gfc_match_structure_constructor): Update prototype.
518 * match.c (match_derived_type_spec): Ensure that one uses the DT
519 not the generic function.
520 * module.c (MOD_VERSION): Bump.
521 (dt_lower_string, dt_upper_string): New functions.
522 (find_use_name_n, find_use_operator, compare_true_names,
523 find_true_name, add_true_name, fix_mio_expr, load_needed,
524 read_module, write_dt_extensions, write_symbol): Changes to deal with
525 different symtree vs. sym names.
526 (create_derived_type): Create also generic procedure.
527 * parse.c (gfc_fixup_sibling_symbols): Don't regard DT and generic
528 function as the same.
529 * primary.c (gfc_convert_to_structure_constructor): New function.
530 (gfc_match_structure_constructor): Restructured; calls
531 gfc_convert_to_structure_constructor.
532 (build_actual_constructor, gfc_match_rvalue): Update for DT generic
534 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
535 is_illegal_recursion, resolve_generic_f, resolve_variable,
536 resolve_fl_variable_derived, resolve_fl_derived0,
537 resolve_symbol): Handle DT and DT generic constructors.
538 * symbol.c (gfc_use_derived, gfc_undo_symbols,
539 gen_special_c_interop_ptr, gen_cptr_param,
540 generate_isocbinding_symbol, gfc_get_derived_super_type): Handle
541 derived-types, which are hidden in the generic type.
542 (gfc_find_dt_in_generic): New function
543 * trans-array.c (gfc_conv_array_initializer): Replace FL_PARAMETER
544 expr by actual value.
545 * trans-decl.c (gfc_get_module_backend_decl, gfc_trans_use_stmts):
546 Ensure that we use the DT and not the generic function.
547 * trans-types.c (gfc_get_derived_type): Ensure that we use the DT
548 and not the generic procedure.
550 2011-11-14 Tobias Burnus <burnus@net-b.de>
553 * trans-decl.c (generate_coarray_sym_init): Handle zero-sized arrays.
555 2011-11-09 Tobias Burnus <burnus@net-b.de>
557 * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
558 (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
559 (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.
561 2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
564 * gfortran.texi (Data consistency and durability): New section.
566 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
569 * resolve.c (resolve_forall_iterators): Transform internal errors
572 2011-11-09 Janus Weil <janus@gcc.gnu.org>
575 * class.c (gfc_find_derived_vtab): Make the vtab symbols FL_PARAMETER.
576 * expr.c (gfc_simplify_expr): Prevent vtabs from being replaced with
578 * resolve.c (resolve_values): Use-associated symbols do not need to
580 (resolve_fl_parameter): Make sure the symbol has a value.
582 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
585 * intrinsic.c (add_functions): Allow dreal simplification.
586 * intrinsic.h (gfc_simplify_dreal): New prototype.
587 * simplify.c (gfc_simplify_dreal): New function.
589 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
592 * trans-types.c (gfc_get_dtype): Issue a fatal error instead of
595 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
598 * io.c (gfc_resolve_close): CLOSE requires a UNIT.
600 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
603 * expr.c (gfc_simplify_expr): Substrings can't have negative
606 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
609 * invoke.texi (-finit-*): Document interaction with
612 2011-11-07 François-Xavier Coudert <fxcoudert@gcc.gnu.org>
616 * invoke.texi: Fix documentation of fsign-zero option. Remove
618 * intrinsic.texi: Fix ATAN2 documentation for signed zeros.
620 * gfortran.texi: Remove contractions.
622 2011-11-07 Janus Weil <janus@gcc.gnu.org>
625 * class.c (add_proc_comp): Don't add non-overridable procedures to the
627 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
628 Don't generate a dynamic _vptr call for non-overridable procedures.
630 2011-11-07 Janne Blomqvist <jb@gcc.gnu.org>
632 * intrinsic.texi (MCLOCK, MCLOCK8, TIME, TIME8): Functions clock
633 and time are part of the C standard library.
635 2011-11-06 Janus Weil <janus@gcc.gnu.org>
637 * gfortran.h (gfc_extend_expr): Modified prototype.
638 * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'.
639 Remove argument 'real_error'.
640 * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'.
642 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
643 Aldy Hernandez <aldyh@redhat.com>
645 Merged from cxx-mem-model.
647 * types.def: (BT_SIZE, BT_CONST_VOLATILE_PTR, BT_FN_VOID_INT,
648 BT_FN_I{1,2,4,8,16}_CONST_VPTR_INT, BT_FN_VOID_VPTR_INT,
649 BT_FN_BOOL_VPTR_INT, BT_FN_BOOL_SIZE_CONST_VPTR,
650 BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT, BT_FN_VOID_SIZE_VPTR_PTR_INT,
651 BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT,
652 BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT,
653 BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New types.
655 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
658 * trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
659 case in the assertion.
660 * trans-intrinsic (enter_nested_loop): New function.
661 (gfc_conv_intrinsic_arith): Support non-scalar cases.
662 (nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
663 (walk_inline_intrinsic_function): Handle sum and product.
664 (gfc_inline_intrinsic_function_p): Ditto.
665 * trans.h (gfc_get_loopinfo): New macro.
667 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
669 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
670 expression variable. Use it.
672 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
674 * trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
677 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
679 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Small argument handling
682 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
684 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Update conditions.
686 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
688 * frontend-passes.c (cfe_register_funcs): Return early in the case
689 of an inline intrinsic function.
690 (optimize_binop_array_assignment): Skip optimization in the case of
691 an inline intrinsic function.
693 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
695 * array.c (match_subscript): Skip whitespaces before setting locus.
696 * matchexp.c (match_level_1): Ditto.
698 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
700 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's
701 temporary rank to the loop rank. Mark ss chains for multiple loop
702 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
705 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
707 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's
708 temporary rank to the loop rank. Mark ss chains for multiple loop
709 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
712 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
714 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Don't calculate
715 offset twice in generated code.
717 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
719 * trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
720 arguments to elemental calls.
721 * trans-stmt.c (replace_ss): New function.
722 (gfc_conv_elemental_dependencies): Remove temporary loop handling.
723 Create a new ss for the temporary and replace the original one with it.
724 Remove fake array references. Recalculate all offsets.
726 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
728 * trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
729 * trans-array.c (gfc_free_ss): Remove forward declaration.
731 (set_delta, gfc_set_delta): Remove forward declaration.
732 Make non-static and rename the former to the later. Update uses.
734 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
736 * trans.h (gfc_inline_intrinsic_function_p): Move prototype...
737 * gfortran.h (gfc_inline_intrinsic_function_p): ... here.
738 * dependency.c (gfc_check_argument_var_dependency): Check dependencies
739 of inline intrinsics' arguments.
741 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
743 * trans-array.c (gfc_trans_preloop_setup): New pointers to outer
744 dimension's ss and loop. Use them.
746 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
748 * trans-array.c (outermost_loop): New function.
749 (gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
750 gfc_add_loop_ss_code): Put generated code out of the outermost loop.
752 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
754 * trans-array.c (constant_array_constructor_loop_size):
755 Handle multiple loops.
757 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
759 * trans-array.c (get_rank, get_loop_upper_bound_for_array):
761 (gfc_trans_array_constructor): Handle multiple loops.
763 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
765 * trans.h (struct gfc_loopinfo): New field parent.
766 * trans-array.c (gfc_cleanup_loop): Free nested loops.
767 (gfc_add_ss_to_loop): Set nested_loop's parent loop.
768 (gfc_trans_array_constructor): Update assertion.
769 (gfc_conv_loop_setup): Ditto.
771 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
773 * trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
774 Call recursively gfc_add_loop_ss_code for all the nested loops.
775 (gfc_conv_ss_startstride): Only get the descriptor for the outermost
776 ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
777 (set_loop_bounds): Call recursively for all the nested loops.
780 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
782 * trans.h (struct gfc_loopinfo): New fields nested and next.
783 * trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
784 ss has non-null nested_ss field.
786 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
788 * trans-array.c (gfc_trans_create_temp_array): Loop over the parents.
790 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
792 * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
793 Rename the former to the latter and loop over the parents.
794 (innermost_ss): New function.
795 (get_array_ref_dim_for_loop_dim): New function.
796 (gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
797 (set_loop_bounds): Use get_array_dim_for_loop_dim).
799 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
801 * trans.h (struct gfc_ss): New field nested_ss.
802 * trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
804 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
806 * trans-array.c (set_vector_loop_bounds): Loop over the parents.
808 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
810 * trans-array.c (gfc_trans_array_constructor): Loop over the parents.
812 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
814 * trans-array.c (gfc_set_loop_bounds_from_array_spec): Loop over the
817 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
819 * trans.h (struct gfc_ss): New field parent.
820 * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
822 * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
825 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
827 * trans-array.h (gfc_trans_create_temp_array): Remove loop argument.
828 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get loop from ss.
829 Update reference to loop. Remove loop argument.
830 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update calls to
831 gfc_trans_create_temp_array.
832 * trans-expr.c (gfc_conv_procedure_call): Ditto.
833 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
834 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
835 Set loop before calling gfc_trans_create_temp_array.
837 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
839 * trans-array.c (gfc_trans_create_temp_array): New variable total_dim.
840 Set total_dim to loop's rank. Replace usages of loop's rank.
842 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
844 * trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
845 Rename the former to the later. Get loop from ss.
846 Remove loop argument.
847 (gfc_add_loop_ss_code): Update call.
849 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
851 * trans-array.c (gfc_set_vector_loop_bounds): Get loop from ss.
852 Remove loop argument.
853 (gfc_add_loop_ss_code): Update call.
855 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
857 * trans.h (struct gfc_ss): New field loop.
858 * trans-array.c (set_ss_loop): New function.
859 (gfc_add_ss_to_loop): Call set_ss_loop.
861 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
863 * trans.h (struct gfc_ss_info): New field refcount.
864 * trans-array.c (free_ss_info): Decrement refcount. Return early if
866 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
869 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
871 * trans-array.c (gfc_trans_create_temp_array): Move invariant condition
872 out of the containing loop.
874 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
876 * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array):
877 Move specloop arrays clearing from the former to the latter.
879 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
881 * trans-array.c (set_loop_bounds): Separate the beginning of
882 gfc_conv_loop_setup into a function of its own.
883 (set_delta): Separate the end of gfc_conv_loop_setup into a function
885 (gfc_conv_loop_setup): Call set_loop_bounds and set delta.
886 (set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
887 pointer to the specloop field from the loop struct.
889 2011-11-03 Tobias Burnus <burnus@net-b.de>
892 * interface.c (gfc_compare_derived_types): Fix check for BIND(C).
894 2011-11-03 Tobias Burnus <burnus@net-b.de>
897 * trans-decl.c (gfc_finish_var_decl): Mark PARAMETER as TREE_READONLY.
899 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
901 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
902 gfc_ss::where into gfc_ss_info.
903 * trans-array.c (gfc_add_loop_ss_code):
904 Update reference chains.
905 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
907 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
909 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
910 gfc_ss::useflags into gfc_ss_info.
911 * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
912 gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
913 Update reference chains.
914 * trans-expr.c (gfc_conv_procedure_call): Ditto.
915 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
917 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
919 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
920 gfc_ss::data::info into gfc_ss_info::data and remove empty union
922 * trans-array.c (gfc_free_ss, gfc_trans_create_temp_array,
923 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
924 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
925 gfc_conv_ss_descriptor, gfc_trans_array_bound_check,
926 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
927 add_array_offset, gfc_trans_preloop_setup,
928 gfc_trans_scalarized_boundary, gfc_conv_section_startstride,
929 gfc_conv_ss_startstride, gfc_could_be_alias,
930 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
931 gfc_alloc_allocatable_for_assignment, gfc_walk_array_ref):
932 Update reference chains and factor them where possible.
933 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
934 gfc_conv_procedure_call, gfc_trans_subarray_assign): Updata reference
936 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
937 * trans-io.c (transfer_array_component): Ditto.
938 * trans-stmt.c (gfc_conv_elemental_dependencies,
939 gfc_trans_pointer_assign_need_temp): Ditto.
941 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
943 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
944 gfc_ss::data::temp into gfc_ss_info::data.
945 * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference
948 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
950 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
951 gfc_ss::data::scalar into newly created union gfc_ss_info::data,
952 and rename subfield expr to value.
953 * trans-array.c (gfc_add_loop_ss_code, gfc_conv_array_index_offset,
954 gfc_conv_expr_descriptor): Update reference chains.
955 * trans-const.c (gfc_conv_constant): Ditto.
956 * trans-expr.c (gfc_conv_expr): Ditto.
958 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
960 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
961 string_length from the former struct to the latter.
963 (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
964 gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
965 gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
966 gfc_conv_expr_descriptor): Update references to string_length and
967 factor common reference chains where possible.
968 * trans-const.c (gfc_conv_constant): Ditto.
969 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
970 gfc_conv_expr): Ditto.
972 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
974 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from
975 the former struct to the latter.
977 (gfc_get_array_ss, gfc_get_scalar_ss,
978 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
979 gfc_add_loop_ss_code, gfc_conv_ss_descriptor,
980 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
981 gfc_conv_scalarized_array_ref, gfc_conv_ss_startstride,
982 gfc_could_be_alias, gfc_conv_resolve_dependencies,
983 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
984 gfc_alloc_allocatable_for_assignment): Update references to expr and
985 factor common reference chains where possible.
986 * trans-const.c (gfc_conv_constant): Ditto.
987 * trans-expr.c (gfc_conv_variable, gfc_conv_procedure_call,
988 gfc_conv_array_constructor_expr, gfc_conv_expr,
989 gfc_conv_expr_reference): Ditto.
990 * trans-intrinsic.c (trans_this_image, gfc_conv_intrinsic_bound,
991 gfc_conv_intrinsic_cobound, gfc_conv_intrinsic_funcall,
992 gfc_add_intrinsic_ss_code): Ditto.
993 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
995 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
997 * trans.h (struct gfc_ss_info): New struct.
998 (gfc_get_ss_info): New macro.
999 (struct gfc_ss): Move type field to struct gfc_ss_info.
1000 Add an info field of type gfc_ss_info.
1001 * trans-array.c (free_ss_info): New function.
1002 (gfc_free_ss): Call free_ss_info.
1003 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss):
1004 Allocate gfc_ss_info field.
1005 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss,
1006 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
1007 gfc_conv_array_index_offset, gfc_trans_preloop_setup,
1008 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
1009 gfc_conv_ss_startstride, gfc_conv_resolve_dependencies,
1010 gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor,
1011 gfc_walk_elemental_function_args): Update references to type.
1012 * trans-const.c (gfc_conv_constant): Factor common reference chains
1013 and update reference to type.
1014 * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1):
1015 Update reference to type.
1016 (gfc_conv_array_constructor_expr, gfc_conv_expr,
1017 gfc_conv_expr_reference): Ditto. Factor common reference chains.
1018 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references
1020 * trans-stmt.c (gfc_trans_where_assign): Ditto.
1022 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1024 * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
1025 from the former struct to the latter.
1026 * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
1027 Update field references.
1028 * trans-expr.c (gfc_trans_subarray_assign): Update field references
1029 and factor common reference chains.
1030 * trans-io.c (transfer_array_component): Ditto.
1032 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1034 * trans.h (struct gfc_array_info): Move dim and dimen fields...
1035 (struct gfc_ss): ... here. Remove gfc_ss::data::temp::dimen field.
1036 * trans-array.c (gfc_conv_loop_setup): Remove temp_ss dim array
1038 (gfc_get_temp_ss): Initialize dim and dimen.
1039 (gfc_free_ss, gfc_get_array_ss, gfc_get_temp_ss,
1040 gfc_set_loop_bounds_from_array_spec, get_array_ref_dim,
1041 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
1042 gfc_set_vector_loop_bounds, gfc_conv_scalarized_array_ref,
1043 gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1044 gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims,
1045 gfc_conv_expr_descriptor, gfc_alloc_allocatable_for_assignment,
1046 gfc_walk_array_ref): Update field references.
1047 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
1049 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Ditto.
1050 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1052 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1054 * trans.h (struct gfc_ss_info, struct gfc_array_info):
1055 Rename the former to the latter.
1056 * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
1057 get_array_ref_dim, gfc_trans_create_temp_array,
1058 gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
1059 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1060 add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
1061 gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
1062 gfc_conv_expr_descriptor): Update all uses.
1063 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
1065 * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
1066 walk_inline_intrinsic_transpose): Ditto.
1067 * trans-stmt.c (gfc_conv_elemental_dependencies,
1068 gfc_trans_pointer_assign_need_temp): Ditto.
1070 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1072 * trans-array.c (dim_ok, transposed_dims): Rename the former to the
1073 latter. Change argument type. Invert return value.
1074 (gfc_conv_expr_descriptor): Update calls.
1076 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1078 * trans-array.c (get_array_ref_dim): Change argument type and name.
1079 Obtain previous argument from the new argument in the body.
1080 (gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
1082 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1084 * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
1085 Rename the former to the latter. Change type and name of argument.
1086 Get previous argument from the new one.
1087 (gfc_add_loop_ss_code): Update call.
1089 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1091 * trans-array.h (gfc_trans_create_temp_array): Replace info argument
1093 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
1094 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
1095 gfc_trans_create_temp_array.
1096 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1097 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
1098 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1100 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1102 * trans-array.c (gfc_trans_array_bound_check): Use ss argument
1105 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1107 * trans-array.c (gfc_trans_array_bound_check,
1108 trans_array_bound_check): Rename the former to the latter.
1109 Replace descriptor argument with ss argument. Get descriptor from ss.
1110 (gfc_conv_array_index_offset, conv_array_index_offset): Rename the
1111 former to the latter. Update call to trans_array_bound_check.
1112 Replace info argument with ss argument. Get info from ss.
1113 (gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
1114 (add_array_offset): Ditto
1116 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1118 * trans-array.c (gfc_trans_constant_array_constructor,
1119 trans_constant_array_constructor): Rename the former to the latter.
1120 Don't set the rank of the temporary for the loop. Remove then unused
1122 (gfc_trans_array_constructor): Update call.
1124 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1126 * trans-array.c (gfc_trans_scalarizing_loops): Stop loop before end
1127 marker, not after it.
1129 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1131 * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays.
1133 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1135 * trans-array.c (gfc_conv_ss_startstride): Access array bounds along
1136 array dimensions instead of loop dimensions.
1138 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1140 * trans-array.c (gfc_trans_preloop_setup): Assertify one condition.
1142 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1144 * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions.
1146 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1148 * trans-array.c (get_array_ref_dim): Remove redundant condition.
1150 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1152 * trans-array.c (gfc_trans_preloop_setup): Move common code...
1153 (add_array_offset): ...into that new function.
1155 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1157 * trans-array.c (gfc_trans_preloop_setup): Use loop's dimension instead
1158 of array's dimention. Check that it is indeed the same.
1160 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1162 * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
1163 Special case outermost loop.
1165 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1167 * trans-array.c (gfc_trans_preloop_setup): Factor loop index
1170 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1172 * trans-array.c (gfc_trans_preloop_setup): Move code earlier.
1174 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
1176 * trans-array.c (gfc_trans_preloop_setup): Move array reference
1177 initialisation earlier. Factor subsequent array references.
1179 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1181 * Makef-lang.in (gfortranspec.o): Pass SHLIB instead of SHLIB_LINK.
1183 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
1186 * check.c (gfc_check_dshift): Update argument checking for BOZ.
1187 Update checking SHIFT against BITSIZE of I or J.
1188 * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR.
1190 2011-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
1192 * check.c (gfc_check_atan_2): Typo in comment.
1193 (gfc_check_nearest): If 's' is constant, check that it is not 0.
1194 * simplify.c (simplify_dshift, gfc_simplify_ibclr, gfc_simplify_ibits,
1195 gfc_simplify_ibset, simplify_shift, gfc_simplify_ishftc,
1196 gfc_simplify_nearest): Remove dead code.
1198 2011-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1200 * simplify.c (simplify_transformation_to_array): Fix memory leak.
1202 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1205 * check.c (gfc_check_ishftc): Check args are constant before
1206 extracting the integer.
1208 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1211 * check.c (less_than_bitsize1): Check |shift| <= bit_size(i).
1212 (gfc_check_ishftc): Check |shift| <= bit_size(i) and check
1213 that size is positive.
1215 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1218 * resolve.c (resolve_ref): Check return value of resolve_substring().
1220 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1222 * io.c (match_dt_format): Match a user-defined operator or a kind
1223 type prefixed string.
1225 2011-10-19 Janus Weil <janus@gcc.gnu.org>
1228 * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF.
1229 * intrinsinc.texi (SIZEOF): Document it.
1230 (STORAGE_SIZE): Fix special characters. Fix line breaks.
1232 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1235 * trans.c (gfc_build_array_ref): If type is not an array, check that
1236 there is nothing to do, and do nothing.
1238 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1241 * trans-types.c (gfc_build_array_type): Don't force lower bound to one
1242 in the deferred case.
1244 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1247 * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
1248 Don't set already set array ref.
1250 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1252 * array.c (gfc_find_array_ref): Remove coarray-specific handling.
1254 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1257 * check.c (dim_corank_check): Use gfc_get_corank to get corank.
1259 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1262 * trans-intrinsic.c (walk_coarray): Change AR_ELEMENT to AR_SECTION.
1265 * trans-intrinsic.c (walk_coarray): Use gfc_walk_array_ref for
1266 the scalarization chain initialization.
1268 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1271 * trans-intrinsic.c (walk_coarray): Allow subreferences after a
1272 coarray object reference.
1274 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1277 * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
1278 if they are coarrays.
1280 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1282 * trans-array.h (gfc_walk_array_ref): New prototype.
1283 * trans-array.c (gfc_walk_array_ref): New function, containing
1284 all but the beginning of gfc_walk_variable_expr's code.
1285 (gfc_walk_variable_expr): Use gfc_walk_array_ref.
1287 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1290 * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
1291 ndim for the descriptor's rank.
1293 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1296 * trans-array.c (gfc_conv_expr_descriptor): Count codimensions starting
1297 from zero, and add then the relevant offset (either ndim or loop.dimen)
1298 depending on context.
1300 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1302 * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
1304 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
1306 * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
1309 2011-10-18 Janus Weil <janus@gcc.gnu.org>
1312 * decl.c (verify_c_interop_param): Renamed to
1313 'gfc_verify_c_interop_param'. Add error message for polymorphic
1315 (verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
1316 polymorphic variables.
1317 (verify_bind_c_sym): Renamed 'verify_c_interop'.
1318 * gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
1319 * check.c (gfc_check_sizeof): Ditto.
1320 * resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
1321 * symbol.c (verify_bind_c_derived_type): Ditto.
1323 2011-10-15 Tom Tromey <tromey@redhat.com>
1324 Dodji Seketeli <dodji@redhat.com>
1326 * cpp.c (print_line, cb_define): Adjust to avoid using internals
1327 of struct line_map. Use the public API instead.
1329 2011-10-17 Janus Weil <janus@gcc.gnu.org>
1333 * primary.c (match_kind_param): Avoid segfault.
1335 2011-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1337 * frontend-passes.c (current_ns): Make static.
1338 (create_var): Note parent of newly created namespace.
1339 (optimize_namespace): Don't wak sibling namespaces
1340 if they are EXEC_BLOCK because this is handled...
1341 (gfc_code_walker): ... here. Also walk ASSOCIATE lists.
1343 2011-10-16 Janus Weil <janus@gcc.gnu.org>
1346 * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
1347 (get_kind): Pass on 'is_iso_c' flag.
1348 (match_integer_constant,match_real_constant,match_logical_constant):
1349 Set 'ts.is_c_interop'.
1351 2011-10-16 Janus Weil <janus@gcc.gnu.org>
1354 * resolve.c (resolve_formal_arglist): Remove unneeded error message.
1357 2011-10-15 Tobias Burnus <burnus@net-b.de>
1359 * gfortran.texi (Fortran 2008 status, TS 29113 status,
1360 Further Interoperability of Fortran with C): Update implementation
1361 status, change references from TR 29113 to TS 29113.
1362 * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
1363 * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
1364 * lang.opt (std=): Ditto.
1365 * options.c (gfc_handle_option, set_default_std_flags): Ditto and
1366 change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
1367 * libgfortran.h: Ditto.
1368 * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
1369 * decl.c (verify_c_interop_param): Ditto.
1371 2011-10-14 Janus Weil <janus@gcc.gnu.org>
1374 * expr.c (gfc_check_vardef_context): Don't throw an error on
1375 non-pointer assignments involving an intent(in) pointer dummy.
1377 2011-10-14 Tobias Burnus <burnus@net-b.de>
1380 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1381 for dummy arguments with VALUE attribute.
1383 2011-10-11 Tobias Burnus <burnus@net-b.de>
1384 Janus Weil <janus@gcc.gnu.org>
1386 * invoke.texi (-fwhole-file): Update wording since -fwhole-file
1387 is now enabled by default.
1389 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1391 * trans-expr.c (gfc_conv_power_op): Delete old interface with two
1392 parallel arrays to hold standard builtin declarations, and replace
1393 it with a function based interface that can support creating
1394 builtins on the fly in the future. Change all uses, and poison
1395 the old names. Make sure 0 is not a legitimate builtin index.
1396 (fill_with_spaces): Ditto.
1397 (gfc_trans_string_copy): Ditto.
1398 (gfc_trans_zero_assign): Ditto.
1399 (gfc_build_memcpy_call): Ditto.
1400 (alloc_scalar_allocatable_for_assignment): Ditto.
1401 * trans-array.c (gfc_trans_array_constructor_value): Ditto.
1402 (duplicate_allocatable): Ditto.
1403 (gfc_alloc_allocatable_for_assignment): Ditto.
1404 * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
1405 (gfc_omp_clause_assign_op): Ditto.
1406 (gfc_trans_omp_atomic): Ditto.
1407 (gfc_trans_omp_do): Ditto.
1408 (gfc_trans_omp_task): Ditto.
1409 * trans-stmt.c (gfc_trans_stop): Ditto.
1410 (gfc_trans_sync): Ditto.
1411 (gfc_trans_allocate): Ditto.
1412 (gfc_trans_deallocate): Ditto.
1413 * trans.c (gfc_call_malloc): Ditto.
1414 (gfc_allocate_using_malloc): Ditto.
1415 (gfc_call_free): Ditto.
1416 (gfc_deallocate_with_status): Ditto.
1417 (gfc_deallocate_scalar_with_status): Ditto.
1418 * f95-lang.c (gfc_define_builtin): Ditto.
1419 (gfc_init_builtin_functions): Ditto.
1420 * trans-decl.c (create_main_function): Ditto.
1421 * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
1423 2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1426 * frontend-passes (forall_level): New variable.
1427 (cfe_register_funcs): Don't register functions if we
1428 are within a forall loop.
1429 (optimize_namespace): Set forall_level to 0 before entry.
1430 (gfc_code_walker): Increase/decrease forall_level.
1432 2011-10-09 Tobias Burnus <burnus@net-b.de>
1435 * trans-common.c (translate_common): Fix -Walign-commons check.
1437 2011-10-09 Mikael Morin <mikael.morin@sfr.fr>
1439 * interface.c (check_dummy_characteristics): Count dimensions starting
1440 from one in diagnostic.
1442 2011-10-09 Tobias Burnus <burnus@net-b.de>
1444 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1445 dependency on iso-c-binding.def and iso-fortran-env.def.
1446 * module.c (import_iso_c_binding_module): Add error when
1447 explicitly importing a nonstandard symbol; extend standard-
1449 * iso-c-binding.def: Add c_float128 and c_float128_complex
1450 integer parameters (for -std=gnu).
1451 * intrinsic.texi (ISO_C_Binding): Document them.
1452 * symbol.c (generate_isocbinding_symbol): Change macros
1453 to ignore GFC_STD_* data.
1454 * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
1455 nonstatic and renamed from "init_c_interop_kinds".
1456 (gfc_init_kinds): Don't call it
1457 * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
1458 * f95-lang.c (gfc_init_decl_processing): Call it.
1460 2011-10-09 Janus Weil <janus@gcc.gnu.org>
1463 * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
1465 2011-10-08 Paul Thomas <pault@gcc.gnu.org>
1468 * trans-array.c (gfc_conv_array_index_offset): Use descriptor
1469 stride for pointer function results.
1471 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1473 * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
1475 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1477 * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
1479 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1481 * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
1482 Remove conditions on coarray.
1483 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1484 (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
1486 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1488 * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
1489 argument. Remove condition on coarray_last.
1490 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1491 (gfc_conv_expr_descriptor): Ditto.
1493 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1495 * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
1496 handling. Don't reset array ref's corank and codimensions' types
1497 in the full array ref case. Update loop upper limit.
1498 Remove DIMEN_THIS_IMAGE case. Remove unnecessary conditions.
1500 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1502 * trans.h (gfc_ss_info): Remove codimen field.
1503 * trans-array.c (gfc_get_array_ss): Don't set codimen field.
1504 (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
1505 (gfc_trans_constant_array_constructor): Update loop upper limit.
1506 (gfc_conv_ss_startstride): Don't set codimen field.
1507 Don't get descriptor's cobounds.
1508 (gfc_walk_variable_expr): Update dimension index.
1509 * trans-intrinsic.c (trans_this_image, trans_image_index,
1510 conv_intrinsic_cobound): Don't set codimen field
1512 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1514 * trans.h (gfc_loopinfo): Remove codimen field.
1515 * trans-array.c (gfc_set_vector_loop_bounds,
1516 gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
1518 (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
1520 (gfc_start_scalarized_body): Update loop lower limit.
1521 (gfc_conv_ss_startstride): Don't set loop's codimen field.
1522 (gfc_conv_loop_setup): Remove unnecessary condition.
1523 (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
1525 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1527 * trans.h (gfc_ss): Remove data.temp.codimen field.
1528 * trans-array.c (gfc_conv_resolve_dependencies,
1529 gfc_conv_expr_descriptor): Don't set temp's codimen field.
1531 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1533 * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
1534 associated dimen_type) in the full array ref case.
1536 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1538 * trans-intrinsic.c (walk_coarray): New function.
1539 (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
1540 (trans-this_image, trans_image_index, conv_intrinsic_cobound):
1543 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1545 * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
1546 cobounds evaluation.
1548 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1550 * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
1552 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1554 * trans-array.c (gfc_conv_section_startstride): Move code to
1555 evaluate_bound. Use evaluate_bound.
1556 (evaluate_bound): New function.
1558 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1560 * trans-array.c (gfc_conv_section_startstride): Update assertion to
1561 also accept coarrays.
1563 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1565 * trans-array.c (gfc_conv_section_startstride): Factor common
1566 array ref references.
1568 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1570 * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
1571 loop.codimen as argument to gfc_get_array_type_bounds.
1573 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1575 * trans-array.h (struct gfc_se): New flag want_coarray.
1576 * trans-intrinsic.c (trans_this_image, trans_image_index,
1577 conv_intrinsic_cobound): Set want_coarray.
1578 * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
1579 earlier and without relying on the scalarizer.
1581 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1583 * expr.c (gfc_get_corank): Return 0 if input expression is not a
1586 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1588 * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
1589 descriptor setup code.
1591 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1593 * resolve.c (compare_spec_to_ref): Move coarray ref initialization
1595 (resolve_array_ref): ... here.
1597 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1599 * check.c (is_coarray): Remove.
1600 (coarray_check): Use gfc_is_coarray.
1602 2011-10-07 Janus Weil <janus@gcc.gnu.org>
1605 * class.c (gfc_build_class_symbol): Fix whitespace.
1606 * module.c (mio_symbol): Set 'class_ok' attribute.
1607 * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
1608 been built for class symbols.
1610 2011-10-04 Janus Weil <janus@gcc.gnu.org>
1613 * interface.c (check_dummy_characteristics): Check the array shape.
1615 2011-10-01 Janus Weil <janus@gcc.gnu.org>
1618 * interface.c (get_expr_storage_size): Check if 'length' component is
1621 2011-09-29 Janus Weil <janus@gcc.gnu.org>
1624 * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
1628 * symbol.c (check_conflict): Forbid TARGET attribute for statement
1631 2011-09-27 Jakub Jelinek <jakub@redhat.com>
1633 * trans-types.c (gfc_type_for_size): Return wider type
1634 if no suitable narrower type has been found.
1635 (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
1636 returned type doesn't have expected TYPE_MODE.
1638 2011-09-26 Janus Weil <janus@gcc.gnu.org>
1641 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
1644 * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
1646 2011-09-22 Janus Weil <janus@gcc.gnu.org>
1649 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
1651 * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
1652 for PURE and ELEMENTAL attributes.
1653 (compare_actual_formal): Remove pureness check here.
1655 2011-09-20 Steven G. Kargl <kargl@gcc.gnu.org>
1657 * check.c (gfc_check_c_sizeof): Remove redundant word.
1659 2011-09-20 Simon Baldwin <simonb@google.com>
1661 * module.c (gfc_dump_module): Omit timestamp from output.
1663 2011-09-17 Janus Weil <janus@gcc.gnu.org>
1666 * symbol.c (gfc_use_derived): Fix coding style.
1668 2011-09-15 Janus Weil <janus@gcc.gnu.org>
1671 * resolve.c (resolve_transfer): Check if component 'ref' is defined.
1674 * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
1676 2011-09-14 Tobias Burnus <burnus@net-b.de>
1680 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
1681 * resolve.c (resolve_transfer): Reject NULL without MOLD.
1682 * interface.c (gfc_procedure_use): Reject NULL without MOLD
1683 if no explicit interface is known.
1684 (gfc_search_interface): Reject NULL without MOLD if it would
1687 2011-09-13 Janus Weil <janus@gcc.gnu.org>
1690 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
1693 2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1696 * frontend-passes.c (dummy_expr_callback): New function.
1697 (convert_do_while): New function.
1698 (optimize_namespace): Call code walker to convert do while loops.
1700 2011-09-11 Janus Weil <janus@gcc.gnu.org>
1704 * interface.c (check_dummy_characteristics): New function to check the
1705 characteristics of dummy arguments.
1706 (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
1708 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1710 * trans-array.c (gfc_trans_constant_array_constructor): Remove
1711 superfluous initialisation of DIM field.
1712 (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
1713 (gfc_conv_expr_descriptor): Ditto.
1714 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1716 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1718 * trans-array.h (gfc_get_scalar_ss): New prototype.
1719 * trans-array.c (gfc_get_scalar_ss): New function.
1720 (gfc_walk_variable_expr, gfc_walk_op_expr,
1721 gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
1722 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1723 (gfc_trans_assignment_1): Ditto.
1724 * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
1725 gfc_trans_where_3): Ditto.
1727 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1729 * trans-array.h (gfc_get_temp_ss): New prototype.
1730 * trans-array.c (gfc_get_temp_ss): New function.
1731 (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
1732 (gfc_conv_expr_descriptor): Ditto.
1733 * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
1735 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1737 * trans-array.h (gfc_get_array_ss): New prototype.
1738 * trans-array.c (gfc_get_array_ss): New function.
1739 (gfc_walk_variable_expr, gfc_walk_function_expr,
1740 gfc_walk_array_constructor): Re-use gfc_get_array_ss.
1741 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1742 * trans-intrinsic.c (gfc_walk_intrinsic_bound,
1743 gfc_walk_intrinsic_libfunc): Ditto.
1744 * trans-io.c (transfer_array_component): Ditto.
1746 2011-09-08 Tobias Burnus <burnus@net-b.de>
1749 * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
1750 * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
1751 * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
1752 * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
1753 lock_unlock_statement, sync_statement, gfc_match_allocate,
1754 gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
1755 (gfc_match_do): Match DO CONCURRENT.
1756 (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
1757 match_forall_iterator, match_forall_header, match_simple_forall,
1758 gfc_match_forall): Move up in the file.
1759 * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
1760 * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
1761 * resolve.c (do_concurrent_flag): New global variable.
1762 (resolve_function, pure_subroutine, resolve_branch,
1763 gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
1765 * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
1766 * trans-stmt.c (gfc_trans_do_concurrent): New function.
1767 (gfc_trans_forall_1): Handle do concurrent.
1768 * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
1769 * trans.c (trans_code): Call it.
1770 * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
1772 2011-09-07 Janus Weil <janus@gcc.gnu.org>
1775 * primary.c (gfc_match_structure_constructor): Handle parsing of
1776 procedure pointers components in structure constructors.
1777 * resolve.c (resolve_structure_cons): Check interface of procedure
1778 pointer components. Changed wording of some error messages.
1780 2011-09-04 Janus Weil <janus@gcc.gnu.org>
1783 * trans-types.c (gfc_sym_type): Check for proc_name.
1785 2011-08-30 Tobias Burnus <burnus@net-b.de>
1788 * trans-common.c (build_common_decl): Warn if named common
1789 block's size is not everywhere the same.
1791 2011-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1794 * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
1796 2011-08-29 Janus Weil <janus@gcc.gnu.org>
1799 * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
1800 allocatable function results.
1802 2011-08-29 Tobias Burnus <burnus@net-b.de>
1804 * trans-decl.c (generate_coarray_sym_init): Use
1805 GFC_CAF_COARRAY_STATIC for static coarrays.
1807 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1809 * scanner.c (load_file): Don't abuse LC_RENAME reason while
1810 (indirectly) calling linemap_add.
1812 2011-08-26 Jakub Jelinek <jakub@redhat.com>
1814 * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
1816 * symbol.c (check_conflict): Allow threadprivate attribute with
1817 FL_PROCEDURE if proc_pointer.
1819 2011-08-25 Mikael Morin <mikael@gcc.gnu.org>
1822 * expr.c (gfc_free_shape): Do nothing if shape is NULL.
1823 (free_expr0): Remove redundant NULL shape check.
1824 * resolve.c (check_host_association): Ditto.
1825 * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
1827 * trans-io.c (transfer_array_component): Ditto.
1829 2011-08-25 Tobias Burnus <burnus@net-b.de>
1831 * trans-array.c (gfc_conv_descriptor_token): Add assert.
1832 * trans-decl.c (gfc_build_qualified_array,
1833 create_function_arglist): Handle assumed-shape arrays.
1834 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1835 * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
1836 add "caf_token" to assumed-shape descriptors, new akind argument.
1837 (gfc_get_array_type_bounds): Pass akind.
1838 * trans.h (lang_decl): New elements caf_offset and token.
1839 (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
1841 2011-08-25 Tobias Burnus <burnus@net-b.de>
1843 * trans-array.c (structure_alloc_comps): Fix for allocatable
1844 scalar coarray components.
1845 * trans-expr.c (gfc_conv_component_ref): Ditto.
1846 * trans-type.c (gfc_get_derived_type): Ditto.
1848 2011-08-24 Tobias Burnus <burnus@net-b.de>
1851 * expr.c (check_init_expr): Return when an error occured.
1853 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1855 * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
1857 2011-08-23 Tobias Burnus <burnus@net-b.de>
1860 * symbol.c (gfc_add_type): Better diagnostic if redefining
1861 use-associated symbol.
1862 * module.c (gfc_use_module): Use module name as locus.
1864 2011-08-22 Gabriel Charette <gchare@google.com>
1866 * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
1867 defined in cpp_define_builtins.
1869 2011-08-22 Mikael Morin <mikael@gcc.gnu.org>
1872 * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
1873 * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
1874 (free_expr0): Re-use gfc_free_shape.
1875 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1876 * trans-io.c (transfer_array_component): Ditto.
1877 * resolve.c (check_host_association): Ditto.
1878 (gfc_expr_to_initialize): Don't force the rank value and free the shape
1879 after updating the expression. Recalculate shape and rank.
1880 (resolve_where_shape): Re-use gfc_clear_shape.
1881 * array.c (gfc_array_ref_shape): Ditto.
1883 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1886 * expr.c (gfc_check_assign): Check for type conversions when the
1887 right-hand side is a constant REAL/COMPLEX contstant the left-hand
1888 side is also REAL/COMPLEX. Don't warn when a narrowing conversion
1889 for REAL does not change the value of the constant.
1891 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1894 * resolve.c (resolve_array_ref): Don't calculate upper bound
1895 if the stride is zero.
1897 2011-08-20 Janus Weil <janus@gcc.gnu.org>
1900 * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
1901 (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
1903 * frontend-passes.c (optimize_comparison): Ditto.
1904 * interface.c (gfc_check_typebound_override): Ditto.
1906 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1909 * parse.c (parse_where): Undo changes after emitting an error.
1911 2011-08-19 Jakub Jelinek <jakub@redhat.com>
1914 * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
1915 bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
1916 lhs needs reallocation.
1917 * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
1918 code is NULL, emit a barrier if workshare emitted no code at all
1919 and NOWAIT clause isn't present.
1921 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1924 * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
1925 * parse.c (check_statement_label): Accept ST_END_BLOCK and
1926 ST_END_ASSOCIATE as valid branch target.
1927 (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
1928 Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
1929 * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
1930 EXEC_END_NESTED_BLOCK.
1931 (resolve_branch): Ditto.
1932 (resolve_code): Add EXEC_END_NESTED_BLOCK case.
1933 * st.c (gfc_free_statement): Ditto.
1934 * trans.c (trans_code): Ditto.
1936 2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
1939 * symbol.c (gfc_get_st_label): Use the derived type namespace when
1940 we are parsing a derived type definition.
1942 2011-08-18 Tobias Burnus <burnus@net-b.de>
1945 * parse.c (parse_derived): Add lock_type
1946 checks, improve coarray_comp handling.
1947 * resolve.c (resolve_allocate_expr,
1948 resolve_lock_unlock, resolve_symbol): Fix lock_type
1951 2011-08-17 Tobias Burnus <burnus@net-b.de>
1954 * trans-decl.c (generate_local_decl): Warn about
1955 unused explicitly imported module variables/parameters.
1957 2011-08-17 Janus Weil <janus@gcc.gnu.org>
1960 * resolve.c (resolve_fl_variable): Reject non-constant character lengths
1961 in COMMON variables.
1963 2011-08-16 Tobias Burnus <burnus@net-b.de>
1964 Dominique Dhumieres <dominiq@lps.ens.fr>
1967 * resolve.c (resolve_symbol): Fix stupid typo.
1969 2011-08-15 Tobias Burnus <burnus@net-b.de>
1971 * resolve.c (resolve_symbol): Fix coarray result-var check.
1973 2011-08-14 Steven G. Kargl <kargl@gcc.gnu.org>
1975 * module.c (use_iso_fortran_env_module): Spell 'referrenced' correctly.
1977 2011-08-14 Janus Weil <janus@gcc.gnu.org>
1980 * decl.c (check_function_name): New function, separated off from
1981 'variable_decl' and slightly extended.
1982 (variable_decl,attr_decl1): Call it.
1984 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1986 * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
1988 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1989 Thomas Koenig <tkoenig@gcc.gnu.org>
1992 * dependency.c (are_identical_variables): For dummy arguments only
1993 check for equal names, not equal symbols.
1994 * interface.c (gfc_check_typebound_override): Add checking for rank
1995 and character length.
1997 2011-08-07 Janus Weil <janus@gcc.gnu.org>
2000 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
2002 * dependency.c (gfc_are_identical_variables,are_identical_variables):
2003 Renamed the former to the latter and made static.
2004 (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
2005 commutativity of multiplication.
2006 (gfc_is_same_range,is_same_range): Renamed the former to the latter,
2007 made static and removed argument 'def'.
2008 (check_section_vs_section): Renamed 'gfc_is_same_range'.
2009 * gfortran.h (gfc_check_typebound_override): New prototype.
2010 * interface.c (gfc_check_typebound_override): Moved here from ...
2011 * resolve.c (check_typebound_override): ... here (and renamed).
2012 (resolve_typebound_procedure): Renamed 'check_typebound_override'.
2014 2011-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2017 * target-memory.c (gfc_target_expr-size): Don't clobber typespec
2019 * simplify.c (gfc_simplify_transfer): Don't calculate source_size
2022 2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2025 * gfortran.h (gfc_calculate_transfer_sizes): Add prototype.
2026 * target-memory.h (gfc_target_interpret_expr): Add boolean
2027 argument wether to convert wide characters.
2028 * target-memory.c (gfc_target_expr_size): Also return length
2029 of characters for non-constant expressions if these can be
2030 determined from the cl.
2031 (interpret_array): Add argument for gfc_target_interpret_expr.
2032 (gfc_interpret_derived): Likewise.
2033 (gfc_target_interpret_expr): Likewise.
2034 * check.c: Include target-memory.h.
2035 (gfc_calculate_transfer_sizes): New function.
2036 (gfc_check_transfer): When -Wsurprising is in force, calculate
2037 sizes and warn if result is larger than size (check moved from
2038 gfc_simplify_transfer).
2039 * simplify.c (gfc_simplify_transfer): Use
2040 gfc_calculate_transfer_sizes. Remove warning.
2042 2011-08-04 Richard Guenther <rguenther@suse.de>
2045 * trans-array.c (add_to_offset): New function.
2046 (gfc_conv_array_ref): Build the array index expression in optimally
2048 (gfc_walk_variable_expr): Adjust for the backward walk.
2050 2011-08-02 Daniel Kraft <d@domob.eu>
2053 * trans-array.c (gfc_trans_auto_array_allocation): Change
2054 gfc_start_block to gfc_init_block to avoid spurious extra-scope.
2056 2011-08-02 Tobias Burnus <burnus@net-b.de>
2058 * trans-array.c (gfc_array_allocate): Pass token to
2059 gfc_allocate_allocatable for -fcoarray=lib.
2060 * trans-stmt.c (gfc_trans_allocate): Update
2061 gfc_allocate_allocatable call.
2062 * trans.h (gfc_allocate_allocatable): Update prototype.
2063 (gfc_allocate_using_lib): Remove.
2064 * trans.c (gfc_allocate_using_lib): Make static, handle token.
2065 (gfc_allocate_allocatable): Ditto.
2067 2011-08-02 Jakub Jelinek <jakub@redhat.com>
2070 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
2071 * openmp.c (gfc_free_omp_clauses): Free also final_expr.
2072 (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
2073 (gfc_match_omp_clauses): Handle parsing final and mergeable
2075 (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
2076 (gfc_match_omp_taskyield): New function.
2077 (resolve_omp_clauses): Resolve final clause. Allow POINTERs and
2078 Cray pointers in clauses other than REDUCTION.
2079 (gfc_match_omp_atomic): Match optional
2080 read/write/update/capture keywords after !$omp atomic.
2081 (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
2082 * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
2083 print final and mergeable clauses.
2084 (show_code_node): Handle EXEC_OMP_TASKYIELD.
2085 * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
2087 (gfc_trans_omp_taskyield): New function.
2088 (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
2089 (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
2090 (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
2091 (gfc_omp_predetermined_sharing): Adjust comment.
2092 * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
2094 (gfc_omp_clauses): Add final_expr and mergeable fields.
2095 (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
2096 (gfc_omp_atomic_op): New enum typedef.
2097 (struct gfc_code): Add ext.omp_atomic.
2098 * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
2099 * frontend-passes.c (gfc_code_walker): Also walk final_expr.
2100 * resolve.c (gfc_resolve_blocks, resolve_code): Handle
2102 * st.c (gfc_free_statement): Likewise.
2103 * match.h (gfc_match_omp_taskyield): New prototype.
2104 * parse.c (decode_omp_directive): Handle taskyield directive.
2105 Handle !$omp end atomic.
2106 (case_executable): Add ST_OMP_TASKYIELD case.
2107 (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
2108 (parse_omp_atomic): Return gfc_statement instead of void.
2109 For !$omp atomic capture parse two assignments instead of
2110 just one and require !$omp end atomic afterwards, for
2111 other !$omp atomic forms just allow !$omp end atomic at the
2113 (parse_omp_structured_block, parse_executable): Adjust
2114 parse_omp_atomic callers.
2116 2011-08-02 Tobias Burnus <burnus@net-b.de>
2118 * intrinsic.c (OMP_LIB): Updated openmp_version's
2120 * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
2121 * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
2122 remove deleted omp_integer_kind and omp_logical_kind constants.
2124 2011-07-31 Janus Weil <janus@gcc.gnu.org>
2127 * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
2128 only call 'resolve_fl_derived0'.
2129 (resolve_typebound_procedures): Resolve typebound procedures of
2131 (resolve_fl_derived0): New function, which does a part of the work
2132 for 'resolve_fl_derived'.
2133 (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
2136 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2139 * expr.c (gfc_simplify_expr): If end of a string is less
2140 than zero, set it to zero.
2142 2011-07-28 Jakub Jelinek <jakub@redhat.com>
2145 * frontend-passes.c (optimize_minmaxloc): New function.
2146 (optimize_expr): Call it.
2148 2011-07-27 Tobias Burnus <burnus@net-b.de>
2151 * trans-types.c (gfc_get_derived_type): Ensure that pointer
2152 component types are marked as nonrestricted.
2154 2011-07-27 Daniel Carrera <dcarrera@gmail.com>
2157 * trans.c (gfc_allocate_using_malloc): Change function signature.
2158 Return nothing. New parameter "pointer". Eliminate temorary variables.
2159 (gfc_allocate_using_lib): Ditto.
2160 (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
2161 and gfc_allocate_using_malloc. Do not free and then reallocate a
2162 variable that is already allocated.
2163 (gfc_likely): New function. Basedon gfc_unlikely.
2164 * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
2165 Instructions to modify the array descriptor are stored in this block
2166 while other instructions continue to be stored in "pblock".
2167 (gfc_array_allocate): Update call to gfc_array_init_size. Move the
2168 descriptor_block so that the array descriptor is only updated if
2169 the array was allocated successfully.
2170 Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2171 * trans.h (gfc_allocate_allocatable): Change function signature.
2172 Function now returns void.
2173 (gfc_allocate_using_lib): Ditto, and new function parameter.
2174 (gfc_allocate_using_malloc): Ditto.
2175 * trans-openmp.c (gfc_omp_clause_default_ctor,
2176 gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
2177 to gfc_allocate_allocatable with gfc_allocate_using_malloc.
2178 * trans-stmt.c (gfc_trans_allocate): Update function calls for
2179 gfc_allocate_allocatable and gfc_allocate_using_malloc.
2181 2011-07-26 Tobias Burnus <burnus@net-b.de>
2183 * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
2184 (gfc_conv_descriptor_token): New function.
2185 * trans-array.h (gfc_conv_descriptor_token): New prototype.
2186 * trans-types.c (gfc_get_array_descriptor_base): For coarrays
2187 with -fcoarray=lib, append "void *token" to the array descriptor.
2188 (gfc_array_descriptor_base_caf): New static variable.
2189 * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
2190 when passing a descriptor coarray to a nondescriptor dummy.
2192 2011-07-23 Tobias Burnus <burnus@net-b.de>
2194 * resolve.c (resolve_symbol): Fix coarray var decl check.
2196 2011-07-21 Daniel Carrera <dcarrera@gmail.com>
2198 * trans.c (gfc_allocate_with_status): Split into two functions
2199 gfc_allocate_using_malloc and gfc_allocate_usig_lib.
2200 (gfc_allocate_using_malloc): The status parameter is now the
2201 actual status rather than a pointer. Code cleanup.
2202 (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
2203 errlen. Pass these to the coarray lib.
2204 * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
2205 gfc_allocate_allocatable.
2206 (gfc_omp_clause_copy_ctor): Ditto.
2207 (gfc_trans_omp_array_reduction): Ditto.
2208 * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
2209 gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
2210 fuctions. If using coarray lib, pass errmsg and errlen to the allocate
2211 functions. Move error checking outside the if (!gfc_array_allocate)
2212 block so that it also affects trees produced by gfc_array_allocate.
2213 * trans-array.c (gfc_array_allocate): Add new parameters errmsg
2214 and errlen. Replace parameter pstat by status. Code cleanup. Update
2215 calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2216 * trans-array.h (gfc_array_allocate): Update signature of
2219 2011-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
2221 * gfortran.texi: Remove a duplicate word.
2223 2011-07-21 Tobias Burnus <burnus@net-b.de>
2225 * check.c (gfc_check_present): Allow coarrays.
2226 * trans-array.c (gfc_conv_array_ref): Avoid casting
2227 when a pointer is wanted.
2228 * trans-decl.c (create_function_arglist): For -fcoarray=lib,
2229 handle hidden token and offset arguments for nondescriptor
2231 * trans-expr.c (get_tree_for_caf_expr): New function.
2232 (gfc_conv_procedure_call): For -fcoarray=lib pass the
2233 token and offset for nondescriptor coarray dummies.
2234 * trans.h (lang_type): Add caf_offset tree.
2235 (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
2237 2011-07-19 Tobias Burnus <burnus@net-b.de>
2239 * expr.c (gfc_is_coarray): New function.
2240 * gfortran.h (gfc_is_coarray): New prototype.
2241 * interface.c (compare_parameter): Use it.
2243 2011-07-19 Richard Guenther <rguenther@suse.de>
2245 * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
2246 (gfc_trans_string_copy): Likewise.
2247 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
2248 * trans-types.c (gfc_get_array_descr_info): Likewise.
2249 * trans.c (gfc_build_array_ref): Likewise.
2251 2011-07-19 Janus Weil <janus@gcc.gnu.org>
2254 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
2256 2011-07-18 Tobias Burnus <burnus@net-b.de>
2258 * trans-decl.c (gfc_build_qualified_array): Make coarray's
2259 token TYPE_QUAL_RESTRICT.
2261 2011-07-18 Tobias Burnus <burnus@net-b.de>
2263 * resolve.c (resolve_transfer): Mention defined I/O
2264 in the diagnostic for alloc_comp/pointer_comp.
2266 2011-07-17 Tobias Burnus <burnus@net-b.de>
2269 * module.c (check_for_ambiguous): Check whether the name is matches
2270 the current program unit.
2272 2011-07-17 Tobias Burnus <burnus@net-b.de>
2275 * expr.c (gfc_check_pointer_assign): Fix checking for invalid
2278 2011-07-16 Tobias Burnus <burnus@net-b.de>
2280 * expr.c (gfc_ref_this_image): New function.
2281 (gfc_is_coindexed): Use it.
2282 * gfortran.h (gfc_ref_this_image): New prototype.
2283 * resolve.c (resolve_deallocate_expr,
2284 resolve_allocate_expr): Support alloc scalar coarrays.
2285 * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
2286 gfc_conv_descriptor_cosize, gfc_array_allocate,
2287 gfc_trans_deferred_array): Ditto.
2288 * trans-expr.c (gfc_conv_variable) Ditto.:
2289 * trans-stmt.c (gfc_trans_deallocate): Ditto.
2290 * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
2291 gfc_get_array_descr_info): Ditto.
2292 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2294 2011-07-11 Jakub Jelinek <jakub@redhat.com>
2297 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
2298 inner_size to gfc_index_one_node instead of integer_one_node.
2300 2011-07-10 Tobias Burnus <burnus@net-b.de>
2303 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
2305 2011-07-09 Uros Bizjak <ubizjak@gmail.com>
2308 * expr.c (gfc_get_corank): Change return value to int.
2309 * gfortran.h (gfc_get_corank): Update function prototype.
2311 2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
2314 * resolve.c (resolve_symbol): Force resolution of function result's
2315 array specification.
2317 2011-07-07 Tobias Burnus <burnus@net-b.de>
2319 * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
2320 with NULL arguments for (new) stat=/errmsg= arguments.
2322 2011-07-06 Daniel Carrera <dcarrera@gmail.com>
2324 * trans-array.c (gfc_array_allocate): Rename allocatable_array to
2325 allocatable. Rename function gfc_allocate_array_with_status to
2326 gfc_allocate_allocatable_with_status. Update function call for
2327 gfc_allocate_with_status.
2328 * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
2329 gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
2330 * trans-stmt.c (gfc_trans_allocate): Update function call for
2331 gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
2332 to gfc_allocate_allocatable_with_status.
2333 * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
2334 so it uses the library for memory allocation when -fcoarray=lib.
2335 (gfc_allocate_allocatable_with_status): Renamed from
2336 gfc_allocate_array_with_status.
2337 (gfc_allocate_allocatable_with_status): Update function call for
2338 gfc_allocate_with_status.
2339 * trans.h (gfc_coarray_type): New enum.
2340 (gfc_allocate_with_status): Update prototype.
2341 (gfc_allocate_allocatable_with_status): Renamed from
2342 gfc_allocate_array_with_status.
2343 * trans-decl.c (generate_coarray_sym_init): Use the new constant
2344 GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
2346 2011-07-06 Richard Guenther <rguenther@suse.de>
2348 * f95-lang.c (gfc_init_decl_processing):
2349 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2351 2011-07-04 Jakub Jelinek <jakub@redhat.com>
2354 * gfortranspec.c (lang_specific_driver): Ignore options with
2355 CL_ERR_MISSING_ARG errors.
2357 2011-07-02 Janus Weil <janus@gcc.gnu.org>
2360 * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
2362 2011-06-30 Jakub Jelinek <jakub@redhat.com>
2365 * gfortran.h (gfc_constructor): Add repeat field.
2366 * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
2367 * array.c (current_expand): Add repeat field.
2368 (expand_constructor): Copy repeat.
2369 * constructor.c (node_free, node_copy, gfc_constructor_get,
2370 gfc_constructor_lookup): Handle repeat field.
2371 (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
2372 * data.h (gfc_assign_data_value): Add mpz_t * argument.
2373 (gfc_assign_data_value_range): Removed.
2374 * constructor.h (gfc_constructor_advance): Removed.
2375 (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
2376 * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
2377 also handle overwriting a range with a single entry.
2378 (gfc_assign_data_value_range): Removed.
2379 * resolve.c (check_data_variable): Adjust gfc_assign_data_value
2380 call. Use gfc_assign_data_value instead of
2381 gfc_assign_data_value_expr.
2383 2011-06-27 Janus Weil <janus@gcc.gnu.org>
2386 * trans-array.c (structure_alloc_comps): Make sure sub-components
2387 and extended types are correctly deallocated.
2389 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
2391 * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
2392 * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
2393 * trans-decl.c: Add sync_ or SYNC__ to builtin names.
2395 2011-06-21 Janus Weil <janus@gcc.gnu.org>
2398 * class.c (gfc_find_derived_vtab): Make vtab and default initialization
2399 symbols SAVE_IMPLICIT.
2401 2011-06-20 Tobias Burnus <burnus@net-b.de>
2404 * gfortran.h (gfc_check_vardef_context): Update prototype.
2405 (iso_fortran_env_symbol): Handle derived types.
2406 (symbol_attribute): Add lock_comp.
2407 * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
2408 * interface.c (compare_parameter, gfc_procedure_use): Handle
2410 (compare_actual_formal): Update
2411 gfc_check_vardef_context call.
2412 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
2413 * intrinsic.c (check_arglist): Ditto.
2414 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
2415 * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
2416 * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
2417 * module.c (mio_symbol_attribute): Handle lock_comp.
2418 (create_derived_type): New function.
2419 (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
2420 * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
2421 * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
2422 checks for LOCK_TYPE.
2423 (gfc_resolve_iterator, resolve_deallocate_expr,
2424 resolve_allocate_expr, resolve_code, resolve_transfer): Update
2425 gfc_check_vardef_context call.
2426 * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
2427 * trans-stmt.c (gfc_trans_lock_unlock): New function.
2428 * trans.c (trans_code): Handle LOCK and UNLOCK.
2430 2011-06-18 Janus Weil <janus@gcc.gnu.org>
2433 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
2436 2011-06-17 Janus Weil <janus@gcc.gnu.org>
2439 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
2440 make sure the vtab is present.
2442 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2445 * interface.c (gfc_extend_assign): Propagate the locus from the
2446 assignment to the type-bound procedure call.
2448 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2451 * module.c (mio_component): Make sure the 'class_ok' attribute is set
2452 for use-associated CLASS components.
2453 * parse.c (parse_derived): Check for 'class_ok' attribute.
2454 * resolve.c (resolve_fl_derived): Ditto.
2456 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2458 * frontend-passes.c (remove_trim): New function.
2459 (optimize_assignment): Use it.
2460 (optimize_comparison): Likewise. Return correct status
2461 for previous change.
2463 2011-06-12 Tobias Burnus
2466 * trans-expr.c (gfc_trans_assignment_1): Tell
2467 gfc_trans_scalar_assign to also deep-copy RHS nonvariables
2468 with allocatable components.
2469 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
2471 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2473 * frontend-passes.c (optimize_assignment): Follow chains
2474 of concatenation operators to the end for removing trailing
2475 TRIMS for assignments.
2477 2011-06-10 Daniel Carrera <dcarrera@gmail.com>
2479 * trans-decl.c (gfc_build_builtin_function_decls):
2480 Updated declaration of caf_sync_all and caf_sync_images.
2481 * trans-stmt.c (gfc_trans_sync): Function
2482 can now handle a "stat" variable that has an integer type
2483 different from integer_type_node.
2485 2011-06-09 Richard Guenther <rguenther@suse.de>
2487 * trans.c (gfc_allocate_array_with_status): Mark error path
2490 2011-06-08 Tobias Burnus <burnus@net-b.de>
2493 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
2494 (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
2495 (gfc_code): Add expr4.
2496 * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
2497 * match.c (gfc_match_lock, gfc_match_unlock,
2498 lock_unlock_statement): New functions.
2499 (sync_statement): Bug fix, avoiding double freeing.
2500 (gfc_match_if): Handle LOCK/UNLOCK statement.
2501 * parse.c (decode_statement, next_statement,
2502 gfc_ascii_statement): Ditto.
2503 * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
2504 * resolve.c (resolve_lock_unlock): New function.
2505 (resolve_code): Call it.
2506 * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
2508 2011-06-07 Richard Guenther <rguenther@suse.de>
2510 * f95-lang.c (gfc_init_decl_processing): Do not set
2511 size_type_node or call set_sizetype.
2513 2011-06-05 Tobias Burnus <burnus@net-b.de>
2516 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
2519 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net>
2520 Thomas Koenig <tkoenig@gcc.gnu.org>
2522 * dump-parse-tree.c (show_symbol): Don't dump namespace
2523 for ENTRY to avoid infinite recursion.
2525 2011-06-02 Asher Langton <langton2@llnl.gov>
2528 * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
2529 pointees as AS_EXPLICIT.
2531 2011-06-02 Asher Langton <langton2@llnl.gov>
2534 * decl.c (variable_decl): Merge current_as before copying to cp_as.
2536 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
2539 * decl.c (gfc_match_modproc): Allow for a double colon in a module
2540 procedure statement.
2541 * parse.c ( decode_statement): Deal with whitespace around :: in
2544 2011-05-31 Tobias Burnus <burnus@net-b.de>
2547 * intrinsic.c (klass): Add CLASS_ATOMIC.
2548 (add_subroutines): Add atomic_ref/atomic_define.
2549 * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
2550 * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
2551 gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
2552 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
2553 and GFC_ISYM_ATOMIC_REF.
2554 (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
2555 * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
2557 * check.c (gfc_check_atomic, gfc_check_atomic_def,
2558 gfc_check_atomic_ref): New functions.
2559 * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
2560 ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
2561 * trans-intrinsic.c (conv_intrinsic_atomic_def,
2562 conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
2564 (conv_intrinsic_move_alloc) Renamed from
2565 gfc_conv_intrinsic_move_alloc - and made static.
2566 * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
2567 (gfc_conv_intrinsic_subroutine) Add prototype.
2568 * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
2569 * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
2571 (gfc_init_kinds): Set them.
2573 2011-05-31 Tobias Burnus <burnus@net-b.de>
2576 * trans-array.c (gfc_trans_dummy_array_bias): Handle
2577 cobounds of assumed-shape arrays.
2579 2011-05-31 Tobias Burnus <burnus@net-b.de>
2582 * resolve.c (resolve_fl_variable): Handle static coarrays
2583 with non-constant cobounds.
2585 2011-05-29 Janus Weil <janus@gcc.gnu.org>
2588 * module.c (mio_component_ref): Handle components of extended types.
2589 * symbol.c (gfc_find_component): Return is sym is NULL.
2591 2011-05-29 Tobias Burnus <burnus@net-b.de>
2594 * interface.c (compare_parameter): Add check for passing coarray
2595 to allocatable noncoarray dummy.
2597 2011-05-29 Tobias Burnus <burnus@net-b.de>
2598 Richard Guenther <rguenther@suse.de>
2601 * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
2602 the type's TREE_TYPE.
2603 * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
2604 * trans.c (gfc_build_array_ref): Ditto.
2606 2011-05-27 Tobias Burnus <burnus@net-b.de>
2609 * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
2610 * match.c (gfc_match_nullify): Ditto.
2611 * resolve.c (resolve_deallocate_expr): Ditto.
2612 * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
2615 2011-05-27 Tobias Burnus <burnus@net-b.de>
2618 * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
2619 * intrinsic.c (add_functions): Add rank intrinsic.
2620 (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
2621 * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
2622 * simplify.c (gfc_simplify_rank): New function.
2623 * intrinsic.texi (RANK): Add description for rank intrinsic.
2624 * check.c (gfc_check_rank): New function.
2626 2011-05-26 Paul Thomas <pault@gcc.gnu.org>
2627 Thomas Koenig <tkoenig@gcc.gnu.org>
2630 * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
2631 changed to GFC_ENABLE_REVERSE.
2632 * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
2633 to GFC_INHIBIT_REVERSE.
2634 * gfortran.h: Enum gfc_reverse is now GFC_ENABLE_REVERSE,
2635 GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
2636 * dependency.c (gfc_dep_resolver): Change names for elements of
2637 gfc_reverse as necessary. Change the logic so that forward
2638 dependences are remembered as well as backward ones. When both
2639 have appeared, force a temporary.
2641 2011-05-26 Tobias Burnus <burnus@net-b.de>
2644 * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
2645 * trans-decl.c (has_coarray_vars, caf_init_block,
2646 gfor_fndecl_caf_register): New file-global variables.
2647 (gfc_finish_var_decl): Make sure that coarrays in main are static.
2648 (gfc_build_qualified_array): Generate coarray token variable.
2649 (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
2650 (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
2651 (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
2653 (generate_local_decl): Check for local coarrays.
2654 (create_main_function): SYNC ALL before calling MAIN.
2655 (generate_coarray_sym_init): Register static coarray.
2656 (generate_coarray_init): Generate CAF registering constructor
2658 (gfc_generate_function_code): Call it, if needed, do not create
2660 (gfc_generate_module_vars, gfc_process_block_locals): Call
2661 generate_coarray_init.
2662 * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
2664 * trans.h (gfor_fndecl_caf_register): New variable.
2665 (lang_type): New element caf_token.
2666 (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
2668 2011-05-24 Joseph Myers <joseph@codesourcery.com>
2670 * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
2671 (gfortran$(exeext)): Use libcommon-target.a.
2673 2011-05-22 Thomas Koenig <tkoenig@gcc.gnu.org>
2675 * frontend-passes.c (cfe_register_funcs): Also register
2676 character functions if their charlens are known and constant.
2677 Also register allocatable functions.
2679 2011-05-21 Janus Weil <janus@gcc.gnu.org>
2682 * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
2683 selector is ALLOCATABLE.
2685 2011-05-20 Janus Weil <janus@gcc.gnu.org>
2688 * module.c (write_dt_extensions): Do not write extended types which
2689 are local to a subroutine.
2691 2011-05-20 Joseph Myers <joseph@codesourcery.com>
2693 * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
2695 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
2697 * gfortran.texi (set_fpe): Update documentation.
2698 * invoke.texi (-ffpe-trap): Likewise.
2699 * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
2700 * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
2701 precision an alias for it.
2703 2011-05-19 Tobias Burnus <burnus@net-b.de>
2706 * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
2707 (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
2709 * trans.c (gfc_build_array_ref): Return original type not variant
2710 copy for scalar coarrays.
2711 * trans-array.c (gfc_conv_array_ref): Ditto.
2713 2011-05-18 Janus Weil <janus@gcc.gnu.org>
2716 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
2717 argument to avoid memory leaks.
2719 2011-05-16 Tobias Burnus <burnus@net-b.de>
2721 * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
2722 (Fortran 2008 status): Multi-image support for coarrays.
2723 (TR 19113 status): New section.
2725 2011-05-15 Tobias Burnus <burnus@net-b.de>
2728 actual argument is not an array; rank mismatch is diagnosted later.
2729 * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
2731 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2733 2011-05-15 Joern Rennecke <amylaar@spamcop.net>
2736 * trans-types.c: Include "tm.h".
2737 [0] (c_size_t_size): Remove.
2739 2011-05-15 Janne Blomqvist <jb@gcc.gnu.org>
2742 * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
2743 is now the default, the library defaults to backtracing disabled.
2745 2011-05-14 Tobias Burnus <burnus@net-b.de>
2747 * lang.opt (fdump-core): Re-add as ignored option
2748 for backward compatibility.
2750 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2753 * gfortran.texi: Update mixed-language programming section
2754 reflecting the removal of the fdump-core option, and that
2755 -fbacktrace is now enabled by default.
2757 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2760 * frontend-passes.c (cfe_register_funcs): Also register functions
2761 for potential elimination if the rank is > 0, the shape is unknown
2762 and reallocate on assignment is active.
2763 (create_var): For rank > 0 functions with unknown shape, create
2764 an allocatable temporary.
2766 2011-05-14 Tobias Burnus <burnus@net-b.de>
2769 * interface.c (compare_parameter): Skip diagnostic if
2770 actual argument is not an array; rank mismatch is diagnosted later.
2772 2011-05-14 Tobias Burnus <burnus@net-b.de>
2774 * options.c (gfc_init_options, gfc_post_options): Enable
2775 -fstack-arrays by default if -Ofast is used.
2776 * invoke.texi (-fstack-arrays): Document this.
2778 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2781 * gfortran.h (gfc_option_t): Remove flag_dump_core.
2782 * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
2783 (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
2784 * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
2785 * invoke.texi: Remove -fdump-core, document that -fbacktrace is
2787 * lang.opt: Remove -fdump-core.
2788 * options.c (gfc_init_options): Make backtrace default to enabled,
2790 (gfc_handle_option): Remove OPT_fdump-core.
2791 * trans-decl.c: Pass a 0 to preserve ABI.
2793 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2795 * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
2797 2011-05-13 Tobias Burnus <burnus@net-b.de>
2800 * io.c (resolve_tag_format, resolve_tag): Make sure
2801 that the string is of default kind.
2802 (gfc_resolve_inquire): Also resolve decimal tag.
2804 2011-05-12 Tobias Burnus <burnus@net-b.de>
2807 * resolve.c (resolve_intrinsic): Don't resolve module
2808 intrinsics multiple times.
2810 2011-05-11 Tobias Burnus <burnus@net-b.de>
2813 * expr.c (gfc_is_constant_expr): Use e->value.function.esym
2814 instead of e->symtree->n.sym, if available.
2816 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2818 * f95-lang.c (global_bindings_p): Return bool and simplify.
2820 2011-05-07 Tobias Burnus <burnus@net-b.de>
2824 * trans.h: Move gfc_init_coarray_decl prototype ...
2825 * gfortran.h: ... to here.
2826 * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
2827 (gfc_parse_file): Update translate_all_program_units call.
2828 * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
2829 new argument whether DECL_EXTERNAL should be used.
2830 (create_main_function): Update gfc_init_coarray_decl call.
2831 * trans-intrinsic.c (trans_this_image, trans_image_index,
2832 conv_intrinsic_cobound): Ditto.
2834 2011-05-06 Tobias Burnus <burnus@net-b.de>
2837 * trans-array.c (gfc_walk_variable_expr): Continue walking
2838 for scalar coarrays.
2839 * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
2840 (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
2841 (trans_this_image): Fix algorithm.
2842 * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
2843 gfc_sym_type): Handle scalar coarrays.
2845 2011-05-06 Tobias Burnus <burnus@net-b.de>
2849 * lang.opt (std=f2008tr): New.
2850 * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
2851 * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
2852 procedures for -std=f2008tr/gnu/legacy.
2853 (gfc_match_import): Set sym to NULL.
2854 * options.c (set_default_std_flags,gfc_handle_option): Handle
2856 * invoke.texi (-std=): Document -std=f2008tr.
2858 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2860 * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
2861 * trans-io.c (add_case): Likewise.
2862 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2863 (gfc_trans_character_select): Likewise.
2865 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2867 * trans-decl.c (trans_function_start): Do not set
2868 dont_save_pending_sizes_p.
2870 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2872 * trans.h (gfc_chainon_list): Delete.
2873 * trans.c (gfc_chainon_list): Delete.
2875 2011-05-04 Tobias Burnus <burnus@net-b.de>
2878 * invoke.texi (fno-protect-parens): Document
2879 that -Ofast implies -fno-protect-parens.
2880 * options.c (gfc_init_options, gfc_post_options):
2881 Make -Ofast imply -fno-protect-parens.
2883 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2885 * trans-decl.c (build_library_function_decl_1): Call
2886 build_function_type_vec. Adjust argument list building accordingly.
2887 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
2888 * trans-types.c (gfc_get_function_type): Likewise.
2890 2011-05-04 Richard Guenther <rguenther@suse.de>
2892 * trans-array.c (gfc_trans_array_constructor_value): Use
2893 size_int for bounds of range types.
2894 (gfc_trans_array_constructor_value): Use size_type_node
2895 for memcpy argument.
2896 * trans-common.c (build_field): Use gfc_charlen_type_node
2898 * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
2899 as type to build_int_cst.
2900 * trans-const.c (gfc_build_string_const): Use size_int
2901 for bounds of range types.
2902 (gfc_build_wide_string_const): Likewise.
2903 * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
2905 (gfc_trans_character_select): Likewise.
2906 (gfc_trans_character_select): Do not pass NULL
2907 as type to build_int_cst.
2908 (gfc_trans_character_select): Use size_int for bounds of range types.
2909 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2910 (add_case): Do not pass NULL as type to build_int_cst.
2911 (transfer_expr): Likewise.
2912 (transfer_array_desc): Likewise.
2913 * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
2915 (gfc_trans_assign_aux_var): Likewise.
2916 (create_main_function): Use size_int for bounds of range types.
2917 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
2918 NULL as type to build_int_cst.
2919 (gfc_conv_intrinsic_spacing): Likewise.
2920 (gfc_conv_intrinsic_rrspacing): Likewise.
2921 (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
2923 2011-05-04 Richard Guenther <rguenther@suse.de>
2925 * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
2926 argument to int_const_binop.
2928 2011-05-03 Tobias Burnus <burnus@net-b.de>
2931 * trans-intrinsic.c (trans_this_image): Implement version with
2933 (conv_intrinsic_cobound): Simplify code.
2934 (gfc_conv_intrinsic_function): Call trans_this_image for
2935 this_image(coarray) except for -fcoarray=single.
2937 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
2940 * gfortran.texi: Document the 'Q' exponent-letter extension.
2941 * invoke.texi: Document -Wreal-q-constant.
2942 * lang.opt: Add -Wreal-q-constant option.
2943 * gfortran.h: Add warn_real_q_constant to option struct.
2944 * primary.c (match_real_constant): Use it. Accept 'Q' as
2945 exponent-letter for REAL(16) real-literal-constant with a
2946 fallback to REAL(10) or error if REAL(10) is not available.
2947 * options.c (gfc_init_options, set_Wall) Set it.
2948 (gfc_handle_option): Handle new option.
2950 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2952 * dump-prase-tree.c (show_code_node): Set the current
2953 namespace to the BLOCK before displaying it; restore
2956 2011-04-30 Tobias Burnus <burnus@net-b.de>
2959 * decl.c (gfc_match_import): Don't try to find the
2960 symbol if already found.
2962 2011-04-30 Paul Thomas <pault@gcc.gnu.org>
2965 * trans-expr.c (fcncall_realloc_result): Set the bounds and the
2966 offset so that the lbounds are one.
2967 (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
2969 2011-04-29 Paul Thomas <pault@gcc.gnu.org>
2972 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
2973 automatic reallocation when the lhs is a target.
2976 * trans-expr.c (fcncall_realloc_result): Make sure that the
2977 result dtype field is set before the function call.
2979 2011-04-29 Tobias Burnus <burnus@net-b.de>
2982 * resolve.c (resolve_typebound_generic_call): Don't check access
2983 flags of the specific function.
2986 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
2987 to AS_ASSUMED_SHAPE for function results.
2988 (resolve_fl_var_and_proc): Print also for function results with
2989 AS_DEFERRED an error, if they are not a pointer or allocatable.
2990 (resolve_types): Make sure arguments of procedures in interface
2991 blocks are resolved.
2993 2011-04-29 Michael Matz <matz@suse.de>
2995 * options.c (options.c): Set warn_maybe_uninitialized.
2997 2011-04-28 Tobias Burnus <burnus@net-b.de>
3000 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
3001 function results only once.
3002 (resolve_symbol): Always resolve function results.
3005 * expr.c (gfc_check_vardef_context): Fix handling of generic
3007 * interface.c (check_interface0): Reject internal functions
3008 in generic interfaces, unless -std=gnu.
3010 2011-04-27 Tobias Burnus <burnus@net-b.de>
3013 * resolve.c (resolve_global_procedure): Error recovery -
3014 avoid segfault for (non)character-returning functions.
3016 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
3018 * decl.c (gfc_match_end): Check that the block name starts
3020 * parse.c (gfc_build_block_ns): Make block names unique by
3023 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
3025 * frontend-passes.c (inserted_block): New variable.
3026 (changed_statement): Likewise.
3027 (create_var): Encase statement to be operated on in a BLOCK.
3028 Adjust code insertion for BLOCK.
3029 (cfe_code): Set inserted_block and changed_statement to NULL.
3031 2011-04-23 Tobias Burnus <burnus@net-b.de>
3034 * module.c (mio_array_spec): Set as->cotype on reading.
3035 * resolve.c (resolve_allocate_expr): Fix allocating coarray
3038 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3041 * frontend_passes (cfe_register_funcs): Remove workaround for DO
3043 (gfc_code_walker): Make sure the pointer to the current
3044 statement doen't change when other statements are inserted.
3046 2011-04-21 Tobias Burnus <burnus@net-b.de>
3049 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
3051 2011-04-20 Jim Meyering <meyering@redhat.com>
3053 * expr.c (free_expr0): Remove useless if-before-free.
3054 * gfortranspec.c (lang_specific_pre_link): Likewise.
3055 * interface.c (gfc_extend_expr): Likewise.
3056 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
3058 2011-04-19 Tobias Burnus <burnus@net-b.de>
3063 * module.c (fix_mio_expr): Commit created symbol.
3065 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
3067 * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
3069 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
3071 * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
3074 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
3076 * misc.c (gfc_getmem): Remove function.
3077 * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
3078 usage with XCNEW or XCNEWVEC.
3079 * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
3081 * options.c (gfc_handle_module_path_options)
3082 (gfc_get_option_string): Likewise.
3083 * resolve.c (gfc_resolve_forall): Likewise.
3084 * simplify.c (simplify_transformation_to_array): Likewise.
3085 * target-memory.c (gfc_target_interpret_expr): Likewise.
3086 * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
3087 (get_init_field): Likewise.
3088 * trans-expr.c (gfc_conv_statement_function): Likewise.
3089 * trans-io.c (nml_full_name): Likewise.
3090 * trans-stmt.c (gfc_trans_forall_1): Likewise.
3091 * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
3093 2011-04-19 Tobias Burnus <burnus@net-b.de>
3096 * parse.c (resolve_all_program_units): Skip modules.
3097 (translate_all_program_units): Handle modules.
3098 (gfc_parse_file): Defer code generation for modules.
3100 2011-04-19 Martin Jambor <mjambor@suse.cz>
3102 * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
3103 instead of cgraph_get_create_node.
3105 2011-04-18 Jim Meyering <meyering@redhat.com>
3107 remove now-unused definition of gfc_free
3108 * misc.c (gfc_free): Remove function.
3109 * gfortran.h (gfc_free): Remove its prototype.
3111 2011-04-18 Jim Meyering <meyering@redhat.com>
3113 convert each use of gfc_free (p) to free (p)
3114 Do that by running this command:
3115 perl -pi -e 's/\bgfc_free ?\(/free (/' \
3116 $(git grep -El '\bgfc_free ?\(')
3117 which also corrects the few uses that lacked a space between
3118 the function name and the open parenthesis.
3119 Manually undo the change to the function definition itself
3120 and its prototype. They'll be removed next.
3121 * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
3122 * constructor.c (node_free): Likewise.
3123 * cpp.c (dump_queued_macros): Likewise.
3124 * data.c (gfc_assign_data_value): Likewise.
3125 * decl.c (free_variable, free_value, gfc_free_data): Likewise.
3126 (gfc_free_data_all, match_old_style_init): Likewise.
3127 (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
3129 (gfc_match_modproc): Likewise.
3130 * dependency.c (check_section_vs_section): Likewise.
3131 * error.c (gfc_pop_error, gfc_free_error): Likewise.
3132 * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
3133 (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
3134 (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
3136 * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
3137 (strip_function_call, optimize_comparison): Likewise.
3138 * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
3139 (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
3141 * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
3142 (gfc_convert_chartype): Likewise.
3143 * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
3145 (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
3146 * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
3147 (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
3149 (free_case, gfc_free_forall_iterator): Likewise.
3151 * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
3152 (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
3153 (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
3154 (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
3155 (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
3156 (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
3157 * openmp.c (gfc_free_omp_clauses): Likewise.
3158 * options.c (gfc_post_options): Likewise.
3159 * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
3160 * primary.c (gfc_free_structure_ctor_component): Likewise.
3161 * resolve.c (resolve_structure_cons, check_host_association): Likewise.
3162 (gfc_resolve_forall, resolve_equivalence): Likewise.
3163 * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
3164 (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
3165 (load_file, gfc_read_orig_filename): Likewise.
3166 * simplify.c (simplify_transformation_to_array): Likewise.
3167 (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
3169 (gfc_simplify_compiler_options): Likewise.
3170 * st.c (gfc_free_statement, gfc_free_statements): Likewise.
3171 (gfc_free_association_list): Likewise.
3172 * symbol.c (free_components, gfc_free_st_label, free_st_labels):
3174 (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
3175 (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
3176 (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
3177 (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
3179 (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
3180 (gfc_free_namespace): Likewise.
3181 * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
3182 (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
3183 (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
3184 * trans-common.c (get_init_field, create_common): Likewise.
3185 * trans-const.c (gfc_build_wide_string_const): Likewise.
3186 (gfc_conv_string_init): Likewise.
3187 * trans-decl.c (gfc_generate_function_code): Likewise.
3188 * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
3190 (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
3191 (gfc_trans_subarray_assign): Likewise.
3192 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
3193 * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
3194 (transfer_namelist_element, transfer_array_component): Likewise.
3195 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
3196 * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
3197 * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
3200 2011-04-15 Jim Meyering <meyering@redhat.com>
3202 gfortran: remove cpp definition of free, ...
3203 in preparation for the s/gfc_free/free/ transformation.
3204 * gfortran.h (free): Remove macro definition that would otherwise
3205 prevent direct use of the function.
3207 2011-04-18 Tobias Burnus <burnus@net-b.de>
3210 * array.c (gfc_match_array_ref): Check for too many codimensions.
3211 * check.c (gfc_check_image_index): Check number of elements
3213 * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
3215 2011-04-18 Tobias Burnus <burnus@net-b.de>
3218 * iresolve.c (gfc_resolve_image_index): Set ts.type.
3219 * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
3220 are not known at compile time and handle -fcoarray=lib.
3221 * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
3223 (conv_intrinsic_cobound): Fix comment typo.
3224 (trans_this_image): New function.
3225 * trans-array.c (gfc_unlikely): Move to trans.c.
3226 * trans.c (gfc_unlikely): Function moved from trans-array.c.
3227 (gfc_trans_runtime_check): Use it.
3228 * trans-io.c (gfc_trans_io_runtime_check): Ditto.
3229 * trans.h (gfc_unlikely): Add prototype.
3231 2011-04-18 Paul Thomas <pault@gcc.gnu.org>
3234 * trans-expr.c (fcncall_realloc_result): Renamed version of
3235 realloc_lhs_bounds_for_intrinsic_call that does not touch the
3236 descriptor bounds anymore but makes a temporary descriptor to
3238 (gfc_trans_arrayfunc_assign): Modify the reference to above
3241 2011-05-17 Tobias Burnus <burnus@net-b.de>
3244 * trans-decl.c (gfc_get_extern_function_decl): Fix decl
3245 for external procedures with proc arguments.
3247 2011-04-15 Michael Matz <matz@suse.de>
3249 * trans-array.c (toplevel): Include gimple.h.
3250 (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
3251 properly expand variable length arrays.
3252 (gfc_trans_auto_array_allocation): If flag_stack_arrays create
3253 variable length decls and associate them with their scope.
3254 * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
3255 * options.c (gfc_init_options): Handle -fstack_arrays option.
3256 * lang.opt (fstack-arrays): Add option.
3257 * invoke.texi (Code Gen Options): Document it.
3258 * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
3260 2011-04-15 Tobias Burnus <burnus@net-b.de>
3263 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
3264 code which is also causing an ICE.
3266 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3268 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
3270 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3272 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
3275 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
3279 * trans-array.c (get_std_lbound): For derived type variables
3280 return array valued component lbound.
3282 2011-04-12 Martin Jambor <mjambor@suse.cz>
3284 * trans-decl.c (gfc_generate_function_code): Call
3285 cgraph_get_create_node instead of cgraph_node.
3287 2011-04-11 Tobias Burnus <burnus@net-b.de>
3290 * simplify.c (simplify_bound_dim): Exit for
3291 ucobound's last dimension unless -fcoarray=single.
3292 * trans-array (gfc_conv_descriptor_size_1): Renamed from
3293 gfc_conv_descriptor_size, made static, has now from_dim and
3295 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
3296 (gfc_conv_descriptor_cosize): New function.
3297 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
3298 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
3299 and handle last codim of ucobound for when -fcoarray is not "single".
3301 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3304 * gfortran.h (gfc_option_t): Add warn_function_elimination and
3305 flag_frontend_optimize.
3306 * lang.opt (Wfunction-elimination): Add.
3307 (ffrontend-optimize): Add.
3308 * invoke.texi: Add documentation for -Wfunction-elimination
3309 and -ffrontend-optimize. Add -faggressive-function-elimination
3310 to list of code generation options.
3311 * frontend-passes.c (gfc_run_passes): Run optimizations if
3312 flag_frontend_optimize is set.
3313 (warn_function_elimination): New function.
3314 (cfe_expr_0): Call it if requested to do so.
3315 * options.c (gfc_init_options): Initiate warn_function_elimination
3316 and flag_frontend_optimize.
3317 (gfc_post_options): Set flag_frontend_optimize if not specified
3318 by user, depending on the optimization level.
3319 (gfc_handle_option): Handle -Wfunction-elimination and
3320 -ffrontend-optimize.
3322 2011-04-06 Tobias Burnus <burnus@net-b.de>
3325 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
3326 call for this_image.
3328 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
3330 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
3331 build_function_type_list instead of build_function_type. Correct
3332 argument order for func_frexp and func_scalbn.
3334 2011-04-05 Duncan Sands <baldrick@free.fr>
3336 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
3338 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
3340 * frontend-passes: (optimize_lexical_comparison): New function.
3341 (optimize_expr): Call it.
3342 (optimize_comparison): Also handle lexical comparison functions.
3343 Return false instad of -2 for unequal comparison.
3345 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
3348 * frontend-passes (cfe_expr_0): Reverse the order of going
3351 2011-04-04 Tobias Burnus <burnus@net-b.de>
3352 Mikael Morin <mikael.morin@sfr.fr>
3355 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
3356 * expr.c (gfc_is_coindexed): Ditto.
3357 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
3358 * interface.c (compare_parameter): Use gfc_expr_attr and
3360 * resolve.c (check_dimension, compare_spec_to_ref,
3361 resolve_allocate_expr, check_data_variable): Update for
3363 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
3364 gfc_simplify_ucobound): Allow non-constant bounds.
3365 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
3366 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
3367 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
3368 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
3369 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
3370 gfc_conv_ss_startstride, gfc_conv_loop_setup,
3371 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
3372 gfc_walk_variable_expr): Handle codimen.
3373 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
3374 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
3375 (conv_intrinsic_cobound): New function.
3376 (gfc_conv_intrinsic_function): Call it.
3377 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
3378 ucobound, lcobound, this_image.
3379 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.