1 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
4 * arith.c (check_result, eval_intrinsic): If result overflows, pass
5 the expression up the chain instead of a NULL pointer.
7 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
11 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
13 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
17 * expr.c (simplify_parameter_variable): If p is a size zero array
18 and not an ARRAY_EXPR insert an empty array constructor and
20 * gfortran.h: Add prototype for gfc_is_size_zero_array.
21 * simplify.c (is_size_zero_array): Make non-static and rename into
22 (gfc_is_size_zero_array): Check for parameter arrays of zero
23 size by comparing shape and absence of constructor.
24 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
26 (gfc_simplify_count): Likewise.
27 (gfc_simplify_iall): Likewise.
28 (gfc_simplify_iany): Likewise.
29 (gfc_simplify_iparity): Likewise.
30 (gfc_simplify_minval): Likewise.
31 (gfc_simplify_maxval): Likewise.
32 (gfc_simplify_product): Likewise.
33 (gfc_simplify_sum): Likewise.
35 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
38 * primary.c (match_sym_complex_part): Give the matcher for an implied
39 do-loop a chance to run.
41 2018-03-03 Harald Anlauf <anlauf@gmx.de>
44 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
45 dereference NULL pointer.
47 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
50 * simplify.c (is_size_zero_array): New function to check for size
52 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
53 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
54 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
55 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
56 requirements from F2018.
58 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
61 * simplify.c (gfc_simplify_transfer): Resolve mold.
63 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
66 * resolve.c (build_loc_call): Change symtree name from 'loc' to
69 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
72 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
73 components are caf tokens.
74 (gfc_target_interpret_expr): Treat BT_VOID expressions as
77 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
80 * class.c (class_array_ref_detected): Remove the condition that
81 there be no reference after the array reference.
82 (find_intrinsic_vtab): Remove excess whitespace.
83 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
84 as 'base and call build_class_array_ref earlier.
86 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
89 * trans-stmt.c (trans_associate_var): Make sure that the se
90 expression is a pointer type before converting it to the symbol
93 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
96 * decl.c (variable_decl): Check that an explicit-shape-array with
97 nonconstant bounds is allowed.
99 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
102 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
103 has a pre block, add it to the expression pre block.
105 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
108 * gfortran.h (gfc_integer_4_kind): Define.
109 * resolve.c (resolve_select_type): Make sure that the
110 kind of c->high is gfc_integer_4_kind.
112 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
115 * decl.c (gfc_match_data): Check for invalid substring in
118 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
120 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
122 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
125 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
127 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
130 * interface.c (compare_actual_formal): Issue error if keyword is
131 used in a statement function.
133 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
136 * trans-io.c (set_parameter_value_inquire): Adjust range check of
137 negative unit values for kind=8 units to the kind=4 negative limit.
139 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
142 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
143 accessing its components.
145 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
148 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
149 before accessing its components.
151 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
154 * trans-const.c : Clean up some whitespace issues.
155 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
156 derived type has a kind value of zero, set it to the default
159 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
162 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
163 argument to stop and error stop decls.
164 * trans-stmt.c (gfc_trans_stop): Add false value to argument
167 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
171 * trans-decl.c (gfc_build_builtin_function_decls): Pass
172 gfc_int8_type node to pause_numeric, size_type_node to
174 * trans-stmt.c (gfc_trans_pause): Likewise.
176 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
178 * gfortran.texi: Update Coarray API description.
179 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
180 character lengths, int for exit codes.
181 (generate_coarray_sym_init): Use size_t for character length.
182 * trans-intrinsic.c (conv_co_collective): Likewise.
183 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
184 (gfc_trans_event_post_wait): Likewise.
185 (gfc_trans_sync): Likewise.
186 (gfc_trans_stop): Use size_t for character lengths, int for exit
189 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
193 * primary.c (gfc_convert_to_structure_constructor):
194 For a constant string constructor, make sure the length
197 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
201 * resolve.c (resolve_assoc_var): Rearrange the logic for the
202 determination of the character length of associate names. If
203 the associate name is missing a length expression or the length
204 expression is not a constant and the target is not a variable,
205 make the associate name allocatable and deferred length.
206 * trans-decl.c (gfc_get_symbol_decl): Null the character length
207 backend_decl for deferred length associate names that are not
208 variables. Set 'length' to gfc_index_zero_node for character
209 associate names, whose character length is a PARM_DECL.
211 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
214 * frontend-passes.c (traverse_io_block): Remove workaround for
217 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
219 * gfortran.texi: Document additional src/dst_type. Fix some typos.
220 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
221 argument of _caf_*_by_ref () with * e { get, send, sendget }.
222 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
223 data referenced when generating a call to caf_get_by_ref ().
224 (conv_caf_send): Same but for caf_send_by_ref () and
225 caf_sendget_by_ref ().
227 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
230 * io.c (check_format): Allow FMT_COLON.
232 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
235 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
236 the typenode in the case of deferred length characters.
238 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
241 * frontend-passes (scalarized_expr): If the expression
242 is an assumed size array, leave in the last reference
243 and pass AR_SECTION instead of AR_FULL to gfc_resolve
244 in order to avoid an error.
246 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
249 * resolve.c (resolve_assoc_var): If a non-constant target expr.
250 has no string length expression, make the associate variable
251 into a deferred length, allocatable symbol.
252 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
254 * trans-stmt.c (trans_associate_var): Null and free scalar
255 associate names that are allocatable. After assignment, remove
256 the allocatable attribute to prevent reallocation.
258 2018-02-16 Jakub Jelinek <jakub@redhat.com>
261 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
262 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
264 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
267 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
269 2018-02-15 Janus Weil <janus@gcc.gnu.org>
272 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
275 2018-02-14 Janus Weil <janus@gcc.gnu.org>
278 * match.c (gfc_match_select_type): Fix check for selector in
279 SELECT TYPE statement.
281 2018-02-13 Janus Weil <janus@gcc.gnu.org>
284 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
286 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
287 Janne Blomqvist <jb@gcc.gnu.org>
289 * module.c (dump_module): Use lbasename to ensure that module
290 files are reproducible.
292 2018-02-12 Janus Weil <janus@gcc.gnu.org>
295 * resolve.c (resolve_component): Fix checks of passed argument in
296 procedure-pointer components.
298 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
301 * resolve.c (resolve_formal_arglist): Update error message.
303 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
305 * gfortran.texi: Fix typos in documentation of caf_register ().
306 * trans-array.c (structure_alloc_comps): Only register a component of
307 a derived typed corray, not of an ultimate component coarray.
309 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
313 * interface.c (compare_actual_formal): Add in_statement_function
314 bool parameter. Skip check of INTENT attribute for statement
315 functions. Arguments to a statement function cannot be optional,
316 issue error for missing argument.
317 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
318 in_statement_function.
320 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
323 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
324 flag. If the is a vector subscript or the expression is not a
325 variable, make the descriptor one-based.
327 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
331 * trans-array.c (gfc_array_init_size): Revert the change made
332 in revision 257356 setting the dtype.
333 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
334 Call gfc_get_dtype_rank_type every time.
337 * trans-array.c (gfc_conv_expr_descriptor): If the source array
338 is a descriptor type, use its offset, removing the condition
339 that is be a class expression.
341 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
344 * match.c (gfc_match_deallocate): Check for NULL pointer.
346 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
349 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
350 (gfc_conv_intrinsic_function): Call it.
352 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
355 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
356 try to resolve it. While here return early if possible.
358 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
361 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
362 'length' if the symbol charlen backend_decl is an indirect ref.
364 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
368 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
369 use gfc_get_dtype_rank_type.
371 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
375 * resolve.c (resolve_assoc_var): Generate an error if
376 target length unknown.
378 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
381 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
382 to runtime, print a warning message.
384 2018-01-31 Jakub Jelinek <jakub@redhat.com>
387 * openmp.c (gfc_match_omp_clauses): If all the linear
388 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
389 nor set *head = NULL. Formatting fixes.
391 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
394 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
395 an address expression passed to an assumed rank dummy, convert
396 to an indirect reference.
398 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
400 * dump-parse-tree.c (write_proc): Use sym_name (which may
401 be sym->binding_label) instead of sym->name.
403 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
405 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
408 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
411 * trans-expr.c (fill_with_spaces): Use memset instead of
413 (gfc_trans_string_copy): Improve opportunity to use builtins with
416 2018-01-30 Jakub Jelinek <jakub@redhat.com>
419 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
420 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
422 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
425 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
428 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
431 * frontend-passes (matmul_to_var_expr): Return early if
433 (inline_matmul_assign): Likewise.
435 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
438 * resolve.c (resolve_component): Ensure BIND(C) character
439 components have length one.
440 (resolve_symbol): Likewise for variables.
442 2018-01-27 Jakub Jelinek <jakub@redhat.com>
445 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
448 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
449 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
450 Soren Rasmussen <s.c.rasmussen@gmail.com>
452 Partial support for Fortran 2018 teams features.
454 * array.c (gfc_match_array_ref): add team attribute in coarray
456 * check.c (gfc_check_get_team, gfc_check_team_number): add new
457 functions for get_team and team_number.
458 * dump-parse-tree.c (show_code_node): add new statements: form team,
459 change team, end team, and sync team.
460 * expr.c (gfc_find_team_co): add new function.
461 * gfortran.h: add new statements.
462 * intrinsic.c (add_functions): add get_team and team_number functions.
463 * intrinsic.h: add get_team and team_number prototypes for check,
464 simplify, and resolve.
465 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
467 * iso-fortran-env.def: add the team_type derived type.
468 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
469 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
470 add change team, end team, form team, sync team match and functions.
471 * match.h: add new prototypes for change team, end team, form team,
473 * parse.c (decode_statement): add cases for change team, end team,
474 form team, and sync team.
475 * resolve.c: add cases for exec form team, change team, end team, and
477 * simplify.c (gfc_simplify_get_team): add new function for get team.
478 * st.c (gfc_free_statement): add cases exec for change team, end team,
479 form team, sync team.
480 * trans-decl.c (gfor_fndecl_caf_form_team)
481 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
482 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
483 (gfor_fndecl_caf_team_number): add functions and definitions.
484 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
485 new function and team_type argument support.
486 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
487 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
488 * trans-stmt.h: add new prototypes.
489 * trans-types.c (gfc_get_derived_type): check condition for team_type.
490 * trans.c (trans_code): new exec cases for form team, change team, end
492 * trans.h: add new prototypes.
494 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
497 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
498 or .false. The summation does the correct type conversion.
499 (gfc_simplify_dot_product): Special case zero-sized arrays.
501 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
504 * array.c (gfc_match_array_ref): If standard earlier than F2008
505 it is an error if the reference dimension is greater than 7.
506 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
507 dtype masks and shifts accordingly.
508 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
509 type node to check the field.
510 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
511 (duplicate_allocatable_coarray): Access the rank field of the
512 dtype descriptor rather than the dtype itself.
513 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
514 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
516 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
517 get_scalar_to_descriptor_type if the actual expression is a
519 (gfc_trans_structure_assign): Assign the rank directly to the
521 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
522 to default integer kind.
523 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
524 'elem_len' field of the dtype.
525 * trans-io.c (gfc_build_io_library_fndecls): Replace
526 gfc_int4_type_node with dtype_type_node where necessary.
527 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
529 * trans-types.c : Provide 'get_dtype_type_node' to acces the
530 dtype_type_node and, if necessary, build it.
531 The maximum size of an array element is now determined by the
532 maximum value of size_t.
533 Update the description of the array descriptor, including the
534 type def for the dtype_type.
535 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
536 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
537 (gfc_get_array_descriptor_base): Change the type of the dtype
538 field to dtype_type_node.
539 (gfc_get_array_descr_info): Get the offset to the rank field of
541 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
542 * trans.h : Define the indices of the dtype fields.
544 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
547 * decl.c (gfc_match_derived_decl): If eos not matched, recover
548 and emit error about garbage after declaration.
550 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
553 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
556 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
560 * arith.c (gfc_arith_concat): Use size_t for string length.
561 (gfc_compare_string): Likewise.
562 (gfc_compare_with_Cstring): Likewise.
563 * array.c (gfc_resolve_character_array_constructor): Use
564 HOST_WIDE_INT, gfc_mpz_get_hwi.
565 * check.c (gfc_check_fe_runtime_error): Use size_t.
566 * data.c (create_character_initializer): Use HOST_WIDE_INT,
568 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
569 (add_init_expr_to_sym): Use HOST_WIDE_INT.
570 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
572 (gfc_apply_init): Likewise.
573 * match.h (gfc_set_constant_character_len): Update prototype.
574 * primary.c (match_string_constant): Use size_t.
575 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
577 * simplify.c (init_result_expr): Likewise.
578 (gfc_simplify_len_trim): Use size_t.
579 * target-memory.c (gfc_encode_character): Use size_t.
580 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
581 (interpret_array): Use size_t.
582 (gfc_interpret_character): Likewise.
583 * target-memory.h (gfc_encode_character): Update prototype.
584 (gfc_interpret_character): Likewise.
585 (gfc_target_interpret_expr): Likewise.
586 * trans-const.c (gfc_build_string_const): Use size_t for length
588 (gfc_build_wide_string_const): Likewise.
589 * trans-const.h (gfc_build_string_const): Likewise.
590 (gfc_build_wide_string_const): Likewise.
592 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
595 * simplify.c (gfc_simplify_matmul): Set return type correctly.
597 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
600 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
602 2018-01-17 Harald Anlauf <anlauf@gmx.de>
605 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
607 2018-01-17 Harald Anlauf <anlauf@gmx.de>
610 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
612 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
615 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
616 from symbol marked unlimited polymorphic.
617 * resolve.c (resolve_structure_cons): Likewise.
618 * misc.c (gfc_typename): Don't dereference derived->components
621 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
624 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
625 (gfc_logical_4_kind): New macro
626 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
627 (gfc_simplify_maxloc): Likewise.
628 (gfc_resolve_maxloc): Likewise.
629 (gfc_resolve_minloc): Likewise.
630 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
631 argument; also raise error if it is used (for now). Add it
633 * intrinsic.c (add_sym_4ml): Rename to
634 (add_sym_5ml), adjust for extra argument.
635 (add_functions): Add "back" constant. Adjust maxloc and minloc
637 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
638 not of gfc_logical_4_kind, convert.
639 (gfc_resolve_minloc): Likewise.
640 * simplify.c (gfc_simplify_minloc): Add back argument.
641 (gfc_simplify_maxloc): Likewise.
642 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
643 argument to %VAL to ensure passing by value.
644 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
645 also for library calls.
647 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
650 * resolve.c (resolve_transfer): Delete code looking for 'DT'
651 format specifiers in format strings. Set formatted to true if a
652 format string or format label is present.
653 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
656 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
659 * dump-parse-tree.c (get_c_type_name): Remove extra line.
660 Change for loop to use declaration in for loop. Handle BT_LOGICAL
662 (write_decl): Add where argument. Fix indentation. Replace
663 assert with error message. Add typename to warning
665 (write_type): Adjust locus to call of write_decl.
666 (write_variable): Likewise.
667 (write_proc): Likewise. Replace assert with error message.
669 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
672 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
673 the rhs expression is neither an elemental nor a conversion
677 * trans-array.c (is_pointer_array): Remove unconditional return
678 of false for -fopenmp.
680 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
684 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
687 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
690 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
692 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
695 * resolve.c (resolve_charlen): Check the type of cl->length
698 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
701 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
703 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
706 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
707 LHS type when assigning.
709 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
712 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
714 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
716 * match.c (gfc_match_allocate): Check for NULL pointer.
718 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
720 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
722 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
725 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
726 an initializer, convert the kind parameters and add to the
727 component if the instance.
728 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
729 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
730 for parameterized arrays. Clean up typos in comments. Convert
731 parameterized array initializers and copy into the array.
732 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
734 *trans-stmt.c (trans_associate_var): Deallocate associate vars
735 as necessary, when they are PDT function results for example.
738 * trans-array.c (structure_alloc_comps): Only compare len parms
739 when they are declared explicitly.
741 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
744 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
747 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
751 * array.c (got_charlen): Use gfc_charlen_int_kind.
752 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
754 (find_intrinsic_vtab): Likewise.
755 * decl.c (match_char_length): Use gfc_charlen_int_kind.
756 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
757 (gfc_match_implicit): Use gfc_charlen_int_kind.
758 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
759 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
760 * expr.c (gfc_get_character_expr): Length parameter of type
762 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
763 (gfc_extract_hwi): New function.
764 (simplify_const_ref): Make string_len of type gfc_charlen_t.
765 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
766 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
767 * gfortran.h (gfc_mpz_get_hwi): New prototype.
768 (gfc_mpz_set_hwi): Likewise.
769 (gfc_charlen_t): New typedef.
770 (gfc_expr): Use gfc_charlen_t for character lengths.
771 (gfc_size_kind): New extern variable.
772 (gfc_extract_hwi): New prototype.
773 (gfc_get_character_expr): Use gfc_charlen_t for character length.
774 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
775 * gfortran.texi: Update description of hidden string length argument.
776 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
777 (gfc_resolve_char_achar): Likewise.
778 (gfc_resolve_repeat): Pass string length directly without
779 temporary, use gfc_charlen_int_kind.
780 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
781 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
782 * misc.c (gfc_mpz_get_hwi): New function.
783 (gfc_mpz_set_hwi): New function.
784 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
785 (parse_integer): Don't complain about large integers.
786 (write_atom): Use HOST_WIDE_INT for integers.
787 (mio_integer): Handle integer type mismatch.
788 (mio_hwi): New function.
789 (mio_intrinsic_op): Use HOST_WIDE_INT.
790 (mio_array_ref): Likewise.
791 (mio_expr): Likewise.
792 * primary.c (match_substring): Use gfc_charlen_int_kind.
793 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
794 (resolve_character_operator): Likewise.
795 (resolve_assoc_var): Likewise.
796 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
797 (resolve_charlen): Use mpz_sgn to determine sign.
798 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
800 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
801 * target-memory.c (size_character): Length argument of type
803 (gfc_encode_character): Likewise.
804 (gfc_interpret_character): Use gfc_charlen_t.
805 * target-memory.h (gfc_encode_character): Modify prototype.
806 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
807 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
808 (trans_array_constructor): Use existing type.
809 (get_array_charlen): Likewise.
810 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
811 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
812 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
813 (add_argument_checking): Likewise.
814 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
815 gfc_charlen_type_node.
816 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
817 4, fold_convert to correct type.
818 (gfc_conv_class_to_class): Build const of type size_type_node for
820 (gfc_copy_class_to_class): Likewise.
821 (gfc_conv_string_length): Use same type in expression.
822 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
823 (gfc_conv_string_tmp): Make sure len is of the right type.
824 (gfc_conv_concat_op): Use same type in expression.
825 (gfc_conv_procedure_call): Likewise.
826 (fill_with_spaces): Comment out memset() block due to spurious
827 -Wstringop-overflow warnings.
828 (gfc_trans_string_copy): Use gfc_charlen_type_node.
829 (alloc_scalar_allocatable_for_subcomponent_assignment):
830 fold_convert to right type.
831 (gfc_trans_subcomponent_assign): Likewise.
832 (trans_class_vptr_len_assignment): Build const of correct type.
833 (gfc_trans_pointer_assignment): Likewise.
834 (alloc_scalar_allocatable_for_assignment): fold_convert to right
836 (trans_class_assignment): Build const of correct type.
837 * trans-intrinsic.c (gfc_conv_associated): Likewise.
838 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
839 * trans-io.c (gfc_build_io_library_fndecls): Use
840 gfc_charlen_type_node for character lengths.
841 (set_string): Convert to right type in assignment.
842 * trans-stmt.c (gfc_trans_label_assign): Build const of
843 gfc_charlen_type_node.
844 (trans_associate_var): Likewise.
845 (gfc_trans_character_select): Likewise.
846 (gfc_trans_allocate): Likewise, don't typecast strlen result.
847 (gfc_trans_deallocate): Don't typecast strlen result.
848 * trans-types.c (gfc_size_kind): New variable.
849 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
851 * trans-types.h: Fix comment.
853 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
857 * check.c (gfc_check_eoshift): Check for string length and
858 for conformance of boundary.
859 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
860 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
861 * simplify.c (gfc_simplify_eoshift): New function.
863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
864 Alan Hayward <alan.hayward@arm.com>
865 David Sherwood <david.sherwood@arm.com>
867 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
870 Alan Hayward <alan.hayward@arm.com>
871 David Sherwood <david.sherwood@arm.com>
873 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
875 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
878 * check.c (gfc_check_eoshift): Error for missing boundary if array
879 is not one of the standard types.
881 2018-01-03 Jakub Jelinek <jakub@redhat.com>
883 Update copyright years.
885 * gfortranspec.c (lang_specific_driver): Update copyright notice
887 * gfc-internals.texi: Bump @copying's copyright year.
888 * gfortran.texi: Ditto.
889 * intrinsic.texi: Ditto.
890 * invoke.texi: Ditto.
892 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
895 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
896 gfc_simplify_minloc to maxloc and minloc, respectively.
897 * intrinsic.h: Add prototypes for gfc_simplify_minloc
898 and gfc_simplify_maxloc.
899 * simplify.c (min_max_chose): Adjust prototype. Modify function
900 to have a return value which indicates if the extremum was found.
901 (is_constant_array_expr): Fix typo in comment.
902 (simplify_minmaxloc_to_scalar): New function.
903 (simplify_minmaxloc_nodim): New function.
904 (new_array): New function.
905 (simplify_minmaxloc_to_array): New function.
906 (gfc_simplify_minmaxloc): New function.
907 (simplify_minloc): New function.
908 (simplify_maxloc): New function.
910 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
914 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
917 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
920 * resolve.c (resolve_fl_derived0): Add caf_token fields for
921 allocatable and pointer scalars, when -fcoarray selected.
922 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
923 field as well as the backend_decl.
924 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
925 derived types that are not vtypes. Components with caf_token
926 attribute are pvoid types. For a component requiring it, find
927 the caf_token field and have the component token field point to
931 *trans-types.c (gfc_get_array_descriptor_base): Add the token
932 field to the descriptor even when codimen not set.
934 Copyright (C) 2018 Free Software Foundation, Inc.
936 Copying and distribution of this file, with or without modification,
937 are permitted in any medium without royalty provided the copyright
938 notice and this notice are preserved.