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