1 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
5 * array.c (got_charlen): Use gfc_charlen_int_kind.
6 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
8 (find_intrinsic_vtab): Likewise.
9 * decl.c (match_char_length): Use gfc_charlen_int_kind.
10 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
11 (gfc_match_implicit): Use gfc_charlen_int_kind.
12 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
13 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
14 * expr.c (gfc_get_character_expr): Length parameter of type
16 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
17 (gfc_extract_hwi): New function.
18 (simplify_const_ref): Make string_len of type gfc_charlen_t.
19 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
20 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
21 * gfortran.h (gfc_mpz_get_hwi): New prototype.
22 (gfc_mpz_set_hwi): Likewise.
23 (gfc_charlen_t): New typedef.
24 (gfc_expr): Use gfc_charlen_t for character lengths.
25 (gfc_size_kind): New extern variable.
26 (gfc_extract_hwi): New prototype.
27 (gfc_get_character_expr): Use gfc_charlen_t for character length.
28 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
29 * gfortran.texi: Update description of hidden string length argument.
30 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
31 (gfc_resolve_char_achar): Likewise.
32 (gfc_resolve_repeat): Pass string length directly without
33 temporary, use gfc_charlen_int_kind.
34 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
35 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
36 * misc.c (gfc_mpz_get_hwi): New function.
37 (gfc_mpz_set_hwi): New function.
38 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
39 (parse_integer): Don't complain about large integers.
40 (write_atom): Use HOST_WIDE_INT for integers.
41 (mio_integer): Handle integer type mismatch.
42 (mio_hwi): New function.
43 (mio_intrinsic_op): Use HOST_WIDE_INT.
44 (mio_array_ref): Likewise.
46 * primary.c (match_substring): Use gfc_charlen_int_kind.
47 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
48 (resolve_character_operator): Likewise.
49 (resolve_assoc_var): Likewise.
50 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
51 (resolve_charlen): Use mpz_sgn to determine sign.
52 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
54 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
55 * target-memory.c (size_character): Length argument of type
57 (gfc_encode_character): Likewise.
58 (gfc_interpret_character): Use gfc_charlen_t.
59 * target-memory.h (gfc_encode_character): Modify prototype.
60 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
61 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
62 (trans_array_constructor): Use existing type.
63 (get_array_charlen): Likewise.
64 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
65 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
66 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
67 (add_argument_checking): Likewise.
68 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
69 gfc_charlen_type_node.
70 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
71 4, fold_convert to correct type.
72 (gfc_conv_class_to_class): Build const of type size_type_node for
74 (gfc_copy_class_to_class): Likewise.
75 (gfc_conv_string_length): Use same type in expression.
76 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
77 (gfc_conv_string_tmp): Make sure len is of the right type.
78 (gfc_conv_concat_op): Use same type in expression.
79 (gfc_conv_procedure_call): Likewise.
80 (fill_with_spaces): Comment out memset() block due to spurious
81 -Wstringop-overflow warnings.
82 (gfc_trans_string_copy): Use gfc_charlen_type_node.
83 (alloc_scalar_allocatable_for_subcomponent_assignment):
84 fold_convert to right type.
85 (gfc_trans_subcomponent_assign): Likewise.
86 (trans_class_vptr_len_assignment): Build const of correct type.
87 (gfc_trans_pointer_assignment): Likewise.
88 (alloc_scalar_allocatable_for_assignment): fold_convert to right
90 (trans_class_assignment): Build const of correct type.
91 * trans-intrinsic.c (gfc_conv_associated): Likewise.
92 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
93 * trans-io.c (gfc_build_io_library_fndecls): Use
94 gfc_charlen_type_node for character lengths.
95 (set_string): Convert to right type in assignment.
96 * trans-stmt.c (gfc_trans_label_assign): Build const of
97 gfc_charlen_type_node.
98 (trans_associate_var): Likewise.
99 (gfc_trans_character_select): Likewise.
100 (gfc_trans_allocate): Likewise, don't typecast strlen result.
101 (gfc_trans_deallocate): Don't typecast strlen result.
102 * trans-types.c (gfc_size_kind): New variable.
103 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
105 * trans-types.h: Fix comment.
107 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
111 * check.c (gfc_check_eoshift): Check for string length and
112 for conformance of boundary.
113 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
114 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
115 * simplify.c (gfc_simplify_eoshift): New function.
117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
118 Alan Hayward <alan.hayward@arm.com>
119 David Sherwood <david.sherwood@arm.com>
121 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
124 Alan Hayward <alan.hayward@arm.com>
125 David Sherwood <david.sherwood@arm.com>
127 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
129 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
132 * check.c (gfc_check_eoshift): Error for missing boundary if array
133 is not one of the standard types.
135 2018-01-03 Jakub Jelinek <jakub@redhat.com>
137 Update copyright years.
139 * gfortranspec.c (lang_specific_driver): Update copyright notice
141 * gfc-internals.texi: Bump @copying's copyright year.
142 * gfortran.texi: Ditto.
143 * intrinsic.texi: Ditto.
144 * invoke.texi: Ditto.
146 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
149 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
150 gfc_simplify_minloc to maxloc and minloc, respectively.
151 * intrinsic.h: Add prototypes for gfc_simplify_minloc
152 and gfc_simplify_maxloc.
153 * simplify.c (min_max_chose): Adjust prototype. Modify function
154 to have a return value which indicates if the extremum was found.
155 (is_constant_array_expr): Fix typo in comment.
156 (simplify_minmaxloc_to_scalar): New function.
157 (simplify_minmaxloc_nodim): New function.
158 (new_array): New function.
159 (simplify_minmaxloc_to_array): New function.
160 (gfc_simplify_minmaxloc): New function.
161 (simplify_minloc): New function.
162 (simplify_maxloc): New function.
164 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
168 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
171 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
174 * resolve.c (resolve_fl_derived0): Add caf_token fields for
175 allocatable and pointer scalars, when -fcoarray selected.
176 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
177 field as well as the backend_decl.
178 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
179 derived types that are not vtypes. Components with caf_token
180 attribute are pvoid types. For a component requiring it, find
181 the caf_token field and have the component token field point to
185 *trans-types.c (gfc_get_array_descriptor_base): Add the token
186 field to the descriptor even when codimen not set.
188 Copyright (C) 2018 Free Software Foundation, Inc.
190 Copying and distribution of this file, with or without modification,
191 are permitted in any medium without royalty provided the copyright
192 notice and this notice are preserved.