re PR fortran/84273 ([F03] Reject allocatable passed-object dummy argument (proc_ptr_...
[gcc.git] / gcc / fortran / ChangeLog
1 2018-02-12 Janus Weil <janus@gcc.gnu.org>
2
3 PR fortran/84273
4 * resolve.c (resolve_component): Fix checks of passed argument in
5 procedure-pointer components.
6
7 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8
9 PR fortran/35299
10 * resolve.c (resolve_formal_arglist): Update error message.
11
12 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
13
14 * gfortran.texi: Fix typos in documentation of caf_register ().
15 * trans-array.c (structure_alloc_comps): Only register a component of
16 a derived typed corray, not of an ultimate component coarray.
17
18 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
19
20 PR fortran/54223
21 PR fortran/84276
22 * interface.c (compare_actual_formal): Add in_statement_function
23 bool parameter. Skip check of INTENT attribute for statement
24 functions. Arguments to a statement function cannot be optional,
25 issue error for missing argument.
26 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
27 in_statement_function.
28
29 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
30
31 PR fortran/84074
32 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
33 flag. If the is a vector subscript or the expression is not a
34 variable, make the descriptor one-based.
35
36 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
37
38 PR fortran/84141
39 PR fortran/84155
40 * trans-array.c (gfc_array_init_size): Revert the change made
41 in revision 257356 setting the dtype.
42 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
43 Call gfc_get_dtype_rank_type every time.
44
45 PR fortran/56691
46 * trans-array.c (gfc_conv_expr_descriptor): If the source array
47 is a descriptor type, use its offset, removing the condition
48 that is be a class expression.
49
50 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
51
52 PR fortran/82994
53 * match.c (gfc_match_deallocate): Check for NULL pointer.
54
55 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
56
57 PR fortran/68560
58 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
59 (gfc_conv_intrinsic_function): Call it.
60
61 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
62
63 PR fortran/82049
64 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
65 try to resolve it. While here return early if possible.
66
67 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
68
69 PR fortran/84115
70 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
71 'length' if the symbol charlen backend_decl is an indirect ref.
72
73 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
74
75 PR fortran/84141
76 PR fortran/84155
77 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
78 use gfc_get_dtype_rank_type.
79
80 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
81
82 PR 83975
83 PR 83344
84 * resolve.c (resolve_assoc_var): Generate an error if
85 target length unknown.
86
87 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
88
89 PR fortran/83705
90 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
91 to runtime, print a warning message.
92
93 2018-01-31 Jakub Jelinek <jakub@redhat.com>
94
95 PR fortran/84116
96 * openmp.c (gfc_match_omp_clauses): If all the linear
97 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
98 nor set *head = NULL. Formatting fixes.
99
100 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
101
102 PR fortran/84088
103 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
104 an address expression passed to an assumed rank dummy, convert
105 to an indirect reference.
106
107 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
108
109 * dump-parse-tree.c (write_proc): Use sym_name (which may
110 be sym->binding_label) instead of sym->name.
111
112 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
113
114 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
115 of int for slen.
116
117 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
118
119 PR fortran/78534
120 * trans-expr.c (fill_with_spaces): Use memset instead of
121 generating loop.
122 (gfc_trans_string_copy): Improve opportunity to use builtins with
123 constant lengths.
124
125 2018-01-30 Jakub Jelinek <jakub@redhat.com>
126
127 PR debug/84131
128 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
129 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
130
131 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
132
133 PR fortran/84134
134 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
135 zero, return false.
136
137 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
138
139 PR fortran/84133
140 * frontend-passes (matmul_to_var_expr): Return early if
141 in association list.
142 (inline_matmul_assign): Likewise.
143
144 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
145
146 PR fortran/84073
147 * resolve.c (resolve_component): Ensure BIND(C) character
148 components have length one.
149 (resolve_symbol): Likewise for variables.
150
151 2018-01-27 Jakub Jelinek <jakub@redhat.com>
152
153 PR fortran/84065
154 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
155 lengths.
156
157 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
158 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
159 Soren Rasmussen <s.c.rasmussen@gmail.com>
160
161 Partial support for Fortran 2018 teams features.
162
163 * array.c (gfc_match_array_ref): add team attribute in coarray
164 transfers.
165 * check.c (gfc_check_get_team, gfc_check_team_number): add new
166 functions for get_team and team_number.
167 * dump-parse-tree.c (show_code_node): add new statements: form team,
168 change team, end team, and sync team.
169 * expr.c (gfc_find_team_co): add new function.
170 * gfortran.h: add new statements.
171 * intrinsic.c (add_functions): add get_team and team_number functions.
172 * intrinsic.h: add get_team and team_number prototypes for check,
173 simplify, and resolve.
174 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
175 functions.
176 * iso-fortran-env.def: add the team_type derived type.
177 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
178 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
179 add change team, end team, form team, sync team match and functions.
180 * match.h: add new prototypes for change team, end team, form team,
181 and sync team.
182 * parse.c (decode_statement): add cases for change team, end team,
183 form team, and sync team.
184 * resolve.c: add cases for exec form team, change team, end team, and
185 sync team.
186 * simplify.c (gfc_simplify_get_team): add new function for get team.
187 * st.c (gfc_free_statement): add cases exec for change team, end team,
188 form team, sync team.
189 * trans-decl.c (gfor_fndecl_caf_form_team)
190 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
191 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
192 (gfor_fndecl_caf_team_number): add functions and definitions.
193 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
194 new function and team_type argument support.
195 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
196 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
197 * trans-stmt.h: add new prototypes.
198 * trans-types.c (gfc_get_derived_type): check condition for team_type.
199 * trans.c (trans_code): new exec cases for form team, change team, end
200 team, and sync team.
201 * trans.h: add new prototypes.
202
203 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
204
205 PR fortran/83998
206 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
207 or .false. The summation does the correct type conversion.
208 (gfc_simplify_dot_product): Special case zero-sized arrays.
209
210 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
211
212 PR fortran/37577
213 * array.c (gfc_match_array_ref): If standard earlier than F2008
214 it is an error if the reference dimension is greater than 7.
215 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
216 dtype masks and shifts accordingly.
217 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
218 type node to check the field.
219 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
220 (duplicate_allocatable_coarray): Access the rank field of the
221 dtype descriptor rather than the dtype itself.
222 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
223 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
224 (ie. a character).
225 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
226 get_scalar_to_descriptor_type if the actual expression is a
227 constant.
228 (gfc_trans_structure_assign): Assign the rank directly to the
229 dtype rank field.
230 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
231 to default integer kind.
232 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
233 'elem_len' field of the dtype.
234 * trans-io.c (gfc_build_io_library_fndecls): Replace
235 gfc_int4_type_node with dtype_type_node where necessary.
236 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
237 scalars.
238 * trans-types.c : Provide 'get_dtype_type_node' to acces the
239 dtype_type_node and, if necessary, build it.
240 The maximum size of an array element is now determined by the
241 maximum value of size_t.
242 Update the description of the array descriptor, including the
243 type def for the dtype_type.
244 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
245 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
246 (gfc_get_array_descriptor_base): Change the type of the dtype
247 field to dtype_type_node.
248 (gfc_get_array_descr_info): Get the offset to the rank field of
249 the dtype.
250 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
251 * trans.h : Define the indices of the dtype fields.
252
253 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
254
255 PR fortran/83866
256 * decl.c (gfc_match_derived_decl): If eos not matched, recover
257 and emit error about garbage after declaration.
258
259 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
260
261 PR fortran/83898
262 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
263 for characters.
264
265 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
266
267 PR 78534
268 PR 83704
269 * arith.c (gfc_arith_concat): Use size_t for string length.
270 (gfc_compare_string): Likewise.
271 (gfc_compare_with_Cstring): Likewise.
272 * array.c (gfc_resolve_character_array_constructor): Use
273 HOST_WIDE_INT, gfc_mpz_get_hwi.
274 * check.c (gfc_check_fe_runtime_error): Use size_t.
275 * data.c (create_character_initializer): Use HOST_WIDE_INT,
276 gfc_extract_hwi.
277 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
278 (add_init_expr_to_sym): Use HOST_WIDE_INT.
279 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
280 gfc_extract_hwi.
281 (gfc_apply_init): Likewise.
282 * match.h (gfc_set_constant_character_len): Update prototype.
283 * primary.c (match_string_constant): Use size_t.
284 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
285 gfc_mpz_get_hwi.
286 * simplify.c (init_result_expr): Likewise.
287 (gfc_simplify_len_trim): Use size_t.
288 * target-memory.c (gfc_encode_character): Use size_t.
289 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
290 (interpret_array): Use size_t.
291 (gfc_interpret_character): Likewise.
292 * target-memory.h (gfc_encode_character): Update prototype.
293 (gfc_interpret_character): Likewise.
294 (gfc_target_interpret_expr): Likewise.
295 * trans-const.c (gfc_build_string_const): Use size_t for length
296 argument.
297 (gfc_build_wide_string_const): Likewise.
298 * trans-const.h (gfc_build_string_const): Likewise.
299 (gfc_build_wide_string_const): Likewise.
300
301 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
302
303 PR fortran/83900
304 * simplify.c (gfc_simplify_matmul): Set return type correctly.
305
306 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
307
308 PR fortran/83900
309 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
310
311 2018-01-17 Harald Anlauf <anlauf@gmx.de>
312
313 PR fortran/83864
314 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
315
316 2018-01-17 Harald Anlauf <anlauf@gmx.de>
317
318 PR fortran/83874
319 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
320
321 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
322
323 PR fortran/82257
324 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
325 from symbol marked unlimited polymorphic.
326 * resolve.c (resolve_structure_cons): Likewise.
327 * misc.c (gfc_typename): Don't dereference derived->components
328 if it's NULL.
329
330 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
331
332 PR fortran/54613
333 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
334 (gfc_logical_4_kind): New macro
335 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
336 (gfc_simplify_maxloc): Likewise.
337 (gfc_resolve_maxloc): Likewise.
338 (gfc_resolve_minloc): Likewise.
339 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
340 argument; also raise error if it is used (for now). Add it
341 if it isn't present.
342 * intrinsic.c (add_sym_4ml): Rename to
343 (add_sym_5ml), adjust for extra argument.
344 (add_functions): Add "back" constant. Adjust maxloc and minloc
345 for back argument.
346 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
347 not of gfc_logical_4_kind, convert.
348 (gfc_resolve_minloc): Likewise.
349 * simplify.c (gfc_simplify_minloc): Add back argument.
350 (gfc_simplify_maxloc): Likewise.
351 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
352 argument to %VAL to ensure passing by value.
353 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
354 also for library calls.
355
356 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
357
358 PR fortran/82007
359 * resolve.c (resolve_transfer): Delete code looking for 'DT'
360 format specifiers in format strings. Set formatted to true if a
361 format string or format label is present.
362 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
363 whitespace.
364
365 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
366
367 PR fortran/83744
368 * dump-parse-tree.c (get_c_type_name): Remove extra line.
369 Change for loop to use declaration in for loop. Handle BT_LOGICAL
370 and BT_CHARACTER.
371 (write_decl): Add where argument. Fix indentation. Replace
372 assert with error message. Add typename to warning
373 in comment.
374 (write_type): Adjust locus to call of write_decl.
375 (write_variable): Likewise.
376 (write_proc): Likewise. Replace assert with error message.
377
378 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
379
380 PR fortran/52162
381 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
382 the rhs expression is neither an elemental nor a conversion
383 function.
384
385 PR fortran/83622
386 * trans-array.c (is_pointer_array): Remove unconditional return
387 of false for -fopenmp.
388
389 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
390 <emsr@gcc.gnu.org>
391
392 PR fortran/83803
393 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
394 for functions.
395
396 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
397
398 PR fortran/82367
399 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
400
401 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
402
403 PR fortran/83093
404 * resolve.c (resolve_charlen): Check the type of cl->length
405 after resolution.
406
407 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
408
409 PR fortran/83740
410 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
411
412 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
413
414 PR fortran/83740
415 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
416 LHS type when assigning.
417
418 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
419
420 PR fortran/83742
421 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
422
423 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
424
425 * match.c (gfc_match_allocate): Check for NULL pointer.
426
427 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
428
429 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
430
431 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
432
433 PR fortran/83611
434 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
435 an initializer, convert the kind parameters and add to the
436 component if the instance.
437 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
438 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
439 for parameterized arrays. Clean up typos in comments. Convert
440 parameterized array initializers and copy into the array.
441 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
442 parameterized types.
443 *trans-stmt.c (trans_associate_var): Deallocate associate vars
444 as necessary, when they are PDT function results for example.
445
446 PR fortran/83731
447 * trans-array.c (structure_alloc_comps): Only compare len parms
448 when they are declared explicitly.
449
450 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
451
452 PR fortran/50892
453 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
454 lhs type.
455
456 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
457
458 PR fortran/78534
459 PR fortran/66310
460 * array.c (got_charlen): Use gfc_charlen_int_kind.
461 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
462 hardcoded kind.
463 (find_intrinsic_vtab): Likewise.
464 * decl.c (match_char_length): Use gfc_charlen_int_kind.
465 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
466 (gfc_match_implicit): Use gfc_charlen_int_kind.
467 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
468 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
469 * expr.c (gfc_get_character_expr): Length parameter of type
470 gfc_charlen_t.
471 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
472 (gfc_extract_hwi): New function.
473 (simplify_const_ref): Make string_len of type gfc_charlen_t.
474 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
475 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
476 * gfortran.h (gfc_mpz_get_hwi): New prototype.
477 (gfc_mpz_set_hwi): Likewise.
478 (gfc_charlen_t): New typedef.
479 (gfc_expr): Use gfc_charlen_t for character lengths.
480 (gfc_size_kind): New extern variable.
481 (gfc_extract_hwi): New prototype.
482 (gfc_get_character_expr): Use gfc_charlen_t for character length.
483 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
484 * gfortran.texi: Update description of hidden string length argument.
485 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
486 (gfc_resolve_char_achar): Likewise.
487 (gfc_resolve_repeat): Pass string length directly without
488 temporary, use gfc_charlen_int_kind.
489 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
490 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
491 * misc.c (gfc_mpz_get_hwi): New function.
492 (gfc_mpz_set_hwi): New function.
493 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
494 (parse_integer): Don't complain about large integers.
495 (write_atom): Use HOST_WIDE_INT for integers.
496 (mio_integer): Handle integer type mismatch.
497 (mio_hwi): New function.
498 (mio_intrinsic_op): Use HOST_WIDE_INT.
499 (mio_array_ref): Likewise.
500 (mio_expr): Likewise.
501 * primary.c (match_substring): Use gfc_charlen_int_kind.
502 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
503 (resolve_character_operator): Likewise.
504 (resolve_assoc_var): Likewise.
505 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
506 (resolve_charlen): Use mpz_sgn to determine sign.
507 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
508 instead of long.
509 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
510 * target-memory.c (size_character): Length argument of type
511 gfc_charlen_t.
512 (gfc_encode_character): Likewise.
513 (gfc_interpret_character): Use gfc_charlen_t.
514 * target-memory.h (gfc_encode_character): Modify prototype.
515 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
516 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
517 (trans_array_constructor): Use existing type.
518 (get_array_charlen): Likewise.
519 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
520 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
521 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
522 (add_argument_checking): Likewise.
523 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
524 gfc_charlen_type_node.
525 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
526 4, fold_convert to correct type.
527 (gfc_conv_class_to_class): Build const of type size_type_node for
528 size.
529 (gfc_copy_class_to_class): Likewise.
530 (gfc_conv_string_length): Use same type in expression.
531 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
532 (gfc_conv_string_tmp): Make sure len is of the right type.
533 (gfc_conv_concat_op): Use same type in expression.
534 (gfc_conv_procedure_call): Likewise.
535 (fill_with_spaces): Comment out memset() block due to spurious
536 -Wstringop-overflow warnings.
537 (gfc_trans_string_copy): Use gfc_charlen_type_node.
538 (alloc_scalar_allocatable_for_subcomponent_assignment):
539 fold_convert to right type.
540 (gfc_trans_subcomponent_assign): Likewise.
541 (trans_class_vptr_len_assignment): Build const of correct type.
542 (gfc_trans_pointer_assignment): Likewise.
543 (alloc_scalar_allocatable_for_assignment): fold_convert to right
544 type in expr.
545 (trans_class_assignment): Build const of correct type.
546 * trans-intrinsic.c (gfc_conv_associated): Likewise.
547 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
548 * trans-io.c (gfc_build_io_library_fndecls): Use
549 gfc_charlen_type_node for character lengths.
550 (set_string): Convert to right type in assignment.
551 * trans-stmt.c (gfc_trans_label_assign): Build const of
552 gfc_charlen_type_node.
553 (trans_associate_var): Likewise.
554 (gfc_trans_character_select): Likewise.
555 (gfc_trans_allocate): Likewise, don't typecast strlen result.
556 (gfc_trans_deallocate): Don't typecast strlen result.
557 * trans-types.c (gfc_size_kind): New variable.
558 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
559 from size_type_node.
560 * trans-types.h: Fix comment.
561
562 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
563
564 PR fortran/83683
565 PR fortran/45689
566 * check.c (gfc_check_eoshift): Check for string length and
567 for conformance of boundary.
568 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
569 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
570 * simplify.c (gfc_simplify_eoshift): New function.
571
572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
573 Alan Hayward <alan.hayward@arm.com>
574 David Sherwood <david.sherwood@arm.com>
575
576 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
577
578 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
579 Alan Hayward <alan.hayward@arm.com>
580 David Sherwood <david.sherwood@arm.com>
581
582 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
583
584 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
585
586 PR fortran/83664
587 * check.c (gfc_check_eoshift): Error for missing boundary if array
588 is not one of the standard types.
589
590 2018-01-03 Jakub Jelinek <jakub@redhat.com>
591
592 Update copyright years.
593
594 * gfortranspec.c (lang_specific_driver): Update copyright notice
595 dates.
596 * gfc-internals.texi: Bump @copying's copyright year.
597 * gfortran.texi: Ditto.
598 * intrinsic.texi: Ditto.
599 * invoke.texi: Ditto.
600
601 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
602
603 PR fortran/45689
604 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
605 gfc_simplify_minloc to maxloc and minloc, respectively.
606 * intrinsic.h: Add prototypes for gfc_simplify_minloc
607 and gfc_simplify_maxloc.
608 * simplify.c (min_max_chose): Adjust prototype. Modify function
609 to have a return value which indicates if the extremum was found.
610 (is_constant_array_expr): Fix typo in comment.
611 (simplify_minmaxloc_to_scalar): New function.
612 (simplify_minmaxloc_nodim): New function.
613 (new_array): New function.
614 (simplify_minmaxloc_to_array): New function.
615 (gfc_simplify_minmaxloc): New function.
616 (simplify_minloc): New function.
617 (simplify_maxloc): New function.
618
619 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
620
621 PR fortran/45689
622 PR fortran/83650
623 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
624 range of arguments.
625
626 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
627
628 PR fortran/83076
629 * resolve.c (resolve_fl_derived0): Add caf_token fields for
630 allocatable and pointer scalars, when -fcoarray selected.
631 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
632 field as well as the backend_decl.
633 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
634 derived types that are not vtypes. Components with caf_token
635 attribute are pvoid types. For a component requiring it, find
636 the caf_token field and have the component token field point to
637 its backend_decl.
638
639 PR fortran/83319
640 *trans-types.c (gfc_get_array_descriptor_base): Add the token
641 field to the descriptor even when codimen not set.
642 \f
643 Copyright (C) 2018 Free Software Foundation, Inc.
644
645 Copying and distribution of this file, with or without modification,
646 are permitted in any medium without royalty provided the copyright
647 notice and this notice are preserved.