1 2016-12-19 Janus Weil <janus@gcc.gnu.org>
4 * intrinsic.texi: Minor documentation fixes for non-standard
5 time-related intrinsics. Add references to standard intrinsics and
6 linkify some existing references.
8 2016-12-18 Dominique d'Humieres <dominiq@lps.ens.fr>
11 * intrinsic.texi: Fix documentation for GMTIME and LTIME.
13 2016-12-18 Janus Weil <janus@gcc.gnu.org>
16 * trans-io.c (get_dtio_proc): Generate non-typebound DTIO call for class
17 variables, if no typebound DTIO procedure is available.
19 2016-12-18 Janus Weil <janus@gcc.gnu.org>
22 * interfac.c (gfc_find_specific_dtio_proc): Fixup for r243005, making
23 sure that the generic list is followed through until the end.
25 2016-12-17 Thomas Koenig <tkoenig@gcc.gnu.org>
28 * decl.c (char_len_param_value): Actually commit previous change.
30 2016-12-17 Thomas Koenig <tkoenig@gcc.gnu.org>
33 * decl.c( char_len_param_value): Also check for -fimplicit-none
34 when determining if implicit none is in force.
36 2016-12-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
39 * io.c (format_lex): Continue of string delimiter seen.
41 2016-12-16 Jakub Jelinek <jakub@redhat.com>
44 * trans-expr.c (gfc_conv_procedure_call): Emit DECL_EXPR for the
45 type pstr var points to.
47 2016-12-15 Janus Weil <janus@gcc.gnu.org>
50 * gfortran.h (gfc_compare_derived_types,gfc_compare_types,
51 gfc_compare_interfaces,gfc_has_vector_subscript): Return bool instead
53 * interface.c (compare_components): Ditto.
54 (gfc_compare_union_types): Rename to compare_union_types, declare as
56 (gfc_compare_derived_types): Return bool instead of int.
57 (gfc_compare_types): Ditto.
58 (compare_type): Ditto.
59 (compare_rank): Ditto.
60 (compare_type_rank): Ditto.
61 (compare_type_rank_if): Ditto.
62 (count_types_test): Ditto.
63 (generic_correspondence): Ditto.
64 (gfc_compare_interfaces): Ditto.
65 (check_interface0): Ditto.
66 (check_interface1): Ditto.
67 (compare_allocatable): Ditto.
68 (compare_parameter): Ditto.
69 (gfc_has_vector_subscript): Ditto.
70 (compare_actual_formal): Ditto.
72 2016-12-15 Janus Weil <janus@gcc.gnu.org>
75 * interface.c (compare_allocatable): Avoid additional errors on bad
77 (compare_parameter): Put the result of gfc_expr_attr into a variable,
78 in order to avoid calling it multiple times. Exit early on bad class
79 declarations to avoid ICE.
81 2016-12-14 Martin Jambor <mjambor@suse.cz>
83 * trans-openmp.c: Include omp-general.h.
85 2016-12-14 Andre Vehreschild <vehre@gcc.gnu.org>
88 * trans-expr.c (gfc_trans_assignment_1): Improve check whether detour
89 caf-runtime routines is needed.
91 2016-12-14 Andre Vehreschild <vehre@gcc.gnu.org>
94 * array.c (gfc_find_array_ref): Add flag to return NULL when no ref is
95 found instead of erroring out.
96 * data.c (gfc_assign_data_value): Only constant expressions are valid
98 * gfortran.h: Reflect change of gfc_find_array_ref's signature.
99 * interface.c (compare_actual_formal): Access the non-elemental
100 array-ref. Prevent taking a REF_COMPONENT for a REF_ARRAY. Correct
102 * module.c (load_omp_udrs): Clear typespec before reading into it.
103 * trans-decl.c (gfc_build_qualified_array): Prevent accessing the array
104 when it is a coarray.
105 * trans-expr.c (gfc_conv_cst_int_power): Use wi::abs()-function instead
106 of crutch preventing sanitizer's bickering here.
107 * trans-stmt.c (gfc_trans_deallocate): Only get data-component when it
108 is a descriptor-array here.
110 2016-12-13 Janus Weil <janus@gcc.gnu.org>
113 * gfortran.h (gfc_is_constant_expr, gfc_is_formal_arg,
114 gfc_is_compile_time_shape): Return bool instead of int.
115 * array.c (gfc_is_compile_time_shape): Ditto.
116 * expr.c (gfc_is_constant_expr): Ditto.
117 * resolve.c (gfc_is_formal_arg): Ditto. Make formal_arg_flag bool.
119 2016-12-13 Andre Vehreschild <vehre@gcc.gnu.org>
122 * resolve.c (resolve_symbol): Correct attr lookup to the _data
124 * trans-array.c (gfc_alloc_allocatable_for_assignment): Indirect ref
125 pointers and references before retrieving the caf-token.
127 2016-12-13 Janus Weil <janus@gcc.gnu.org>
128 Paul Thomas <pault@gcc.gnu.org>
131 * gfortran.h (gfc_find_typebound_dtio_proc): New prototype.
132 * interface.c (gfc_compare_interfaces): Whitespace fix.
133 (gfc_find_typebound_dtio_proc): New function.
134 (gfc_find_specific_dtio_proc): Use it. Improve error recovery.
135 * trans-io.c (get_dtio_proc): Implement polymorphic calls to DTIO
138 2016-12-12 Janus Weil <janus@gcc.gnu.org>
141 * expr.c (gfc_is_constant_expr): Specification functions are not
142 compile-time constants. Update documentation (add reference to F08
143 standard), add a FIXME.
144 (external_spec_function): Add reference to F08 standard.
145 * resolve.c (resolve_fl_variable): Ditto.
147 2016-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
150 * error.c (gfc_warning_internal): New function.
151 * frontend-passes.c (gfc_run_passes): Call check_locus if
152 CHECKING_P is defined.
153 (check_locus_code): New function.
154 (check_locus_expr): New function.
155 (check_locus): New function.
156 * gfortran.h: Add prototype for gfc_warning_internal.
158 2016-12-10 Paul Thomas <pault@gcc.gnu.org>
161 * resolve.c (resolve_structure_cons): Remove the block that
162 tried to remove a charlen and rely on namespace cleanup.
164 2016-12-09 Paul Thomas <pault@gcc.gnu.org>
167 * decl.c (get_proc_name): Use the symbol tlink field instead of
168 the typespec interface field.
169 (gfc_match_function_decl, gfc_match_submod_proc): Ditto.
170 * gfortran.h : Since the symbol tlink field is no longer used
171 by the frontend for change management, change the comment to
172 reflect its current uses.
173 * parse.c (get_modproc_result): Same as decl.c changes.
174 * resolve.c (resolve_fl_procedure): Ditto.
176 2016-12-09 Janus Weil <janus@gcc.gnu.org>
179 * class.c (has_finalizer_component): Fix this function to detect only
180 non-pointer non-allocatable components which have a finalizer.
182 2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
185 * trans-stmt.c (gfc_trans_allocate): Add sync all after the execution
186 of the whole allocate-statement to adhere to the standard.
188 2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
190 * trans-array.c (gfc_array_deallocate): Remove wrapper.
191 (gfc_trans_dealloc_allocated): Same.
192 (structure_alloc_comps): Restructure deallocation of (nested)
193 allocatable components. Insert dealloc of sub-component into the block
194 guarded by the if != NULL for the component.
195 (gfc_trans_deferred_array): Use the almightly deallocate_with_status.
196 * trans-array.h: Remove prototypes.
197 * trans-expr.c (gfc_conv_procedure_call): Use the almighty deallocate_
199 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
200 (gfc_omp_clause_assign_op): Likewise.
201 (gfc_omp_clause_dtor): Likewise.
202 * trans-stmt.c (gfc_trans_deallocate): Likewise.
203 * trans.c (gfc_deallocate_with_status): Allow deallocation of scalar
204 and arrays as well as coarrays.
205 (gfc_deallocate_scalar_with_status): Get the data member for coarrays
206 only when freeing an array with descriptor. And set correct caf_mode
207 when freeing components of coarrays.
208 * trans.h: Change prototype of gfc_deallocate_with_status to allow
209 adding statements into the block guarded by the if (pointer != 0) and
210 supply a coarray handle.
212 2016-12-09 Paul Thomas <pault@gcc.gnu.org>
215 * gfortran.h : Add fn_result_spec bitfield to gfc_symbol.
216 * resolve.c (flag_fn_result_spec): New function.
217 (resolve_fntype): Call it for character result lengths.
218 * symbol.c (gfc_new_symbol): Set fn_result_spec to zero.
219 * trans-decl.c (gfc_sym_mangled_identifier): Include the
220 procedure name in the mangled name for symbols with the
221 fn_result_spec bit set.
222 (gfc_finish_var_decl): Mark the decls of these symbols
223 appropriately for the case where the function is external.
224 (gfc_get_symbol_decl): Mangle the name of these symbols.
225 (gfc_create_module_variable): Allow them through the assert.
226 (gfc_generate_function_code): Remove the assert before the
227 initialization of sym->tlink because the frontend no longer
229 * trans-expr.c (gfc_map_intrinsic_function): Add a case to
230 treat the LEN_TRIM intrinsic.
231 (gfc_trans_string_copy): Deal with Wstringop-overflow warning
232 that can occur with constant source lengths at -O3.
234 2016-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
240 * gfortran.h (gfc_namespace): Remove old_cl_list member.
241 * parse.c (use_modules, next_statement): old_cl_list is gone.
242 (clear_default_charlen): Remove no longer used function.
243 (reject_statement): Do not try ot clean up gfc_charlen structure(s)
244 that may have been added to a cl_list list.
245 * symbol.c (gfc_new_charlen): old_cl_list structure is gone.
247 2016-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
250 * resolve.c (resolve_fl_namelist): Remove unneeded error.
252 2016-12-06 Andre Vehreschild <vehre@gcc.gnu.org>
255 * class.c (finalize_component): Add missing locus information.
256 (finalization_scalarizer): Likewise.
257 (finalization_get_offset): Likewise.
258 (finalizer_insert_packed_call): Likewise.
259 (generate_finalization_wrapper): Likewise.
261 2016-12-05 Nathan Sidwell <nathan@acm.org>
263 * error.c (gfc_warning_check): Call diagnostic_check_max_errors.
264 (gfc_error_check): Likewise.
266 2016-12-04 Janus Weil <janus@gcc.gnu.org>
269 * intrinsic.c (gfc_convert_type_warn): Do not set the full typespec for
270 the conversion symbol, but only type and kind. Set the full typespec
272 (gfc_convert_chartype): Ditto.
274 2016-12-03 Janus Weil <janus@gcc.gnu.org>
277 * primary.c (gfc_match_varspec): Reject nonpolymorphic references to
280 2016-12-03 Janus Weil <janus@gcc.gnu.org>
283 * primary.c (gfc_match_rvalue): Add a new check that gives better error
286 2016-12-03 Janus Weil <janus@gcc.gnu.org>
289 * resolve.c (gfc_resolve_finalizers): Prevent bogus warning.
291 2016-12-02 Steven G. Kargl <kargl@gcc.gnu.org>
293 * simplify.c (gfc_convert_char_constant): Free result on error.
295 2016-12-02 Janus Weil <janus@gcc.gnu.org>
296 Steven G. Kargl <kargl@gcc.gnu.org>
299 * check.c (gfc_check_rank): Remove ATTRIBUTE_UNUSED.
300 * expr.c (gfc_check_assign): Fix error propagation.
302 2016-12-01 Elizebeth Punnoose <elizebeth.punnoose@hpe.com>
305 * trans-array.c (trans_array_constructor): Treat negative character
308 2016-12-01 Steven G. Kargl <kargl@gcc.gnu.org>
311 * dependency.c (identical_array_ref): Convert gcc_assert to conditional
312 and gfc_internal_error.
314 2016-11-30 Andre Vehreschild <vehre@gcc.gnu.org>
316 * check.c (gfc_check_allocated): By pass the caf_get call and check on
318 * gfortran.h: Add optional flag to gfc_caf_attr.
319 * gfortran.texi: Document new enum values and _caf_is_present function.
320 * primary.c (caf_variable_attr): Add optional flag to indicate that the
321 expression is reffing a component.
322 (gfc_caf_attr): Likewise.
323 * trans-array.c (gfc_array_deallocate): Handle deallocation mode for
324 coarray deregistration.
325 (gfc_trans_dealloc_allocated): Likewise.
326 (duplicate_allocatable): Use constants instead of
327 creating custom constant tree node of zero or one. Use gfc_add_modify
328 convenience function.
329 (duplicate_allocatable_coarray): This function is similar to
330 duplicate_allocatable but tailored to handle coarrays.
331 (caf_enabled): Check whether in-derived-type coarray processing is
333 (caf_in_coarray): Check that in-derived-type coarray processing is
334 enabled and currently in a derived-typed coarray.
335 (gfc_caf_is_dealloc_only): Return true, when deallocate only is
336 desired for components in derived typed coarrays.
337 (structure_alloc_comps): A mode for handling coarrays, that is no
338 longer encode in the purpose. This makes the use cases of the
339 routine more flexible without repeating. Allocatable components in
340 derived type coarrays are now registered only when nullifying an
341 object and allocated before copying data into them.
342 (gfc_nullify_alloc_comp): Use the caf_mode of structure_alloc_comps
344 (gfc_deallocate_alloc_comp): Likewise.
345 (gfc_deallocate_alloc_comp_no_caf): Likewise.
346 (gfc_reassign_alloc_comp_caf): Likewise.
347 (gfc_copy_alloc_comp): Likewise.
348 (gfc_copy_only_alloc_comp): Likewise.
349 (gfc_alloc_allocatable_for_assignment): Make use to the cheaper way of
350 reallocating a coarray without deregistering and reregistering it.
351 (gfc_trans_deferred_array): Initialize the coarray token correctly for
352 deferred variables and tear them down on exit.
353 * trans-array.h: Change some prototypes to add the coarray (de-)
354 registration modes. Add prototype for checking if deallocate only is
355 selected for components in derived typed coarrays.
356 * trans-decl.c (gfc_build_builtin_function_decls): Generate the
357 declarations for the changed/new caf-lib routines.
358 (gfc_trans_deferred_vars): Ensure deferred variables are (de-)
359 registered correctly on procedure entry/exit.
360 (generate_coarray_sym_init): Use constants.
361 * trans-expr.c (gfc_conv_procedure_call): Propagate coarray allocation
363 (gfc_trans_alloc_subarray_assign): Likewise.
364 (gfc_trans_subcomponent_assign): Likewise.
365 (gfc_trans_structure_assign): Generate code to register the components
366 of a derived type coarray prior to initialization.
367 (gfc_conv_structure): Set flag that the structure is in a coarray.
368 (gfc_trans_scalar_assign): Add flag to indicate being in a coarray and
369 set the structure_alloc_comps modes correctly.
370 (gfc_trans_assignment_1): Figure being in a coarray expression.
371 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Adapt to new
372 structure_alloc_comps interface.
373 (conv_caf_send): Use the old API as long as possible.
374 (trans_caf_is_present): Generate code to check whether an allocatable
375 component in a derived typed coarray is allocated on a remote image.
376 (caf_this_image_ref): Return true, when only reffing this image.
377 (gfc_conv_allocated): Convert allocated queries on allocatable
378 components to the library API.
379 (conv_intrinsic_move_alloc): Adapt to new interface of
380 structure_alloc_comps.
381 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
382 (gfc_omp_clause_assign_op): Likewise.
383 (gfc_omp_clause_dtor): Likewise.
384 * trans-stmt.c (gfc_trans_deallocate): Figure which mode to use when
385 deallocating allocatable components in derived type coarras.
386 * trans.c (gfc_allocate_using_lib): Renamed to
387 gfc_allcate_using_caf_lib.
388 (gfc_allocate_allocatable): Set the registration mode/type of caf-
389 register calls adapting to all the possible allocatable objects.
390 (gfc_deallocate_with_status): Add deregistration mode for allocatable
391 components in derived type coarrays.
392 (gfc_deallocate_scalar_with_status): Likewise.
393 * trans.h (enum gfc_coarray_type): Renamed to gfc_coarray_regtype to
394 avoid collision with gfc_coarray_deregtype.
396 2016-11-30 Janus Weil <janus@gcc.gnu.org>
399 * primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.
401 2016-11-30 Janus Weil <janus@gcc.gnu.org>
404 * interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid
405 dereferencing a null pointer.
407 2016-11-30 Janus Weil <janus@gcc.gnu.org>
410 * decl.c (build_struct): On error, return directly and do not build
413 2016-11-29 Tobias Burnus <burnus@net-b.de>
416 * resolve.c (gfc_resolve_finalizers): Properly detect scalar finalizers.
418 2016-11-27 Paul Thomas <pault@gcc.gnu.org>
421 * module.c (gfc_match_submodule): If there is more than one
422 colon, it is a syntax error.
425 * module.c (gfc_use_module): If an smod file does not exist it
426 is either because the module does not have a module procedure
427 interface or there is an error in the module.
429 2016-11-25 Janne Blomqvist <jb@gcc.gnu.org>
431 * intrinsic.texi: Fix ptrdiff_t typo in ISO_C_BINDING constants
434 2016-11-25 Janus Weil <janus@gcc.gnu.org>
437 * interface.c (gfc_compare_interfaces): Remove bad special case for
438 unlimited polymorphism. Refactor for loop.
440 2016-11-25 Andre Vehreschild <vehre@gcc.gnu.org>
441 Paul Thomas <pault@gcc.gnu.org>
444 * trans-expr.c (gfc_conv_procedure_call): Prepend deallocation
445 of alloctable components to post, rather than adding to
447 * trans-stmt.c (gfc_trans_allocate): Move deallocation of expr3
448 allocatable components so that all expr3s are visited.
450 2016-11-25 Paul Thomas <pault@gcc.gnu.org>
453 * gfortran.dg/allocatable_function_10.f90: New test.
454 * gfortran.dg/class_array_15.f03: Increase builtin_free count
457 2016-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
460 * expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
461 * interface.c (matching_typebound_op): Ditto.
463 2016-11-23 Steven G. Kargl <kargl@gcc.gnu.org>
466 * trans-common.c (finish_equivalences): Do not dereference a NULL pointer.
468 2016-11-23 Martin Jambor <mjambor@suse.cz>
470 * f95-lang.c (DEF_HSA_BUILTIN): New macro.
472 2016-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
475 * expr.c (gfc_apply_init): Allocate a charlen if needed.
477 2016-11-22 Janus Weil <janus@gcc.gnu.org>
480 * class.c (add_proc_comp): Add a vtype component for non-overridable
481 procedures that are overriding.
483 2016-11-20 Harald Anlauf <anlauf@gmx.de>
486 * resolve.c (gfc_resolve_forall): Check for nonscalar index variables.
488 2016-11-20 Andre Vehreschild <vehre@gcc.gnu.org>
491 * resolve.c (resolve_typebound_function): Prevent stripping of refs,
492 when the base-expression is a class' typed one.
494 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
495 Alan Hayward <alan.hayward@arm.com>
496 David Sherwood <david.sherwood@arm.com>
498 * trans-common.c (build_common_decl): Use SET_DECL_MODE.
499 * trans-decl.c (gfc_build_label_decl): Likewise.
500 * trans-types.c (gfc_get_array_descr_info): Likewise.
502 2016-11-17 Janus Weil <janus@gcc.gnu.org>
505 * simplify.c (gfc_simplify_extends_type_of): Fix missed optimization.
506 Prevent over-simplification. Fix a comment. Add a comment.
508 2016-11-16 Steven G. Kargl <kargl@gcc.gnu.org>
511 * io.c (next_char_not_space): Update handling of a 'tab' in a FORMAT.
512 (format_lex): Adjust invocations of next_char_not_space().
514 2016-11-16 Andre Vehreschild <vehre@gcc.gnu.org>
517 * class.c (gfc_is_class_scalar_expr): Prevent taking an array ref for
519 * trans-expr.c (gfc_trans_assignment_1): Ensure a reference to the
520 object to copy is generated, when assigning class objects.
522 2016-11-14 Thomas Koenig <tkoenig@gcc.gnu.org>
524 * dump-parse-tree.c (show_code): Add prototype.
525 (gfc_debug_code): New function.
526 (show_code_node): Add space after SELECT TYPE.
528 2016-11-14 Janus Weil <janus@gcc.gnu.org>
531 * resolve.c (resolve_procedure_interface): Properly handle CLASS-valued
534 2016-11-13 Janus Weil <janus@gcc.gnu.org>
537 * decl.c (match_procedure_in_type): Apply the FL_PROCEDURE attribute
538 to the target procedure.
540 2016-11-13 Janus Weil <janus@gcc.gnu.org>
543 * resolve.c (resolve_component): Move check for C437
545 * decl.c (build_struct): ... here. Fix indentation.
547 2016-11-12 Janus Weil <janus@gcc.gnu.org>
550 * class.c (gfc_find_typebound_intrinsic_op): Remove an unnecessary
551 assert and nullification.
552 * decl.c (gfc_match_decl_type_spec): Use gfc_get_tbp_symtree,
554 (gfc_match_generic): Remove an unnecessary assert.
555 Use gfc_get_tbp_symtree to avoid ICE.
557 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
560 * gcc/fortran/decl.c (gfc_match_data_decl): Gracefully handle bad
561 anonymous structure declarations.
563 2016-11-10 Fritz O. Reese <fritzoreese@gmail.com>
565 * decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix
567 * interface.c (gfc_compare_union_types): Likewise.
569 2016-11-10 Jakub Jelinek <jakub@redhat.com>
571 * cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead
573 * gfortran.texi: Mention partial OpenMP 4.5 support.
574 * intrinsic.texi: Update for OpenMP 4.5.
576 * openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
577 hint, num_tasks, priority and if_exprs.
578 (gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
579 (enum omp_mask1, enum omp_mask2): New enums.
580 Change all OMP_CLAUSE_* defines into enum values, and change their
581 values from ((uint64_t) 1 << bit) to just bit.
582 (omp_mask, omp_inv_mask): New classes. Add ctors and operators.
583 (gfc_match_omp_clauses): Change mask argument from uint64_t to
584 const omp_mask. Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
585 at most 64. Move delete clause handling to where it
586 alphabetically belongs. Parse defaultmap, grainsize, hint,
587 is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
588 and use_device_ptr clauses. Parse if clause modifier. Parse map
589 clause always modifier, and release and delete kinds. Parse ordered
590 clause with argument. Parse schedule clause modifiers. Differentiate
591 device clause parsing based on openacc flag. Guard link clause
592 parsing with openacc flag. Add support for parsing
593 linear clause modifiers. Parse depend(source) and depend(sink: ...).
594 Use gfc_match_omp_to_link for to and link clauses in declare target
596 (match_acc): Change mask type from uint64_t to const omp_mask.
597 (OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
598 OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
599 OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
600 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
601 OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
602 OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
603 OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
604 OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
605 Replace first or only OMP_CLAUSE_* value in bitset with
606 omp_mask (OMP_CLAUSE_*).
607 (OMP_DO_CLAUSES): Likewise. Add OMP_CLAUSE_LINEAR.
608 (OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
609 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_SIMDLEN.
610 (OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
611 bitset with omp_mask (OMP_CLAUSE_*). Replace OMP_CLAUSE_OACC_DEVICE
612 with OMP_CLAUSE_DEVICE.
613 (OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
614 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_PRIORITY.
615 (OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
616 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND,
617 OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
618 OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
619 (OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
620 bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_USE_DEVICE_PTR.
621 (OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
622 in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND and
624 (match_omp): Change mask argument from unsigned int to
626 (gfc_match_omp_critical): Parse optional clauses and use omp_clauses
627 union member instead of omp_name.
628 (gfc_match_omp_end_critical): New function.
629 (gfc_match_omp_distribute_parallel_do): Remove ordered and linear
630 clauses from the mask.
631 (gfc_match_omp_distribute_parallel_do_simd): Use
632 & ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
633 (gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
634 (gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
635 (gfc_match_omp_do_simd): Likewise. Don't remove ordered clause from
637 (gfc_match_omp_parallel_do_simd): Likewise.
638 (gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
639 (gfc_match_omp_teams_distribute_parallel_do): Likewise.
640 (gfc_match_omp_declare_simd): If not using the form with
641 (proc-name), require space before first clause. Make (proc-name)
642 optional. If not present, set proc_name to NULL.
643 (gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
644 (gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
645 (gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
646 Move around to where they belong alphabetically.
647 (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
648 gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
649 gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
650 gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
652 (gfc_match_omp_ordered): Parse clauses.
653 (gfc_match_omp_ordered_depend): New function.
654 (gfc_match_omp_cancel, gfc_match_omp_end_single): Use
655 omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
656 (resolve_oacc_scalar_int_expr): Renamed to ...
657 (resolve_scalar_int_expr): ... this. Fix up formatting.
658 (resolve_oacc_positive_int_expr): Renamed to ...
659 (resolve_positive_int_expr): ... this. Fix up formatting.
660 (resolve_nonnegative_int_expr): New function.
661 (resolve_omp_clauses): Adjust callers, use the above functions
662 even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
663 Require orderedc >= collapse if specified. Handle depend(sink:)
664 and depend(source) restrictions. Disallow linear clause when
665 orderedc is non-zero. Diagnose linear clause modifiers when not in
666 declare simd. Only check for integer type if ref modifier
667 is not used. Remove diagnostics for required VALUE attribute.
668 Diagnose VALUE attribute with ref or uval modifiers. Allow
669 non-constant linear-step, if it is a dummy argument alone and is
670 mentioned in uniform clause. Diagnose map kinds not allowed
671 for various constructs. Diagnose target {enter ,exit ,}data without
672 any map clauses. Add dummy OMP_LIST_IS_DEVICE_PTR and
673 OMP_LIST_USE_DEVICE_PTR cases.
674 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
676 (gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
677 replace underscores with spaces in a few construct names.
678 (resolve_omp_do): Set collapse to orderedc if non-zero. Handle new
679 OpenMP 4.5 constructs.
680 (resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
681 of resolve_oacc_positive_int_expr.
682 (gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
683 (gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
684 * trans-openmp.c (gfc_omp_scalar_p): New function.
685 (doacross_steps): New variable.
686 (gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
688 (gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
689 (gfc_trans_omp_do): Handle doacross loops. Clear sched_simd flag.
690 Handle EXEC_OMP_TASKLOOP.
691 (gfc_trans_omp_ordered): Translate omp clauses, allow NULL
693 (GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
694 (gfc_split_omp_clauses): Copy orderedc together with ordered. Change
695 firstprivate and lastprivate handling for OpenMP 4.5.
696 Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
697 and EXEC_OMP_TASKLOOP{,_SIMD}. Add handling for new OpenMP 4.5
698 clauses and clause modifiers and handle if clause without/with
700 (gfc_trans_omp_teams): Add omp_clauses argument, add it to other
701 teams clauses. Don't wrap into OMP_TEAMS if -fopenmp-simd.
702 (gfc_trans_omp_target): For -fopenmp, translate num_teams and
703 thread_limit clauses on combined target teams early and pass to
704 gfc_trans_omp_teams. Set OMP_TARGET_COMBINED if needed.
705 Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
706 EXEC_OMP_TARGET_SIMD.
707 (gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
708 gfc_trans_omp_target_exit_data): New functions.
709 (gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
710 EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
711 and EXEC_OMP_TARGET_SIMD. Adjust gfc_trans_omp_teams caller.
712 * symbol.c (check_conflict): Handle omp_declare_target_link.
713 (gfc_add_omp_declare_target_link): New function.
714 (gfc_copy_attr): Copy omp_declare_target_link.
715 * dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
716 depend_op. Print linear clause modifiers.
717 (show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
718 (show_omp_node): Print clauses for EXEC_OMP_ORDERED. Allow NULL
719 c->block for EXEC_OMP_ORDERED. Formatting fixes. Adjust handling of
720 EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
721 forgotten OpenMP 4.0 constructs.
722 (show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
723 OpenMP 4.0 constructs.
724 * gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
725 (struct gfc_omp_namelist): Add u.common and u.linear_op fields.
726 (struct gfc_common_head): Change omp_declare_target into bitfield.
727 Add omp_declare_target_link bitfield.
728 (gfc_add_omp_declare_target_link): New prototype.
729 (enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
730 ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
731 ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
732 ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
733 ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
734 ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
735 ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
736 (enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
738 (enum gfc_omp_linear_op): New.
739 (struct gfc_omp_clauses): Add critical_name, depend_source,
740 orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
741 sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
742 priority and if_exprs fields.
743 (enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
744 EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
745 EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
746 EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
747 EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
748 (enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
749 OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
750 (OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
751 (enum gfc_omp_if_kind): New.
752 * module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
753 (attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
754 (mio_symbol_attribute): Save and restore omp_declare_target_link bit.
755 * trans.h (gfc_omp_scalar_p): New prototype.
756 * frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
758 * trans.c (trans_code): Handle new OpenMP 4.5 constructs.
759 * resolve.c (gfc_resolve_blocks): Likewise.
760 (gfc_resolve_code): Likewise.
761 * f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
762 (gfc_attribute_table): Add "omp declare target link".
763 * st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
764 EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
765 and new OpenMP 4.5 constructs. Free omp clauses even for
767 * match.c (match_exit_cycle): Rename collapse variable to count,
768 set it to orderedc if non-zero, instead of collapse.
769 * trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
770 instead of "omp declare target" for omp_declare_target_link.
771 * trans-common.c (build_common_decl): Likewise.
772 * match.h (gfc_match_omp_target_enter_data,
773 gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
774 gfc_match_omp_target_parallel_do,
775 gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
776 gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
777 gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
779 * parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
780 instead of gfc_match_omp_critical for !$omp end critical.
781 Handle new OpenMP 4.5 constructs. If ordered directive has
782 depend clause as the first of the clauses, use
783 gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
784 gfc_match_omp_ordered and ST_OMP_ORDERED.
785 (case_executable): Add ST_OMP_TARGET_ENTER_DATA,
786 ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
787 (case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
788 ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
789 ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
790 (gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
791 (parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
792 ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
793 ST_OMP_TASKLOOP_SIMD.
794 (parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
795 of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
797 (parse_executable): Handle ST_OMP_TARGET_PARALLEL,
798 ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
799 ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
801 2016-11-09 Mikael Morin <mikael@gcc.gnu.org>
802 Janus Weil <janus@gcc.gnu.org>
805 * interface.c (compare_actual_formal): Add safety checks to avoid ICE.
807 2016-11-09 Fritz O. Reese <fritzoreese@gmail.com>
810 * trans-expr.c (gfc_trans_subcomponent_assign): Guard against NULL
813 2016-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
814 Janus Weil <janus@gcc.gnu.org>
817 * expr.c (external_spec_function): Allow recursive specification
820 2016-11-09 Paul Thomas <pault@gcc.gnu.org>
822 * check.c (gfc_check_move_alloc): Prevent error that avoids
823 aliasing between to and from arguments from rejecting valid
826 2016-11-09 Janus Weil <janus@gcc.gnu.org>
829 * class.c (gfc_add_component_ref): Add safety checks to avoid ICE.
831 2016-11-08 Janus Weil <janus@gcc.gnu.org>
834 * expr.c (check_alloc_comp_init): Loosen an assert.
835 * resolve.c (resolve_fl_parameter): Reject class parameters.
837 2016-11-08 Janus Weil <janus@gcc.gnu.org>
840 * expr.c (gfc_check_pointer_assign): Add special check for procedure-
841 pointer component with absent interface.
843 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
846 * expr.c (gfc_generate_initializer): Add where to EXPR_NULL
848 * iresolve.c (gfc_resolve_extends_type_of): Add where to
849 both arguments of the function.
850 * resolve.c (resolve_select_type): Add where to the
851 second argument of the new statement.
853 2016-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
856 * match.c (gfc_match_select_type): Add where for expr1.
857 * resolve.c (resolev_select_type): Add where for expr1 of new
860 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
863 resolve.c (build_loc_call): Add location to return value.
865 2016-11-06 Andre Vehreschild <vehre@gcc.gnu.org>
867 * expr.c (is_non_empty_structure_constructor): New function to detect
868 non-empty structure constructor.
869 (gfc_has_default_initializer): Analyse initializers.
870 * resolve.c (cond_init): Removed.
871 (resolve_allocate_expr): Removed dead code. Moved invariant code out
872 of the loop over all objects to allocate.
873 (resolve_allocate_deallocate): Added the invariant code remove from
874 resolve_allocate_expr.
875 * trans-array.c (gfc_array_allocate): Removed nullify of structure
876 components in favour of doing this in gfc_trans_allocate for both
877 scalars and arrays in the same place.
878 * trans-expr.c (gfc_trans_init_assign): Always using _vptr->copy for
880 * trans-stmt.c (allocate_get_initializer): Get the initializer
881 expression for object allocated.
882 (gfc_trans_allocate): Nullify a derived type only, when no SOURCE=
883 or MOLD= is present preventing duplicate work. Moved the creation
884 of the init-expression here to prevent code for conditions that
885 can not occur on freshly allocated object, like checking for the need
886 to free allocatable components.
888 2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
891 * arith.c (gfc_complex2real): Change gfc_warning_now to
894 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
896 * check.c (gfc_check_move_alloc): Introduce error to prevent
897 aliasing between to and from arguments.
899 2016-11-05 Janus Weil <janus@gcc.gnu.org>
900 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
903 * invoke.texi: Mention -Wpedantic as an alias of -pedantic.
904 * check.c (gfc_check_transfer): Mention responsible flag in warning
906 * frontend-passes.c (do_warn_function_elimination): Ditto.
907 * resolve.c (resolve_elemental_actual): Ditto.
908 (resolve_operator): Ditto.
909 (warn_unused_fortran_label): Ditto.
910 * trans-common.c (translate_common): Ditto.
912 2016-11-05 Paul Thomas <pault@gcc.gnu.org>
915 * trans-expr.c (gfc_conv_class_to_class): Return _len component
916 of unlimited polymorphic entities.
918 2016-11-04 Paul Thomas <pault@gcc.gnu.org>
921 * primary.c (gfc_match_varspec): If selector expression is
922 unambiguously an array, make sure that the associate name
923 is an array and has an array spec. Modify the original
924 condition for doing this to exclude character types.
926 2016-11-03 Fritz Reese <fritzoreese@gmail.com>
928 * gfortran.texi: Document.
929 * gfortran.h (gfc_dt): New field default_exp.
930 * primary.c (match_real_constant): Default exponent with -fdec.
931 * io.c (match_io): Set dt.default_exp with -fdec.
932 * ioparm.def (IOPARM_dt_default_exp): New.
933 * trans-io.c (build_dt): Set IOPARM_dt_default_exp with -fdec.
935 2016-11-03 Fritz O. Reese <fritzoreese@gmail.com>
937 * decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
938 * parse.c (decode_statement): Match "parameter" before assignments.
939 * gfortran.texi: Document.
941 2016-11-02 Fritz O. Reese <fritzoreese@gmail.com>
943 * lang.opt, invoke.texi: New argument -Wargument-mismatch.
944 * interface.c (compare_parameter, compare_actual_formal,
945 gfc_check_typebound_override, argument_rank_mismatch): Control argument
946 mismatch warnings with -Wargument-mismatch.
947 * resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto.
949 2016-11-02 Fritz Reese <fritzoreese@gmail.com>
951 * gfortran.h (gfc_error): New declaration for gfc_error with 'opt'.
952 * error.c (gfc_error): Add optional 'opt' argument.
953 * error.c (gfc_notify_std): Call fully-qualified gfc_error.
955 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
958 * match.c (match_simple_where): Fill in locus for assigment
959 in simple WHERE statement.
961 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
964 * match.c (gfc_match_where): Fill in locus for assigment
965 in simple WHERE statement.
967 2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
970 * io.c (check_format): Adjust checks for FMT_L to treat a zero
971 width as an extension, giving warnings or error as appropriate.
974 2016-10-31 Jakub Jelinek <jakub@redhat.com>
976 * trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
977 -gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
980 2016-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
983 * arith.c (gfc_int2real): Change gfc_warning_now
985 * primary.c (match_complex_constant): If there
986 is no comma, throw away any warning which might have
987 been issued by gfc_int2real.
989 2016-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
992 * symbol.c (gfc_type_compatible): Fix typo.
994 2016-10-27 Jakub Jelinek <jakub@redhat.com>
997 * parse.c (decode_statement): Don't create namespace for possible
998 select type here and destroy it afterwards.
999 (parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
1000 (parse_executable, gfc_parse_file): Formatting fixes.
1001 * match.c (gfc_match_select_type): Create namespace for select type
1002 here, only after matching select type. Formatting fixes. Free that
1003 namespace if not returning MATCH_YES, after gfc_undo_symbols,
1004 otherwise remember it in new_st.ext.block.ns and switch to parent
1007 2016-10-27 Fritz Reese <fritzoreese@gmail.com>
1009 * expr.c (generate_union_initializer, get_union_initializer): New.
1010 * expr.c (component_initializer): Consider BT_UNION specially.
1011 * resolve.c (resolve_structure_cons): Hack for BT_UNION.
1012 * trans-expr.c (gfc_trans_subcomponent_assign): Ditto.
1013 * trans-expr.c (gfc_conv_union_initializer): New.
1014 * trans-expr.c (gfc_conv_structure): Replace UNION handling code with
1015 new function gfc_conv_union_initializer.
1017 2016-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
1020 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Fix reference to an
1021 array element of type CLASS.
1023 2016-10-26 Paul Thomas <pault@gcc.gnu.org>
1026 * resolve.c (resolve_typebound_intrinsic_op): For submodules
1027 suppress the error and return if the same procedure symbol
1028 is added more than once to the interface.
1030 2016-10-26 Fritz Reese <fritzoreese@gmail.com>
1032 * frontend-passes.c (gfc_code_walker): Add SHARE and CARRIAGECONTROL.
1033 * io.c (gfc_free_open, gfc_resolve_open, gfc_match_open): Ditto.
1034 * gfortran.h (gfc_open): Add SHARE, CARRIAGECONTROL, and READONLY.
1035 * io.c (io_tag, match_open_element): Ditto.
1036 * ioparm.def: Ditto.
1037 * trans-io.c (gfc_trans_open): Ditto.
1038 * io.c (match_dec_etag, match_dec_ftag): New functions.
1039 * gfortran.texi: Document.
1041 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1043 * gfortran.texi: Document.
1044 * resolve.c (logical_to_bitwise): New function.
1045 * resolve.c (resolve_operator): Wrap operands with logical_to_bitwise.
1047 2016-10-25 Andre Vehreschild <vehre@gcc.gnu.org>
1050 * class.c (find_intrinsic_vtab): No longer encode the string length
1051 into vtype's name and use the char's kind for the size instead of
1052 the string_length time the size.
1053 * trans-array.c (gfc_conv_ss_descriptor): For deferred length char
1054 arrays the dynamically sized type needs to be declared.
1055 (build_class_array_ref): Address the i-th array element by multiplying
1056 it with the _vptr->_size and the _len to make sure char arrays are
1057 addressed correctly.
1058 * trans-expr.c (gfc_conv_intrinsic_to_class): Made comment more
1061 2016-10-25 Cesar Philippidis <cesar@codesourcery.com>
1063 * intrinsic.texi (cosd): New mathop.
1065 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1067 * match.c (gfc_match_intrinsic_op): Match ".XOR." with -std=legacy.
1068 * gfortran.texi: Document.
1070 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1072 * primary.c (gfc_match_rvalue): Match %LOC as LOC with -std=legacy.
1073 * gfortran.texi: Document.
1075 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1077 * decl.c (gfc_match_type): New function.
1078 * match.h (gfc_match_type): New function.
1079 * match.c (gfc_match_if): Special case for one-line IFs.
1080 * gfortran.texi: Update documentation.
1081 * parse.c (decode_statement): Invoke gfc_match_type.
1083 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1085 * gfortran.texi: Document.
1086 * gfortran.h (gfc_is_whitespace): Include form feed ('\f').
1088 2016-10-25 Fritz Reese <fritzoreese@gmail.com>
1090 * invoke.texi, gfortran.texi: Touch up documentation of -fdec.
1091 * gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option.
1092 * decl.c (match_record_decl, gfc_match_decl_type_spec,
1093 gfc_match_structure_decl): Ditto.
1094 * match.c (gfc_match_member_sep): Ditto.
1095 * options.c (gfc_handle_option): Ditto.
1096 * lang.opt (fdec-structure): Use Fortran Var for flag_dec_structure.
1097 * lang.opt (fdec): Use Fortran Var to create flag_dec.
1098 * options.c (set_dec_flags): With -fdec enable -fcray-pointer,
1099 -fd-lines-as-comments (default), -fdollar-ok, and legacy std flags.
1101 2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1104 * ioparm.def: Reorder dt parameters to match libgfortran.
1105 * libgfortran.h: Swap definitions of GFC_INTERNAL_UNIT and
1108 2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
1111 * interface.c (gfc_compare_derived_types): Convert gcc_assert()
1112 to a gfc_internal_error() to prevent an ICE.
1114 2016-10-24 Jakub Jelinek <jakub@redhat.com>
1116 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x)
1117 instead of TREE_CODE (x) == VAR_DECL.
1118 * trans-expr.c (gfc_class_vptr_get, gfc_class_len_get,
1119 gfc_class_len_or_zero_get, gfc_get_vptr_from_expr,
1120 gfc_conv_string_length, conv_base_obj_fcn_val,
1121 gfc_conv_procedure_call, gfc_trans_assignment_1): Likewise.
1122 * trans-openmp.c (gfc_omp_predetermined_sharing,
1123 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause,
1124 gfc_trans_omp_atomic, gfc_trans_omp_do): Likewise.
1125 * trans-io.c (nml_get_addr_expr): Likewise.
1126 * trans-decl.c (gfc_finish_decl, gfc_build_qualified_array,
1127 gfc_get_symbol_decl, gfc_get_fake_result_decl,
1128 gfc_trans_deferred_vars, gfc_trans_use_stmts,
1129 generate_local_decl): Likewise.
1130 * trans-array.c (trans_array_constructor, trans_array_bound_check,
1131 build_class_array_ref, gfc_array_init_size,
1132 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1133 gfc_trans_dummy_array_bias, gfc_alloc_allocatable_for_assignment,
1134 gfc_trans_deferred_array): Likewise.
1135 * trans.c (gfc_build_array_ref): Likewise. Use
1136 VAR_OR_FUNCTION_DECL_P (x) instead of TREE_CODE (x) == VAR_DECL
1137 || TREE_CODE (x) == FUNCTION_DECL.
1139 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1142 * parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA. Sort
1145 2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
1149 * array.c (gfc_match_array_constructor): Remove checkpointing
1150 introduced in r196416 (original fix for PR fortran/54730). Move
1151 initialization to top of function.
1152 * match.c (gfc_match_type_spec): Special case matching for REAL.
1154 2016-10-23 Paul Thomas <pault@gcc.gnu.org>
1157 * class.c (gfc_find_derived_vtab): Obtain the gsymbol for the
1158 derived type's module. If the gsymbol is present and the top
1159 level namespace corresponds to a module, use the gsymbol name
1160 space. In the search to see if the vtable exists, try the gsym
1162 * dump-parse-tree (show_code_node): Modify select case dump to
1163 show select type construct.
1164 * resolve.c (build_loc_call): New function.
1165 (resolve_select_type): Add check for repeated type is cases.
1166 Retain selector expression and use it later instead of expr1.
1167 Exclude deferred length TYPE IS cases and emit error message.
1168 Store the address for the vtable in the 'low' expression and
1169 the hash value in the 'high' expression, for each case. Do not
1170 call resolve_select.
1171 * trans.c(trans_code) : Call gfc_trans_select_type.
1172 * trans-stmt.c (gfc_trans_select_type_cases): New function.
1173 (gfc_trans_select_type): New function.
1174 * trans-stmt.h : Add prototype for gfc_trans_select_type.
1176 2016-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1179 * gfc_compare_functions: Strings with different lengths in
1180 argument lists compare unequal.
1182 2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
1189 * primary.c (gfc_expr_attr): For transformational functions on classes
1190 get the attrs from the class argument.
1191 * resolve.c (resolve_ordinary_assign): Remove error message due to
1192 feature implementation. Rewrite POINTER_ASSIGNS to ordinary ones when
1193 the right-hand side is scalar class object (with some restrictions).
1194 * trans-array.c (trans_array_constructor): Create the temporary from
1195 class' inner type, i.e., the derived type.
1196 (build_class_array_ref): Add support for class array's storage of the
1197 class object or the array descriptor in the decl saved descriptor.
1198 (gfc_conv_expr_descriptor): When creating temporaries for class objects
1199 add the class object's handle into the decl saved descriptor.
1200 (structure_alloc_comps): Use the common way to get the _data component.
1201 (gfc_is_reallocatable_lhs): Add notion of allocatable class objects.
1202 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Remove the only ref
1203 only when the expression's type is BT_CLASS.
1204 (gfc_trans_class_init_assign): Correctly handle class arrays.
1205 (gfc_trans_class_assign): Joined into gfc_trans_assignment_1.
1206 (gfc_conv_procedure_call): Support for class types as arguments.
1207 (trans_get_upoly_len): For unlimited polymorphics retrieve the _len
1209 (trans_class_vptr_len_assignment): Catch all ways to assign the _vptr
1210 and _len components of a class object correctly.
1211 (pointer_assignment_is_proc_pointer): Identify assignments of
1213 (gfc_trans_pointer_assignment): Enhance support for class object pointer
1215 (gfc_trans_scalar_assign): Removed assert.
1216 (trans_class_assignment): Assign to a class object.
1217 (gfc_trans_assignment_1): Treat class objects correctly.
1218 (gfc_trans_assignment): Propagate flags to trans_assignment_1.
1219 * trans-stmt.c (gfc_trans_allocate): Use gfc_trans_assignment now
1220 instead of copy_class_to_class.
1221 * trans-stmt.h: Function prototype removed.
1222 * trans.c (trans_code): Less special casing for class objects.
1223 * trans.h: Added flags to gfc_trans_assignment () prototype.
1225 2016-10-21 Paul Thomas <pault@gcc.gnu.org>
1228 * resolve.c (fixup_array_ref): New function.
1229 (resolve_select_type): Gather up the rank and array reference,
1230 if any, from the selector. Fix up the 'associate name' and the
1231 'associate entities' as necessary.
1232 * trans-expr.c (gfc_conv_class_to_class): If the symbol backend
1233 decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.
1235 2016-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
1237 * array.c (gfc_match_array_constructor): Remove set, but unused
1240 2016-10-20 Andre Vehreschild <vehre@gcc.gnu.org>
1242 * class.c (gfc_build_class_symbol): Set the kind of _len to
1243 gfc_charlen_int_kind to catch changes of the charlen kind.
1245 2016-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
1248 * match.c (gfc_match_stopcode): Fix error reporting for several
1249 deficiencies in matching stop-codes.
1251 2016-10-17 Paul Thomas <pault@gcc.gnu.org>
1255 * resolve.c (resolve_variable): Obtain the typespec for a
1256 variable expression, when the variable is a function result
1257 that is a procedure pointer.
1259 2016-10-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1262 * trans-io.c (transfer_expr): Ignore dtio procedures for inquire
1265 2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1268 * scanner.c (gfc_next_char_literal): If nextc is null do not
1269 decrement the pointer and call the diagnostics.
1271 2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
1273 * resolve.c (resolve_symbol): Add unimplemented message for
1274 polymorphic types with allocatable/pointer components and coarray=lib.
1276 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1278 * trans-intrinsic.c: Include memmodel.h.
1280 2016-10-13 Andre Vehreschild <vehre@gcc.gnu.org>
1283 * trans-expr.c (gfc_copy_class_to_class): Add generation of
1284 runtime array bounds check.
1285 * trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to
1286 get the descriptor of a function returning a class object.
1287 * trans-stmt.c (gfc_trans_allocate): Use the array spec on the
1288 array to allocate instead of the array spec from source=.
1290 2016-10-12 Andre Vehreschild <vehre@gcc.gnu.org>
1292 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Fixed style.
1293 (gfc_trans_class_init_assign): Same.
1294 (gfc_conv_procedure_call): Same.
1295 (gfc_trans_assignment_1): Same.
1296 * trans-stmt.c (gfc_trans_allocate): Same.
1298 2016-10-11 Jakub Jelinek <jakub@redhat.com>
1300 * iresolve.c (is_trig_resolved, resolve_trig_call): Formatting fixes.
1301 * simplify.c (simplify_trig_call, degrees_f, radians_f,
1302 gfc_simplify_atrigd, gfc_simplify_cotan): Likewise.
1304 2016-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
1307 * simplify.c (gfc_simplify_cshift): Check for zero.
1309 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
1311 * iresolve.c (get_radians, get_degrees): Fix sloppy commit.
1312 * simplify.c (degrees_f, radians_f): Ditto.
1314 2016-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1316 * simplify.c (radians_f): Fix mpfr_mod.
1317 * ireolce.c (get_degrees): Declare tmp.
1319 2016-10-11 Fritz Reese <fritzoreese@gmail.com>
1321 * lang.opt: New flag -fdec-math.
1322 * options.c (set_dec_flags): Enable with -fdec.
1323 * invoke.texi, gfortran.texi, intrinsic.texi: Update documentation.
1324 * intrinsics.c (add_functions, do_simplify): New intrinsics
1326 * gfortran.h (gfc_isym_id): New isym GFC_ISYM_COTAN.
1327 * gfortran.h (gfc_resolve_atan2d, gfc_resolve_cotan,
1328 gfc_resolve_trigd, gfc_resolve_atrigd): New prototypes.
1329 * iresolve.c (resolve_trig_call, get_degrees, get_radians,
1330 is_trig_resolved, gfc_resolve_cotan, gfc_resolve_trigd,
1331 gfc_resolve_atrigd, gfc_resolve_atan2d): New functions.
1332 * intrinsics.h (gfc_simplify_atan2d, gfc_simplify_atrigd,
1333 gfc_simplify_cotan, gfc_simplify_trigd): New prototypes.
1334 * simplify.c (simplify_trig_call, degrees_f, radians_f,
1335 gfc_simplify_cotan, gfc_simplify_trigd, gfc_simplify_atrigd,
1336 gfc_simplify_atan2d): New functions.
1338 2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1341 * frontend-passes.c (inline_matmul_assign): Return early if
1342 inside a FORALL statement.
1344 2016-10-07 Fritz Reese <fritzoreese@gmail.com>
1346 * interface.c (compare_components): Check charlen for BT_CHAR.
1348 2016-10-07 Steven G. Kargl <kargl@gcc.gnu.org>
1351 * interface.c (gfc_compare_interfaces): Fix detection of ambiguous
1352 interface involving alternate return.
1353 (check_interface1): Improve error message and loci.
1355 2016-10-06 Louis Krupp <louis.krupp@zoho.com>
1358 * trans-array.c (gfc_conv_expr_descriptor): Don't allocate
1359 components if it's not necessary.
1361 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
1364 * trans-expr.c (gfc_add_interface_mapping): Don't try to
1365 dereference call-by-value scalar argument.
1367 2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
1371 * resolve.c (resolve_assoc_var): Fix CHARACTER type-spec for a
1372 selector in ASSOCIATE.
1373 (resolve_fl_variable): Skip checks for an ASSOCIATE variable.
1375 2016-10-05 Fritz Reese <fritzoreese@gmail.com>
1377 * interface.c (gfc_compare_types): Don't compare BT_UNION components
1378 until we know they're both UNIONs.
1379 * interface.c (gfc_compare_union_types): Guard against empty
1382 2016-10-05 Louis Krupp <louis.krupp@zoho.com>
1385 * resolve.c (resolve_symbol): Don't apply default type rules to
1386 mixed-entry master created for function entry points.
1388 2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1391 * io.c (match_dt_unit): Peek check for missing format.
1393 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
1396 * interface.c (gfc_compare_union_types): Null-guard map components.
1398 2016-09-30 Fritz Reese <fritzoreese@gmail.com>
1401 * interface.c (gfc_compare_derived_types): Use gfc_compare_union_types
1402 to compare union types.
1404 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org>
1406 * trans-array.c (gfc_array_allocate): Use the token from coarray's
1408 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate
1409 caf-reference chains from the first coarray references on.
1410 * trans-types.c (gfc_get_derived_type): Switch on mandatory .token
1411 member generation for allocatable arrays in coarrays in derived types.
1413 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
1415 * options.c (gfc_post_options): Remove special case for
1416 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
1418 2016-09-27 Jakub Jelinek <jakub@redhat.com>
1420 * dependency.c (gfc_dep_compare_expr): Remove break after return.
1421 * frontend-passes.c (optimize_op): Likewise.
1422 * interface.c (gfc_current_interface_head): Likewise.
1423 * symbol.c (check_conflict): Likewise.
1424 * trans-intrinsic.c (build_fix_expr): Likewise.
1427 * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
1428 references to allocatable arrays.
1430 2016-09-26 Steven G. Kargl <kargl@gcc.gnu.org>
1433 * trans-common.c: Handle array elements in equivalence when
1434 the lower and upper bounds of array spec are NULL.
1436 2016-09-26 Paul Thomas <pault@gcc.gnu.org>
1439 * interface.c (gfc_find_specific_dtio_proc) : Return NULL if
1440 the derived type is broken, as indicated by a flavor other than
1443 2016-09-26 Marek Polacek <polacek@redhat.com>
1446 * arith.c (eval_intrinsic): Add gcc_fallthrough.
1447 * frontend-passes.c (optimize_op): Likewise.
1448 (gfc_expr_walker): Likewise.
1449 * parse.c (next_fixed): Likewise.
1450 * primary.c (match_variable): Likewise.
1451 * trans-array.c: Likewise.
1452 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
1453 * trans-io.c (transfer_expr): Likewise.
1455 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
1458 * dependency.c (gfc_check_dependency): Convert gcc_assert() to
1459 a conditional and possible call to gfc_internal_error().
1461 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
1464 * frontend-passes.c (optimize_binop_array_assignment): Check pointer
1467 2016-09-23 Fritz Reese <fritzoreese@gmail.com>
1469 * lang.opt, invoke.texi, gfortran.texi: New flag -fdec-static.
1470 * options.c (set_dec_flags): Set -fdec-static with -fdec.
1471 * gfortran.h (symbol_attribute): New attribute automatic.
1472 * gfortran.h (gfc_add_automatic): New prototype.
1473 * match.h (gfc_match_automatic, gfc_match_static): New functions.
1474 * decl.c (gfc_match_automatic, gfc_match_static): Ditto.
1475 * symbol.c (gfc_add_automatic): Ditto.
1476 * decl.c (match_attr_spec): Match AUTOMATIC and STATIC decls.
1477 * parse.c (decode_specification_statement, decode_statement): Ditto.
1478 * resolve.c (apply_default_init_local, resolve_fl_variable_derived,
1479 resolve_symbol): Support for automatic attribute.
1480 * symbol.c (check_conflict, gfc_copy_attr, gfc_is_var_automatic):
1482 * trans-decl.c (gfc_finish_var_decl): Ditto.
1484 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1487 * gfortran.h (gfc_dt): Add *udtio.
1488 * ioparm.def: Add bit IOPARM_dt_f2003 to align with library use of bit
1489 25. Add IOPARM_dt_dtio bit to common flags.
1490 * resolve.c (resolve_transfer): Set dt->udtio to expression.
1491 * io.c (gfc_match_inquire): Adjust error message for internal
1493 * libgfortran.h: Adjust defines for GFC_INTERNAL_UNIT4,
1494 GFC_INTERNAL_UNIT, and GFC_INVALID_UNIT.
1495 * trans-io.c (build_dt): Set common_unit to reflect the KIND of
1496 the internal unit. Set mask bit for presence of dt->udtio.
1498 2016-09-22 Andre Vehreschild <vehre@gcc.gnu.org>
1500 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf-
1501 interface where possible.
1503 2016-09-22 Paul Thomas <pault@gcc.gnu.org>
1505 * interface.c (check_dtio_interface1): Introduce errors for
1506 alternate returns and incorrect numbers of arguments.
1507 (gfc_find_specific_dtio_proc): Return cleanly if the derived
1508 type either doesn't exist or has no namespace.
1510 2016-09-21 Louis Krupp <louis.krupp@zoho.com>
1513 * decl.c (add_init_expr_to_sym): Catch variable character length
1516 2016-09-21 Paul Thomas <pault@gcc.gnu.org>
1520 * interface.c (gfc_find_specific_dtio_proc): Borrow trick from
1521 resolve_typebound_generic_call to find dtio procedures that
1522 over-ride those in the declared type.
1524 2016-09-20 Marek Polacek <polacek@redhat.com>
1526 * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
1529 2016-09-19 Andre Vehreschild <vehre@gcc.gnu.org>
1532 * expr.c (gfc_check_assign): Added flag to control whether datatype
1533 conversion is allowed.
1534 * gfortran.h: Added caf-token-tree to gfc_component. Changed
1535 prototypes mostly to add whether datatype conversion is allowed.
1536 * gfortran.texi: Added documentation for the caf_reference_t and the
1537 caf_*_by_ref function.
1538 * primary.c (caf_variable_attr): Similar to gfc_variable_attr but
1539 focused on the needs of coarrays.
1540 (gfc_caf_attr): Same.
1541 * resolve.c (resolve_ordinary_assign): Set the conversion allowed
1542 flag when not in a coarray.
1543 * trans-array.c (gfc_array_init_size): Moved setting of array
1544 descriptor's datatype before the alloc, because caf_register needs it.
1545 (gfc_array_allocate): Changed notion of whether an array is a coarray.
1546 (gfc_array_deallocate): Same.
1547 (gfc_alloc_allocatable_for_assignment): Added setting of coarray's
1548 array descriptor datatype before the register. And using deregister/
1549 register to mimmick a realloc for coarrays.
1550 * trans-decl.c (gfc_build_builtin_function_decls): Corrected signatures
1551 of old caf-functions and added signature definitions of the _by_ref
1553 (generate_coarray_sym_init): Adapted to new caf_register signature.
1554 * trans-expr.c (gfc_conv_scalar_to_descriptor): Make sure a constant
1555 is translated to an lvalue expression before use in an array
1557 (gfc_get_ultimate_alloc_ptr_comps_caf_token): New function. Get the
1558 last allocatable component's coarray token.
1559 (gfc_get_tree_for_caf_expr): For top-level object get the coarray
1560 token and check for unsupported features.
1561 (gfc_get_caf_token_offset): Getting the offset might procude new
1562 statements, which now are stored in the pre and post of the current se.
1563 (gfc_caf_get_image_index): For this image return a call to
1565 (expr_may_alias_variables): Check that the result is set for testing
1567 (alloc_scalar_allocatable_for_assignment): Added auto allocation of
1569 (gfc_trans_assignment_1): Rewrite an assign to a coarray object to
1571 * trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
1573 (compute_component_offset): Compute the correct offset a structure
1575 (conv_expr_ref_to_caf_ref): Convert to a chain of refs into
1577 (gfc_conv_intrinsic_caf_get): Call caf_get_by_ref instead of caf_get.
1578 (conv_caf_send): Call caf_*_by_ref for coarrays that need
1580 (gfc_conv_intrinsic_function): Adapted to new signuature of the caf
1582 (conv_intrinsic_atomic_op): Add pre and post statements correctly.
1583 (conv_intrinsic_atomic_ref): Same.
1584 (conv_intrinsic_atomic_cas): Same.
1585 (conv_intrinsic_event_query): Same.
1586 * trans-stmt.c (gfc_trans_lock_unlock): Same.
1587 (gfc_trans_event_post_wait): Same.
1588 (gfc_trans_allocate): Support allocation of allocatable coarrays.
1589 (gfc_trans_deallocate): And there deallocation.
1590 * trans-types.c (gfc_typenode_for_spec): Added flag to control whether
1591 a component is part of coarray. When so, then add space to store a
1593 (gfc_build_array_type): Same.
1594 (gfc_get_array_descriptor_base): Same.
1595 (gfc_get_array_type_bounds): Same.
1596 (gfc_sym_type): Same.
1597 (gfc_get_derived_type): Same.
1598 (gfc_get_caf_reference_type): Declare the caf_reference_type.
1599 * trans-types.h: Prototype changes only.
1600 * trans.c (gfc_allocate_using_lib): Use the updated caf_register
1602 (gfc_allocate_allocatable): Same.
1603 (gfc_deallocate_with_status): Same.
1604 * trans.h: Defined the runtime types for caf_reference_t and the enums.
1606 2016-09-19 Fritz Reese <fritzoreese@gmail.com>
1609 * decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
1610 handling of structure/record from declaration-type-spec.
1612 2016_09_17 Louis Krupp <louis.krupp@zoho.com>
1615 * resolve.c (resolve_allocate_expr): Check that derived type
1616 pointer, object or array has been successfully allocated before
1619 2016-09-16 Steven G. Kargl <kargl@gcc.gnu.org>
1622 * decl.c (char_len_param_value): Check parent namespace for
1625 2016-09-15 Louis Krupp <louis.krupp@zoho.com>
1628 * parse.c (reject_statement): Clear charlen pointers in implicit
1629 character typespecs before those charlen structures are freed.
1631 2016-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1633 * simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
1635 2016-09-13 Steven G. Kargl <kargl@gcc.gnu.org>
1638 * module.c (load_equiv): Revert revision 240063.
1640 2016-09-10 Paul Thomas <pault@gcc.gnu.org>
1641 Steven G. Kargl <kargl@gcc.gnu.org>
1644 * interface.c (check_dtio_arg_TKR_intent): Return after error.
1645 (check_dtio_interface1): Remove asserts, test for NULL and return
1648 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1651 * module.c (load_equiv): If the current namespace has a list of
1652 equivalence statements, initialize duplicate to false and then
1653 look for duplicates; otherwise, initialize it to true.
1655 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1658 * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
1659 appear in an array constructor.
1661 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1664 * intrinsic.c (add_functions): Use correct keyword.
1666 2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
1669 * array.c (gfc_match_array_constructor): If type-spec is present,
1670 walk the array constructor performing possible conversions for
1673 2016-09-08 Jakub Jelinek <jakub@redhat.com>
1676 * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
1677 swap, don't try to look through GFC_ISYM_CONVERSION. In other cases,
1678 check that value.function.isym is non-NULL before dereferencing it.
1680 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1683 * resolve.c (deferred_requirements): New function to check F2008:C402.
1684 (resolve_fl_variable,resolve_fl_parameter): Use it.
1686 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
1689 * simplify.c (simplify_transformation_to_scalar): On error, result
1690 may be NULL, simply return.
1692 2016-08-31 Jakub Jelinek <jakub@redhat.com>
1695 * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
1696 BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
1699 * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
1700 to cp->block->ext.omp_atomic.
1701 * resolve.c (gfc_resolve_blocks): Assert block with one or two
1702 EXEC_ASSIGNs for EXEC_*_ATOMIC.
1703 * openmp.c (resolve_omp_atomic): Don't assert one or two
1704 EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
1705 error unexpected statements.
1707 2016-08-31 Paul Thomas <pault@gcc.gnu.org>
1708 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1711 * decl.c (access_attr_decl): Include case INTERFACE_DTIO as
1713 * gfortran.h : Add INTRINSIC_FORMATTED and
1714 INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO
1715 to interface type. Add new enum 'dtio_codes'. Add bitfield
1716 'has_dtio_procs' to symbol_attr. Add prototypes
1717 'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'.
1718 * interface.c (dtio_op): New function.
1719 (gfc_match_generic_spec): Match generic DTIO interfaces.
1720 (gfc_match_interface): Treat DTIO interfaces in the same way as
1721 (gfc_current_interface_head): Add INTERFACE_DTIO appropriately.
1722 (check_dtio_arg_TKR_intent): New function.
1723 (check_dtio_interface1): New function.
1724 (gfc_check_dtio_interfaces): New function.
1725 (gfc_find_specific_dtio_proc): New function.
1726 * io.c : Add FMT_DT to format_token.
1727 (format_lex): Handle DTIO formatting.
1728 * match.c (gfc_op2string): Add DTIO operators.
1729 * resolve.c (derived_inaccessible): Ignore pointer components
1730 to enclosing derived type.
1731 (resolve_transfer): Resolve transfers that involve DTIO.
1732 procedures. Find the specific subroutine for the transfer and
1733 use its existence to over-ride some of the constraints on
1734 derived types. If the transfer is recursive, require that the
1735 subroutine be so qualified.
1736 (dtio_procs_present): New function.
1737 (resolve_fl_namelist): Remove inhibition of polymorphic objects
1738 in namelists if DTIO read and write subroutines exist. Likewise
1740 (resolve_types): Invoke 'gfc_verify_dtio_procedures'.
1741 * symbol.c : Set 'dtio_procs' using 'minit'.
1742 * trans-decl.c (gfc_finish_var_decl): If a derived-type/class
1743 object is associated with DTIO procedures, make it TREE_STATIC.
1744 * trans-expr.c (gfc_get_vptr_from_expr): If the expression
1745 drills down to a PARM_DECL, extract the vptr correctly.
1746 (gfc_conv_derived_to_class): Check 'info' in the test for
1747 'useflags'. If the se expression exists and is a pointer, use
1748 it as the class _data.
1749 * trans-io.c : Add IOCALL_X_DERIVED to iocall and the function
1750 prototype. Likewise for IOCALL_SET_NML_DTIO_VAL.
1751 (set_parameter_tree): Renamed from 'set_parameter_const', now
1752 returns void and has new tree argument. Calls modified to match
1754 (transfer_namelist_element): Transfer DTIO procedure pointer
1755 and vpointer using the new function IOCALL_SET_NML_DTIO_VAL.
1756 (get_dtio_proc): New function.
1757 (transfer_expr): Add new argument for the vptr field of class
1758 objects. Add the code to call the specific DTIO proc, convert
1759 derived types to class and call IOCALL_X_DERIVED.
1760 (trans_transfer): Add BT_CLASS to structures for treatment by
1761 the scalarizer. Obtain the vptr for the dynamic type, both for
1762 scalar and array transfer.
1764 2016-08-30 Fritz Reese <fritzoreese@gmail.com>
1766 * gfortran.texi: Fix typo in STRUCTURE documentation.
1768 2016-08-29 Fritz Reese <fritzoreese@gmail.com>
1770 Fix, reorganize, and clarify comparisons of anonymous types/components.
1773 * interface.c (is_anonymous_component, is_anonymous_dt): New functions.
1774 * interface.c (compare_components, gfc_compare_derived_types): Use new
1777 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1780 * dependency.c (gfc_check_dependency): Do not assert with
1783 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
1786 simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
1788 2016-08-25 Steven g. Kargl <kargl@gcc.gnu.org>
1791 * frontend-passes.c (remove_trim,combine_array_constructor): Check for
1794 2016-08-24 Paul Thomas <pault@gcc.gnu.org>
1797 * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
1798 for deferred character length module procedures.
1800 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1802 * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
1804 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
1806 * interface.c (compare_components): Fix typo in name check conditional.
1808 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1809 Bud Davis <jmdavis@link.com>
1812 * parse.c (next_free,next_fixed): Issue error for statement label
1813 without a statement.
1815 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1818 * interface.c (compare_parameter): Use better locus for error message.
1820 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
1823 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
1824 for unused variable if symbol is entry point.
1826 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1829 * trans-types.h (float128_type_node): Rename to
1830 gfc_float128_type_node.
1831 (complex_float128_type_node): Rename to
1832 gfc_complex_float128_type_node.
1833 * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
1836 2016-08-19 Jakub Jelinek <jakub@redhat.com>
1839 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
1840 and restore omp state around the resolving.
1843 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
1844 gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
1845 BIND_EXPR with its own forced BLOCK.
1847 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
1849 * intrinsics.texi (RANDOM_NUMBER): Remove reference to
1850 init_random_seed in example.
1851 (RANDOM_SEED): Remove warning to not set all seed values to 0.
1853 2016-08-18 David Malcolm <dmalcolm@redhat.com>
1855 * error.c (gfc_diagnostic_starter): Update for change to
1856 diagnostic_show_locus.
1858 2016-08-17 Jakub Jelinek <jakub@redhat.com>
1861 * trans-array.c (trans_array_constructor): Load
1862 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
1865 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
1867 * lang.opt, invoke.texi: New flag -finit-derived.
1868 * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
1869 gfc_generate_initializer): New prototypes.
1870 * expr.c (gfc_build_default_init_expr, gfc_apply_init,
1871 component_initializer, gfc_generate_initializer): New functions.
1872 * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
1873 * decl.c (build_struct): Move common code to gfc_apply_init.
1874 * resolve.c (can_generate_init): New function.
1875 * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
1876 * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
1877 gfc_generate_initializer.
1878 * trans-decl.c (gfc_generate_function_code): Use
1879 gfc_generate_initializer.
1881 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1883 * frontend-passes.c (create_var): Set ts.deferred for
1884 deferred-length character variables.
1885 * dump-parse-tree.c (show_typespec): Also dump
1886 is_c_interop, is_iso_c and deferred flags.
1888 2016-08-15 Jakub Jelinek <jakub@redhat.com>
1891 * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
1892 for decl's character length before gfc_finish_var_decl on the
1895 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
1898 * openmp.c (resolve_omp_clauses): Adjust use_device clause
1899 handling to only allow pointers and arrays.
1901 2016-08-12 Marek Polacek <polacek@redhat.com>
1904 * decl.c (match_attr_spec): Add FALLTHRU.
1905 * primary.c (match_arg_list_function): Likewise.
1906 * resolve.c (resolve_operator): Adjust fall through comment.
1907 (fixup_charlen): Add FALLTHRU.
1908 (resolve_allocate_expr): Adjust fall through comment.
1909 * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
1910 * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
1913 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
1915 * check.c (gfc_check_random_seed): Use new seed size in check.
1916 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
1917 (RANDOM_SEED): Likewise.
1919 2016-08-08 Jakub Jelinek <jakub@redhat.com>
1922 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
1923 BLOCK DATA ns, it will be rejected later.
1925 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1928 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
1929 stick with the ref of the object to allocate.
1931 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1934 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
1935 copy of zero sized string and with it an ICE.
1937 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
1940 * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
1941 location information is correctly set.
1942 * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
1943 current construct early.
1945 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
1947 * lang.opt: New option -fdec-intrinsic-ints.
1948 * options.c (set_dec_flags): Enable with -fdec.
1949 * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
1950 * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
1953 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1956 * target-memory.c (expr_to_char): Pass in locus and use it in error
1958 (gfc_merge_initializers): Ditto.
1959 * target-memory.h: Update prototype for gfc_merge_initializers ().
1960 * trans-common.c (get_init_field): Use the correct locus.
1962 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1965 * check.c (gfc_check_reshape): Check for constant expression.
1967 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1970 * decl.c (build_struct): Ensure that pointers point to something.
1972 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1975 * decl.c (gfc_set_constant_character_len): if expr is not
1976 constant issue an error instead of an ICE.
1978 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1981 * io.c (gfc_resolve_dt): Use correct locus.
1982 * resolve.c (resolve_branch): Ditto.
1984 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
1987 * decl.c (char_len_param_value): Check return value of
1988 gfc_reduce_init_expr().
1990 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
1992 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
1993 message (was too small).
1995 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
1998 * decl.c (match_data_constant): On error, set 'result' to NULL.
2000 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
2003 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
2006 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
2009 * check.c(numeric_check): Prevent ICE. Issue error for invalid
2010 subroutine as an actual argument when numeric argument is expected.
2012 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
2013 Thomas Koenig <tkoenig@gcc.gnu.org>
2016 * frontend-passes.c (gfc_run_passes): Bail out if there are any
2018 * error.c (gfc_internal_error): If there are any errors in the
2019 buffer, exit with EXIT_FAILURE.
2021 2016-07-28 Renlin Li <renlin.li@arm.com>
2024 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2027 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
2028 if identical is true and two array element references differ.
2029 (gfc_dep_resovler): Move most of the code to dep_ref.
2030 (dep_ref): New function.
2031 * frontend-passes.c (realloc_string_callback): Name temporary
2032 variable "realloc_string".
2034 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
2037 * class.c: Remove assert. Iterate over component only if non-null.
2039 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
2042 * check.c (is_c_interoperable): Simplify right expression.
2044 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
2047 * frontend-passes.c (combine_array_constructor): Don't
2048 do anything if the expression is inside an array iterator.
2050 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
2052 * expr.c (gfc_find_stat_co): Fixed whitespaces.
2053 * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
2054 src and dst description.
2055 * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
2056 and corrected fnspec for caf functions.
2057 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
2058 (conv_caf_send): Dito.
2060 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2063 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
2064 if identical is true and two array element references differ.
2065 (gfc_dep_resovler): Move most of the code to dep_ref.
2066 (dep_ref): New function.
2067 * frontend-passes.c (realloc_string_callback): Name temporary
2068 variable "realloc_string".
2070 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
2073 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
2076 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2077 Marco Restelli <mrestelli@gmail.com>
2080 * symbol.c (select_type_insert_tmp): Recursively call self to take care
2081 of nested select type.
2083 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2085 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
2088 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
2091 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
2092 when allocatable component is set to null() in initializer.
2094 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
2097 * parse.c (parse_contained): Use proper locus.
2099 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
2102 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
2103 types replace the expression's _data ref with a _len ref.
2105 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2108 * frontend-passes.c (create_var): Always allocate a charlen
2109 for character variables.
2111 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
2114 * simplify (gfc_simplify_spread): Adjust locus.
2116 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
2118 * parse.c (matcha): Define.
2119 (decode_oacc_directive): Add spec_only local var and set it. Use
2120 matcha to parse acc directives except for routine and declare. Return
2121 ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
2124 2016-07-08 Martin Liska <mliska@suse.cz>
2126 * invoke.texi (Wundefined-do-loop): Enhance documentation.
2128 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2131 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
2133 2016-07-07 Martin Liska <mliska@suse.cz>
2135 * lang.opt (Wundefined-do-loop): New option.
2136 * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
2137 (gfc_trans_simple_do): Generate a c-style loop.
2138 (gfc_trans_do): Fix GNU coding style.
2139 * invoke.texi: Mention the new warning.
2141 2016-07-07 Martin Liska <mliska@suse.cz>
2143 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
2144 loops with step bigger than +-1.
2146 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2148 * array.c (gfc_match_array_ref): Add parsing support for
2149 STAT= attribute in CAF reference.
2150 * expr.c (gfc_find_stat_co): New function that returns
2151 the STAT= assignment.
2152 * gfortran.h (gfc_array_ref): New member.
2153 * trans-decl.c (gfc_build_builtin_function_decls):
2154 new attribute for caf_get and caf_send functions.
2155 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
2156 the stat attribute to external function.
2157 (gfc_conv_intrinsic_caf_send): Ditto.
2159 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
2162 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
2163 in allocate to parent block.
2165 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2168 * decl.c (match_procedure_interface): Exit loop if procedure
2169 interface refers to itself.
2171 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2172 Steven G. Kargl <kargl@gcc.gnu.org>
2175 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
2176 SHIFT is less than or equal to SIZE.
2178 2016-07-01 Jakub Jelinek <jakub@redhat.com>
2181 * f95-lang.c (struct binding_level): Add reversed field.
2182 (clear_binding_level): Adjust initializer.
2183 (getdecls): If reversed is clear, set it and nreverse the names
2184 chain before returning it.
2185 (poplevel): Use getdecls.
2186 * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
2187 Use nreverse to pushdecl decls in the declaration order.
2190 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2191 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
2193 2016-06-30 Jakub Jelinek <jakub@redhat.com>
2196 * parse.c (matchs, matcho): Move right before decode_omp_directive.
2197 If spec_only, only gfc_match the keyword and if successful, goto
2199 (matchds, matchdo): Define.
2200 (decode_omp_directive): Add spec_only local var and set it.
2201 Use matchds or matchdo macros instead of matchs or matcho
2202 for declare target, declare simd, declare reduction and threadprivate
2203 directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
2204 directive could be matched.
2205 (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
2206 gfc_current_locus from old_locus even if there is no label.
2209 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
2210 decls in to/from clauses.
2212 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2215 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
2218 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
2220 * openmp.c (match_oacc_clause_gang): Rename to ...
2221 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
2223 (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
2224 OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
2225 invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
2226 (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
2227 oacc_expr_lists. Adjust the first and needs_space arguments to
2228 gfc_match_omp_clauses.
2230 2016-06-29 Richard Biener <rguenther@suse.de>
2233 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
2234 (gfc_get_alias_set): Remove.
2236 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2239 * module.c (create_intrinsic_function): Check for NULL values and
2240 return after giving error.
2242 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
2244 * trans-types.c (gfc_build_complex_type): Move setting complex
2245 MODE to layout_type, instead of setting it ahead of time by the
2248 2016-06-21 Tobias Burnus <burnus@net-b.de>
2251 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
2252 (check_data_variable): Strip-off caf_get before checking.
2254 2016-06-20 Tobias Burnus <burnus@net-b.de>
2257 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
2258 RHS pointer functions.
2260 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2262 * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
2263 instead of gfc_add_component_ref().
2264 (gfc_get_len_component): Call gfc_add_len_component() instead of
2265 gfc_add_component_ref().
2266 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
2267 gfc_add_data_component() instead of gfc_add_component_ref().
2268 * trans.c (gfc_add_finalizer_call): Call
2269 gfc_add_final_component() and gfc_add_size_component() instead
2270 of gfc_add_component_ref.
2272 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2274 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
2276 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
2278 * openmp.c (match_acc): New generic function to parse OpenACC
2280 (gfc_match_oacc_parallel_loop): Use it.
2281 (gfc_match_oacc_parallel): Likewise.
2282 (gfc_match_oacc_kernels_loop): Likewise.
2283 (gfc_match_oacc_kernels): Likewise.
2284 (gfc_match_oacc_data): Likewise.
2285 (gfc_match_oacc_host_data): Likewise.
2286 (gfc_match_oacc_loop): Likewise.
2287 (gfc_match_oacc_enter_data): Likewise.
2288 (gfc_match_oacc_exit_data): Likewise.
2290 2016-06-16 Martin Liska <mliska@suse.cz>
2292 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
2294 2016-06-16 Martin Liska <mliska@suse.cz>
2296 * trans-array.c (gfc_array_allocate): Do not generate expect
2298 * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
2299 predictor for malloc return value.
2300 (gfc_allocate_allocatable): Use REALLOC predictor instead of
2302 (gfc_deallocate_with_status): Likewise.
2304 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
2307 * frontend-passes.c (realloc_string_callback): Add a call to
2308 gfc_dep_compare_expr.
2310 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
2313 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
2315 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2318 * openmp.c (gfc_match_oacc_cache): Add comment.
2320 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2323 * io.c (match_io): For READ, commit in pending symbols in the
2324 current statement before trying to match an expression so that
2325 if the match fails and we undo symbols we dont toss good symbols.
2327 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
2330 * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
2331 the address of the _data component to reference the arrays data
2334 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2336 * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
2337 bool parameter, set reduction clause DECLs as addressable when true.
2338 (gfc_trans_omp_clauses): Pass clauses->async to
2339 gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
2341 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2344 * io.c (match_io): For READ, try to match a default character
2345 expression. If found, set the dt format expression to this,
2346 otherwise go back and try control list.
2348 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
2351 * decl.c (copy_prefix): Add checks that the module procedure
2352 declaration prefixes are compliant with the interface. Invert
2353 order of existing elemental and pure checks.
2354 * resolve.c (resolve_fl_procedure): Invert order of elemental
2357 2016-06-01 Jakub Jelinek <jakub@redhat.com>
2359 * parse.c (case_decl): Move ST_OMP_* to ...
2360 (case_omp_decl): ... here, new macro.
2361 (verify_st_order): For case_omp_decl, complain about
2362 p->state >= ORDER_EXEC, but don't change p->state otherwise.
2364 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2366 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
2369 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2372 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
2373 current locus back to old_locus.
2375 2016-05-20 Jakub Jelinek <jakub@redhat.com>
2378 * frontend-passes.c (realloc_string_callback): Clear inserted_block
2379 and changed_statement before calling create_var.
2381 2016-05-15 Harald Anlauf <anlauf@gmx.de>
2384 * interface.c (compare_parameter): Check for non-NULL pointer.
2386 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
2388 * gfortran.texi: Update example of DEC UNION extension.
2390 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
2393 * expr.c (gfc_default_initializer): Avoid extra component refs in
2394 constructors for derived types and classes.
2396 2016-05-11 Jakub Jelinek <jakub@redhat.com>
2399 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
2401 2016-05-09 Richard Biener <rguenther@suse.de>
2404 * trans-decl.c: Include gimplify.h for unshare_expr.
2405 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
2408 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
2411 * module.c (dt_upper_string): Rename to gfc_dt_upper_string
2412 (dt_lower_string): Likewise.
2413 * gfortran.h: Make new gfc_dt_upper/lower_string global.
2414 * class.c: Use gfc_dt_upper_string.
2416 * symbol.c: Likewise.
2417 * resolve.c (resolve_component): New function.
2418 (resolve_fl_derived0): Move component loop code to resolve_component.
2419 * parse.c (check_component): New function.
2420 (parse_derived): Move loop code to check_component.
2421 * lang.opt, invoke.texi, options.c : New option -fdec-structure.
2422 * libgfortran.h (bt): New basic type BT_UNION.
2423 * gfortran.h (gfc_option): New option -fdec-structure.
2424 (gfc_get_union_type, gfc_compare_union_types): New prototypes.
2425 (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
2427 (gfc_find_component): Change prototype.
2428 * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
2429 gfc_match_structure_decl): New prototypes.
2430 * parse.h (gfc_comp_struct): New macro.
2431 * symbol.c (gfc_find_component): Search for components in nested unions
2432 * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
2433 copy_vtab_proc_comps): Update calls to gfc_find_component.
2434 * primary.c (gfc_convert_to_structure_constructor): Likewise.
2435 * symbol.c (gfc_add_component): Likewise.
2436 * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
2437 resolve_typebound_procedure, resolve_component, resolve_fl_derived):
2439 * expr.c (get_union_init, component_init): New functions.
2440 * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
2441 gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
2442 * interface.c (compare_components, gfc_compare_union_types): Likewise.
2443 * match.c (gfc_match_member_sep): Likewise.
2444 * parse.c (check_component, parse_union, parse_struct_map): Likewise.
2445 * resolve.c (resolve_fl_struct): Likewise.
2446 * symbol.c (find_union_component): Likewise.
2447 * trans-types.c (gfc_get_union_type): Likewise.
2448 * parse.c (parse_derived): Use new functions.
2449 * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
2450 * expr.c (gfc_default_initializer): Likewise.
2451 * gfortran.texi: Support for DEC structures, unions, and maps.
2452 * gfortran.h (gfc_statement, sym_flavor): Likewise.
2453 * check.c (gfc_check_kill_sub): Likewise.
2454 * expr.c (gfc_copy_expr, simplify_const_ref,
2455 gfc_has_default_initializer): Likewise.
2456 * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
2457 match_pointer_init, build_struct, variable_decl,
2458 gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
2459 gfc_match_end, gfc_match_derived_decl): Likewise.
2460 * interface.c (check_interface0, check_interface1,
2461 gfc_search_interface): Likewise.
2462 * misc.c (gfc_basic_typename, gfc_typename): Likewise.
2463 * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
2464 fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
2465 gfc_get_module_backend_decl): Likewise.
2466 * parse.h (gfc_compile_state): Likewise.
2467 * parse.c (decode_specification_statement, decode_statement,
2468 gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
2469 * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
2470 gfc_match_rvalue, match_variable): Likewise.
2471 * resolve.c (find_arglists, resolve_structure_cons,
2472 is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
2473 resolve_typebound_subroutine, resolve_allocate_expr,
2474 nonscalar_typebound_assign, generate_component_assignments,
2475 resolve_fl_variable_derived, check_defined_assignments,
2476 resolve_component, resolve_symbol, resolve_equivalence_derived):
2478 * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
2479 gfc_restore_last_undo_checkpoint, gfc_type_compatible,
2480 gfc_find_dt_in_generic): Likewise.
2481 * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
2482 gfc_create_module_variable, check_constant_initializer): Likewise.
2483 * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
2484 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
2485 gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
2487 * trans-io.c (transfer_namelist_element, transfer_expr,
2488 gfc_trans_transfer): Likewise.
2489 * trans-stmt.c (gfc_trans_deallocate): Likewise.
2490 * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
2491 gfc_get_derived_type): Likewise.
2493 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2495 * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
2496 parsing is done in a big switch based on gfc_peek_ascii_char and
2497 individual clauses under their first letters are sorted too.
2499 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
2501 * trans-types.c (gfc_build_complex_type):
2503 2016-05-02 Richard Biener <rguenther@suse.de>
2505 * trans-array.c (gfc_trans_create_temp_array): Properly
2506 create a DECL_EXPR for the anonymous VLA array type.
2508 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2511 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
2512 the reduction clause in both parallel and loop directives.
2514 2016-04-18 Michael Matz <matz@suse.de>
2516 * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
2517 * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
2518 * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
2520 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2523 * intrinsic.texi: Correct the documentation of pseudorandom
2526 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
2529 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
2532 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2535 * array.c (match_array_element_spec): Add check for non-integer.
2536 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
2538 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
2541 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
2542 future -Wparentheses warning.
2544 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
2547 * resolve.c (resolve_allocate_expr): Emit error message when no
2548 array spec and no array valued source= expression is given in an
2549 F2008 allocate() for an array to allocate.
2551 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
2554 * trans-array.c (gfc_array_allocate): When the array is a coarray,
2555 do not nullyfing its allocatable components in array_allocate, because
2556 the nullify missed the array ref and nullifies the wrong component.
2559 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
2562 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
2563 constant zero tree, when the class to get the _len component from is
2564 not unlimited polymorphic.
2565 (gfc_copy_class_to_class): Use the new function.
2566 * trans.h: Added interface of new function gfc_class_len_or_zero_get.
2568 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2570 * trans-decl.c (gfc_build_builtin_function_decls):
2571 caf_stop_numeric and caf_stop_str definition.
2572 * trans-stmt.c (gfc_trans_stop): invoke external functions
2573 for stop and stop_str when coarrays are used.
2574 * trans.h: extern for new functions.
2576 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2579 * scanner.c (load_file): Update to use S_ISREG macro.
2581 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
2583 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
2584 to OMP_MAP_DELETE. Adjust all users.
2586 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2587 Jim MacArthur <jim.macarthur@codethink.co.uk>
2590 * scanner.c (load_file): Check that included file is regular.
2592 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2593 Harold Anlauf <anlauf@gmx.de>
2596 * invoke.texi: Explain use of the 'no-' construct within the
2598 * options.c (gfc_handle_runtime_check_option): Enable use of
2599 'no-' prefix for the various options with -fcheck= to allow
2600 negating previously enabled check options.
2602 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
2605 * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
2606 same way as the others, rather than fixing it to come last.
2607 (gfc_match_function_decl, gfc_match_subroutine): After errors
2608 in 'copy_prefix', emit them immediately in the case of module
2609 procedures to prevent a later ICE.
2612 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
2613 declarations within the contains section of modules as well as
2615 * resolve.c (resolve_fl_procedure): Likewise.
2616 *trans-decl.c (build_function_decl): Change the gcc_assert to
2617 allow all forms of module procedure declarations within module
2620 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2624 * frontend-passes.c (realloc_string_callback): Don't set
2627 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2629 * dump-parse-tree.c (show_code_node): Print association
2630 list of a block if present. Handle EXEC_END_BLOCK.
2632 2016-02-28 Harald Anlauf <anlauf@gmx.de>
2633 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2636 * match.c (gfc_match_iterator): Add diagnostic for array variable
2639 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2640 Steven G. Kargl <kargl@gcc.gnu.org>
2643 * io.c (gfc_match_open): Check that open status is an expression
2644 constant before comparing string to 'scratch' with NEWUNIT.
2646 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2648 * trans.c (gfc_allocate_allocatable): size conversion
2649 from byte to number of elements for event variables.
2650 * trans-types.c (gfc_get_derived_type): event variables
2651 represented as a pointer (like lock variable).
2653 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2656 * scanner.c (add_path_to_list): If include path is not a directory,
2657 issue a fatal error.
2659 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
2662 * trans-array.c (gfc_array_allocate): Take the attributes from the
2663 expression to allocate and not from the source=-expression.
2665 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
2668 * trans-decl.c (create_function_arglist): Deferred character
2669 length functions, with and without declared results, address
2670 the passed reference type as '.result' and the local string
2671 length as '..result'.
2672 (gfc_null_and_pass_deferred_len): Helper function to null and
2673 return deferred string lengths, as needed.
2674 (gfc_trans_deferred_vars): Call it, thereby reducing repeated
2675 code, add call for deferred arrays and reroute pointer function
2676 results. Avoid using 'tmp' for anything other that a temporary
2677 tree by introducing 'type_of_array' for the arrayspec type.
2679 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
2682 * frontend-passes.c (cfe-expr_0): Don't register functions
2683 from within an ASSOCIATE statement.
2685 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2688 * decl.c (build_sym): If the name has already been defined as a
2689 type, it has a symtree with an upper case letter at the beginning.
2690 If such a symtree exists, issue an error and exit. Don't do
2691 this if there is no corresponding upper case letter.
2693 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2697 * decl.c (build_sym): Reverted previous patch.
2699 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2702 * decl.c (build_sym): If the name has already been defined as a
2703 type, issue error and return false.
2705 2016-02-12 David Malcolm <dmalcolm@redhat.com>
2708 * error.c (gfc_diagnostic_start_span): New function.
2709 (gfc_diagnostics_init): Initialize global_dc's start_span.
2711 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2714 * gfortran.h: Added flag to gfc_association_list indicating that
2715 the rank of an associate variable has been guessed only.
2716 * parse.c (parse_associate): Set the guess flag mentioned above
2717 when guessing the rank of an expression.
2718 * resolve.c (resolve_assoc_var): When the rank has been guessed,
2719 make sure, that the guess was correct else overwrite with the actual
2721 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
2722 class objects, take the span from the _data component.
2724 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2727 * primary.c (match_actual_arg): If symbol has attribute flavor of
2728 namelist, generate an error. (gfc_match_rvalue): Likewise return
2730 * resolve.c (resolve_symbol): Scan arument list of procedures and
2731 generate an error if a namelist is found.
2733 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
2736 * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
2737 the former to the latter and make it non-static. Update callers.
2738 * gfortran.h (gfc_expr_is_variable): New declaration.
2739 (struct gfc_ss_info): Add field needs_temporary.
2740 * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
2741 Tighten the condition on aggregate expressions with a check
2742 that the expression is a variable and doesn't need a temporary.
2743 (gfc_conv_resolve_dependency): Add intermediary reference variable.
2744 Set the needs_temporary field.
2746 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
2750 * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
2751 pointer is passed. Take it as is without trying to deref the
2753 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
2754 argument to source=-expression.
2756 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
2758 * lang.opt (fopenacc-dim=): New option.
2760 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
2763 * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
2764 subroutines, add a string length argument, when the actual
2765 argument is an unlimited polymorphic class object.
2767 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
2770 * trans-expr.c (gfc_conv_procedure_call): Correct expression
2771 for 'ulim_copy', which was missing a test for 'comp'.
2773 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
2776 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
2777 when the END encountered does not match a BLOCK's end.
2779 2016-01-27 Janus Weil <janus@gcc.gnu.org>
2782 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
2784 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
2787 * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
2788 for allocatable components, whilst checking if the symbol is a
2789 derived or class entity..
2791 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
2794 * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
2795 assignments from check on assignment of scalars to unassigned
2796 arrays and correct wrong code within the corresponding block.
2798 2016-01-26 David Malcolm <dmalcolm@redhat.com>
2801 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
2803 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2807 * interface.c (gfc_arglist_matches_symbol): Replace assert with
2808 a return false if not a procedure.
2809 * resolve.c (resolve_generic_f): Test if we are resolving an
2810 initialization expression and adjust error message accordingly.
2812 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2815 * frontend-passes.c (matmul_lhs_realloc): Add
2816 forgotten break statement.
2818 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
2821 * primary.c (gfc_variable_attr): revert revision r221955,
2822 call gfc_internal_error only if there is no error.
2824 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2827 * frontend-passes.c (enum matrix_case): Add case A2B2T for
2828 MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
2829 (inline_limit_check): Also add A2B2T.
2830 (matmul_lhs_realloc): Handle A2B2T.
2831 (check_conjg_variable): Rename to
2832 (check_conjg_transpose_variable): and also count TRANSPOSE.
2833 (inline_matmul_assign): Handle A2B2T.
2835 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2838 * error.c (gfc_error): Save the state of abort_on_error and set
2839 it to false for buffered errors to allow normal processing.
2840 Restore the state before leaving.
2842 2016-01-19 Martin Jambor <mjambor@suse.cz>
2844 * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
2845 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
2846 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
2848 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
2851 * resolve.c (check_uop_procedure): Prevent deferred length
2852 characters from being trapped by assumed length error.
2860 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
2861 function as well as variable expressions.
2862 (gfc_array_init_size): Add 'expr' as an argument. Use this to
2863 correctly set the descriptor dtype for deferred characters.
2864 (gfc_array_allocate): Add 'expr' to the call to
2865 'gfc_array_init_size'.
2866 * trans.c (gfc_build_array_ref): Expand logic for setting span
2867 to include indirect references to character lengths.
2868 * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
2869 result char lengths that are PARM_DECLs are indirectly
2870 referenced both for directly passed and by reference.
2871 (create_function_arglist): If the length type is a pointer type
2872 then store the length as the 'passed_length' and make the char
2873 length an indirect reference to it.
2874 (gfc_trans_deferred_vars): If a character length has escaped
2875 being set as an indirect reference, return it via the 'passed
2877 * trans-expr.c (gfc_conv_procedure_call): The length of
2878 deferred character length results is set TREE_STATIC and set to
2880 (gfc_trans_assignment_1): Do not fix the rse string_length if
2881 it is a variable, a parameter or an indirect reference. Add the
2882 code to trap assignment of scalars to unallocated arrays.
2883 * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
2884 all references to it. Instead, replicate the code to obtain a
2885 explicitly defined string length and provide a value before
2886 array allocation so that the dtype is correctly set.
2887 trans-types.c (gfc_get_character_type): If the character length
2888 is a pointer, use the indirect reference.
2890 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
2893 * frontend-passes.c (in_where): New variable.
2894 (inline_matmul_assign): Don't try this if we are within
2896 (gfc_code_walker): Keep track of in_where.
2898 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
2901 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
2902 se->use_offset from condition for calculation of 'base'.
2904 2016-01-08 Jakub Jelinek <jakub@redhat.com>
2907 * trans.h (OMPWS_SCALARIZER_BODY): Define.
2908 (OMPWS_NOWAIT): Renumber.
2909 * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
2910 if OMPWS_SCALARIZER_BODY is not set already, and set also
2911 OMPWS_SCALARIZER_BODY until the final loop creation.
2912 * trans-expr.c (gfc_trans_assignment_1): Likewise.
2913 * trans-openmp.c (gfc_trans_omp_workshare): Also clear
2914 OMPWS_SCALARIZER_BODY.
2915 * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
2916 OMP_FOR if OMPWS_SCALARIZER_BODY is set.
2918 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2920 Update copyright years.
2922 * gfortranspec.c (lang_specific_driver): Update copyright notice
2924 * gfc-internals.texi: Bump @copying's copyright year.
2925 * gfortran.texi: Ditto.
2926 * intrinsic.texi: Ditto.
2927 * invoke.texi: Ditto.
2929 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
2932 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
2933 is an array descriptor before using gfc_conv_descriptor_xxx.
2935 Copyright (C) 2016 Free Software Foundation, Inc.
2937 Copying and distribution of this file, with or without modification,
2938 are permitted in any medium without royalty provided the copyright
2939 notice and this notice are preserved.