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