1 2019-05-29 Jakub Jelinek <jakub@redhat.com>
4 Backported from mainline
5 2019-05-29 Jakub Jelinek <jakub@redhat.com>
8 * lang.opt (fbroken-callers): Remove.
9 (ftail-call-workaround, ftail-call-workaround=): New options.
10 * gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
11 * interface.c (gfc_procedure_use): Set implicit_interface_calls
12 for calls to implicit interface procedures.
13 * trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
14 instead of flag_broken_callers. If it is not 2, also require
15 sym->ns->implicit_interface_calls.
16 * invoke.texi (fbroken-callers): Remove documentation.
17 (ftail-call-workaround, ftail-call-workaround=): Document.
19 2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
22 * invoke.texi: Document -fbroken-callers.
23 * lang.opt: Add -fbroken-callers.
24 * trans-decl.c (create_function_arglist): Only set
25 DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
27 2019-05-16 Jakub Jelinek <jakub@redhat.com>
30 * trans-decl.c (create_function_arglist): Set
31 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
34 2019-04-30 Jakub Jelinek <jakub@redhat.com>
36 Backported from mainline
37 2019-03-11 Jakub Jelinek <jakub@redhat.com>
40 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
41 on decl if adding COND_EXPR for allocatable.
42 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
44 2019-04-24 Paul Thomas <pault@gcc.gnu.org>
46 Backport from mainline
48 * resolve.c (check_host_association): If an external function
49 is typed but not declared explicitly to be external, change the
50 old symbol from a variable to an external function.
52 2019-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
56 * gfortran.h (gfc_component): Add finalized field.
57 * class.c (finalize_component): If the component is already
58 finalized, return early. Set component->finalized on exit.
60 2019-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
64 * resolve.c (resolve_global_procedure): If the global symbol is an
65 ENTRY, also look up its name among the entries.
67 2019-04-10 Harald Anlauf <anlauf@gmx.de>
71 * check.c (gfc_check_transfer): Reject procedures as actual
72 arguments for SOURCE and MOLD of TRANSFER intrinsic.
74 2019-03-31 Harald Anlauf <anlauf@gmx.de>
78 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
80 * target-memory.c (gfc_element_size): Handle size determination
81 for procedure pointers.
83 2019-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
87 * interface.c (compare_actual_formal): Change errors about
88 missing or extra to gfc_error_now to make sure they are issued.
89 Change "spec" to "specifier" in message.
90 * resolve.c (resolve_global_procedure): Also check for mismatching
91 interface with global symbols if the namespace has already been
94 2019-03-24 Janus Weil <janus@gcc.gnu.org>
98 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
101 2019-03-23 Thomas Koenig <tkoeng@gcc.gnu.org>
105 * iresolve.c: Include trans.h.
106 (gfc_resolve_fe_runtine_error): Set backend_decl on
109 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
113 * symbol.c (gfc_add_subroutine): If we are encountering a
114 subrtoutine within a BLOCK DATA and the name starts with an
115 underscore, do not check.
117 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
121 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
122 Return false if a scalar tempoary is needed.
123 (gfc_walk_variable_expr): Fix up class refs.
125 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
131 * gfortran.h (gfc_symbol): Add bind_c component.
132 (gfc_get_gsymbol): Add argument bind_c.
133 * decl.c (add_global_entry): Add bind_c argument to
135 * parse.c (parse_block_data): Likewise.
136 (parse_module): Likewise.
137 (add_global_procedure): Likewise.
138 (add_global_program): Likewise.
139 * resolve.c (resolve_common_blocks): Likewise.
140 (resolve_global_procedure): Likewise.
141 (gfc_verify_binding_labels): Likewise.
142 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
144 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
146 (gfc_get_extern_function_decl): If the sym has a binding label
147 and it cannot be found in the global symbol tabel, it is the wrong
150 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
154 * match.c (gfc_match_type_spec): Remove call to
155 gfc_resolve_expr for character length.
157 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
161 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
163 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
165 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
166 Steven G. Kargl <kargl@gcc.gnu.org>
170 * symbol.c (gfc_add_procedure): Only throw an error if the
171 procedure has not been declared either PUBLIC or PRIVATE.
172 * resolve.c (is_illegal_recursion): Remove an assert().
174 2019-03-06 Harald Anlauf <anlauf@gmx.de>
178 * expr.c (simplify_const_ref): Avoid null pointer dereference.
180 2019-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
184 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
186 2019-03-03 Harald Anlauf <anlauf@gmx.de>
190 * decl.c (gfc_set_constant_character_len): Clear original string
191 representation after padding has been performed to target length.
192 * resolve.c (gfc_resolve_substring_charlen): Check substring
193 length for constantness prior to general calculation of length.
195 2019-03-03 Harald Anlauf <anlauf@gmx.de>
196 Steven G. Kargl <kargl@gcc.gnu.org>
200 * symbol.c (check_conflict): Check for valid procedure name
201 passed to error reporting routine.
203 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
207 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
208 to garguments. If we are dealing with a MOLD, call
209 gfc_expr_to_initialize().
210 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
211 to gfc_find_and_cut_at_last_class_ref.
212 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
213 argument is_mold with default false.
215 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
219 * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to
221 * gfortran.dg/lto/20091028-2_0.f90: Likewise.
222 * gfortran.dg/lto/pr87689_0.f: New file.
223 * gfortran.dg/lto/pr87689_1.f: New file.
224 * gfortran.dg/altreturn_9_0.f90: New file.
225 * gfortran.dg/altreturn_9_1.f90: New file.
227 2019-03-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
231 * trans-io.c (transfer_expr): Do not return if there are no
232 components to the derived type or class.
234 2019-03-02 Harald Anlauf <anlauf@gmx.de>
238 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
239 where storage size of elements of MOLD is 0.
242 * check.c (gfc_calculate_transfer_sizes): Handle cases where
243 storage size of elements of MOLD is 0.
247 * target-memory.c (gfc_element_size): Return false if element size
248 cannot be determined; element size is returned separately.
249 (gfc_target_expr_size): Return false if expression size cannot be
250 determined; expression size is returned separately.
251 * target-memory.h: Adjust prototypes.
252 * check.c (gfc_calculate_transfer_sizes): Adjust references to
253 gfc_target_expr_size, gfc_element_size.
254 * arith.c (hollerith2representation): Likewise.
255 * class.c (find_intrinsic_vtab): Likewise.
256 * simplify.c (gfc_simplify_sizeof): Likewise.
258 2019-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
262 * class.c (gfc_get_len_component): Add argument k for kind.
263 If the kind of the resulting expression is not equal to k,
265 * gfortran.h (gfc_len_component): Adjust prototype.
266 * simplify.c (gfc_simplify_len): Pass kind to
267 gfc_get_len_component.
269 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
273 * resolve.c (deferred_op_assign): Return if the lhs expression
274 has the pointer attribute.
276 2019-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
280 * trans-decl.c (generate_coarray_sym_init): For an array
281 constructor in a DATA statement of a coarray variable, set the
282 rank to 1 to avoid confusion later on. If the constructor
283 contains only one value, use that for initiailizig.
285 2019-02-22 Release Manager
287 * GCC 8.3.0 released.
289 2019-02-10 Harald Anlauf <anlauf@gmx.de>
293 * decl.c (add_init_expr_to_sym): Copy length of string initializer
296 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
300 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
301 looking at an init expression, issue error if the target is not a
302 TARGET and we are not looking at a procedure pointer.
303 * gfortran.h (gfc_check_assign): Add optional argument
306 2019-02-07 Jakub Jelinek <jakub@redhat.com>
308 Backported from mainline
309 2019-02-01 Jakub Jelinek <jakub@redhat.com>
313 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
314 if sym->ns->construct_entities rather than if
315 sym->ns->parent->code->op == EXEC_BLOCK.
317 2019-01-19 Jakub Jelinek <jakub@redhat.com>
320 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
321 or parent function if it has been added there already.
323 2019-02-05 Thomas Koenig <tkoenig@gcc.gnu.org>
327 * trans-array.c (gfc_array_allocate): For setting the bounds on
328 the new array, add a condition for a not previously allocated
331 2019-02-03 Paul Thomas <pault@gcc.gnu.org>
335 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
336 passed in parentheses to class formals, invert the order of
337 copying allocatable components to taking the _data of the
340 2019-02-03 Paul Thomas <pault@gcc.gnu.org>
344 * trans-array.c (gfc_array_init_size): Add element_size to the
346 (gfc_array_allocate): Remove the recalculation of the size of
347 the element and use element_size from the call to the above.
348 Unconditionally set the span field of the descriptor.
350 2019-02-03 Paul Thomas <pault@gcc.gnu.org>
354 * expr.c (is_subref_array): Move the check for class pointer
355 dummy arrays to after the reference check. If we haven't seen
356 an array reference other than an element and a component is not
357 class or derived, return false.
359 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
363 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
364 * gfortran.h (gfc_expr): Add flag do_not_warn.
365 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
366 no warning is desired.
368 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
372 * interface.c (gfc_compare_types): If a derived type and an
373 integer both have a derived type, and they are identical,
374 this is a C binding type and compares equal.
376 2019-01-27 Paul Thomas <pault@gcc.gnu.org>
384 * resolve.c (resolve_variable): Fix up expressions with array
385 associate names, where the parser did not detect that this is
386 array and there was no array part_ref in the expression.
387 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): base_expr
388 should be a copy of e and not the initialization expr.
390 2019-01-25 Paul Thomas <pault@gcc.gnu.org>
393 * trans-array.c (gfc_get_array_span): Try to get the element
394 length of incomplete types. Return NULL_TREE otherwise.
395 (gfc_conv_expr_descriptor): Only set the 'span' field if the
396 above does not return NULL_TREE. Set 'span' field if possible
397 for all new descriptors.
399 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
402 * resolve.c (resolve_symbol): Host associated varaibles can appear
403 in the specification statement of a RESULT array.
405 2019-01-15 Dominique d'Humieres <dominiq@gcc.gnu.org>
408 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
410 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
413 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
416 2019-01-08 Jakub Jelinek <jakub@redhat.com>
418 Backported from mainline
419 2018-12-12 Jakub Jelinek <jakub@redhat.com>
422 * trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
423 VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
425 2018-12-07 Jakub Jelinek <jakub@redhat.com>
428 * trans-openmp.c (gfc_omp_clause_default_ctor,
429 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
430 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
431 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
434 2018-12-23 Paul Thomas <pault@gcc.gnu.org>
438 * resolve.c (get_temp_from_expr): Use the string length of
439 constant character expressions.
441 2018-12-23 Paul Thomas <pault@gcc.gnu.org>
445 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
446 rhs has a charlen expression, convert that and use it.
447 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
448 assignment of deferred character array vars to a realocatable
449 lhs should not be added to the exterior block since vector
450 indices, for example, generate temporaries indexed within the
453 2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
456 * decl.c (gfc_match_data): If a component of a derived type entity
457 appears in data statement, check that does not have the allocatable
460 2018-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
464 * frontend-passes.c (optimize_power): Remove.
465 (optimize_op): Remove call to optimize_power.
466 * trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
467 (2|4|8|16) ** integer and (-1) ** integer.
469 2018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
472 * module.c (mio_namelist): Remove an error condition/message that
473 is contrary to the Fortran standard.
475 2018-12-21 Paul Thomas <pault@gcc.gnu.org>
478 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
479 introduced by r264358, which prevented components of associate
480 names from being reallocated on assignment.
482 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
486 * array.c (gfc_match_array_constructor): Check return value of
487 gfc_convert_type(). Skip constructor elements with BT_UNKNOWN,
488 which need to go through resolution.
489 * intrinsic.c (gfc_convert_type_warn): Return early if the types
490 martch (i.e., no conversion is required).
491 * simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
492 and return gfc_bad_expr.
494 2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
497 * decl.c (variable_decl): Check that a derived isn't being assigned
498 an incompatible entity in an initialization.
500 2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
503 * primary.c (gfc_match_structure_constructor): Set the locus of
504 an expression to avoid a NULL pointer dereference.
506 2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
509 * gfortran.h: Update prototype for gfc_resolve_filepos().
510 * io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
511 Use passed in locus for error message.
512 * resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
515 2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
518 * io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
520 2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
523 * io.c (io_constraint): Update macro. If locus line buffer is NULL,
524 use gfc_current_locus in error messages.
525 (check_io_constraints): Catch missing IO UNIT in write and read
526 statements. io_constraint macro is incompatible here.
528 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
531 * io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
533 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
536 * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
538 2018-12-09 Fritz Reese <fritzoreese@gmail.com>
541 * resolve.c (resolve_operator): Do not call resolve_function.
542 Break like other cases.
544 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
547 * resolve.c (check_data_variable): Named constant cannot be a
550 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
553 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
554 Check for a NULL pointer.
556 2018-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
560 * frontend-passes.c (combine_array_constructor): Do not do
561 anything if in a WHERE statement.
563 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
567 * resolve.c (resolve_variable): Check for associate names with
570 2018-11-05 Jakub Jelinek <jakub@redhat.com>
572 Backported from mainline
573 2018-10-25 Jakub Jelinek <jakub@redhat.com>
576 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
577 nonmonotonic modifiers regardless of if they have been parsed
578 already or if the opposite one has. Fix up check whether
579 comma after modifier should be parsed.
580 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
582 2019-11-03 Tobias Burnus <burnus@net-b.de>
583 Thomas Koenig <tkoenig@gcc.gnu.org>
587 * expr.c (gfc_simplify_expr): Avoid simplifying
588 the 'array' argument to lbound/ubound/lcobound/
591 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
595 * resolve.c (resolve_fl_procedure): Include class functions in
596 the test that elemental function results be scalar.
598 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
602 * trans-stmt.c (trans_associate_var): Character associate names
603 with variable string length do not have to be deferred length
604 for the string length to be set, if variable.
606 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
610 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
611 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
612 (gfc_arith_concat): If the types of op1 and op2 are not
613 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
615 2018-09-18 Janus Weil <janus@gcc.gnu.org>
619 * decl.c (match_binding_attributes): Use correct default accessibility
620 for procedure pointer components.
622 2018-09-18 Janus Weil <janus@gcc.gnu.org>
626 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
627 with non-polymorphic objects.
629 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
631 Backported from trunk
633 * resolve.c (resolve_assoc_var): If the target expression is a
634 deferred charlen dummy and the associate name shares the
635 charlen, generate a new one. Make sure that new charlens are in
636 the namespace list so that they get cleaned up.
637 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
639 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
640 length dummy and result arrays on the deferred initialization
641 list so that the variable length arrays can be correctly dealt
643 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
644 NULL rather than ICEing.
646 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
648 Backported from trunk
650 * trans-expr.c (gfc_trans_class_init_assign): Access to
651 to array elements of the dynamic type requires that the array
652 reference be added to the class expression and not the _data
653 component, unlike scalar expressions.
655 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
657 Backported from trunk
659 * expr.c (is_subref_array): Add the check of dimensionality for
660 class, dummy, pointer arrays.
662 2018-09-05 Janus Weil <janus@gcc.gnu.org>
664 Backported from trunk
666 * interface.c (compare_type): Remove a CLASS/TYPE check.
667 (compare_type_characteristics): New function that behaves like the old
669 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
670 Call 'compare_type_characteristics' instead of 'compare_type'.
672 2018-09-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
674 * simplify.c (gfc_simplify_modulo): Re-arrange code to test
675 whether 'P' is zero and issue an error if it is.
677 2018-09-01 Paul Thomas <pault@gcc.gnu.org>
681 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
682 info->descriptor but pass it directly to gfc_build_array_ref.
683 (gfc_conv_array_ref): Likewise for se->expr.
684 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
685 obtain the span field directly from it.
687 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
691 * frontend-passes.c (var_in_expr_callback): New function.
692 (var_in_expr): New function.
693 (traverse_io_block): Use var_in_expr instead of
694 gfc_check_dependency for checking if the variable depends on the
697 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
699 Backported from trunk
701 * resolve.c (resolve_fl_variable_derived): Check if the derived
702 type is use associated before checking for the host association
705 2018-07-26 Jakub Jelinek <jakub@redhat.com>
707 Backported from mainline
708 2018-07-10 Jakub Jelinek <jakub@redhat.com>
711 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
713 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
714 on linear clauses. Initialize n->where to gfc_current_locus.
716 2018-07-26 Release Manager
718 * GCC 8.2.0 released.
720 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
724 * decl.c (match_old_style_init): Initialize locus of variable expr when
725 creating a data variable.
726 (match_clist_expr): Verify array is explicit shape/size before
727 attempting to allocate constant array constructor.
729 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
734 * module.c (mio_component): Set component->loc when loading from module.
738 * expr.c (class_allocatable, class_pointer, comp_allocatable,
739 comp_pointer): New helpers.
740 (component_initializer): Generate EXPR_NULL for allocatable or pointer
741 components. Do not generate initializers for components within BT_CLASS.
742 Do not assign to comp->initializer.
743 (gfc_generate_initializer): Use new helpers; move code to generate
744 EXPR_NULL for class allocatable components into component_initializer().
746 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
750 * trans-array.c (structure_alloc_comps): Do not explicitly copy
751 procedure pointer components.
753 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
757 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
759 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
765 * expr.c (component_initializer): Assign init expr to c->initializer.
766 (generate_isocbinding_initializer): New.
767 (gfc_generate_initializer): Call generate_isocbinding_initializer to
768 generate initializers for c_ptr and c_funptr with -finit-derived.
770 2018-06-25 Paul Thomas <pault@gcc.gnu.org>
774 * resolve.c (resolve_ordinary_assign): Force the creation of a
775 vtable for assignment of non-polymorphic expressions to an
776 unlimited polymorphic object.
777 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
778 size of the rhs type for such assignments. Set the dtype, _len
779 and vptrs appropriately.
780 * trans-expr.c (gfc_trans_assignment): Force the use of the
781 _copy function for these assignments.
783 2018-06-15 Cesar Philippidis <cesar@codesourcery.com>
785 Backport from mainline
786 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
789 * parse.c (decode_oacc_directive): Set gfc_matching_function
791 (decode_omp_directive): Likewise.
793 2018-06-15 Cesar Philippidis <cesar@codesourcery.com>
795 Backport from mainline
796 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
799 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
801 2018-06-15 Cesar Philippidis <cesar@codesourcery.com>
803 Backport from mainline
804 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
807 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
808 subroutine data clause arguments.
810 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
813 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
816 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
819 * expr.c (gfc_check_assign): Select non-NULL locus.
821 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
826 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
827 reduce a charlen to a constant.
829 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
832 * array.c (match_array_cons_element): NULL() cannot be in an
835 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
838 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
840 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
843 Committed as part of r261364
844 * data.c (gfc_assign_data_value): Re-arrange code to allow for
845 an error for double initialization of CHARACTER entities.
847 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
850 * resolve.c (resolve_operator): Provide better error message for
851 derived type entity used in an binary intrinsic numeric operator.
853 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
856 * data.c (create_character_initializer): Return early if type is
857 incompatible with CHARACTER.
859 2018-06-09 Thomas Koenig <tkoenig@gcc.gnu.org>
863 * trans.h (gfc_ss): Add field no_bounds_check.
864 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
865 ss->no_bounds_check is set, do not use runtime checks.
866 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
867 for reallocatable lhs.
869 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
873 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
874 'P' is zero and issue an error if it is.
876 2018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
880 * frontend-passes.c (is_fe_temp): Add prototype.
881 (realloc_string_callback): Early return for frontend-generated
884 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
887 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
890 2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
893 * trans-intrinsic.c (gfc_conv_associated): Add arg1se to the block.
895 2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
899 * resolve.c (resolve_sync): Resolve expression before checking for
902 2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
906 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
908 2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
912 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
914 2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
918 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
921 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
925 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
926 test for self refs to the function result in the character len
927 expression. If a self reference is found, emit an error and
929 (resolve_fntype): Use the function symbol in the calls to the
932 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
936 * trans-array.c (gfc_get_array_span): Renamed from
938 (gfc_conv_expr_descriptor): Change references to above.
939 * trans-array.h : Add prototype for 'gfc_get_array_span'.
940 * trans-stmt.c (trans_associate_var): If the associate name is
941 a subref array pointer, use gfc_get_array_span for the span.
943 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
947 * match.c (gfc_match_type_spec): Go through the array ref and
948 decrement 'rank' for every dimension that is an element.
950 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
956 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
957 charlen backend_decl of the rhs expr to ss->info->string_length
958 so that the value in the current scope is used.
960 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
963 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
964 of 'size'. If the element type is a pointer use the size of the
965 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
966 case, set the size to zero.
968 2018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
972 * expr.c (check_inquiry): Avoid NULL pointer dereference.
974 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
978 * data.c (gfc_assign_data_value): Check that a data object does
979 not also have default initialization.
981 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
985 * array.c (gfc_resolve_character_array_constructor): Substrings
986 with upper bound smaller than lower bound are zero length strings.
988 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
992 * check.c (gfc_check_rank): Check that the argument is a data object.
994 2018-05-11 Paul Thomas <pault@gcc.gnu.org>
999 * resolve.c (get_temp_from_expr): The temporary must not have
1000 dummy or intent attributes.
1002 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
1005 Backport from trunk.
1006 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1007 introduced by r259385.
1008 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1009 same variables in coarray assignments.
1011 2018-05-02 Release Manager
1013 * GCC 8.1.0 released.
1015 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
1018 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1020 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
1024 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1025 during dependency computation. They define no data dependency.
1026 * trans-array.c (conv_array_index_offset): The stride can not be set
1028 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1029 for caf_get's result and copying to the array with vectorial
1032 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1035 * frontend-passes.c (traverse_io_block): Check for start, end or
1036 stride being defined by an outer implied DO loop.
1038 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1042 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1043 for annotation and remove dependence on -ftree-parallelize-loops.
1045 2018-04-10 Jakub Jelinek <jakub@redhat.com>
1048 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1049 (resolve_oacc_nested_loops): Likewise. Formatting fix.
1051 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1054 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1055 parallell processing of DO CONCURRENT -ftree-parallelize-loops
1058 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1061 * resolve.c (resolve_variable): Simplify cases where access to a
1062 parameter array results in a single constant.
1064 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1067 * decl.c (variable_decl): If upper or lower bounds simplify
1068 to a constant, use that.
1070 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
1073 * simplify.c (gfc_convert_constant): Handle case of array
1074 constructors within an array that has no iterator and improve
1075 the conciseness of this section of code.
1077 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1080 * array.c (gfc_resolve_character_array_constructor): Early
1081 exit for zero-size arrays.
1082 * simplify.c (simplify_transformation_to_array): Exit early
1083 if the result size is zero.
1084 (simplify_minmaxloc_to_array): Likewise.
1086 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
1089 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1091 (gfc_free_namespace): Restore assert (revert r258839).
1093 2018-03-28 Jakub Jelinek <jakub@redhat.com>
1095 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1096 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1097 (IOPARM_dt_dec_ext): ... this.
1098 * trans-io.c (build_dt): Adjust for default_exp renaming to
1099 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1100 * io.c (match_io): Likewise.
1102 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1105 * frontend-passes.c (gfc_run_passes): Do not run front-end
1106 optimizations if a previous error occurred.
1108 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1109 Harald Anlauf <anlauf@gmx.de>
1112 * primary.c (gfc_convert_to_structure_constructor): Check
1113 conformance of argument types in structure constructor.
1115 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1118 * io.c: Include constructor.h.
1119 (resolve_tag_format): For a constant character array, concatenate
1120 into a single character expression.
1122 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
1123 Dominique d'Humieres <dominiq@gcc.gnu.org>
1126 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1127 scalar derived type with -std=f2003 and -std=f2008.
1129 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1130 Dominique d'Humieres <dominiq@gcc.gnu.org>
1133 * symbol.c (gfc_free_namespace): Delete the assert and only if
1134 refs count is equals zero, free the namespace. Otherwise,
1135 something is halfway and other errors will resound.
1137 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1140 * expr.c (find_substring_ref): Change types of start, end
1141 and length variables to gfc_charlen_t. Set length to zero
1142 for empty substring.
1144 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
1147 * decl.c (check_function_name): Improved error message
1148 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1150 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
1153 * decl.c (get_proc_name): If the MODULE prefix appears in interface
1154 body, then it must appear on the contained subroutine or function.
1155 While here, fix nearby mis-indented code.
1157 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1158 Harald Anlauf <anlauf@gmx.de>
1161 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1163 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
1166 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1167 gfc_charlen_type_node when calling procedure.
1169 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
1172 * interface.c (symbol_rank): Remove bogus null pointer check that
1173 crept in when translating a ternary operator into an if-else
1176 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1179 * simplify.c (gfc_convert_constant): Correctly handle iterators
1180 for type conversion.
1182 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1185 * decl.c (get_proc_name): Check for a subroutine re-defined in
1186 the contain portion of a subroutine. Change language of existing
1187 error message to better describe the issue. While here fix whitespace
1190 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1193 * decl.c (get_proc_name): Catch clash between a procedure statement
1194 and a contained subprogram
1196 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1199 * decl.c (merge_array_spec): Correct the error condition.
1201 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1204 * decl.c (get_proc_name): Check for clash of entry name with
1207 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1210 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1211 dimensions, and issue error message if limit is exceeded.
1213 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1215 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1216 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1217 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1218 * intrinsic.texi: Update documentation.
1219 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1220 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1221 gfor_fndecl_kill and gfor_fndecl_kill_sub
1222 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1224 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1225 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1226 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1228 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
1231 * trans-array.c (structure_alloc_comps): Make sure that the
1232 vptr is copied and that the unlimited polymorphic _len is used
1233 to compute the size to be allocated.
1234 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1235 unlimited polymorphic _len for the offset to the element.
1236 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1237 * trans.h : Add the boolean 'unlimited' to the prototype.
1239 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1242 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1244 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1246 * check.c (gfc_check_kill): Check pid and sig are scalar.
1247 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1248 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1249 keywords for KILL. Remove redundant *back="back" in favor of the
1250 original *bck="back".
1251 (add_subroutines): Sort keyword list. Add pid and sig keywords
1253 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1254 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1256 (gfc_resolve_rename_sub): Add comment.
1258 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1261 * simplify.c (simplify_transformation): Return default result for
1262 empty array argument.
1263 (gfc_simplify_all): Remove special-case handling for zerosize.
1264 (gfc_simplify_any): Likewise.
1265 (gfc_simplify_count): Likewise.
1266 (gfc_simplify_iall): Likewise.
1267 (gfc_simplify_iany): Likewise.
1268 (gfc_simplify_iparity): Likewise.
1269 (gfc_simplify_minval): Likewise.
1270 (gfc_simplify_maxval): Likewise.
1271 (gfc_simplify_norm2): Likewise.
1272 (gfc_simplify_product): Likewise.
1273 (gfc_simplify_sum): Likewise.
1275 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1278 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1279 the expression up the chain instead of a NULL pointer.
1281 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1285 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1287 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1291 * expr.c (simplify_parameter_variable): If p is a size zero array
1292 and not an ARRAY_EXPR insert an empty array constructor and
1294 * gfortran.h: Add prototype for gfc_is_size_zero_array.
1295 * simplify.c (is_size_zero_array): Make non-static and rename into
1296 (gfc_is_size_zero_array): Check for parameter arrays of zero
1297 size by comparing shape and absence of constructor.
1298 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1300 (gfc_simplify_count): Likewise.
1301 (gfc_simplify_iall): Likewise.
1302 (gfc_simplify_iany): Likewise.
1303 (gfc_simplify_iparity): Likewise.
1304 (gfc_simplify_minval): Likewise.
1305 (gfc_simplify_maxval): Likewise.
1306 (gfc_simplify_product): Likewise.
1307 (gfc_simplify_sum): Likewise.
1309 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
1312 * primary.c (match_sym_complex_part): Give the matcher for an implied
1313 do-loop a chance to run.
1315 2018-03-03 Harald Anlauf <anlauf@gmx.de>
1318 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1319 dereference NULL pointer.
1321 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1324 * simplify.c (is_size_zero_array): New function to check for size
1326 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1327 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1328 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1329 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1330 requirements from F2018.
1332 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1335 * simplify.c (gfc_simplify_transfer): Resolve mold.
1337 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
1340 * resolve.c (build_loc_call): Change symtree name from 'loc' to
1343 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1346 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1347 components are caf tokens.
1348 (gfc_target_interpret_expr): Treat BT_VOID expressions as
1351 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1354 * class.c (class_array_ref_detected): Remove the condition that
1355 there be no reference after the array reference.
1356 (find_intrinsic_vtab): Remove excess whitespace.
1357 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1358 as 'base and call build_class_array_ref earlier.
1360 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
1363 * trans-stmt.c (trans_associate_var): Make sure that the se
1364 expression is a pointer type before converting it to the symbol
1367 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
1370 * decl.c (variable_decl): Check that an explicit-shape-array with
1371 nonconstant bounds is allowed.
1373 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
1376 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1377 has a pre block, add it to the expression pre block.
1379 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1382 * gfortran.h (gfc_integer_4_kind): Define.
1383 * resolve.c (resolve_select_type): Make sure that the
1384 kind of c->high is gfc_integer_4_kind.
1386 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
1389 * decl.c (gfc_match_data): Check for invalid substring in
1392 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1394 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1396 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1399 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1401 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1404 * interface.c (compare_actual_formal): Issue error if keyword is
1405 used in a statement function.
1407 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1410 * trans-io.c (set_parameter_value_inquire): Adjust range check of
1411 negative unit values for kind=8 units to the kind=4 negative limit.
1413 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1416 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1417 accessing its components.
1419 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1422 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1423 before accessing its components.
1425 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1428 * trans-const.c : Clean up some whitespace issues.
1429 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1430 derived type has a kind value of zero, set it to the default
1433 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
1436 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1437 argument to stop and error stop decls.
1438 * trans-stmt.c (gfc_trans_stop): Add false value to argument
1441 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1445 * trans-decl.c (gfc_build_builtin_function_decls): Pass
1446 gfc_int8_type node to pause_numeric, size_type_node to
1448 * trans-stmt.c (gfc_trans_pause): Likewise.
1450 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1452 * gfortran.texi: Update Coarray API description.
1453 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1454 character lengths, int for exit codes.
1455 (generate_coarray_sym_init): Use size_t for character length.
1456 * trans-intrinsic.c (conv_co_collective): Likewise.
1457 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1458 (gfc_trans_event_post_wait): Likewise.
1459 (gfc_trans_sync): Likewise.
1460 (gfc_trans_stop): Use size_t for character lengths, int for exit
1463 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
1467 * primary.c (gfc_convert_to_structure_constructor):
1468 For a constant string constructor, make sure the length
1471 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
1475 * resolve.c (resolve_assoc_var): Rearrange the logic for the
1476 determination of the character length of associate names. If
1477 the associate name is missing a length expression or the length
1478 expression is not a constant and the target is not a variable,
1479 make the associate name allocatable and deferred length.
1480 * trans-decl.c (gfc_get_symbol_decl): Null the character length
1481 backend_decl for deferred length associate names that are not
1482 variables. Set 'length' to gfc_index_zero_node for character
1483 associate names, whose character length is a PARM_DECL.
1485 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1488 * frontend-passes.c (traverse_io_block): Remove workaround for
1491 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1493 * gfortran.texi: Document additional src/dst_type. Fix some typos.
1494 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
1495 argument of _caf_*_by_ref () with * e { get, send, sendget }.
1496 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
1497 data referenced when generating a call to caf_get_by_ref ().
1498 (conv_caf_send): Same but for caf_send_by_ref () and
1499 caf_sendget_by_ref ().
1501 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1504 * io.c (check_format): Allow FMT_COLON.
1506 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
1509 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
1510 the typenode in the case of deferred length characters.
1512 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1515 * frontend-passes (scalarized_expr): If the expression
1516 is an assumed size array, leave in the last reference
1517 and pass AR_SECTION instead of AR_FULL to gfc_resolve
1518 in order to avoid an error.
1520 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
1523 * resolve.c (resolve_assoc_var): If a non-constant target expr.
1524 has no string length expression, make the associate variable
1525 into a deferred length, allocatable symbol.
1526 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
1528 * trans-stmt.c (trans_associate_var): Null and free scalar
1529 associate names that are allocatable. After assignment, remove
1530 the allocatable attribute to prevent reallocation.
1532 2018-02-16 Jakub Jelinek <jakub@redhat.com>
1535 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
1536 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
1538 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
1541 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
1543 2018-02-15 Janus Weil <janus@gcc.gnu.org>
1546 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
1549 2018-02-14 Janus Weil <janus@gcc.gnu.org>
1552 * match.c (gfc_match_select_type): Fix check for selector in
1553 SELECT TYPE statement.
1555 2018-02-13 Janus Weil <janus@gcc.gnu.org>
1558 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
1560 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
1561 Janne Blomqvist <jb@gcc.gnu.org>
1563 * module.c (dump_module): Use lbasename to ensure that module
1564 files are reproducible.
1566 2018-02-12 Janus Weil <janus@gcc.gnu.org>
1569 * resolve.c (resolve_component): Fix checks of passed argument in
1570 procedure-pointer components.
1572 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1575 * resolve.c (resolve_formal_arglist): Update error message.
1577 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
1579 * gfortran.texi: Fix typos in documentation of caf_register ().
1580 * trans-array.c (structure_alloc_comps): Only register a component of
1581 a derived typed corray, not of an ultimate component coarray.
1583 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
1587 * interface.c (compare_actual_formal): Add in_statement_function
1588 bool parameter. Skip check of INTENT attribute for statement
1589 functions. Arguments to a statement function cannot be optional,
1590 issue error for missing argument.
1591 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
1592 in_statement_function.
1594 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
1597 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
1598 flag. If the is a vector subscript or the expression is not a
1599 variable, make the descriptor one-based.
1601 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
1605 * trans-array.c (gfc_array_init_size): Revert the change made
1606 in revision 257356 setting the dtype.
1607 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
1608 Call gfc_get_dtype_rank_type every time.
1611 * trans-array.c (gfc_conv_expr_descriptor): If the source array
1612 is a descriptor type, use its offset, removing the condition
1613 that is be a class expression.
1615 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1618 * match.c (gfc_match_deallocate): Check for NULL pointer.
1620 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1623 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
1624 (gfc_conv_intrinsic_function): Call it.
1626 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1629 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
1630 try to resolve it. While here return early if possible.
1632 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
1635 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
1636 'length' if the symbol charlen backend_decl is an indirect ref.
1638 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
1642 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
1643 use gfc_get_dtype_rank_type.
1645 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1649 * resolve.c (resolve_assoc_var): Generate an error if
1650 target length unknown.
1652 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1655 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
1656 to runtime, print a warning message.
1658 2018-01-31 Jakub Jelinek <jakub@redhat.com>
1661 * openmp.c (gfc_match_omp_clauses): If all the linear
1662 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
1663 nor set *head = NULL. Formatting fixes.
1665 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
1668 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
1669 an address expression passed to an assumed rank dummy, convert
1670 to an indirect reference.
1672 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1674 * dump-parse-tree.c (write_proc): Use sym_name (which may
1675 be sym->binding_label) instead of sym->name.
1677 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1679 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
1682 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1685 * trans-expr.c (fill_with_spaces): Use memset instead of
1687 (gfc_trans_string_copy): Improve opportunity to use builtins with
1690 2018-01-30 Jakub Jelinek <jakub@redhat.com>
1693 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
1694 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
1696 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1699 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
1702 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1705 * frontend-passes (matmul_to_var_expr): Return early if
1706 in association list.
1707 (inline_matmul_assign): Likewise.
1709 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1712 * resolve.c (resolve_component): Ensure BIND(C) character
1713 components have length one.
1714 (resolve_symbol): Likewise for variables.
1716 2018-01-27 Jakub Jelinek <jakub@redhat.com>
1719 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
1722 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
1723 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1724 Soren Rasmussen <s.c.rasmussen@gmail.com>
1726 Partial support for Fortran 2018 teams features.
1728 * array.c (gfc_match_array_ref): add team attribute in coarray
1730 * check.c (gfc_check_get_team, gfc_check_team_number): add new
1731 functions for get_team and team_number.
1732 * dump-parse-tree.c (show_code_node): add new statements: form team,
1733 change team, end team, and sync team.
1734 * expr.c (gfc_find_team_co): add new function.
1735 * gfortran.h: add new statements.
1736 * intrinsic.c (add_functions): add get_team and team_number functions.
1737 * intrinsic.h: add get_team and team_number prototypes for check,
1738 simplify, and resolve.
1739 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
1741 * iso-fortran-env.def: add the team_type derived type.
1742 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
1743 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
1744 add change team, end team, form team, sync team match and functions.
1745 * match.h: add new prototypes for change team, end team, form team,
1747 * parse.c (decode_statement): add cases for change team, end team,
1748 form team, and sync team.
1749 * resolve.c: add cases for exec form team, change team, end team, and
1751 * simplify.c (gfc_simplify_get_team): add new function for get team.
1752 * st.c (gfc_free_statement): add cases exec for change team, end team,
1753 form team, sync team.
1754 * trans-decl.c (gfor_fndecl_caf_form_team)
1755 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
1756 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
1757 (gfor_fndecl_caf_team_number): add functions and definitions.
1758 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
1759 new function and team_type argument support.
1760 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
1761 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
1762 * trans-stmt.h: add new prototypes.
1763 * trans-types.c (gfc_get_derived_type): check condition for team_type.
1764 * trans.c (trans_code): new exec cases for form team, change team, end
1765 team, and sync team.
1766 * trans.h: add new prototypes.
1768 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
1771 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
1772 or .false. The summation does the correct type conversion.
1773 (gfc_simplify_dot_product): Special case zero-sized arrays.
1775 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
1778 * array.c (gfc_match_array_ref): If standard earlier than F2008
1779 it is an error if the reference dimension is greater than 7.
1780 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
1781 dtype masks and shifts accordingly.
1782 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
1783 type node to check the field.
1784 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
1785 (duplicate_allocatable_coarray): Access the rank field of the
1786 dtype descriptor rather than the dtype itself.
1787 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
1788 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
1790 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
1791 get_scalar_to_descriptor_type if the actual expression is a
1793 (gfc_trans_structure_assign): Assign the rank directly to the
1795 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
1796 to default integer kind.
1797 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
1798 'elem_len' field of the dtype.
1799 * trans-io.c (gfc_build_io_library_fndecls): Replace
1800 gfc_int4_type_node with dtype_type_node where necessary.
1801 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
1803 * trans-types.c : Provide 'get_dtype_type_node' to acces the
1804 dtype_type_node and, if necessary, build it.
1805 The maximum size of an array element is now determined by the
1806 maximum value of size_t.
1807 Update the description of the array descriptor, including the
1808 type def for the dtype_type.
1809 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
1810 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
1811 (gfc_get_array_descriptor_base): Change the type of the dtype
1812 field to dtype_type_node.
1813 (gfc_get_array_descr_info): Get the offset to the rank field of
1815 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
1816 * trans.h : Define the indices of the dtype fields.
1818 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
1821 * decl.c (gfc_match_derived_decl): If eos not matched, recover
1822 and emit error about garbage after declaration.
1824 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
1827 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
1830 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
1834 * arith.c (gfc_arith_concat): Use size_t for string length.
1835 (gfc_compare_string): Likewise.
1836 (gfc_compare_with_Cstring): Likewise.
1837 * array.c (gfc_resolve_character_array_constructor): Use
1838 HOST_WIDE_INT, gfc_mpz_get_hwi.
1839 * check.c (gfc_check_fe_runtime_error): Use size_t.
1840 * data.c (create_character_initializer): Use HOST_WIDE_INT,
1842 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
1843 (add_init_expr_to_sym): Use HOST_WIDE_INT.
1844 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
1846 (gfc_apply_init): Likewise.
1847 * match.h (gfc_set_constant_character_len): Update prototype.
1848 * primary.c (match_string_constant): Use size_t.
1849 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
1851 * simplify.c (init_result_expr): Likewise.
1852 (gfc_simplify_len_trim): Use size_t.
1853 * target-memory.c (gfc_encode_character): Use size_t.
1854 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
1855 (interpret_array): Use size_t.
1856 (gfc_interpret_character): Likewise.
1857 * target-memory.h (gfc_encode_character): Update prototype.
1858 (gfc_interpret_character): Likewise.
1859 (gfc_target_interpret_expr): Likewise.
1860 * trans-const.c (gfc_build_string_const): Use size_t for length
1862 (gfc_build_wide_string_const): Likewise.
1863 * trans-const.h (gfc_build_string_const): Likewise.
1864 (gfc_build_wide_string_const): Likewise.
1866 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
1869 * simplify.c (gfc_simplify_matmul): Set return type correctly.
1871 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1874 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
1876 2018-01-17 Harald Anlauf <anlauf@gmx.de>
1879 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1881 2018-01-17 Harald Anlauf <anlauf@gmx.de>
1884 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1886 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
1889 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
1890 from symbol marked unlimited polymorphic.
1891 * resolve.c (resolve_structure_cons): Likewise.
1892 * misc.c (gfc_typename): Don't dereference derived->components
1895 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1898 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
1899 (gfc_logical_4_kind): New macro
1900 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
1901 (gfc_simplify_maxloc): Likewise.
1902 (gfc_resolve_maxloc): Likewise.
1903 (gfc_resolve_minloc): Likewise.
1904 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
1905 argument; also raise error if it is used (for now). Add it
1906 if it isn't present.
1907 * intrinsic.c (add_sym_4ml): Rename to
1908 (add_sym_5ml), adjust for extra argument.
1909 (add_functions): Add "back" constant. Adjust maxloc and minloc
1911 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
1912 not of gfc_logical_4_kind, convert.
1913 (gfc_resolve_minloc): Likewise.
1914 * simplify.c (gfc_simplify_minloc): Add back argument.
1915 (gfc_simplify_maxloc): Likewise.
1916 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
1917 argument to %VAL to ensure passing by value.
1918 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
1919 also for library calls.
1921 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1924 * resolve.c (resolve_transfer): Delete code looking for 'DT'
1925 format specifiers in format strings. Set formatted to true if a
1926 format string or format label is present.
1927 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
1930 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1933 * dump-parse-tree.c (get_c_type_name): Remove extra line.
1934 Change for loop to use declaration in for loop. Handle BT_LOGICAL
1936 (write_decl): Add where argument. Fix indentation. Replace
1937 assert with error message. Add typename to warning
1939 (write_type): Adjust locus to call of write_decl.
1940 (write_variable): Likewise.
1941 (write_proc): Likewise. Replace assert with error message.
1943 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
1946 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1947 the rhs expression is neither an elemental nor a conversion
1951 * trans-array.c (is_pointer_array): Remove unconditional return
1952 of false for -fopenmp.
1954 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1958 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1961 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1964 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1966 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1969 * resolve.c (resolve_charlen): Check the type of cl->length
1972 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1975 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
1977 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1980 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1981 LHS type when assigning.
1983 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1986 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1988 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1990 * match.c (gfc_match_allocate): Check for NULL pointer.
1992 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1994 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1996 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
1999 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2000 an initializer, convert the kind parameters and add to the
2001 component if the instance.
2002 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2003 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2004 for parameterized arrays. Clean up typos in comments. Convert
2005 parameterized array initializers and copy into the array.
2006 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2007 parameterized types.
2008 *trans-stmt.c (trans_associate_var): Deallocate associate vars
2009 as necessary, when they are PDT function results for example.
2012 * trans-array.c (structure_alloc_comps): Only compare len parms
2013 when they are declared explicitly.
2015 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
2018 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2021 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
2025 * array.c (got_charlen): Use gfc_charlen_int_kind.
2026 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2028 (find_intrinsic_vtab): Likewise.
2029 * decl.c (match_char_length): Use gfc_charlen_int_kind.
2030 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2031 (gfc_match_implicit): Use gfc_charlen_int_kind.
2032 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2033 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2034 * expr.c (gfc_get_character_expr): Length parameter of type
2036 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2037 (gfc_extract_hwi): New function.
2038 (simplify_const_ref): Make string_len of type gfc_charlen_t.
2039 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2040 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2041 * gfortran.h (gfc_mpz_get_hwi): New prototype.
2042 (gfc_mpz_set_hwi): Likewise.
2043 (gfc_charlen_t): New typedef.
2044 (gfc_expr): Use gfc_charlen_t for character lengths.
2045 (gfc_size_kind): New extern variable.
2046 (gfc_extract_hwi): New prototype.
2047 (gfc_get_character_expr): Use gfc_charlen_t for character length.
2048 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2049 * gfortran.texi: Update description of hidden string length argument.
2050 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2051 (gfc_resolve_char_achar): Likewise.
2052 (gfc_resolve_repeat): Pass string length directly without
2053 temporary, use gfc_charlen_int_kind.
2054 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2055 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2056 * misc.c (gfc_mpz_get_hwi): New function.
2057 (gfc_mpz_set_hwi): New function.
2058 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2059 (parse_integer): Don't complain about large integers.
2060 (write_atom): Use HOST_WIDE_INT for integers.
2061 (mio_integer): Handle integer type mismatch.
2062 (mio_hwi): New function.
2063 (mio_intrinsic_op): Use HOST_WIDE_INT.
2064 (mio_array_ref): Likewise.
2065 (mio_expr): Likewise.
2066 * primary.c (match_substring): Use gfc_charlen_int_kind.
2067 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2068 (resolve_character_operator): Likewise.
2069 (resolve_assoc_var): Likewise.
2070 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2071 (resolve_charlen): Use mpz_sgn to determine sign.
2072 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2074 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2075 * target-memory.c (size_character): Length argument of type
2077 (gfc_encode_character): Likewise.
2078 (gfc_interpret_character): Use gfc_charlen_t.
2079 * target-memory.h (gfc_encode_character): Modify prototype.
2080 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2081 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2082 (trans_array_constructor): Use existing type.
2083 (get_array_charlen): Likewise.
2084 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2085 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2086 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2087 (add_argument_checking): Likewise.
2088 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2089 gfc_charlen_type_node.
2090 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2091 4, fold_convert to correct type.
2092 (gfc_conv_class_to_class): Build const of type size_type_node for
2094 (gfc_copy_class_to_class): Likewise.
2095 (gfc_conv_string_length): Use same type in expression.
2096 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2097 (gfc_conv_string_tmp): Make sure len is of the right type.
2098 (gfc_conv_concat_op): Use same type in expression.
2099 (gfc_conv_procedure_call): Likewise.
2100 (fill_with_spaces): Comment out memset() block due to spurious
2101 -Wstringop-overflow warnings.
2102 (gfc_trans_string_copy): Use gfc_charlen_type_node.
2103 (alloc_scalar_allocatable_for_subcomponent_assignment):
2104 fold_convert to right type.
2105 (gfc_trans_subcomponent_assign): Likewise.
2106 (trans_class_vptr_len_assignment): Build const of correct type.
2107 (gfc_trans_pointer_assignment): Likewise.
2108 (alloc_scalar_allocatable_for_assignment): fold_convert to right
2110 (trans_class_assignment): Build const of correct type.
2111 * trans-intrinsic.c (gfc_conv_associated): Likewise.
2112 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2113 * trans-io.c (gfc_build_io_library_fndecls): Use
2114 gfc_charlen_type_node for character lengths.
2115 (set_string): Convert to right type in assignment.
2116 * trans-stmt.c (gfc_trans_label_assign): Build const of
2117 gfc_charlen_type_node.
2118 (trans_associate_var): Likewise.
2119 (gfc_trans_character_select): Likewise.
2120 (gfc_trans_allocate): Likewise, don't typecast strlen result.
2121 (gfc_trans_deallocate): Don't typecast strlen result.
2122 * trans-types.c (gfc_size_kind): New variable.
2123 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2124 from size_type_node.
2125 * trans-types.h: Fix comment.
2127 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2131 * check.c (gfc_check_eoshift): Check for string length and
2132 for conformance of boundary.
2133 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2134 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2135 * simplify.c (gfc_simplify_eoshift): New function.
2137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2138 Alan Hayward <alan.hayward@arm.com>
2139 David Sherwood <david.sherwood@arm.com>
2141 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2144 Alan Hayward <alan.hayward@arm.com>
2145 David Sherwood <david.sherwood@arm.com>
2147 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2149 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2152 * check.c (gfc_check_eoshift): Error for missing boundary if array
2153 is not one of the standard types.
2155 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2157 Update copyright years.
2159 * gfortranspec.c (lang_specific_driver): Update copyright notice
2161 * gfc-internals.texi: Bump @copying's copyright year.
2162 * gfortran.texi: Ditto.
2163 * intrinsic.texi: Ditto.
2164 * invoke.texi: Ditto.
2166 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2169 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2170 gfc_simplify_minloc to maxloc and minloc, respectively.
2171 * intrinsic.h: Add prototypes for gfc_simplify_minloc
2172 and gfc_simplify_maxloc.
2173 * simplify.c (min_max_chose): Adjust prototype. Modify function
2174 to have a return value which indicates if the extremum was found.
2175 (is_constant_array_expr): Fix typo in comment.
2176 (simplify_minmaxloc_to_scalar): New function.
2177 (simplify_minmaxloc_nodim): New function.
2178 (new_array): New function.
2179 (simplify_minmaxloc_to_array): New function.
2180 (gfc_simplify_minmaxloc): New function.
2181 (simplify_minloc): New function.
2182 (simplify_maxloc): New function.
2184 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2188 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2191 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
2194 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2195 allocatable and pointer scalars, when -fcoarray selected.
2196 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2197 field as well as the backend_decl.
2198 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2199 derived types that are not vtypes. Components with caf_token
2200 attribute are pvoid types. For a component requiring it, find
2201 the caf_token field and have the component token field point to
2205 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2206 field to the descriptor even when codimen not set.
2208 Copyright (C) 2018 Free Software Foundation, Inc.
2210 Copying and distribution of this file, with or without modification,
2211 are permitted in any medium without royalty provided the copyright
2212 notice and this notice are preserved.