1 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
4 * decl.c (gfc_match_data): Check for invalid substring in
7 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
9 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
11 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
14 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
16 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
19 * interface.c (compare_actual_formal): Issue error if keyword is
20 used in a statement function.
22 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
25 * trans-io.c (set_parameter_value_inquire): Adjust range check of
26 negative unit values for kind=8 units to the kind=4 negative limit.
28 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
31 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
32 accessing its components.
34 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
37 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
38 before accessing its components.
40 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
43 * trans-const.c : Clean up some whitespace issues.
44 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
45 derived type has a kind value of zero, set it to the default
48 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
51 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
52 argument to stop and error stop decls.
53 * trans-stmt.c (gfc_trans_stop): Add false value to argument
56 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
60 * trans-decl.c (gfc_build_builtin_function_decls): Pass
61 gfc_int8_type node to pause_numeric, size_type_node to
63 * trans-stmt.c (gfc_trans_pause): Likewise.
65 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
67 * gfortran.texi: Update Coarray API description.
68 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
69 character lengths, int for exit codes.
70 (generate_coarray_sym_init): Use size_t for character length.
71 * trans-intrinsic.c (conv_co_collective): Likewise.
72 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
73 (gfc_trans_event_post_wait): Likewise.
74 (gfc_trans_sync): Likewise.
75 (gfc_trans_stop): Use size_t for character lengths, int for exit
78 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
82 * primary.c (gfc_convert_to_structure_constructor):
83 For a constant string constructor, make sure the length
86 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
90 * resolve.c (resolve_assoc_var): Rearrange the logic for the
91 determination of the character length of associate names. If
92 the associate name is missing a length expression or the length
93 expression is not a constant and the target is not a variable,
94 make the associate name allocatable and deferred length.
95 * trans-decl.c (gfc_get_symbol_decl): Null the character length
96 backend_decl for deferred length associate names that are not
97 variables. Set 'length' to gfc_index_zero_node for character
98 associate names, whose character length is a PARM_DECL.
100 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
103 * frontend-passes.c (traverse_io_block): Remove workaround for
106 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
108 * gfortran.texi: Document additional src/dst_type. Fix some typos.
109 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
110 argument of _caf_*_by_ref () with * e { get, send, sendget }.
111 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
112 data referenced when generating a call to caf_get_by_ref ().
113 (conv_caf_send): Same but for caf_send_by_ref () and
114 caf_sendget_by_ref ().
116 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
119 * io.c (check_format): Allow FMT_COLON.
121 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
124 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
125 the typenode in the case of deferred length characters.
127 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
130 * frontend-passes (scalarized_expr): If the expression
131 is an assumed size array, leave in the last reference
132 and pass AR_SECTION instead of AR_FULL to gfc_resolve
133 in order to avoid an error.
135 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
138 * resolve.c (resolve_assoc_var): If a non-constant target expr.
139 has no string length expression, make the associate variable
140 into a deferred length, allocatable symbol.
141 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
143 * trans-stmt.c (trans_associate_var): Null and free scalar
144 associate names that are allocatable. After assignment, remove
145 the allocatable attribute to prevent reallocation.
147 2018-02-16 Jakub Jelinek <jakub@redhat.com>
150 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
151 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
153 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
156 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
158 2018-02-15 Janus Weil <janus@gcc.gnu.org>
161 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
164 2018-02-14 Janus Weil <janus@gcc.gnu.org>
167 * match.c (gfc_match_select_type): Fix check for selector in
168 SELECT TYPE statement.
170 2018-02-13 Janus Weil <janus@gcc.gnu.org>
173 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
175 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
176 Janne Blomqvist <jb@gcc.gnu.org>
178 * module.c (dump_module): Use lbasename to ensure that module
179 files are reproducible.
181 2018-02-12 Janus Weil <janus@gcc.gnu.org>
184 * resolve.c (resolve_component): Fix checks of passed argument in
185 procedure-pointer components.
187 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
190 * resolve.c (resolve_formal_arglist): Update error message.
192 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
194 * gfortran.texi: Fix typos in documentation of caf_register ().
195 * trans-array.c (structure_alloc_comps): Only register a component of
196 a derived typed corray, not of an ultimate component coarray.
198 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
202 * interface.c (compare_actual_formal): Add in_statement_function
203 bool parameter. Skip check of INTENT attribute for statement
204 functions. Arguments to a statement function cannot be optional,
205 issue error for missing argument.
206 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
207 in_statement_function.
209 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
212 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
213 flag. If the is a vector subscript or the expression is not a
214 variable, make the descriptor one-based.
216 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
220 * trans-array.c (gfc_array_init_size): Revert the change made
221 in revision 257356 setting the dtype.
222 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
223 Call gfc_get_dtype_rank_type every time.
226 * trans-array.c (gfc_conv_expr_descriptor): If the source array
227 is a descriptor type, use its offset, removing the condition
228 that is be a class expression.
230 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
233 * match.c (gfc_match_deallocate): Check for NULL pointer.
235 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
238 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
239 (gfc_conv_intrinsic_function): Call it.
241 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
244 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
245 try to resolve it. While here return early if possible.
247 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
250 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
251 'length' if the symbol charlen backend_decl is an indirect ref.
253 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
257 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
258 use gfc_get_dtype_rank_type.
260 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
264 * resolve.c (resolve_assoc_var): Generate an error if
265 target length unknown.
267 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
270 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
271 to runtime, print a warning message.
273 2018-01-31 Jakub Jelinek <jakub@redhat.com>
276 * openmp.c (gfc_match_omp_clauses): If all the linear
277 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
278 nor set *head = NULL. Formatting fixes.
280 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
283 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
284 an address expression passed to an assumed rank dummy, convert
285 to an indirect reference.
287 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
289 * dump-parse-tree.c (write_proc): Use sym_name (which may
290 be sym->binding_label) instead of sym->name.
292 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
294 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
297 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
300 * trans-expr.c (fill_with_spaces): Use memset instead of
302 (gfc_trans_string_copy): Improve opportunity to use builtins with
305 2018-01-30 Jakub Jelinek <jakub@redhat.com>
308 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
309 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
311 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
314 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
317 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
320 * frontend-passes (matmul_to_var_expr): Return early if
322 (inline_matmul_assign): Likewise.
324 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
327 * resolve.c (resolve_component): Ensure BIND(C) character
328 components have length one.
329 (resolve_symbol): Likewise for variables.
331 2018-01-27 Jakub Jelinek <jakub@redhat.com>
334 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
337 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
338 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
339 Soren Rasmussen <s.c.rasmussen@gmail.com>
341 Partial support for Fortran 2018 teams features.
343 * array.c (gfc_match_array_ref): add team attribute in coarray
345 * check.c (gfc_check_get_team, gfc_check_team_number): add new
346 functions for get_team and team_number.
347 * dump-parse-tree.c (show_code_node): add new statements: form team,
348 change team, end team, and sync team.
349 * expr.c (gfc_find_team_co): add new function.
350 * gfortran.h: add new statements.
351 * intrinsic.c (add_functions): add get_team and team_number functions.
352 * intrinsic.h: add get_team and team_number prototypes for check,
353 simplify, and resolve.
354 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
356 * iso-fortran-env.def: add the team_type derived type.
357 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
358 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
359 add change team, end team, form team, sync team match and functions.
360 * match.h: add new prototypes for change team, end team, form team,
362 * parse.c (decode_statement): add cases for change team, end team,
363 form team, and sync team.
364 * resolve.c: add cases for exec form team, change team, end team, and
366 * simplify.c (gfc_simplify_get_team): add new function for get team.
367 * st.c (gfc_free_statement): add cases exec for change team, end team,
368 form team, sync team.
369 * trans-decl.c (gfor_fndecl_caf_form_team)
370 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
371 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
372 (gfor_fndecl_caf_team_number): add functions and definitions.
373 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
374 new function and team_type argument support.
375 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
376 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
377 * trans-stmt.h: add new prototypes.
378 * trans-types.c (gfc_get_derived_type): check condition for team_type.
379 * trans.c (trans_code): new exec cases for form team, change team, end
381 * trans.h: add new prototypes.
383 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
386 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
387 or .false. The summation does the correct type conversion.
388 (gfc_simplify_dot_product): Special case zero-sized arrays.
390 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
393 * array.c (gfc_match_array_ref): If standard earlier than F2008
394 it is an error if the reference dimension is greater than 7.
395 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
396 dtype masks and shifts accordingly.
397 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
398 type node to check the field.
399 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
400 (duplicate_allocatable_coarray): Access the rank field of the
401 dtype descriptor rather than the dtype itself.
402 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
403 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
405 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
406 get_scalar_to_descriptor_type if the actual expression is a
408 (gfc_trans_structure_assign): Assign the rank directly to the
410 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
411 to default integer kind.
412 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
413 'elem_len' field of the dtype.
414 * trans-io.c (gfc_build_io_library_fndecls): Replace
415 gfc_int4_type_node with dtype_type_node where necessary.
416 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
418 * trans-types.c : Provide 'get_dtype_type_node' to acces the
419 dtype_type_node and, if necessary, build it.
420 The maximum size of an array element is now determined by the
421 maximum value of size_t.
422 Update the description of the array descriptor, including the
423 type def for the dtype_type.
424 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
425 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
426 (gfc_get_array_descriptor_base): Change the type of the dtype
427 field to dtype_type_node.
428 (gfc_get_array_descr_info): Get the offset to the rank field of
430 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
431 * trans.h : Define the indices of the dtype fields.
433 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
436 * decl.c (gfc_match_derived_decl): If eos not matched, recover
437 and emit error about garbage after declaration.
439 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
442 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
445 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
449 * arith.c (gfc_arith_concat): Use size_t for string length.
450 (gfc_compare_string): Likewise.
451 (gfc_compare_with_Cstring): Likewise.
452 * array.c (gfc_resolve_character_array_constructor): Use
453 HOST_WIDE_INT, gfc_mpz_get_hwi.
454 * check.c (gfc_check_fe_runtime_error): Use size_t.
455 * data.c (create_character_initializer): Use HOST_WIDE_INT,
457 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
458 (add_init_expr_to_sym): Use HOST_WIDE_INT.
459 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
461 (gfc_apply_init): Likewise.
462 * match.h (gfc_set_constant_character_len): Update prototype.
463 * primary.c (match_string_constant): Use size_t.
464 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
466 * simplify.c (init_result_expr): Likewise.
467 (gfc_simplify_len_trim): Use size_t.
468 * target-memory.c (gfc_encode_character): Use size_t.
469 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
470 (interpret_array): Use size_t.
471 (gfc_interpret_character): Likewise.
472 * target-memory.h (gfc_encode_character): Update prototype.
473 (gfc_interpret_character): Likewise.
474 (gfc_target_interpret_expr): Likewise.
475 * trans-const.c (gfc_build_string_const): Use size_t for length
477 (gfc_build_wide_string_const): Likewise.
478 * trans-const.h (gfc_build_string_const): Likewise.
479 (gfc_build_wide_string_const): Likewise.
481 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
484 * simplify.c (gfc_simplify_matmul): Set return type correctly.
486 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
489 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
491 2018-01-17 Harald Anlauf <anlauf@gmx.de>
494 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
496 2018-01-17 Harald Anlauf <anlauf@gmx.de>
499 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
501 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
504 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
505 from symbol marked unlimited polymorphic.
506 * resolve.c (resolve_structure_cons): Likewise.
507 * misc.c (gfc_typename): Don't dereference derived->components
510 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
513 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
514 (gfc_logical_4_kind): New macro
515 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
516 (gfc_simplify_maxloc): Likewise.
517 (gfc_resolve_maxloc): Likewise.
518 (gfc_resolve_minloc): Likewise.
519 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
520 argument; also raise error if it is used (for now). Add it
522 * intrinsic.c (add_sym_4ml): Rename to
523 (add_sym_5ml), adjust for extra argument.
524 (add_functions): Add "back" constant. Adjust maxloc and minloc
526 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
527 not of gfc_logical_4_kind, convert.
528 (gfc_resolve_minloc): Likewise.
529 * simplify.c (gfc_simplify_minloc): Add back argument.
530 (gfc_simplify_maxloc): Likewise.
531 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
532 argument to %VAL to ensure passing by value.
533 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
534 also for library calls.
536 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
539 * resolve.c (resolve_transfer): Delete code looking for 'DT'
540 format specifiers in format strings. Set formatted to true if a
541 format string or format label is present.
542 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
545 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
548 * dump-parse-tree.c (get_c_type_name): Remove extra line.
549 Change for loop to use declaration in for loop. Handle BT_LOGICAL
551 (write_decl): Add where argument. Fix indentation. Replace
552 assert with error message. Add typename to warning
554 (write_type): Adjust locus to call of write_decl.
555 (write_variable): Likewise.
556 (write_proc): Likewise. Replace assert with error message.
558 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
561 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
562 the rhs expression is neither an elemental nor a conversion
566 * trans-array.c (is_pointer_array): Remove unconditional return
567 of false for -fopenmp.
569 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
573 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
576 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
579 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
581 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
584 * resolve.c (resolve_charlen): Check the type of cl->length
587 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
590 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
592 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
595 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
596 LHS type when assigning.
598 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
601 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
603 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
605 * match.c (gfc_match_allocate): Check for NULL pointer.
607 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
609 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
611 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
614 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
615 an initializer, convert the kind parameters and add to the
616 component if the instance.
617 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
618 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
619 for parameterized arrays. Clean up typos in comments. Convert
620 parameterized array initializers and copy into the array.
621 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
623 *trans-stmt.c (trans_associate_var): Deallocate associate vars
624 as necessary, when they are PDT function results for example.
627 * trans-array.c (structure_alloc_comps): Only compare len parms
628 when they are declared explicitly.
630 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
633 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
636 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
640 * array.c (got_charlen): Use gfc_charlen_int_kind.
641 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
643 (find_intrinsic_vtab): Likewise.
644 * decl.c (match_char_length): Use gfc_charlen_int_kind.
645 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
646 (gfc_match_implicit): Use gfc_charlen_int_kind.
647 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
648 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
649 * expr.c (gfc_get_character_expr): Length parameter of type
651 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
652 (gfc_extract_hwi): New function.
653 (simplify_const_ref): Make string_len of type gfc_charlen_t.
654 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
655 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
656 * gfortran.h (gfc_mpz_get_hwi): New prototype.
657 (gfc_mpz_set_hwi): Likewise.
658 (gfc_charlen_t): New typedef.
659 (gfc_expr): Use gfc_charlen_t for character lengths.
660 (gfc_size_kind): New extern variable.
661 (gfc_extract_hwi): New prototype.
662 (gfc_get_character_expr): Use gfc_charlen_t for character length.
663 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
664 * gfortran.texi: Update description of hidden string length argument.
665 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
666 (gfc_resolve_char_achar): Likewise.
667 (gfc_resolve_repeat): Pass string length directly without
668 temporary, use gfc_charlen_int_kind.
669 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
670 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
671 * misc.c (gfc_mpz_get_hwi): New function.
672 (gfc_mpz_set_hwi): New function.
673 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
674 (parse_integer): Don't complain about large integers.
675 (write_atom): Use HOST_WIDE_INT for integers.
676 (mio_integer): Handle integer type mismatch.
677 (mio_hwi): New function.
678 (mio_intrinsic_op): Use HOST_WIDE_INT.
679 (mio_array_ref): Likewise.
680 (mio_expr): Likewise.
681 * primary.c (match_substring): Use gfc_charlen_int_kind.
682 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
683 (resolve_character_operator): Likewise.
684 (resolve_assoc_var): Likewise.
685 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
686 (resolve_charlen): Use mpz_sgn to determine sign.
687 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
689 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
690 * target-memory.c (size_character): Length argument of type
692 (gfc_encode_character): Likewise.
693 (gfc_interpret_character): Use gfc_charlen_t.
694 * target-memory.h (gfc_encode_character): Modify prototype.
695 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
696 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
697 (trans_array_constructor): Use existing type.
698 (get_array_charlen): Likewise.
699 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
700 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
701 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
702 (add_argument_checking): Likewise.
703 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
704 gfc_charlen_type_node.
705 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
706 4, fold_convert to correct type.
707 (gfc_conv_class_to_class): Build const of type size_type_node for
709 (gfc_copy_class_to_class): Likewise.
710 (gfc_conv_string_length): Use same type in expression.
711 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
712 (gfc_conv_string_tmp): Make sure len is of the right type.
713 (gfc_conv_concat_op): Use same type in expression.
714 (gfc_conv_procedure_call): Likewise.
715 (fill_with_spaces): Comment out memset() block due to spurious
716 -Wstringop-overflow warnings.
717 (gfc_trans_string_copy): Use gfc_charlen_type_node.
718 (alloc_scalar_allocatable_for_subcomponent_assignment):
719 fold_convert to right type.
720 (gfc_trans_subcomponent_assign): Likewise.
721 (trans_class_vptr_len_assignment): Build const of correct type.
722 (gfc_trans_pointer_assignment): Likewise.
723 (alloc_scalar_allocatable_for_assignment): fold_convert to right
725 (trans_class_assignment): Build const of correct type.
726 * trans-intrinsic.c (gfc_conv_associated): Likewise.
727 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
728 * trans-io.c (gfc_build_io_library_fndecls): Use
729 gfc_charlen_type_node for character lengths.
730 (set_string): Convert to right type in assignment.
731 * trans-stmt.c (gfc_trans_label_assign): Build const of
732 gfc_charlen_type_node.
733 (trans_associate_var): Likewise.
734 (gfc_trans_character_select): Likewise.
735 (gfc_trans_allocate): Likewise, don't typecast strlen result.
736 (gfc_trans_deallocate): Don't typecast strlen result.
737 * trans-types.c (gfc_size_kind): New variable.
738 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
740 * trans-types.h: Fix comment.
742 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
746 * check.c (gfc_check_eoshift): Check for string length and
747 for conformance of boundary.
748 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
749 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
750 * simplify.c (gfc_simplify_eoshift): New function.
752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
753 Alan Hayward <alan.hayward@arm.com>
754 David Sherwood <david.sherwood@arm.com>
756 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
759 Alan Hayward <alan.hayward@arm.com>
760 David Sherwood <david.sherwood@arm.com>
762 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
764 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
767 * check.c (gfc_check_eoshift): Error for missing boundary if array
768 is not one of the standard types.
770 2018-01-03 Jakub Jelinek <jakub@redhat.com>
772 Update copyright years.
774 * gfortranspec.c (lang_specific_driver): Update copyright notice
776 * gfc-internals.texi: Bump @copying's copyright year.
777 * gfortran.texi: Ditto.
778 * intrinsic.texi: Ditto.
779 * invoke.texi: Ditto.
781 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
784 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
785 gfc_simplify_minloc to maxloc and minloc, respectively.
786 * intrinsic.h: Add prototypes for gfc_simplify_minloc
787 and gfc_simplify_maxloc.
788 * simplify.c (min_max_chose): Adjust prototype. Modify function
789 to have a return value which indicates if the extremum was found.
790 (is_constant_array_expr): Fix typo in comment.
791 (simplify_minmaxloc_to_scalar): New function.
792 (simplify_minmaxloc_nodim): New function.
793 (new_array): New function.
794 (simplify_minmaxloc_to_array): New function.
795 (gfc_simplify_minmaxloc): New function.
796 (simplify_minloc): New function.
797 (simplify_maxloc): New function.
799 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
803 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
806 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
809 * resolve.c (resolve_fl_derived0): Add caf_token fields for
810 allocatable and pointer scalars, when -fcoarray selected.
811 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
812 field as well as the backend_decl.
813 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
814 derived types that are not vtypes. Components with caf_token
815 attribute are pvoid types. For a component requiring it, find
816 the caf_token field and have the component token field point to
820 *trans-types.c (gfc_get_array_descriptor_base): Add the token
821 field to the descriptor even when codimen not set.
823 Copyright (C) 2018 Free Software Foundation, Inc.
825 Copying and distribution of this file, with or without modification,
826 are permitted in any medium without royalty provided the copyright
827 notice and this notice are preserved.