1 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
3 * gfortran.texi: Update Coarray API description.
4 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
5 character lengths, int for exit codes.
6 (generate_coarray_sym_init): Use size_t for character length.
7 * trans-intrinsic.c (conv_co_collective): Likewise.
8 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
9 (gfc_trans_event_post_wait): Likewise.
10 (gfc_trans_sync): Likewise.
11 (gfc_trans_stop): Use size_t for character lengths, int for exit
14 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
18 * primary.c (gfc_convert_to_structure_constructor):
19 For a constant string constructor, make sure the length
22 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
26 * resolve.c (resolve_assoc_var): Rearrange the logic for the
27 determination of the character length of associate names. If
28 the associate name is missing a length expression or the length
29 expression is not a constant and the target is not a variable,
30 make the associate name allocatable and deferred length.
31 * trans-decl.c (gfc_get_symbol_decl): Null the character length
32 backend_decl for deferred length associate names that are not
33 variables. Set 'length' to gfc_index_zero_node for character
34 associate names, whose character length is a PARM_DECL.
36 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
39 * frontend-passes.c (traverse_io_block): Remove workaround for
42 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
44 * gfortran.texi: Document additional src/dst_type. Fix some typos.
45 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
46 argument of _caf_*_by_ref () with * e { get, send, sendget }.
47 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
48 data referenced when generating a call to caf_get_by_ref ().
49 (conv_caf_send): Same but for caf_send_by_ref () and
50 caf_sendget_by_ref ().
52 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
55 * io.c (check_format): Allow FMT_COLON.
57 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
60 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
61 the typenode in the case of deferred length characters.
63 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
66 * frontend-passes (scalarized_expr): If the expression
67 is an assumed size array, leave in the last reference
68 and pass AR_SECTION instead of AR_FULL to gfc_resolve
69 in order to avoid an error.
71 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
74 * resolve.c (resolve_assoc_var): If a non-constant target expr.
75 has no string length expression, make the associate variable
76 into a deferred length, allocatable symbol.
77 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
79 * trans-stmt.c (trans_associate_var): Null and free scalar
80 associate names that are allocatable. After assignment, remove
81 the allocatable attribute to prevent reallocation.
83 2018-02-16 Jakub Jelinek <jakub@redhat.com>
86 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
87 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
89 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
92 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
94 2018-02-15 Janus Weil <janus@gcc.gnu.org>
97 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
100 2018-02-14 Janus Weil <janus@gcc.gnu.org>
103 * match.c (gfc_match_select_type): Fix check for selector in
104 SELECT TYPE statement.
106 2018-02-13 Janus Weil <janus@gcc.gnu.org>
109 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
111 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
112 Janne Blomqvist <jb@gcc.gnu.org>
114 * module.c (dump_module): Use lbasename to ensure that module
115 files are reproducible.
117 2018-02-12 Janus Weil <janus@gcc.gnu.org>
120 * resolve.c (resolve_component): Fix checks of passed argument in
121 procedure-pointer components.
123 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
126 * resolve.c (resolve_formal_arglist): Update error message.
128 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
130 * gfortran.texi: Fix typos in documentation of caf_register ().
131 * trans-array.c (structure_alloc_comps): Only register a component of
132 a derived typed corray, not of an ultimate component coarray.
134 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
138 * interface.c (compare_actual_formal): Add in_statement_function
139 bool parameter. Skip check of INTENT attribute for statement
140 functions. Arguments to a statement function cannot be optional,
141 issue error for missing argument.
142 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
143 in_statement_function.
145 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
148 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
149 flag. If the is a vector subscript or the expression is not a
150 variable, make the descriptor one-based.
152 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
156 * trans-array.c (gfc_array_init_size): Revert the change made
157 in revision 257356 setting the dtype.
158 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
159 Call gfc_get_dtype_rank_type every time.
162 * trans-array.c (gfc_conv_expr_descriptor): If the source array
163 is a descriptor type, use its offset, removing the condition
164 that is be a class expression.
166 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
169 * match.c (gfc_match_deallocate): Check for NULL pointer.
171 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
174 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
175 (gfc_conv_intrinsic_function): Call it.
177 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
180 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
181 try to resolve it. While here return early if possible.
183 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
186 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
187 'length' if the symbol charlen backend_decl is an indirect ref.
189 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
193 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
194 use gfc_get_dtype_rank_type.
196 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
200 * resolve.c (resolve_assoc_var): Generate an error if
201 target length unknown.
203 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
206 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
207 to runtime, print a warning message.
209 2018-01-31 Jakub Jelinek <jakub@redhat.com>
212 * openmp.c (gfc_match_omp_clauses): If all the linear
213 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
214 nor set *head = NULL. Formatting fixes.
216 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
219 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
220 an address expression passed to an assumed rank dummy, convert
221 to an indirect reference.
223 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
225 * dump-parse-tree.c (write_proc): Use sym_name (which may
226 be sym->binding_label) instead of sym->name.
228 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
230 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
233 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
236 * trans-expr.c (fill_with_spaces): Use memset instead of
238 (gfc_trans_string_copy): Improve opportunity to use builtins with
241 2018-01-30 Jakub Jelinek <jakub@redhat.com>
244 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
245 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
247 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
250 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
253 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
256 * frontend-passes (matmul_to_var_expr): Return early if
258 (inline_matmul_assign): Likewise.
260 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
263 * resolve.c (resolve_component): Ensure BIND(C) character
264 components have length one.
265 (resolve_symbol): Likewise for variables.
267 2018-01-27 Jakub Jelinek <jakub@redhat.com>
270 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
273 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
274 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
275 Soren Rasmussen <s.c.rasmussen@gmail.com>
277 Partial support for Fortran 2018 teams features.
279 * array.c (gfc_match_array_ref): add team attribute in coarray
281 * check.c (gfc_check_get_team, gfc_check_team_number): add new
282 functions for get_team and team_number.
283 * dump-parse-tree.c (show_code_node): add new statements: form team,
284 change team, end team, and sync team.
285 * expr.c (gfc_find_team_co): add new function.
286 * gfortran.h: add new statements.
287 * intrinsic.c (add_functions): add get_team and team_number functions.
288 * intrinsic.h: add get_team and team_number prototypes for check,
289 simplify, and resolve.
290 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
292 * iso-fortran-env.def: add the team_type derived type.
293 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
294 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
295 add change team, end team, form team, sync team match and functions.
296 * match.h: add new prototypes for change team, end team, form team,
298 * parse.c (decode_statement): add cases for change team, end team,
299 form team, and sync team.
300 * resolve.c: add cases for exec form team, change team, end team, and
302 * simplify.c (gfc_simplify_get_team): add new function for get team.
303 * st.c (gfc_free_statement): add cases exec for change team, end team,
304 form team, sync team.
305 * trans-decl.c (gfor_fndecl_caf_form_team)
306 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
307 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
308 (gfor_fndecl_caf_team_number): add functions and definitions.
309 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
310 new function and team_type argument support.
311 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
312 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
313 * trans-stmt.h: add new prototypes.
314 * trans-types.c (gfc_get_derived_type): check condition for team_type.
315 * trans.c (trans_code): new exec cases for form team, change team, end
317 * trans.h: add new prototypes.
319 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
322 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
323 or .false. The summation does the correct type conversion.
324 (gfc_simplify_dot_product): Special case zero-sized arrays.
326 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
329 * array.c (gfc_match_array_ref): If standard earlier than F2008
330 it is an error if the reference dimension is greater than 7.
331 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
332 dtype masks and shifts accordingly.
333 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
334 type node to check the field.
335 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
336 (duplicate_allocatable_coarray): Access the rank field of the
337 dtype descriptor rather than the dtype itself.
338 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
339 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
341 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
342 get_scalar_to_descriptor_type if the actual expression is a
344 (gfc_trans_structure_assign): Assign the rank directly to the
346 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
347 to default integer kind.
348 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
349 'elem_len' field of the dtype.
350 * trans-io.c (gfc_build_io_library_fndecls): Replace
351 gfc_int4_type_node with dtype_type_node where necessary.
352 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
354 * trans-types.c : Provide 'get_dtype_type_node' to acces the
355 dtype_type_node and, if necessary, build it.
356 The maximum size of an array element is now determined by the
357 maximum value of size_t.
358 Update the description of the array descriptor, including the
359 type def for the dtype_type.
360 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
361 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
362 (gfc_get_array_descriptor_base): Change the type of the dtype
363 field to dtype_type_node.
364 (gfc_get_array_descr_info): Get the offset to the rank field of
366 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
367 * trans.h : Define the indices of the dtype fields.
369 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
372 * decl.c (gfc_match_derived_decl): If eos not matched, recover
373 and emit error about garbage after declaration.
375 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
378 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
381 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
385 * arith.c (gfc_arith_concat): Use size_t for string length.
386 (gfc_compare_string): Likewise.
387 (gfc_compare_with_Cstring): Likewise.
388 * array.c (gfc_resolve_character_array_constructor): Use
389 HOST_WIDE_INT, gfc_mpz_get_hwi.
390 * check.c (gfc_check_fe_runtime_error): Use size_t.
391 * data.c (create_character_initializer): Use HOST_WIDE_INT,
393 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
394 (add_init_expr_to_sym): Use HOST_WIDE_INT.
395 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
397 (gfc_apply_init): Likewise.
398 * match.h (gfc_set_constant_character_len): Update prototype.
399 * primary.c (match_string_constant): Use size_t.
400 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
402 * simplify.c (init_result_expr): Likewise.
403 (gfc_simplify_len_trim): Use size_t.
404 * target-memory.c (gfc_encode_character): Use size_t.
405 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
406 (interpret_array): Use size_t.
407 (gfc_interpret_character): Likewise.
408 * target-memory.h (gfc_encode_character): Update prototype.
409 (gfc_interpret_character): Likewise.
410 (gfc_target_interpret_expr): Likewise.
411 * trans-const.c (gfc_build_string_const): Use size_t for length
413 (gfc_build_wide_string_const): Likewise.
414 * trans-const.h (gfc_build_string_const): Likewise.
415 (gfc_build_wide_string_const): Likewise.
417 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
420 * simplify.c (gfc_simplify_matmul): Set return type correctly.
422 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
425 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
427 2018-01-17 Harald Anlauf <anlauf@gmx.de>
430 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
432 2018-01-17 Harald Anlauf <anlauf@gmx.de>
435 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
437 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
440 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
441 from symbol marked unlimited polymorphic.
442 * resolve.c (resolve_structure_cons): Likewise.
443 * misc.c (gfc_typename): Don't dereference derived->components
446 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
449 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
450 (gfc_logical_4_kind): New macro
451 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
452 (gfc_simplify_maxloc): Likewise.
453 (gfc_resolve_maxloc): Likewise.
454 (gfc_resolve_minloc): Likewise.
455 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
456 argument; also raise error if it is used (for now). Add it
458 * intrinsic.c (add_sym_4ml): Rename to
459 (add_sym_5ml), adjust for extra argument.
460 (add_functions): Add "back" constant. Adjust maxloc and minloc
462 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
463 not of gfc_logical_4_kind, convert.
464 (gfc_resolve_minloc): Likewise.
465 * simplify.c (gfc_simplify_minloc): Add back argument.
466 (gfc_simplify_maxloc): Likewise.
467 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
468 argument to %VAL to ensure passing by value.
469 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
470 also for library calls.
472 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
475 * resolve.c (resolve_transfer): Delete code looking for 'DT'
476 format specifiers in format strings. Set formatted to true if a
477 format string or format label is present.
478 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
481 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
484 * dump-parse-tree.c (get_c_type_name): Remove extra line.
485 Change for loop to use declaration in for loop. Handle BT_LOGICAL
487 (write_decl): Add where argument. Fix indentation. Replace
488 assert with error message. Add typename to warning
490 (write_type): Adjust locus to call of write_decl.
491 (write_variable): Likewise.
492 (write_proc): Likewise. Replace assert with error message.
494 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
497 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
498 the rhs expression is neither an elemental nor a conversion
502 * trans-array.c (is_pointer_array): Remove unconditional return
503 of false for -fopenmp.
505 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
509 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
512 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
515 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
517 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
520 * resolve.c (resolve_charlen): Check the type of cl->length
523 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
526 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
528 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
531 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
532 LHS type when assigning.
534 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
537 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
539 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
541 * match.c (gfc_match_allocate): Check for NULL pointer.
543 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
545 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
547 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
550 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
551 an initializer, convert the kind parameters and add to the
552 component if the instance.
553 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
554 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
555 for parameterized arrays. Clean up typos in comments. Convert
556 parameterized array initializers and copy into the array.
557 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
559 *trans-stmt.c (trans_associate_var): Deallocate associate vars
560 as necessary, when they are PDT function results for example.
563 * trans-array.c (structure_alloc_comps): Only compare len parms
564 when they are declared explicitly.
566 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
569 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
572 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
576 * array.c (got_charlen): Use gfc_charlen_int_kind.
577 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
579 (find_intrinsic_vtab): Likewise.
580 * decl.c (match_char_length): Use gfc_charlen_int_kind.
581 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
582 (gfc_match_implicit): Use gfc_charlen_int_kind.
583 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
584 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
585 * expr.c (gfc_get_character_expr): Length parameter of type
587 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
588 (gfc_extract_hwi): New function.
589 (simplify_const_ref): Make string_len of type gfc_charlen_t.
590 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
591 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
592 * gfortran.h (gfc_mpz_get_hwi): New prototype.
593 (gfc_mpz_set_hwi): Likewise.
594 (gfc_charlen_t): New typedef.
595 (gfc_expr): Use gfc_charlen_t for character lengths.
596 (gfc_size_kind): New extern variable.
597 (gfc_extract_hwi): New prototype.
598 (gfc_get_character_expr): Use gfc_charlen_t for character length.
599 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
600 * gfortran.texi: Update description of hidden string length argument.
601 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
602 (gfc_resolve_char_achar): Likewise.
603 (gfc_resolve_repeat): Pass string length directly without
604 temporary, use gfc_charlen_int_kind.
605 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
606 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
607 * misc.c (gfc_mpz_get_hwi): New function.
608 (gfc_mpz_set_hwi): New function.
609 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
610 (parse_integer): Don't complain about large integers.
611 (write_atom): Use HOST_WIDE_INT for integers.
612 (mio_integer): Handle integer type mismatch.
613 (mio_hwi): New function.
614 (mio_intrinsic_op): Use HOST_WIDE_INT.
615 (mio_array_ref): Likewise.
616 (mio_expr): Likewise.
617 * primary.c (match_substring): Use gfc_charlen_int_kind.
618 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
619 (resolve_character_operator): Likewise.
620 (resolve_assoc_var): Likewise.
621 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
622 (resolve_charlen): Use mpz_sgn to determine sign.
623 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
625 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
626 * target-memory.c (size_character): Length argument of type
628 (gfc_encode_character): Likewise.
629 (gfc_interpret_character): Use gfc_charlen_t.
630 * target-memory.h (gfc_encode_character): Modify prototype.
631 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
632 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
633 (trans_array_constructor): Use existing type.
634 (get_array_charlen): Likewise.
635 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
636 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
637 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
638 (add_argument_checking): Likewise.
639 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
640 gfc_charlen_type_node.
641 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
642 4, fold_convert to correct type.
643 (gfc_conv_class_to_class): Build const of type size_type_node for
645 (gfc_copy_class_to_class): Likewise.
646 (gfc_conv_string_length): Use same type in expression.
647 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
648 (gfc_conv_string_tmp): Make sure len is of the right type.
649 (gfc_conv_concat_op): Use same type in expression.
650 (gfc_conv_procedure_call): Likewise.
651 (fill_with_spaces): Comment out memset() block due to spurious
652 -Wstringop-overflow warnings.
653 (gfc_trans_string_copy): Use gfc_charlen_type_node.
654 (alloc_scalar_allocatable_for_subcomponent_assignment):
655 fold_convert to right type.
656 (gfc_trans_subcomponent_assign): Likewise.
657 (trans_class_vptr_len_assignment): Build const of correct type.
658 (gfc_trans_pointer_assignment): Likewise.
659 (alloc_scalar_allocatable_for_assignment): fold_convert to right
661 (trans_class_assignment): Build const of correct type.
662 * trans-intrinsic.c (gfc_conv_associated): Likewise.
663 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
664 * trans-io.c (gfc_build_io_library_fndecls): Use
665 gfc_charlen_type_node for character lengths.
666 (set_string): Convert to right type in assignment.
667 * trans-stmt.c (gfc_trans_label_assign): Build const of
668 gfc_charlen_type_node.
669 (trans_associate_var): Likewise.
670 (gfc_trans_character_select): Likewise.
671 (gfc_trans_allocate): Likewise, don't typecast strlen result.
672 (gfc_trans_deallocate): Don't typecast strlen result.
673 * trans-types.c (gfc_size_kind): New variable.
674 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
676 * trans-types.h: Fix comment.
678 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
682 * check.c (gfc_check_eoshift): Check for string length and
683 for conformance of boundary.
684 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
685 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
686 * simplify.c (gfc_simplify_eoshift): New function.
688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
689 Alan Hayward <alan.hayward@arm.com>
690 David Sherwood <david.sherwood@arm.com>
692 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
695 Alan Hayward <alan.hayward@arm.com>
696 David Sherwood <david.sherwood@arm.com>
698 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
700 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
703 * check.c (gfc_check_eoshift): Error for missing boundary if array
704 is not one of the standard types.
706 2018-01-03 Jakub Jelinek <jakub@redhat.com>
708 Update copyright years.
710 * gfortranspec.c (lang_specific_driver): Update copyright notice
712 * gfc-internals.texi: Bump @copying's copyright year.
713 * gfortran.texi: Ditto.
714 * intrinsic.texi: Ditto.
715 * invoke.texi: Ditto.
717 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
720 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
721 gfc_simplify_minloc to maxloc and minloc, respectively.
722 * intrinsic.h: Add prototypes for gfc_simplify_minloc
723 and gfc_simplify_maxloc.
724 * simplify.c (min_max_chose): Adjust prototype. Modify function
725 to have a return value which indicates if the extremum was found.
726 (is_constant_array_expr): Fix typo in comment.
727 (simplify_minmaxloc_to_scalar): New function.
728 (simplify_minmaxloc_nodim): New function.
729 (new_array): New function.
730 (simplify_minmaxloc_to_array): New function.
731 (gfc_simplify_minmaxloc): New function.
732 (simplify_minloc): New function.
733 (simplify_maxloc): New function.
735 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
739 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
742 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
745 * resolve.c (resolve_fl_derived0): Add caf_token fields for
746 allocatable and pointer scalars, when -fcoarray selected.
747 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
748 field as well as the backend_decl.
749 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
750 derived types that are not vtypes. Components with caf_token
751 attribute are pvoid types. For a component requiring it, find
752 the caf_token field and have the component token field point to
756 *trans-types.c (gfc_get_array_descriptor_base): Add the token
757 field to the descriptor even when codimen not set.
759 Copyright (C) 2018 Free Software Foundation, Inc.
761 Copying and distribution of this file, with or without modification,
762 are permitted in any medium without royalty provided the copyright
763 notice and this notice are preserved.