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