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