2018-09-30 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob318567b68935c121c53d71aee8de4eb1853dd985
1 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
3         PR fortran/70752
4         PR fortran/72709
5         * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
6         deferred type and the info->descriptor is present, use the
7         info->descriptor
8         (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
9         it as 'decl' rather than the symbol backend_decl.
10         (gfc_array_allocate): If the se string_length is a component
11         reference, fix it and use it for the expression string length
12         if the latter is not a variable type. If it is a variable do
13         an assignment. Make use of component ref string lengths to set
14         the descriptor 'span'.
15         (gfc_conv_expr_descriptor): For pointer assignment, do not set
16         the span field if gfc_get_array_span returns zero.
17         * trans.c (get_array_span): If the upper bound a character type
18         is zero, use the descriptor span if available.
20 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
22         PR fortran/70149
23         * trans-decl.c (gfc_get_symbol_decl): A deferred character
24         length pointer that is initialized needs the string length to
25         be initialized as well.
27 2018-09-29  Paul Thomas  <pault@gcc.gnu.org>
29         PR fortran/65667
30         * trans-expr.c (gfc_trans_assignment_1): If there is dependency
31         fix the rse stringlength.
33 2018-09-25  Martin Liska  <mliska@suse.cz>
35         PR fortran/87394
36         * decl.c (add_hidden_procptr_result): Simplify condition
37         as we are in branch witch 'case1 || case2'.
39 2018-09-25  Martin Liska  <mliska@suse.cz>
41         * trans.c (remove_suffix): Remove
42         unused function.
44 2018-09-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
46         PR fortran/87397
47         * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
48         for variables in an associate statement.
50 2018-09-24  Bernhard Reuther-Fischer  <aldot@gcc.gnu.org>
51             Cesar Philippidis  <cesar@codesourcery.com>
53         * openmp.c (resolve_oacc_loop_blocks):
55 2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
57         PR fortran/87397
58         * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
59         for variables having the dimension attribute.
61 2018-09-23  Janne Blomqvist  <jb@gcc.gnu.org>
63         * trans-expr.c (gfc_caf_get_image_index): Do array index
64         calculations in gfc_array_index_type.
65         * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
66         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
67         (gfc_trans_event_post_wait): Likewise.
69 2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
71         PR fortran/87395
72         * gfc_conv_procedure_call: Reformat comments slightly. Do not add
73         clobber on INTENT(OUT) for saved variables.
75 2018-09-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
77         PR fortran/41453
78         * trans.h (gfc_conv_expr_reference): Add optional argument
79         add_clobber to prototype.
80         (gfc_conv_procedure_call):  Set add_clobber argument to
81         gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
82         non-pointer, non-allocatable, non-dummy variables whose type
83         is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
84         the procedure is not elemental.
85         * trans-expr.c (gfc_conv_procedure_reference): Add clobber
86         statement before call if add_clobber is set.
88 2018-09-22  Paul Thomas  <pault@gcc.gnu.org>
90         PR fortran/85603
91         * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
92         the charlen backend_decl before using the VAR_P macro.
94 2018-09-21  Paul Thomas  <pault@gcc.gnu.org>
96         PR fortran/77325
97         * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
98         rhs has a charlen expression, convert that and use it.
99         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
100         assignment of deferred character array vars to a realocatable
101         lhs should not be added to the exterior block since vector
102         indices, for example, generate temporaries indexed within the
103         loop.
105 2018-09-21  Paul Thomas  <pault@gcc.gnu.org>
107         PR fortran/87359
108         * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
109         components if must_finalize is set for expr3.
111 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
112             Kwok Cheung Yeung  <kcy@codesourcery.com>
114         * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
115         argument of a call to _gfortran_caf_register is of size_type_node.
116         * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
117         index to a size_type_node type.
118         * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
120 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
122         * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
124 2018-09-20  Janus Weil  <janus@gcc.gnu.org>
126         * gfortran.h (gfc_str_startswith): New macro.
127         * decl.c (variable_decl, gfc_match_end): Use it.
128         * iresolve.c (is_trig_resolved): Ditto.
129         * module.c (load_omp_udrs, read_module): Ditto.
130         * options.c (gfc_handle_runtime_check_option): Ditto.
131         * primary.c (match_arg_list_function): Ditto.
132         * trans-decl.c (gfc_get_symbol_decl): Ditto.
133         * trans-expr.c (gfc_conv_procedure_call): Ditto.
134         * interface.c (dtio_op): Replace strncmp by strcmp.
135         * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
136         * trans-expr.c (conv_arglist_function): Ditto.
137         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
138         STARTS_WITH by gfc_str_startswith.
140 2018-09-20  Cesar Philippidis  <cesar@codesourcery.com>
142         * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
143         and reorder the switch cases to match the enum in gfortran.h.
145 2018-09-19  Paul Thomas  <pault@gcc.gnu.org>
147         PR fortran/84109
148         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
149         assignment of deferred character intrinsic elemental function
150         results to a realocatable lhs must not be added to the exterior
151         block if they are array valued but must go to the loop body.
153 2018-09-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
155         PR fortran/29550
156         * gfortran.h (gfc_expr): Add external_blas flag.
157         * frontend-passes.c (matrix_case): Add case A2TB2T.
158         (optimize_namespace): Handle flag_external_blas by
159         calling call_external_blas.
160         (get_array_inq_function): Add argument okind. If
161         it is nonzero, use it as the kind of argument
162         to be used.
163         (inline_limit_check): Remove m_case argument, add
164         limit argument instead.  Remove assert about m_case.
165         Set the limit for inlining from the limit argument.
166         (matmul_lhs_realloc): Handle case A2TB2T.
167         (inline_matmul_assign): Handle inline limit for other cases with
168         two rank-two matrices.  Remove no-op calls to inline_limit_check.
169         (call_external_blas): New function.
170         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
171         argument to external BLAS if external_blas is already set.
173 2018-09-18  Paul Thomas  <pault@gcc.gnu.org>
175         PR fortran/87239
176         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
177         assignment of deferred character elemental function results to
178         a realocatable lhs must not be added to the exterior block but
179         must go to the loop body.
181 2018-09-18  Paul Thomas  <pault@gcc.gnu.org>
183         PR fortran/87336
184         * trans-array.c (gfc_get_array_span): Try to get the element
185         length of incomplete types. Return NULL_TREE otherwise.
186         (gfc_conv_expr_descriptor): Only set the 'span' field if the
187         above does not return NULL_TREE. Set 'span' field if possible
188         for all new descriptors.
190 2018-09-17  Paul Thomas  <pault@gcc.gnu.org>
192         PR fortran/64120
193         * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
194         characters with a variable length expression for deferred init.
195         (gfc_trans_deferred_vars): Perform the assignment for these
196         symbols by calling gfc_conv_string_length.
198 2018-09-17  Paul Thomas  <pault@gcc.gnu.org>
200         PR fortran/85954
201         * resolve.c (resolve_assoc_var): If the target expression is a
202         deferred charlen dummy and the associate name shares the
203         charlen, generate a new one. Make sure that new charlens are in
204         the namespace list so that they get cleaned up.
205         * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
206         not reallocatable.
207         * trans-decl.c (gfc_get_symbol_decl): Put deferred character
208         length dummy and result arrays on the deferred initialization
209         list so that the variable length arrays can be correctly dealt
210         with.
211         * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
212         NULL rather than ICEing..
214 2018-09-16  Janus Weil  <janus@gcc.gnu.org>
216         PR fortran/86484
217         PR fortran/84543
218         * match.c (gfc_match_assignment): For a polymorphic assignment,
219         make sure that the vtab for the rhs type is generated.
221 2018-09-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
223         PR fortran/37802
224         * frontend-passes.c (B_ERROR): New macro for matmul bounds
225         checking error messages.
226         (C_ERROR): Likewise.
227         (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
228         and C_ERROR macros.
230 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
232         * trans-array.c (gfc_conv_array_initializer): Remove excess precision
233         from overlength string initializers.
235 2018-09-12  Paul Thomas  <pault@gcc.gnu.org>
237         PR fortran/87284
238         * trans-expr.c (gfc_trans_class_init_assign): Access to
239         to array elements of the dynamic type requires that the array
240         reference be added to the class expression and not the _data
241         component, unlike scalar expressions.
243 2018-09-11  Janus Weil  <janus@gcc.gnu.org>
245         PR fortran/87172
246         * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
247         attribute, then it was declared in another module, so there should be
248         no error that it has not been declared.
250 2018-09-11  Paul Thomas  <pault@gcc.gnu.org>
252         PR fortran/87277
253         * expr.c (is_subref_array): Add the check of dimensionality for
254         class, dummy, pointer arrays.
256 2018-09-11  Janus Weil  <janus@gcc.gnu.org>
258         PR fortran/86830
259         * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
260         with non-polymorphic objects.
262 2018-09-10  Janus Weil  <janus@gcc.gnu.org>
264         PR fortran/85395
265         * decl.c (match_binding_attributes): Use correct default accessibility
266         for procedure pointer components.
268 2018-09-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
270         * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
271         'P' is zero and issue an error if it is.
273 2018-08-31  Paul Thomas  <pault@gcc.gnu.org>
275         PR fortran/86328
276         PR fortran/86760
277         * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
278         info->descriptor but pass it directly to gfc_build_array_ref.
279         (gfc_conv_array_ref): Likewise for se->expr.
280         * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
281         obtain the span field directly from it.
283 2017-08-28  Paul Thomas  <pault@gcc.gnu.org>
285         PR fortran/80477
286         * trans-expr.c (gfc_conv_procedure_call): Allocatable class
287         scalar results being passed to a derived type formal argument
288         are finalized if possible. Otherwise, rely on existing code for
289         deallocation. Make the deallocation of allocatable result
290         components conditional on finalization not taking place. Make
291         the freeing of data components after finalization conditional
292         on the data being NULL.
293         (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
294         condition to return NULL_TREE.
295         (gfc_trans_assignment_1): If the assignment is class to class
296         and the rhs expression must be finalized but the assignment
297         is not marked as a polymorphic assignment, use the vptr copy
298         function instead of gfc_trans_scalar_assign.
300         PR fortran/86481
301         * trans-expr.c (gfc_conv_expr_reference): Do not add the post
302         block to the pre block if the expression is to be finalized.
303         * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
304         finalized, load the post block into a finalization block and
305         add it right at the end of the allocation block.
307 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
309         PR 87091
310         * error.c (gfc_format_decoder): Update for conversion of
311         show_caret_p to a tri-state.
313 2018-08-25  Janus Weil  <janus@gcc.gnu.org>
315         PR fortran/86545
316         * resolve.c (resolve_transfer): Correctly determine typespec for
317         generic function calls, in order to throw a proper error.
319 2018-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
321         PR fortran/86837
322         * frontend-passes.c (var_in_expr_callback): New function.
323         (var_in_expr): New function.
324         (traverse_io_block): Use var_in_expr instead of
325         gfc_check_dependency for checking if the variable depends on the
326         previous interators.
328 2018-08-23  Janne Blomqvist  <blomqvist.janne@gmail.com>
330         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
331         HONOR_SIGNED_ZEROS checks.
333 2018-08-23  Paul Thomas  <pault@gcc.gnu.org>
335         PR fortran/86863
336         * resolve.c (resolve_typebound_call): If the TBP is not marked
337         as a subroutine, check the specific symbol.
339 2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
341         * gfortran.texi: Mention that asynchronous I/O does
342         not work on systems which lack condition variables, such
343         as AIX.
345 2018-08-22  Janus Weil  <janus@gcc.gnu.org>
347         PR fortran/86935
348         * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
349         statement.
351 2018-08-22  Andrew Benson  <abensonca@gmail.com>
353         * module.c (load_generic_interfaces): Move call to find_symbol()
354         so that only occurs if actually needed.
356 2018-08-22  Janus Weil  <janus@gcc.gnu.org>
358         PR fortran/86888
359         * decl.c (gfc_match_data_decl): Allow allocatable components of
360         indirectly recursive type.
361         * resolve.c (resolve_component): Remove two errors messages ...
362         (resolve_fl_derived): ... and replace them by a new one.
364 2018-08-21  Janne Blomqvist  <jb@gcc.gnu.org>
366         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
367         MAX_EXPR/MIN_EXPR unconditionally for real arguments.
368         * gfortran.texi (Compiler Characteristics): Document MAX/MIN
369         behavior wrt NaN.
371 2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
372         Thomas Koenig <tkoenig@gcc.gnu.org>
374         PR fortran/25829
375         * gfortran.texi: Add description of asynchronous I/O.
376         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
377         as volatile.
378         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
379         st_wait_async and change argument spec from ".X" to ".w".
380         (gfc_trans_wait): Pass ID argument via reference.
382 2018-08-16  Nathan Sidwell  <nathan@acm.org>
384         * cpp.c (dump_macro): Use cpp_user_macro_p.
386 2018-08-14  Janus Weil  <janus@gcc.gnu.org>
388         PR fortran/86116
389         * interface.c (compare_type): Remove a CLASS/TYPE check.
390         (compare_type_characteristics): New function that behaves like the old
391         'compare_type'.
392         (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
393         Call 'compare_type_characteristics' instead of 'compare_type'.
395 2018-08-12  Paul Thomas  <pault@gcc.gnu.org>
397         PR fortran/66679
398         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
399         elements are returned as references to the data element. Get
400         the class expression by stripping back the references. Use this
401         for the element size.
403 2018-08-12  Paul Thomas  <pault@gcc.gnu.org>
405         PR fortran/86906
406         * resolve.c (resolve_fl_variable_derived): Check if the derived
407         type is use associated before checking for the host association
408         error.
410 2018-08-10  Janus Weil  <janus@gcc.gnu.org>
412         PR fortran/57160
413         * invoke.texi (frontend-optimize): Mention short-circuiting.
414         * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
415         * resolve.c (resolve_operator): Warn about short-circuiting only with
416         -ffrontend-optimize.
417         * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
418         with -ffrontend-optimize. Without that flag, make sure that both
419         operands are evaluated.
421 2018-08-08  Nathan Sidwell  <nathan@acm.org>
423         * cpp.c (cb_file_change): Use linemap_included_from.
425 2018-08-07  Cesar Philippidis  <cesar@codesourcery.com>
427         * trans-stmt.h: Remove stale reference to trans-openacc.c.
429 2018-08-04  Janus Weil  <janus@gcc.gnu.org>
431         PR fortran/45521
432         * interface.c (gfc_compare_interfaces): Apply additional
433         distinguishability criteria of F08 to operator interfaces.
435 2018-07-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
437         Revert 'AsyncI/O patch committed'
438         2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
439                 Thomas Koenig <tkoenig@gcc.gnu.org>
441         PR fortran/25829
442         * gfortran.texi: Add description of asynchronous I/O.
443         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
444         as volatile.
445         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
446         st_wait_async and change argument spec from ".X" to ".w".
447         (gfc_trans_wait): Pass ID argument via reference.
449 2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
450         Thomas Koenig <tkoenig@gcc.gnu.org>
452         PR fortran/25829
453         * gfortran.texi: Add description of asynchronous I/O.
454         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
455         as volatile.
456         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
457         st_wait_async and change argument spec from ".X" to ".w".
458         (gfc_trans_wait): Pass ID argument via reference.
460 2018-07-20  Martin Sebor  <msebor@redhat.com>
462         PR middle-end/82063
463         * gfortran.h (gfc_handle_option): Change function argument
464         to HOST_WIDE_INT.
465         * options.c (gfc_handle_option): Same.
467 2018-07-20  Andrew Benson  <abenson@carnegiescience.edu>
469         * gfortran.h (gfc_symbol): Add pointer to next derived type.
470         (gfc_dt_list, gfc_get_dt_list): Remove.
471         (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
472         * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
473         simple nullification of gfc_derived_types.
474         * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
475         gfc_symbol.
476         (add_dt_to_dt_list): Change derived type linked list insertion to
477         utilize dt_next pointers in gfc_symbol.
478         * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
479         (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
480         gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
481         linked list search/insertion to utilize dt_next pointers in gfc_symbol.
482         * trans-types.c (gfc_get_derived_type): Change derived type linked
483         list search to utilize dt_next pointers in gfc_symbol.
485 2018-07-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
487         * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
488         or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
490 2018-07-18  Janus Weil  <janus@gcc.gnu.org>
491             Thomas Koenig  <tkoenig@gcc.gnu.org>
493         PR fortran/85599
494         * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
495         * frontend-passes.c (do_warn_function_elimination): Do not warn for
496         pure functions.
497         * gfortran.h: Add prototypes for gfc_pure_function and
498         gfc_implicit_pure_function.
499         * gfortran.texi: Add chapter on evaluation of logical expressions.
500         * invoke.texi: Mention that -Wfunction-elimination is implied
501         by -Wextra.
502         * lang.opt: Make -Wextra imply -Wfunction-elimination.
503         * resolve.c (pure_function): Rename to gfc_pure_function.
504         (gfc_implicit_pure_function): New function.
505         (check_pure_function): Use it here.
506         (impure_function_callback): New function.
507         (resolve_operator): Call it via gfc_expr_walker.
509 2018-07-16  Fritz Reese  <fritzoreese@gmail.com>
511         PR fortran/83184
512         * decl.c (match_old_style_init): Initialize locus of variable expr when
513         creating a data variable.
514         (match_clist_expr): Verify array is explicit shape/size before
515         attempting to allocate constant array constructor.
517 2018-07-16  Fritz Reese  <fritzoreese@gmail.com>
519         PR fortran/86417
520         * module.c (mio_component): Set component->loc when loading from module.
522 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
524         PR fortran/86421
525         * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
526         _UVAL suffixes.
527         (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
528         on linear clauses.  Initialize n->where to gfc_current_locus.
530 2018-07-05  Paul Thomas  <pault@gcc.gnu.org>
532         PR fortran/86408
533         * resolve.c.c (resolve_contained_fntype): Reference to C418 is
534         in F2008 and not F2003.
535         (resolve_function): Ditto in error message. Also, exclude
536         deferred character length results from the error.
538 2018-07-05  Fritz Reese  <fritzoreese@gmail.com>
540         PR fortran/83183
541         PR fortran/86325
542         * expr.c (class_allocatable, class_pointer, comp_allocatable,
543         comp_pointer): New helpers.
544         (component_initializer): Generate EXPR_NULL for allocatable or pointer
545         components. Do not generate initializers for components within BT_CLASS.
546         Do not assign to comp->initializer.
547         (gfc_generate_initializer): Use new helpers; move code to generate
548         EXPR_NULL for class allocatable components into component_initializer().
550 2018-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
552         PR fortran/82009
553         * trans-decl.c (gfc_process_block_locals): Delete assert and set
554         saved_local_decls = NULL_TREE.
556 2018-07-02  Richard Biener  <rguenther@suse.de>
558         PR lto/86321
559         * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
560         for the distinct type copy.
562 2018-07-02  Paul Thomas  <pault@gcc.gnu.org>
564         PR fortran/82969
565         PR fortran/86242
566         * trans-array.c (structure_alloc_comps): Do not explicitly copy
567         procedure pointer components.
569 2018-07-02  Paul Thomas  <pault@gcc.gnu.org>
571         PR fortran/45305
572         * expr.c : Add a prototype for scalarize_intrinsic_call.
573         (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
574         intrinsic function calls.
575         (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
576         the expression or any of the actual argument expressions are
577         NULL. Before calling gfc_check_init_expr, check 'init_flag'.
578         Only simplify the scalarized expressions if there are no errors
579         on the stack.
580         (gfc_check_init_expr): Set 'init_flag' true in the call to
581         scalarize_intrinsic_call.
583 2018-06-28  Fritz Reese  <fritzoreese@gmail.com>
585         PR fortran/82865
586         * decl.c (gfc_match_type): Refactor and check for PDT declarations.
588 2018-06-28  Martin Liska  <mliska@suse.cz>
590         * gfortranspec.c: Include opt-suggestions.h.
592 2018-06-25  Fritz Reese  <fritzoreese@gmail.com>
594         PR fortran/82972
595         PR fortran/83088
596         PR fortran/85851
597         * expr.c (component_initializer): Assign init expr to c->initializer.
598         (generate_isocbinding_initializer): New.
599         (gfc_generate_initializer): Call generate_isocbinding_initializer to
600         generate initializers for c_ptr and c_funptr with -finit-derived.
602 2018-06-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
604         PR fortran/85983
605         * interface.c (check_dtio_interface1): Delete assert.
607 2018-06-22  Paul Thomas  <pault@gcc.gnu.org>
608             Rainer Orth  <ro@gcc.gnu.org>
610         PR fortran/86281
611         * resolve.c (resolve_contained_fntype): Check for the charlen
612         before testing the length.
614 2018-06-21  Paul Thomas  <pault@gcc.gnu.org>
616         PR fortran/49630
617         * resolve.c (resolve_contained_fntype): Change standard ref.
618         from F95 to F2003: C418. Correct a spelling error in a comment.
619         It is an error for an abstract interface to have an assumed
620         character length result.
621         * trans-expr.c (gfc_conv_procedure_call): Likewise change the
622         standard reference.
624 2018-06-21  Paul Thomas  <pault@gcc.gnu.org>
626         PR fortran/83118
627         * resolve.c (resolve_ordinary_assign): Force the creation of a
628         vtable for assignment of non-polymorphic expressions to an
629         unlimited polymorphic object.
630         * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
631         size of the rhs type for such assignments. Set the dtype, _len
632         and vptrs appropriately.
633         * trans-expr.c (gfc_trans_assignment): Force the use of the
634         _copy function for these assignments.
636 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
637             Thomas Schwinge <thomas@codesourcery.com>
638             Cesar Philippidis  <cesar@codesourcery.com>
640         * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
641         bitfields.
642         * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
643         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
644         (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
645         create, deviceptr, present_of_*. Add support for finalize and
646         if_present.
647         (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
648         (OACC_KERNELS_CLAUSES): Likewise.
649         (OACC_DATA_CLAUSES): Likewise.
650         (OACC_DECLARE_CLAUSES): Likewise.
651         (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
652         (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
653         (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
654         (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
655         * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
656         and FINALIZE.
658 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
660         * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
662 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
664         * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
665         (nonlocal_dummy_decls): Likewise.
666         (gfc_nonlocal_dummy_array_decl): Likewise.
667         (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
668         (gfc_get_fake_result_decl): Do not generate a new DECL if simply
669         reusing the result of a recursive call.
670         (gfc_generate_function_code): Do not create, insert and destroy
671         nonlocal_dummy_decls.
673 2018-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
675         PR fortran/86110
676         * array.c (gfc_resolve_character_array_constructor): Avoid NULL
677         pointer dereference.
679 2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
681         PR fortran/85703
682         * parse.c (decode_oacc_directive): Set gfc_matching_function
683         to false.
684         (decode_omp_directive): Likewise.
686 2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
688         PR fortran/85702
689         * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
691 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
693         PR other/69968
694         * misc.c (gfc_closest_fuzzy_match): Update for renaming of
695         levenshtein_distance to get_edit_distance.
697 2018-06-12  Steven G. Kargl  <kargl@gcc.gnu.org>
699         PR fortran/44491
700         * expr.c (gfc_check_assign): Select non-NULL locus.
702 2018-06-11  Janus Weil  <janus@gcc.gnu.org>
704         PR fortran/45521
705         * interface.c (compare_ptr_alloc): New function.
706         (generic_correspondence): Call it.
708 2018-06-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
710         * gfortran.h (gfc_expr): Add no_bounds_check field.
711         * frontend-passes.c (get_array_inq_function): Set no_bounds_check
712         on function and function argument.
713         (inline_matmul_assign): Set no_bounds_check on zero expression
714         and on lhs of zero expression.
715         Also handle A1B2 case if realloc on assigment is active.
716         * trans-array.c (gfc_conv_array_ref): Don't do range checking
717         if expr has no_bounds_check set.
718         (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
719         has it set.
720         * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
721         on lss and lss if the corresponding expressions have it set.
723 2018-06-10  Dominique d'Humieres  <dominiq@gcc.gnu.org>
725         PR fortran/79854
726         * trans-const.c: Remove include "diagnostic-core.h".
727         (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
729 2018-06-10  Janus Weil  <janus@gcc.gnu.org>
731         PR fortran/85088
732         * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
733         INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
734         and remove a TODO note.
735         * gfortran.h: Add a comment to sym_intent.
737 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
739         PR fortran/38351
740         * resolve.c (resolve_operator): Provide better error message for
741         derived type entity used in an binary intrinsic numeric operator.
743 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
745         PR fortran/85138
746         PR fortran/85996
747         PR fortran/86051
748         * decl.c (gfc_match_char_spec): Use private namespace in attempt to
749         reduce a charlen to a constant.
751 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
753         PR fortran/78278
754         * data.c (gfc_assign_data_value): Re-arrange code to allow for
755         an error for double initialization of CHARACTER entities.
757 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
759         PR fortran/63514
760         * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
762 2018-06-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
764         PR fortran/85631
765         * trans.h (gfc_ss): Add field no_bounds_check.
766         * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
767         ss->no_bounds_check is set, do not use runtime checks.
768         * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
769         for reallocatable lhs.
771 2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
773         PR fortran/86059
774         * array.c (match_array_cons_element): NULL() cannot be in an
775         array constructor.
777 2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
779         PR fortran/78571
780         * data.c (create_character_initializer): Return early if type is
781         incompatible with CHARACTER.
783 2018-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
785         PR fortran/86045
786         * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
787         'P' is zero and issue an error if it is.
789 2018-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
791         PR fortran/85641
792         * frontend-passes.c (is_fe_temp): Add prototype.
793         (realloc_string_callback): Early return for frontend-generated
794         temporary.
796 2018-06-05  Cesar Philippidis  <cesar@codesourcery.com>
798         PR fortran/85701
800         * openmp.c (gfc_resolve_oacc_declare): Error on functions and
801         subroutine data clause arguments.
803 2018-06-04  Steven G. Kargl  <kargl@gcc.gnu.org>
805         PR fortran/85981
806         * resolve.c (resolve_allocate_deallocate): Check errmsg is default
807         character kind.
809 2018-06-03  Paul Thomas  <pault@gcc.gnu.org>
811         PR fortran/36497
812         * decl.c (variable_decl): Use gfc_add_type for cray pointees.
814 2018-06-01  Steven G. Kargl  <kargl@gcc.gnu.org>
816         PR fortran/63570
817         * check.c (gfc_check_random_init): New function. Check arguments of
818         RANDOM_INIT.
819         * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
820         * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
821         subroutines.
822         (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
823         * intrinsic.h: Add prototypes for gfc_check_random_init and
824         gfc_resolve_random_init
825         * intrinsic.texi: Document new intrinsic subprogram.
826         * iresolve.c (gfc_resolve_random_init): Resolve routine name.
827         * trans-decl.c: Declare gfor_fndecl_random_init
828         * trans-intrinsic.c (conv_intrinsic_random_init): New function.
829         Translate call to RANDOM_INIT.
830         (gfc_conv_intrinsic_subroutine): Call it.
831         * trans.h: Declare gfor_fndecl_random_init
833 2018-05-27  Steven G. Kargl  <kargl@gcc.gnu.org>
835         * decl.c (match_data_constant):  Fortran 2018 allows pointer
836         initialization in a data statement.
838 2018-05-25  Janus Weil  <janus@gcc.gnu.org>
840         PR fortran/85839
841         * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
842         an obsolescent feature in Fortran 2018.
843         (gfc_match_equivalence): Ditto.
844         * resolve.c (resolve_common_blocks): Ditto.
845         (gfc_resolve_forall): Ditto.
846         * symbol.c (gfc_define_st_label): Ditto.
848 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
850         PR fortran/85543
851         * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
852         pointer dereference.
854 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
856         PR fortran/85780
857         * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
859 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
861         PR fortran/85779
862         * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
864 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
866         PR fortran/85895
867         * resolve.c (resolve_sync): Resolve expression before checking for
868         an error.
870 2018-05-22  Janus Weil  <janus@gcc.gnu.org>
872         PR fortran/85841
873         * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
874         GFC_STD_OPT_F08TS.
875         * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
876         * options.c (set_default_std_flags): Ditto.
877         (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
878         * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
879         GFC_STD_F2018.
880         * check.c (gfc_check_atomic, gfc_check_event_query,
881         gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
882         gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
883         * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
884         * intrinsic.c (add_functions, add_subroutines,
885         gfc_check_intrinsic_standard): Ditto.
886         * iso-c-binding.def: Ditto.
887         * iso-fortran-env.def: Ditto.
888         * match.c (gfc_match_event_post, gfc_match_event_wait,
889         gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
890         gfc_match_end_team, gfc_match_sync_team): Ditto.
891         * gfortran.texi: Remove mention of -std=f2008ts.
892         Move TSs into F2018 section.
893         * invoke.texi: Update documentation of -std=f2008ts.
895 2018-05-21  Janus Weil  <janus@gcc.gnu.org>
897         PR fortran/85841
898         * libgfortran.h: New macros GFC_STD_OPT_*.
899         * error.c (notify_std_msg): New function.
900         (gfc_notify_std): Adjust such that it can handle combinations of
901         GFC_STD_* flags in the 'std' argument, not just a single one.
902         * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
903         in Fortran 2018.
904         (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
905         * options.c (set_default_std_flags): Warn for F2018 deleted features
906         by default.
907         (gfc_handle_option): F2018 deleted features are allowed in earlier
908         standards.
909         * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
910         nonblock do constructs in Fortran 2018.
912 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
914         PR fortran/80657
915         * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
916         test for self refs to the function result in the character len
917         expression. If a self reference is found, emit an error and
918         return true.
919         (resolve_fntype): Use the function symbol in the calls to the
920         above.
922 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
924         PR fortran/49636
925         * trans-array.c (gfc_get_array_span): Renamed from
926         'get_array_span'.
927         (gfc_conv_expr_descriptor): Change references to above.
928         * trans-array.h : Add prototype for 'gfc_get_array_span'.
929         * trans-intrinsic.c (gfc_conv_associated): Add pre and post
930         blocks for 'arg1'.
931         * trans-stmt.c (trans_associate_var): If the associate name is
932         a subref array pointer, use gfc_get_array_span for the span.
934 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
936         PR fortran/82275
937         * match.c (gfc_match_type_spec): Go through the array ref and
938         decrement 'rank' for every dimension that is an element.
940 2018-05-19  Paul Thomas  <pault@gcc.gnu.org>
942         PR fortran/82923
943         PR fortran/66694
944         PR fortran/82617
945         * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
946         charlen backend_decl of the rhs expr to ss->info->string_length
947         so that the value in the current scope is used.
949 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
951         PR fortran/63529
952         * gfortran.texi: Clarify documentation for Cray pointer and
953         assumed-sized array.
955 2018-05-13  Paul Thomas  <pault@gcc.gnu.org>
957         PR fortran/85742
958         * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
959         of 'size'. If the element type is a pointer use the size of the
960         TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
961         case, set the size to zero.
963 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
965         * gfortran.h: Remove prototype.
966         * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
968 2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
970         PR fortran/85542
971         * expr.c (check_inquiry): Avoid NULL pointer dereference.
973 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
975         PR fortran/85687
976         * check.c (gfc_check_rank): Check that the argument is a data object.
978 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
980         PR fortran/85521
981         * array.c (gfc_resolve_character_array_constructor): Substrings
982         with upper bound smaller than lower bound are zero length strings.
984 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
986         PR fortran/70870
987         * data.c (gfc_assign_data_value): Check that a data object does
988         not also have default initialization.
990 2018-05-10  Marek Polacek  <polacek@redhat.com>
992         PR fortran/85735
993         * options.c (gfc_post_options): Set main_input_filename.
995 2018-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
997         PR fortran/54613
998         * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
1000 2018-05-10  Paul Thomas  <pault@gcc.gnu.org>
1002         PR fortran/68846
1003         PR fortran/70864
1004         * resolve.c (get_temp_from_expr): The temporary must not have
1005         dummy or intent attributes.
1007 2018-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1009         PR fortran/54613
1010         * check.c (gfc_check_minmaxloc): Remove error for BACK not being
1011         implemented.  Use gfc_logical_4_kind for BACK.
1012         * simplify.c (min_max_choose): Add optional argument back_val.
1013         Handle it.
1014         (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
1015         back_val to min_max_choose.
1016         (simplify_minmaxloc_to_nodim): Likewise.
1017         (simplify_minmaxloc_to_array): Likewise.
1018         (gfc_simplify_minmaxloc): Add argument back, handle it.
1019         Pass back_val to specific simplification functions.
1020         (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
1021         pass it on to gfc_simplify_minmaxloc.
1022         (gfc_simplify_maxloc): Likewise.
1023         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
1024         comment. If BACK is true, use greater or equal (or lesser or
1025         equal) insteal of greater (or lesser). Mark the condition of
1026         having found a value which exceeds the limit as unlikely.
1028 2018-05-07  Jeff Law  <law@redhat.comg>
1030         * scanner.c (preprocessor_line): Call linemap_add after a line
1031         directive that changes the current filename.
1033 2018-05-06  Andre Vehreschild  <vehre@gcc.gnu.org>
1035         PR fortran/85507
1036         * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1037         introduced by r259385.
1038         * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1039         same variables in coarray assignments.
1041 2018-05-02  Tom de Vries  <tom@codesourcery.com>
1043         PR libgomp/82428
1044         * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
1046 2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1048         PR fortran/85520
1049         * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1051 2018-04-14  Andre Vehreschild  <vehre@gcc.gnu.org>
1053         PR fortran/81773
1054         PR fortran/83606
1055         * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1056         during dependency computation.  They define no data dependency.
1057         * trans-array.c (conv_array_index_offset): The stride can not be set
1058         here, prevent fail.
1059         * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1060         for caf_get's result and copying to the array with vectorial
1061         indexing.
1063 2018-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1065         PR fortran/85387
1066         * frontend-passes.c (traverse_io_block): Check for start, end or
1067         stride being defined by an outer implied DO loop.
1069 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1071         PR fortran/83064
1072         PR testsuite/85346
1073         * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1074         for annotation and remove dependence on -ftree-parallelize-loops.
1076 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
1078         PR fortran/85313
1079         * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1080         (resolve_oacc_nested_loops): Likewise.  Formatting fix.
1082 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1084         PR fortran/83064
1085         * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1086         parallell processing of DO CONCURRENT -ftree-parallelize-loops
1087         is set.
1089 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1091         PR fortran/51260
1092         * resolve.c (resolve_variable): Simplify cases where access to a
1093         parameter array results in a single constant.
1095 2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1097         PR fortran/85102
1098         * decl.c (variable_decl): If upper or lower bounds simplify
1099         to a constant, use that.
1101 2018-03-30  Paul Thomas  <pault@gcc.gnu.org>
1103         PR fortran/84931
1104         * simplify.c (gfc_convert_constant): Handle case of array
1105         constructors within an array that has no iterator and improve
1106         the conciseness of this section of code.
1108 2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1110         PR fortran/85111
1111         * array.c (gfc_resolve_character_array_constructor): Early
1112         exit for zero-size arrays.
1113         * simplify.c (simplify_transformation_to_array): Exit early
1114         if the result size is zero.
1115         (simplify_minmaxloc_to_array): Likewise.
1117 2018-03-28  Mikael Morin  <mikael@gcc.gnu.org>
1119         PR fortran/69497
1120         * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1121         from the root.
1122         (gfc_free_namespace): Restore assert (revert r258839).
1124 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
1126         * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1127         * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1128         (IOPARM_dt_dec_ext): ... this.
1129         * trans-io.c (build_dt): Adjust for default_exp renaming to
1130         dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1131         * io.c (match_io): Likewise.
1133 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1135         PR fortran/85084
1136         * frontend-passes.c (gfc_run_passes): Do not run front-end
1137         optimizations if a previous error occurred.
1139 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1140         Harald Anlauf  <anlauf@gmx.de>
1142         PR fortran/85083
1143         * primary.c (gfc_convert_to_structure_constructor): Check
1144         conformance of argument types in structure constructor.
1146 2018-03-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1148         PR fortran/66709
1149         * io.c: Include constructor.h.
1150         (resolve_tag_format): For a constant character array, concatenate
1151         into a single character expression.
1153 2018-03-25  Seth Johnson <johnsonsr@ornl.gov>
1154         Dominique d'Humieres  <dominiq@gcc.gnu.org>
1156         PR fortran/84924
1157         * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1158         scalar derived type with -std=f2003 and -std=f2008.
1160 2018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1161             Dominique d'Humieres  <dominiq@gcc.gnu.org>
1163         PR fortran/69497
1164         * symbol.c (gfc_free_namespace): Delete the assert and only if
1165         refs count is equals zero, free the namespace. Otherwise,
1166         something is halfway and other errors will resound.
1168 2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1170         PR fortran/70068
1171         * expr.c (find_substring_ref): Change types of start, end
1172         and length variables to gfc_charlen_t. Set length to zero
1173         for empty substring.
1175 2018-03-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1177         PR fortran/42651
1178         * decl.c (check_function_name): Improved error message
1179         (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1181 2018-03-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1183         PR fortran/84922
1184         * decl.c (get_proc_name): If the MODULE prefix appears in interface
1185         body, then it must appear on the contained subroutine or function.
1186         While here, fix nearby mis-indented code.
1188 2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1189         Harald Anlauf  <anlauf@gmx.de>
1191         PR fortran/84957
1192         * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1194 2018-03-21  Janne Blomqvist  <jb@gcc.gnu.org>
1196         PR fortran/84615
1197         * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1198         gfc_charlen_type_node when calling procedure.
1200 2018-03-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1202         PR fortran/85001
1203         * interface.c (symbol_rank): Remove bogus null pointer check that
1204         crept in when translating a ternary operator into an if-else
1205         constructor.
1207 2018-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1209         PR fortran/84931
1210         * simplify.c (gfc_convert_constant): Correctly handle iterators
1211         for type conversion.
1213 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1215         PR fortran/77414
1216         * decl.c (get_proc_name):  Check for a subroutine re-defined in
1217         the contain portion of a subroutine.  Change language of existing
1218         error message to better describe the issue. While here fix whitespace
1219         issues.
1221 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1223         PR fortran/65453
1224         * decl.c (get_proc_name): Catch clash between a procedure statement
1225         and a contained subprogram
1227 2018-03-16  Steven G. Kargl  <kargl@gcc.gnu.org>
1229         PR fortran/69395
1230         * decl.c (merge_array_spec): Correct the error condition.
1232 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1234         PR fortran/78741
1235         * decl.c (get_proc_name):  Check for clash of entry name with
1236         subroutine name.
1238 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1240         PR fortran/69395
1241         * decl.c (merge_array_spec): Limit the merging to maximum allowed
1242         dimensions, and issue error message if limit is exceeded.
1244 2018-03-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1246         * check.c (gfc_check_kill_sub):  Remove check for INTEGER(4) or (8).
1247         * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1248         (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1249         * intrinsic.texi: Update documentation.
1250         * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1251         * trans-decl.c (gfc_build_intrinsic_function_decls):  Add
1252         gfor_fndecl_kill and gfor_fndecl_kill_sub
1253         * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1254         functions.
1255         (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1256         (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1257         * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1259 2018-03-11  Paul Thomas  <pault@gcc.gnu.org>
1261         PR fortran/84546
1262         * trans-array.c (structure_alloc_comps): Make sure that the
1263         vptr is copied and that the unlimited polymorphic _len is used
1264         to compute the size to be allocated.
1265         * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1266         unlimited polymorphic _len for the offset to the element.
1267         (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1268         * trans.h : Add the boolean 'unlimited' to the prototype.
1270 2018-03-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1272         PR fortran/83939
1273         * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1275 2018-03-11  Steven G. Kargl  <kargls@gcc.gnu.org>
1277         * check.c (gfc_check_kill):  Check pid and sig are scalar.
1278         (gfc_check_kill_sub): Restrict kind to 4 and 8.
1279         * intrinsic.c (add_function): Sort keyword list.  Add pid and sig
1280         keywords for KILL.  Remove redundant *back="back" in favor of the
1281         original *bck="back".
1282         (add_subroutines): Sort keyword list.  Add pid and sig keywords
1283         for KILL.
1284         * intrinsic.texi: Fix documentation to consistently use pid and sig.
1285         * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8.  Choose the
1286         correct function.
1287         (gfc_resolve_rename_sub): Add comment.
1289 2018-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1291         PR fortran/66128
1292         * simplify.c (simplify_transformation): Return default result for
1293         empty array argument.
1294         (gfc_simplify_all): Remove special-case handling for zerosize.
1295         (gfc_simplify_any): Likewise.
1296         (gfc_simplify_count): Likewise.
1297         (gfc_simplify_iall): Likewise.
1298         (gfc_simplify_iany): Likewise.
1299         (gfc_simplify_iparity): Likewise.
1300         (gfc_simplify_minval): Likewise.
1301         (gfc_simplify_maxval): Likewise.
1302         (gfc_simplify_norm2): Likewise.
1303         (gfc_simplify_product): Likewise.
1304         (gfc_simplify_sum): Likewise.
1306 2018-03-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1308         PR fortran/84734
1309         * arith.c (check_result, eval_intrinsic):  If result overflows, pass
1310         the expression up the chain instead of a NULL pointer.
1312 2018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1314         PR fortran/64124
1315         PR fortran/70409
1316         * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1318 2017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1320         PR fortran/84697
1321         PR fortran/66128
1322         * expr.c (simplify_parameter_variable): If p is a size zero array
1323         and not an ARRAY_EXPR insert an empty array constructor and
1324         return.
1325         * gfortran.h: Add prototype for gfc_is_size_zero_array.
1326         * simplify.c (is_size_zero_array): Make non-static and rename into
1327         (gfc_is_size_zero_array):  Check for parameter arrays of zero
1328         size by comparing shape and absence of constructor.
1329         (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1330         is_size_zero_array.
1331         (gfc_simplify_count): Likewise.
1332         (gfc_simplify_iall): Likewise.
1333         (gfc_simplify_iany): Likewise.
1334         (gfc_simplify_iparity): Likewise.
1335         (gfc_simplify_minval): Likewise.
1336         (gfc_simplify_maxval): Likewise.
1337         (gfc_simplify_product): Likewise.
1338         (gfc_simplify_sum): Likewise.
1340 2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1342         PR fortran/56667
1343         * primary.c (match_sym_complex_part): Give the matcher for an implied
1344         do-loop a chance to run.
1346 2018-03-03  Harald Anlauf  <anlauf@gmx.de>
1348         PR fortran/71085
1349         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1350         dereference NULL pointer.
1352 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1354         PR fortran/66128
1355         * simplify.c (is_size_zero_array): New function to check for size
1356         zero array.
1357         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1358          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1359          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1360          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1361         requirements from F2018.
1363 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1365         PR fortran/51434
1366         * simplify.c (gfc_simplify_transfer): Resolve mold.
1368 2018-03-03  Paul Thomas  <pault@gcc.gnu.org>
1370         PR fortran/80965
1371         * resolve.c (build_loc_call): Change symtree name from 'loc' to
1372         '_loc'.
1374 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
1376         PR fortran/84219
1377         * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1378         components are caf tokens.
1379         (gfc_target_interpret_expr): Treat BT_VOID expressions as
1380         integers.
1382 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
1384         PR fortran/84538
1385         * class.c (class_array_ref_detected): Remove the condition that
1386         there be no reference after the array reference.
1387         (find_intrinsic_vtab): Remove excess whitespace.
1388         * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1389         as 'base and call build_class_array_ref earlier.
1391 2018-02-28  Paul Thomas  <pault@gcc.gnu.org>
1393         PR fortran/83901
1394         * trans-stmt.c (trans_associate_var): Make sure that the se
1395         expression is a pointer type before converting it to the symbol
1396         backend_decl type.
1398 2018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1400         PR fortran/83633
1401         * decl.c (variable_decl): Check that an explicit-shape-array with
1402         nonconstant bounds is allowed.
1404 2018-02-25  Paul Thomas  <pault@gcc.gnu.org>
1406         PR fortran/84523
1407         * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1408         has a pre block, add it to the expression pre block.
1410 2018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
1412         PR fortran/78238
1413         * gfortran.h (gfc_integer_4_kind): Define.
1414         * resolve.c (resolve_select_type): Make sure that the
1415         kind of c->high is gfc_integer_4_kind.
1417 2018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
1419         PR fortran/30792
1420         * decl.c (gfc_match_data): Check for invalid substring in
1421         data-implied-do
1423 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1425         * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1427 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1429         PR fortran/84511
1430         * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1432 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1434         PR fortran/84346
1435         * interface.c (compare_actual_formal): Issue error if keyword is
1436         used in a statement function.
1438 2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1440         PR fortran/84506
1441         * trans-io.c (set_parameter_value_inquire): Adjust range check of
1442         negative unit values for kind=8 units to the kind=4 negative limit.
1444 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
1446         PR fortran/83149
1447         * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1448         accessing its components.
1450 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
1452         PR fortran/83149
1453         * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1454         before accessing its components.
1456 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
1458         PR fortran/83148
1459         * trans-const.c : Clean up some whitespace issues.
1460         * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1461         derived type has a kind value of zero, set it to the default
1462         integer kind.
1464 2018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
1466         PR fortran/84519
1467         * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1468         argument to stop and error stop decls.
1469         * trans-stmt.c (gfc_trans_stop): Add false value to argument
1470         lists.
1472 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
1474         PR 78534
1475         PR 84509
1476         * trans-decl.c (gfc_build_builtin_function_decls): Pass
1477         gfc_int8_type node to pause_numeric, size_type_node to
1478         pause_string.
1479         * trans-stmt.c (gfc_trans_pause): Likewise.
1481 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
1483         * gfortran.texi: Update Coarray API description.
1484         * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1485         character lengths, int for exit codes.
1486         (generate_coarray_sym_init): Use size_t for character length.
1487         * trans-intrinsic.c (conv_co_collective): Likewise.
1488         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1489         (gfc_trans_event_post_wait): Likewise.
1490         (gfc_trans_sync): Likewise.
1491         (gfc_trans_stop): Use size_t for character lengths, int for exit
1492         codes.
1494 2018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
1496         PR fortran/48890
1497         PR fortran/83823
1498         * primary.c (gfc_convert_to_structure_constructor):
1499         For a constant string constructor, make sure the length
1500         is correct.
1502 2018-02-19  Paul Thomas  <pault@gcc.gnu.org>
1504         PR fortran/83344
1505         PR fortran/83975
1506         * resolve.c (resolve_assoc_var): Rearrange the logic for the
1507         determination of the character length of associate names. If
1508         the associate name is missing a length expression or the length
1509         expression is not a constant and the target is not a variable,
1510         make the associate name allocatable and deferred length.
1511         * trans-decl.c (gfc_get_symbol_decl): Null the character length
1512         backend_decl for deferred length associate names that are not
1513         variables. Set 'length' to gfc_index_zero_node for character
1514         associate names, whose character length is a PARM_DECL.
1516 2018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1518         PR fortran/35339
1519         * frontend-passes.c (traverse_io_block): Remove workaround for
1520         PR 80945.
1522 2018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1524         * gfortran.texi: Document additional src/dst_type.  Fix some typos.
1525         * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
1526         argument of _caf_*_by_ref () with * e { get, send, sendget }.
1527         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
1528         data referenced when generating a call to caf_get_by_ref ().
1529         (conv_caf_send): Same but for caf_send_by_ref () and
1530         caf_sendget_by_ref ().
1532 2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1534         PR fortran/84389
1535         * io.c (check_format): Allow FMT_COLON.
1537 2018-02-18  Paul Thomas  <pault@gcc.gnu.org>
1539         PR fortran/80945
1540         * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
1541         the typenode in the case of deferred length characters.
1543 2018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
1545         PR fortran/84270
1546         * frontend-passes (scalarized_expr):  If the expression
1547         is an assumed size array, leave in the last reference
1548         and pass AR_SECTION instead of AR_FULL to gfc_resolve
1549         in order to avoid an error.
1551 2018-02-17  Paul Thomas  <pault@gcc.gnu.org>
1553         PR fortran/84115
1554         * resolve.c (resolve_assoc_var): If a non-constant target expr.
1555         has no string length expression, make the associate variable
1556         into a deferred length, allocatable symbol.
1557         * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
1558         the symbol.
1559         * trans-stmt.c (trans_associate_var): Null and free scalar
1560         associate names that are allocatable. After assignment, remove
1561         the allocatable attribute to prevent reallocation.
1563 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
1565         PR fortran/84418
1566         * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
1567         kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
1569 2018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
1571         PR fortran/84354
1572         * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
1574 2018-02-15  Janus Weil  <janus@gcc.gnu.org>
1576         PR fortran/84409
1577         * interface.c (check_dtio_arg_TKR_intent): Add a check for character
1578         length.
1580 2018-02-14  Janus Weil  <janus@gcc.gnu.org>
1582         PR fortran/84385
1583         * match.c (gfc_match_select_type): Fix check for selector in
1584         SELECT TYPE statement.
1586 2018-02-13  Janus Weil  <janus@gcc.gnu.org>
1588         PR fortran/84313
1589         * symbol.c (check_conflict): Reject procedure pointers in common blocks.
1591 2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
1592             Janne Blomqvist  <jb@gcc.gnu.org>
1594         * module.c (dump_module): Use lbasename to ensure that module
1595         files are reproducible.
1597 2018-02-12  Janus Weil  <janus@gcc.gnu.org>
1599         PR fortran/84273
1600         * resolve.c (resolve_component): Fix checks of passed argument in
1601         procedure-pointer components.
1603 2018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1605         PR fortran/35299
1606         * resolve.c (resolve_formal_arglist): Update error message.
1608 2018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
1610         * gfortran.texi: Fix typos in documentation of caf_register ().
1611         * trans-array.c (structure_alloc_comps): Only register a component of
1612         a derived typed corray, not of an ultimate component coarray.
1614 2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1616         PR fortran/54223
1617         PR fortran/84276
1618         * interface.c (compare_actual_formal): Add in_statement_function
1619         bool parameter.  Skip check of INTENT attribute for statement
1620         functions.  Arguments to a statement function cannot be optional,
1621         issue error for missing argument.
1622         (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
1623          in_statement_function.
1625 2018-02-11  Paul Thomas  <pault@gcc.gnu.org>
1627         PR fortran/84074
1628         * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
1629         flag. If the is a vector subscript or the expression is not a
1630         variable, make the descriptor one-based.
1632 2018-02-10  Paul Thomas  <pault@gcc.gnu.org>
1634         PR fortran/84141
1635         PR fortran/84155
1636         * trans-array.c (gfc_array_init_size): Revert the change made
1637         in revision 257356 setting the dtype.
1638         * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
1639         Call gfc_get_dtype_rank_type every time.
1641         PR fortran/56691
1642         * trans-array.c (gfc_conv_expr_descriptor): If the source array
1643         is a descriptor type, use its offset, removing the condition
1644         that is be a class expression.
1646 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1648         PR fortran/82994
1649         * match.c (gfc_match_deallocate): Check for NULL pointer.
1651 2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1653         PR fortran/68560
1654         * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
1655         (gfc_conv_intrinsic_function): Call it.
1657 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1659         PR fortran/82049
1660         * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
1661         try to resolve it.  While here return early if possible.
1663 2018-02-04  Paul Thomas  <pault@gcc.gnu.org>
1665         PR fortran/84115
1666         * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
1667         'length' if the symbol charlen backend_decl is an indirect ref.
1669 2018-02-03  Paul Thomas  <pault@gcc.gnu.org>
1671         PR fortran/84141
1672         PR fortran/84155
1673         * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
1674         use gfc_get_dtype_rank_type.
1676 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
1678         PR 83975
1679         PR 83344
1680         * resolve.c (resolve_assoc_var): Generate an error if
1681         target length unknown.
1683 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
1685         PR fortran/83705
1686         * simplify.c (gfc_simplify_repeat): Increase limit for deferring
1687         to runtime, print a warning message.
1689 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
1691         PR fortran/84116
1692         * openmp.c (gfc_match_omp_clauses): If all the linear
1693         gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
1694         nor set *head = NULL.  Formatting fixes.
1696 2018-01-31  Paul Thomas  <pault@gcc.gnu.org>
1698         PR fortran/84088
1699         * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
1700         an address expression passed to an assumed rank dummy, convert
1701         to an indirect reference.
1703 2018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
1705         * dump-parse-tree.c (write_proc): Use sym_name (which may
1706         be sym->binding_label) instead of sym->name.
1708 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
1710         * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
1711         of int for slen.
1713 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
1715         PR fortran/78534
1716         * trans-expr.c (fill_with_spaces): Use memset instead of
1717         generating loop.
1718         (gfc_trans_string_copy): Improve opportunity to use builtins with
1719         constant lengths.
1721 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
1723         PR debug/84131
1724         * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
1725         to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
1727 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1729         PR fortran/84134
1730         * array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
1731         zero, return false.
1733 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1735         PR fortran/84133
1736         * frontend-passes (matmul_to_var_expr): Return early if
1737         in association list.
1738         (inline_matmul_assign): Likewise.
1740 2017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1742         PR fortran/84073
1743         * resolve.c (resolve_component): Ensure BIND(C) character
1744         components have length one.
1745         (resolve_symbol): Likewise for variables.
1747 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
1749         PR fortran/84065
1750         * decl.c (add_init_expr_to_sym): Ignore initializers for too large
1751         lengths.
1753 2018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
1754             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1755             Soren Rasmussen  <s.c.rasmussen@gmail.com>
1757         Partial support for Fortran 2018 teams features.
1759         * array.c (gfc_match_array_ref): add team attribute in coarray
1760         transfers.
1761         * check.c (gfc_check_get_team, gfc_check_team_number): add new
1762         functions for get_team and team_number.
1763         * dump-parse-tree.c (show_code_node): add new statements: form team,
1764         change team, end team, and sync team.
1765         * expr.c (gfc_find_team_co): add new function.
1766         * gfortran.h: add new statements.
1767         * intrinsic.c (add_functions): add get_team and team_number functions.
1768         * intrinsic.h: add get_team and team_number prototypes for check,
1769         simplify, and resolve.
1770         * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
1771         functions.
1772         * iso-fortran-env.def: add the team_type derived type.
1773         * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
1774         (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
1775         add change team, end team, form team, sync team match and functions.
1776         * match.h: add new prototypes for change team, end team, form team,
1777         and sync team.
1778         * parse.c (decode_statement): add cases for change team, end team,
1779         form team, and sync team.
1780         * resolve.c: add cases for exec form team, change team, end team, and
1781         sync team.
1782         * simplify.c (gfc_simplify_get_team): add new function for get team.
1783         * st.c (gfc_free_statement): add cases exec for change team, end team,
1784         form team, sync team.
1785         * trans-decl.c (gfor_fndecl_caf_form_team)
1786         (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
1787         (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
1788         (gfor_fndecl_caf_team_number): add functions and definitions.
1789         * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
1790         new function and team_type argument support.
1791         * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
1792         (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
1793         * trans-stmt.h: add new prototypes.
1794         * trans-types.c (gfc_get_derived_type): check condition for team_type.
1795         * trans.c (trans_code): new exec cases for form team, change team, end
1796         team, and sync team.
1797         * trans.h: add new prototypes.
1799 2018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
1801         PR fortran/83998
1802         * simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
1803         or .false.  The summation does the correct type conversion.
1804         (gfc_simplify_dot_product): Special case zero-sized arrays.
1806 2018-25-01  Paul Thomas  <pault@gcc.gnu.org>
1808         PR fortran/37577
1809         * array.c (gfc_match_array_ref): If standard earlier than F2008
1810         it is an error if the reference dimension is greater than 7.
1811         libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
1812         dtype masks and shifts accordingly.
1813         * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
1814         type node to check the field.
1815         (gfc_conv_descriptor_dtype): Access the rank field of dtype.
1816         (duplicate_allocatable_coarray): Access the rank field of the
1817         dtype descriptor rather than the dtype itself.
1818         * trans-expr.c (get_scalar_to_descriptor_type): Store the type
1819         of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
1820         (ie. a character).
1821         (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
1822         get_scalar_to_descriptor_type if the actual expression is a
1823         constant.
1824         (gfc_trans_structure_assign): Assign the rank directly to the
1825         dtype rank field.
1826         * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
1827         to default integer kind.
1828         (gfc_conv_intrinsic_sizeof): Obtain the element size from the
1829         'elem_len' field of the dtype.
1830         * trans-io.c (gfc_build_io_library_fndecls): Replace
1831         gfc_int4_type_node with dtype_type_node where necessary.
1832         (transfer_namelist_element): Use gfc_get_dtype_rank_type for
1833         scalars.
1834         * trans-types.c : Provide 'get_dtype_type_node' to acces the
1835         dtype_type_node and, if necessary, build it.
1836         The maximum size of an array element is now determined by the
1837         maximum value of size_t.
1838         Update the description of the array descriptor, including the
1839         type def for the dtype_type.
1840         (gfc_get_dtype_rank_type): Build a constructor for the dtype.
1841         Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
1842         (gfc_get_array_descriptor_base): Change the type of the dtype
1843         field to dtype_type_node.
1844         (gfc_get_array_descr_info): Get the offset to the rank field of
1845         the dtype.
1846         * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
1847         * trans.h : Define the indices of the dtype fields.
1849 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
1851         PR fortran/83866
1852         * decl.c (gfc_match_derived_decl): If eos not matched, recover
1853         and emit error about garbage after declaration.
1855 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
1857         PR fortran/83898
1858         * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
1859         for characters.
1861 2018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
1863         PR 78534
1864         PR 83704
1865         * arith.c (gfc_arith_concat): Use size_t for string length.
1866         (gfc_compare_string): Likewise.
1867         (gfc_compare_with_Cstring): Likewise.
1868         * array.c (gfc_resolve_character_array_constructor): Use
1869         HOST_WIDE_INT, gfc_mpz_get_hwi.
1870         * check.c (gfc_check_fe_runtime_error): Use size_t.
1871         * data.c (create_character_initializer): Use HOST_WIDE_INT,
1872         gfc_extract_hwi.
1873         * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
1874         (add_init_expr_to_sym): Use HOST_WIDE_INT.
1875         * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
1876         gfc_extract_hwi.
1877         (gfc_apply_init): Likewise.
1878         * match.h (gfc_set_constant_character_len): Update prototype.
1879         * primary.c (match_string_constant): Use size_t.
1880         * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
1881         gfc_mpz_get_hwi.
1882         * simplify.c (init_result_expr): Likewise.
1883         (gfc_simplify_len_trim): Use size_t.
1884         * target-memory.c (gfc_encode_character): Use size_t.
1885         (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
1886         (interpret_array): Use size_t.
1887         (gfc_interpret_character): Likewise.
1888         * target-memory.h (gfc_encode_character): Update prototype.
1889         (gfc_interpret_character): Likewise.
1890         (gfc_target_interpret_expr): Likewise.
1891         * trans-const.c (gfc_build_string_const): Use size_t for length
1892         argument.
1893         (gfc_build_wide_string_const): Likewise.
1894         * trans-const.h (gfc_build_string_const): Likewise.
1895         (gfc_build_wide_string_const): Likewise.
1897 2018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1899         PR fortran/83900
1900     * simplify.c (gfc_simplify_matmul): Set return type correctly.
1902 2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1904         PR fortran/83900
1905         * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
1907 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
1909         PR fortran/83864
1910         * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1912 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
1914         PR fortran/83874
1915         * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1917 2018-01-15  Louis Krupp  <louis.krupp@zoho.com>
1919         PR fortran/82257
1920         * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
1921         from symbol marked unlimited polymorphic.
1922         * resolve.c (resolve_structure_cons): Likewise.
1923         * misc.c (gfc_typename): Don't dereference derived->components
1924         if it's NULL.
1926 2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1928         PR fortran/54613
1929         * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
1930         (gfc_logical_4_kind): New macro
1931         * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
1932         (gfc_simplify_maxloc): Likewise.
1933         (gfc_resolve_maxloc): Likewise.
1934         (gfc_resolve_minloc): Likewise.
1935         * check.c (gfc_check_minloc_maxloc): Add checking for "back"
1936         argument; also raise error if it is used (for now). Add it
1937         if it isn't present.
1938         * intrinsic.c (add_sym_4ml): Rename to
1939         (add_sym_5ml), adjust for extra argument.
1940         (add_functions): Add "back" constant. Adjust maxloc and minloc
1941         for back argument.
1942         * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
1943         not of gfc_logical_4_kind, convert.
1944         (gfc_resolve_minloc): Likewise.
1945         * simplify.c (gfc_simplify_minloc): Add back argument.
1946         (gfc_simplify_maxloc): Likewise.
1947         * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
1948         argument to %VAL to ensure passing by value.
1949         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
1950         also for library calls.
1952 2018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1954         PR fortran/82007
1955         * resolve.c (resolve_transfer): Delete code looking for 'DT'
1956         format specifiers in format strings. Set formatted to true if a
1957         format string or format label is present.
1958         * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
1959         whitespace.
1961 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1963         PR fortran/83744
1964         * dump-parse-tree.c (get_c_type_name): Remove extra line.
1965         Change for loop to use declaration in for loop. Handle BT_LOGICAL
1966         and BT_CHARACTER.
1967         (write_decl): Add where argument. Fix indentation. Replace
1968         assert with error message. Add typename to warning
1969         in comment.
1970         (write_type): Adjust locus to call of write_decl.
1971         (write_variable): Likewise.
1972         (write_proc): Likewise. Replace assert with error message.
1974 2018-01-13  Paul Thomas  <pault@gcc.gnu.org>
1976         PR fortran/52162
1977         * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1978         the rhs expression is neither an elemental nor a conversion
1979         function.
1981         PR fortran/83622
1982         * trans-array.c (is_pointer_array): Remove unconditional return
1983         of false for -fopenmp.
1985 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1986         <emsr@gcc.gnu.org>
1988         PR fortran/83803
1989         * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1990         for functions.
1992 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1994         PR fortran/82367
1995         * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1997 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1999         PR fortran/83093
2000         * resolve.c (resolve_charlen): Check the type of cl->length
2001         after resolution.
2003 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
2005         PR fortran/83740
2006         * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2008 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
2010         PR fortran/83740
2011         * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2012         LHS type when assigning.
2014 2018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2016         PR fortran/83742
2017         * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2019 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2021         * match.c (gfc_match_allocate): Check for NULL pointer.
2023 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2025         * expr.c (gfc_check_pointer_assign): Fix typo in comment.
2027 2018-01-08  Paul Thomas  <pault@gcc.gnu.org>
2029         PR fortran/83611
2030         * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2031         an initializer, convert the kind parameters and add to the
2032         component if the instance.
2033         * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2034         use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2035         for parameterized arrays. Clean up typos in comments. Convert
2036         parameterized array initializers and copy into the array.
2037         * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2038         parameterized types.
2039         *trans-stmt.c (trans_associate_var): Deallocate associate vars
2040         as necessary, when they are PDT function results for example.
2042         PR fortran/83731
2043         * trans-array.c (structure_alloc_comps): Only compare len parms
2044         when they are declared explicitly.
2046 2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
2048         PR fortran/50892
2049         * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2050         lhs type.
2052 2018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
2054         PR fortran/78534
2055         PR fortran/66310
2056         * array.c (got_charlen): Use gfc_charlen_int_kind.
2057         * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2058         hardcoded kind.
2059         (find_intrinsic_vtab): Likewise.
2060         * decl.c (match_char_length): Use gfc_charlen_int_kind.
2061         (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2062         (gfc_match_implicit): Use gfc_charlen_int_kind.
2063         * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2064         (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2065         * expr.c (gfc_get_character_expr): Length parameter of type
2066         gfc_charlen_t.
2067         (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2068         (gfc_extract_hwi): New function.
2069         (simplify_const_ref): Make string_len of type gfc_charlen_t.
2070         (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2071         * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2072         * gfortran.h (gfc_mpz_get_hwi): New prototype.
2073         (gfc_mpz_set_hwi): Likewise.
2074         (gfc_charlen_t): New typedef.
2075         (gfc_expr): Use gfc_charlen_t for character lengths.
2076         (gfc_size_kind): New extern variable.
2077         (gfc_extract_hwi): New prototype.
2078         (gfc_get_character_expr): Use gfc_charlen_t for character length.
2079         (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2080         * gfortran.texi: Update description of hidden string length argument.
2081         * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2082         (gfc_resolve_char_achar): Likewise.
2083         (gfc_resolve_repeat): Pass string length directly without
2084         temporary, use gfc_charlen_int_kind.
2085         (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2086         * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2087         * misc.c (gfc_mpz_get_hwi): New function.
2088         (gfc_mpz_set_hwi): New function.
2089         * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2090         (parse_integer): Don't complain about large integers.
2091         (write_atom): Use HOST_WIDE_INT for integers.
2092         (mio_integer): Handle integer type mismatch.
2093         (mio_hwi): New function.
2094         (mio_intrinsic_op): Use HOST_WIDE_INT.
2095         (mio_array_ref): Likewise.
2096         (mio_expr): Likewise.
2097         * primary.c (match_substring): Use gfc_charlen_int_kind.
2098         * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2099         (resolve_character_operator): Likewise.
2100         (resolve_assoc_var): Likewise.
2101         (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2102         (resolve_charlen): Use mpz_sgn to determine sign.
2103         * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2104         instead of long.
2105         * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2106         * target-memory.c (size_character): Length argument of type
2107         gfc_charlen_t.
2108         (gfc_encode_character): Likewise.
2109         (gfc_interpret_character): Use gfc_charlen_t.
2110         * target-memory.h (gfc_encode_character): Modify prototype.
2111         * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2112         (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2113         (trans_array_constructor): Use existing type.
2114         (get_array_charlen): Likewise.
2115         * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2116         * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2117         * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2118         (add_argument_checking): Likewise.
2119         * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2120         gfc_charlen_type_node.
2121         (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2122         4, fold_convert to correct type.
2123         (gfc_conv_class_to_class): Build const of type size_type_node for
2124         size.
2125         (gfc_copy_class_to_class): Likewise.
2126         (gfc_conv_string_length): Use same type in expression.
2127         (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2128         (gfc_conv_string_tmp): Make sure len is of the right type.
2129         (gfc_conv_concat_op): Use same type in expression.
2130         (gfc_conv_procedure_call): Likewise.
2131         (fill_with_spaces): Comment out memset() block due to spurious
2132         -Wstringop-overflow warnings.
2133         (gfc_trans_string_copy): Use gfc_charlen_type_node.
2134         (alloc_scalar_allocatable_for_subcomponent_assignment):
2135         fold_convert to right type.
2136         (gfc_trans_subcomponent_assign): Likewise.
2137         (trans_class_vptr_len_assignment): Build const of correct type.
2138         (gfc_trans_pointer_assignment): Likewise.
2139         (alloc_scalar_allocatable_for_assignment): fold_convert to right
2140         type in expr.
2141         (trans_class_assignment): Build const of correct type.
2142         * trans-intrinsic.c (gfc_conv_associated): Likewise.
2143         (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2144         * trans-io.c (gfc_build_io_library_fndecls): Use
2145         gfc_charlen_type_node for character lengths.
2146         (set_string): Convert to right type in assignment.
2147         * trans-stmt.c (gfc_trans_label_assign): Build const of
2148         gfc_charlen_type_node.
2149         (trans_associate_var): Likewise.
2150         (gfc_trans_character_select): Likewise.
2151         (gfc_trans_allocate): Likewise, don't typecast strlen result.
2152         (gfc_trans_deallocate): Don't typecast strlen result.
2153         * trans-types.c (gfc_size_kind): New variable.
2154         (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2155         from size_type_node.
2156         * trans-types.h: Fix comment.
2158 2018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
2160         PR fortran/83683
2161         PR fortran/45689
2162         * check.c (gfc_check_eoshift): Check for string length and
2163         for conformance of boundary.
2164         * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2165         * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2166         * simplify.c (gfc_simplify_eoshift): New function.
2168 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2169             Alan Hayward  <alan.hayward@arm.com>
2170             David Sherwood  <david.sherwood@arm.com>
2172         * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2174 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2175             Alan Hayward  <alan.hayward@arm.com>
2176             David Sherwood  <david.sherwood@arm.com>
2178         * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2180 2018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
2182         PR fortran/83664
2183         * check.c (gfc_check_eoshift): Error for missing boundary if array
2184         is not one of the standard types.
2186 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
2188         Update copyright years.
2190         * gfortranspec.c (lang_specific_driver): Update copyright notice
2191         dates.
2192         * gfc-internals.texi: Bump @copying's copyright year.
2193         * gfortran.texi: Ditto.
2194         * intrinsic.texi: Ditto.
2195         * invoke.texi: Ditto.
2197 2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2199         PR fortran/45689
2200         * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2201         gfc_simplify_minloc to maxloc and minloc, respectively.
2202         * intrinsic.h: Add prototypes for gfc_simplify_minloc
2203         and gfc_simplify_maxloc.
2204         * simplify.c (min_max_chose): Adjust prototype.  Modify function
2205         to have a return value which indicates if the extremum was found.
2206         (is_constant_array_expr): Fix typo in comment.
2207         (simplify_minmaxloc_to_scalar): New function.
2208         (simplify_minmaxloc_nodim): New function.
2209         (new_array): New function.
2210         (simplify_minmaxloc_to_array): New function.
2211         (gfc_simplify_minmaxloc): New function.
2212         (simplify_minloc): New function.
2213         (simplify_maxloc): New function.
2215 2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2217         PR fortran/45689
2218         PR fortran/83650
2219         * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2220         range of arguments.
2222 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
2224         PR fortran/83076
2225         * resolve.c (resolve_fl_derived0): Add caf_token fields for
2226         allocatable and pointer scalars, when -fcoarray selected.
2227         * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2228         field as well as the backend_decl.
2229         (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2230         derived types that are not vtypes. Components with caf_token
2231         attribute are pvoid types. For a component requiring it, find
2232         the caf_token field and have the component token field point to
2233         its backend_decl.
2235         PR fortran/83319
2236         *trans-types.c (gfc_get_array_descriptor_base): Add the token
2237         field to the descriptor even when codimen not set.
2239 Copyright (C) 2018 Free Software Foundation, Inc.
2241 Copying and distribution of this file, with or without modification,
2242 are permitted in any medium without royalty provided the copyright
2243 notice and this notice are preserved.