re PR fortran/87992 (ICE in resolve_fl_variable, at fortran/resolve.c:12314)
[official-gcc.git] / gcc / fortran / ChangeLog
blob04eade51b47e219bdcda50add080f06de0b7389f
1 2018-12-19  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/87992
4         * resolve.c (resolve_fl_variable): Avoid a NULL pointer.
6 2018-12-16  Steven G. Kargl  <kargl@gcc.gnu.org>
8         * resolve.c (resolve_transfer): Remove dead code.
10 2018-12-16  Steven G. Kargl  <kargl@gcc.gnu.org>
12         PR fortran/88116
13         PR fortran/88467
14         * array.c (gfc_match_array_constructor): Check return value of
15         gfc_convert_type().  Skip constructor elements with BT_UNKNOWN,
16         which need to go through resolution.
17         * intrinsic.c (gfc_convert_type_warn): Return early if the types
18         match (i.e., no conversion is required).
19         * simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
20         and return gfc_bad_expr.
22 2018-12-16  Steven G. Kargl  <kargl@gcc.gnu.org>
24         * decl.c (variable_decl): Typo fixes in comment and error messsage.
26 2018-12-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
28         PF fortran/88364
29         * trans-expr.c (gfc_conv_expr_reference): Do not add clobber if
30         the expression contains a reference.
32 2018-12-15  Steven G. Kargl  <kargl@gcc.gnu.org>
34         PR fortran/87944
35         * decl.c (match_data_constant): Allow inquiry parameter as data
36         constant in data statement.
38 2018-12-15  Steven G. Kargl  <kargl@gcc.gnu.org>
40         PR fortran/88138
41         * decl.c (variable_decl): Check that a derived isn't being assigned
42         an incompatible entity in an initialization.
44 2018-12-12  Jakub Jelinek  <jakub@redhat.com>
46         PR fortran/88463
47         * trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
48         VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
50 2018-12-11  Steven G. Kargl  <kargl@gcc.gnu.org>
52         PR fortran/88155
53         * primary.c (gfc_match_structure_constructor):  Set the locus of
54         an expression to avoid a NULL pointer dereference.
56 2018-12-11  Steven G. Kargl  <kargl@gcc.gnu.org>
58         PR fortran/88249
59         * gfortran.h: Update prototype for gfc_resolve_filepos().
60         * io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
61         Use passed in locus for error message.
62         * resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
63         call.
65 2018-12-10  Steven G. Kargl  <kargl@gcc.gnu.org>
67         PR fortran/97922
68         * io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
70 2018-12-10  Steven G. Kargl  <kargl@gcc.gnu.org>
72         PR fortran/88269
73         * io.c (io_constraint): Update macro. If locus line buffer is NULL,
74         use gfc_current_locus in error messages.
75         (check_io_constraints): Catch missing IO UNIT in write and read
76         statements.  io_constraint macro is incompatible here.
78 2018-12-09  Steven G. Kargl  <kargl@gcc.gnu.org>
80         PR fortran/88205
81         * io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
83 2018-12-09  Steven G. Kargl  <kargl@gcc.gnu.org>
85         PR fortran/88206
86         * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
88 2018-12-09  Fritz Reese  <fritzoreese@gmail.com>
90         PR fortran/88228
91         * resolve.c (resolve_operator):  Do not call resolve_function.
92         Break like other cases.
94 2018-12-09  Cesar Philippidis  <cesar@codesourcery.com>
96         * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the
97         location of combined acc loops.
99 2018-12-09  Thomas Schwinge  <thomas@codesourcery.com>
101         * openmp.c (resolve_oacc_loop_blocks): Remove checking of OpenACC
102         loop clauses.
104         PR fortran/88420
105         * openmp.c (resolve_oacc_loop_blocks): Remove "Clause SEQ
106         conflicts with INDEPENDENT" diagnostic.
108 2018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
110         PR fortran/88048
111         * resolve.c (check_data_variable): Named constant cannot be a
112         data object.
114 2018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
116         PR fortran/87945
117         * decl.c (var_element): Inquiry parameters cannit be data objects.
119 2018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
121         PR fortran/88025
122         * expr.c (gfc_apply_init):  Remove asserts that cannot trigger.
123         Check for a NULL pointer.
125 2018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
127         PR fortran/88357
128         * class.c (insert_component_ref): Check for NULL pointer and 
129         previous error message issued.
130         * parse.c (parse_associate): Check for NULL pointer.
131         * resolve.c (resolve_assoc_var): Check for NULL pointer.
133 2018-12-07  Jakub Jelinek  <jakub@redhat.com>
135         PR fortran/88377
136         * trans-openmp.c (gfc_omp_clause_default_ctor,
137         gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
138         gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
139         GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
140         have pointer type.
142 2018-12-03  Fritz Reese  <fritzoreese@gmail.com>
143             Mark Eggleston  <mark.eggleston@codethink.co.uk>
145         PR fortran/87919
146         * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
147         (set_dec_flags): Set/unset DEC and std flags according to value.
148         (post_dec_flags, set_init_local_zero): New functions.
149         (gfc_init_options): Use set_init_local_zero and post_dec_flags.
150         (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
151         SET_BITFLAG.
152         <case OPT_finit_local_zero>: Use set_init_local_zero.
153         <case OPT_fdec>: Pass value to set_dec_flags.
154         <case OPT_fdec_structure>: Remove.
156 2018-11-30  Thomas Schwinge  <thomas@codesourcery.com>
158         * gfortran.h (struct gfc_omp_clauses): Remove "wait".  Adjust all
159         users.
161         * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
162         clauses.
164 2018-11-27  Martin Liska  <mliska@suse.cz>
166         * decl.c (gfc_match_gcc_builtin): New function.
167         * gfortran.h (struct vect_builtin_tuple): New.
168         (gfc_adjust_builtins): Likewise.
169         * lang-specs.h (TARGET_F951_OPTIONS): New.
170         (F951_OPTIONS): Use it.
171         * lang.opt: Add new option -fpre-include.
172         * match.h (gfc_match_gcc_builtin): Declare new function.
173         * parse.c (decode_gcc_attribute): Handle builtin.
174         (parse_progunit): Call gfc_adjust_builtins.
175         * scanner.c (gfc_new_file): Load pre-included header file
176         when provided.
177         * trans-intrinsic.c (add_simd_flag_for_built_in): New.
178         (gfc_adjust_builtins): Likewise.
180 2018-11-24  Paul Thomas  <pault@gcc.gnu.org>
182         PR fortran/88143
183         * resolve.c (resolve_variable): Check for associate names with
184         NULL target.
186 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
188         * lang.opt (fpad-source): New option.
189         * scanner.c (load_line): Don't pad fixed form lines if
190         !flag_pad_source.
191         * invoke.texi (-fno-pad-source): Document.
193 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
195         * invoke.texi (-fdec-include): Document.
197 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
198             Mark Eggleston  <mark.eggleston@codethink.com>
200         * lang.opt (fdec-include): New option.
201         * options.c (set_dec_flags): Set also flag_dec_include.
202         * scanner.c (include_line): Change return type from bool to int.
203         In fixed form allow spaces in between include keyword letters.
204         For -fdec-include, allow in fixed form 0 in column 6.  With
205         -fdec-include return -1 if the parsed line is not full include
206         statement and it could be successfully completed on continuation
207         lines.
208         (include_stmt): New function.
209         (load_file): Adjust include_line caller.  If it returns -1, keep
210         trying include_stmt until it stops returning -1 whenever adding
211         further line of input.
213 2018-11-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
215         PR fortran/88073
216         * frontend-passes.c (combine_array_constructor): Do not do
217         anything if in a WHERE statement.
219 2018-11-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
221         PR fortran/70260
222         * expr.c (gfc_check_assign): Reject assigning to an external
223         symbol.
224         (gfc_check_pointer_assign): Add suppress_type_test
225         argument. Insert line after if. A non-proc pointer can not point
226         to a constant.  Only check types if suppress_type_test is false.
227         * gfortran.h (gfc_check_pointer_assign): Add optional
228         suppress_type_test argument.
229         * resolve.c (gfc_resolve_code):  Move up gfc_check_pointer_assign
230         and give it the extra argument.
231         (resolve_fl_procedure): Set error on value for a function with
232         an inizializer.
234 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
236         PR other/19165
237         * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
239 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
241         * cpp.c: Replace "source_location" with "location_t".
242         * gfortran.h: Likewise.
244 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
246         * trans-openmp.c (gfc_trans_omp_clauses): Use
247         OMP_CLAUSE_DEFAULTMAP_SET_KIND.
248         (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
249         rather than OMP_ATOMIC_SEQ_CST.
250         (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
251         make_node instead of build1_loc.
252         * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
253         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
254         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
255         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
256         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
257         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
258         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
260 2018-11-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
262         PR fortran/46020
263         * decl.c (verify_bind_c_sym): Remove unnecessary space
264         in error message.
266 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
268         PR fortran/87782
269         * frontend-passes.c (constant_string_length): If there is a
270         substring with a length which cannot be reduced to a constant,
271         return NULL.
273 2018-11-01  Paul Thomas  <pault@gcc.gnu.org>
275         PR fortran/40196
276         * dependency.c (are_identical_variables): Return false if the
277         inquiry refs are not the same.
278         (gfc_ref_needs_temporary_p): Break on an inquiry ref.
279         * dump_parse_tree.c (show_ref): Show the inquiry ref type.
280         * expr.c (gfc_free_ref_list): Break on an inquiry ref.
281         (gfc_copy_ref): Copy the inquiry ref types.
282         (find_inquiry_ref): New function.
283         (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
284         to simplify_ref_chain.
285         (gfc_simplify_expr): Use the new arg in call to
286         simplify_ref_chain.
287         (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
288         inquiry ref.
289         (gfc_traverse_expr): Return true for inquiry ref.
290         * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
291         * gfortran.h : Add enums and union member in gfc_ref to
292         implement inquiry refs.
293         * intrinsic.c : Fix white nois.
294         * match.c (gfc_match_assignment): A constant lavlue is an
295         error.
296         * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
297         for inquiry_types.
298         (mio_ref): Handle inquiry refs.
299         * primary.c (is_inquiry_ref): New function.
300         (gfc_match_varspec): Handle inquiry refs calling new function.
301         (gfc_variable_attr): Detect inquiry ref for disambiguation
302         with components.
303         (caf_variable_attr): Treat inquiry and substring refs in the
304         same way.
305         * resolve.c (find_array_spec): ditto.
306         (gfc_resolve_substring_charlen): If there is neither a charlen
307         ref not an inquiry ref, return.
308         (resolve_ref): Handle inqiry refs as appropriate.
309         (resolve_allocate_expr): Entities with an inquiry ref cannot be
310         allocated.
311         * simplify.c (simplify_bound, simplify_cobound): Punt on
312         inquiry refs.
313         * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
314         ref.
315         *trans-expr.c (conv_inquiry): New function.
316         (gfc_conv_variable): Retain the last typespec to pass to
317         conv_inquiry on detecting an inquiry ref.
319 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
321         PR fortran/46020
322         * decl.c (verify_bind_c_sym): Improve error message.
324 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
326         PR fortran/54613
327         * gfortran.texi (File format of unformatted sequential files):
328         Replace random comma with period.
329         * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
330         (FINDLOC): Document.
331         (MAXLOC): Add refrence to FINDLOC.
332         (MINLOC): Likewise.
334 2018-10-31  Nathan Sidwell  <nathan@acm.org>
336         * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
338 2018-10-31  Martin Liska  <mliska@suse.cz>
340         * trans-decl.c (struct module_hasher): Call htab_hash_string
341         for s->name and not for s.
343 2018-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
345         PR fortran/85896
346         * simplify.c (simplify_min_max): Do not convert the type of the
347         return expression.
349 2017-10-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
351         PR fortran/54613
352         * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
353         (gfc_check_f): Add f6fl field.
354         (gfc_simplify_f): Add f6 field.
355         (gfc_resolve_f): Likewise.
356         (gfc_type_letter): Add optional logical_equas_int flag.
357         * check.c (intrinsic_type_check): New function.
358         (gfc_check_findloc): New function.
359         * intrinsics.c (gfc_type_letter): If logical_equals_int is
360         set, act accordingly.
361         (add_sym_5ml):  Reformat comment.
362         (add_sym_6fl): New function.
363         (add_functions): Add findloc.
364         (check_arglist): Add sixth argument, handle it.
365         (resolve_intrinsic): Likewise.
366         (check_specific): Handle findloc.
367         * intrinsic.h (gfc_check_findloc): Add prototype.
368         (gfc_simplify_findloc): Likewise.
369         (gfc_resolve_findloc): Likewise.
370         (MAX_INTRINSIC_ARGS): Adjust.
371         * iresolve.c (gfc_resolve_findloc): New function.
372         * simplify.c (gfc_simplify_minmaxloc): Make static.
373         (simplify_findloc_to_scalar): New function.
374         (simplify_findloc_nodim): New function.
375         (simplify_findloc_to_array): New function.
376         (gfc_simplify_findloc): New function.
377         (gfc_conv_intrinsic_findloc): New function.
378         (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
379         (gfc_is_intrinsic_libcall): Likewise.
381 2018-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
383         PR fortran/86907
384         * frontend-passes.c (check_locus_code): Add information that
385         warning about missing location information points to an
386         inconsisten internal state.
387         (check_locus_expr): Likewise.
389 2018-10-25  Jakub Jelinek  <jakub@redhat.com>
391         PR fortran/87725
392         * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
393         nonmonotonic modifiers regardless of if they have been parsed
394         already or if the opposite one has.  Fix up check whether
395         comma after modifier should be parsed.
396         (resolve_omp_clauses): Diagnose schedule modifier restrictions.
398 2018-10-23  Paul Thomas  <pault@gcc.gnu.org>
400         PR fortran/85603
401         * frontend-passes.c (get_len_call): New function to generate a
402         call to intrinsic LEN.
403         (create_var): Use this to make length expressions for variable
404         rhs string lengths.
405         Clean up some white space issues.
407 2018-10-21  Paul Thomas  <pault@gcc.gnu.org>
409         PR fortran/71880
410         * trans-expr.c (gfc_trans_pointer_assignment): Set the string
411         length for array valued deferred length lhs.
413 2018-10-18  Tobias Burnus  <burnus@net-b.de>
415         PR fortran/87625
416         * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
417         polymorphic arrays.
419 2018-10-18  Paul Thomas  <pault@gcc.gnu.org>
421         PR fortran/58618
422         * trans-stmt.c (trans_associate_var): All strings that return
423         as pointer types can be assigned directly to the associate
424         name so remove 'attr' and the condition that uses it.
426 2018-10-18  Paul Thomas  <pault@gcc.gnu.org>
428         PR fortran/58618
429         * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
430         initialization with NULL() of a deferred length pointer.
432 2018-10-17  Tobias Burnus  <burnus@net-b.de>
434         PR fortran/87632
435         * resolve.c (resolve_select_type): Use correct variable.
437 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
439         * Make-lang.in (selftest-fortran): New.
441 2018-10-17  Paul Thomas  <pault@gcc.gnu.org>
443         PR fortran/56386
444         PR fortran/58906
445         PR fortran/77385
446         PR fortran/80260
447         PR fortran/82077
448         * resolve.c (resolve_variable): Fix up expressions with array
449         associate names, where the parser did not detect that this is
450         array and there was no array part_ref in the expression.
452 2018-10-16  Tobias Burnus  <burnus@net-b.de>
454         PR fortran/67125
455         * trans-array.c (gfc_array_init_size, gfc_array_allocate):
456         Rename argument e3_is_array_constr to e3_has_nodescriptor
457         and update comments.
458         * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
459         to 1 for nonalloc/nonpointer func results/vars besides
460         array constructors.
462 2018-10-16  Tobias Burnus  <burnus@net-b.de>
464         PR fortran/87556
465         * trans-stmt.c (form_team, change_team, sync_team):
466         Don't ignore argse.pre/argse.post.
468 2018-10-15  Paul Thomas  <pault@gcc.gnu.org>
469         Tobias Burnus  <burnus@gcc.gnu.org>
471         PR fortran/87566
472         * resolve.c (resolve_assoc_var): Add missing array spec for
473         class associate names.
474         (resolve_select_type): Handle case where last typed component
475         of the selector has a different type to the expression.
476         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
477         call to gfc_expr_to_initialize with call to gfc_copy_expr.
478         (gfc_conv_class_to_class): Guard assignment to 'len' field
479         against case where zero constant is supplied.
481 2018-10-12  Tobias Burnus  <burnus@net-b.de>
483         PR fortran/87597
484         * expr.c (gfc_simplify_expr): Avoid simplifying
485         the 'array' argument to lbound/ubound/lcobound/
486         ucobound.
488 2018-10-12  Tobias Burnus <burnus@net-b.de>
490         PR fortran/58787
491         * decl.c (get_proc_name): Return with error before
492         creating sym_tree.
494 2018-10-11  Tobias Burnus <burnus@net-b.de>
496         Revert:
497         2018-10-09  Tobias Burnus <burnus@net-b.de>
499         PR fortran/83522
500         * resolve.c (resolve_ref): Reject nonscalar
501         substring references.
503 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
505         * cpp.c (gfc_cpp_init_0): Update for renamings.
506         (cb_cpp_error): Rename to...
507         (cb_cpp_diagnostic): ...this, converting level and reason to
508         enums.
510 2018-10-09  Tobias Burnus <burnus@net-b.de>
512         PR fortran/83522
513         * resolve.c (resolve_ref): Reject nonscalar
514         substring references.
516 2018-10-09  Paul Thomas  <pault@gcc.gnu.org>
518         PR fortran/87151
519         * trans-array.c (gfc_get_array_span): Deal with deferred char
520         array components having a TYPE_MAX_VALUE of zero.
521         (gfc_array_init_size): Use the hidden string length component
522         to build the descriptor dtype.
523         (gfc_array_allocate): Remove the erroneous replacement of the
524         charlen backend decl with a temporary.
525         (gfc_conv_expr_descriptor): Use the ss_info string length in
526         the case of deferred character components.
527         (gfc_alloc_allocatable_for_assignment): Actually compare the
528         string lengths for deferred characters. Make sure that kind > 1
529         is handled correctly. Set the span field of the descriptor.
530         * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
531         comment.
533         PR fortran/80931
534         * trans-array.c (gfc_array_allocate): Set the span field for
535         variable length character arrays.
537 2018-10-08  Cesar Philippidis  <cesar@codesourcery.com>
539         * expr.c (gfc_check_pointer_assign): Demote "Assignment to
540         contiguous pointer from non-contiguous target" to a warning.
542 2018-10-08  Paul Thomas  <pault@gcc.gnu.org>
544         PR fortran/86372
545         * trans-stmt.c (trans_associate_var): Character associate names
546         with variable string length do not have to be deferred length
547         for the string length to be set, if variable.
549 2018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
551         PR fortran/86111
552         * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
553         * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
554         (gfc_arith_concat):  If the types of op1 and op2 are not
555         character of if their kinds do not match, issue ARITH_WRONGCONCAT.
557 2018-10-06  Paul Thomas  <pault@gcc.gnu.org>
559         PR fortran/83999
560         * resolve.c (resolve_fl_procedure): Include class functions in
561         the test that elemental function results be scalar.
563 2018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
565         PR fortran/84640
566         * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
567         by one. Set extents one past the array boundaries to zero to avoid
568         warning with instrumented compiler.
569         (gfc_simplify_eoshift): Likewise, only for ss_ex.
571 2018-10-05  Paul Thomas  <pault@gcc.gnu.org>
573         PR fortran/87487
574         * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
575         character length pointer initializer has the right type to fix
576         problem with deferred_character_24.f90 on big endian.
578 2018-10-03  Jeff Law  <law@redhat.comg>
580         * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
582 2018-10-01  Paul Thomas  <pault@gcc.gnu.org>
584         PR fortran/65677
585         * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
586         flag in the call to gfc_check_dependency.
588 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
590         PR fortran/87359
591         * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
592         introduced by r264358, which prevented components of associate
593         names from being reallocated on assignment.
595 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
597         PR fortran/70752
598         PR fortran/72709
599         * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
600         deferred type and the info->descriptor is present, use the
601         info->descriptor
602         (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
603         it as 'decl' rather than the symbol backend_decl.
604         (gfc_array_allocate): If the se string_length is a component
605         reference, fix it and use it for the expression string length
606         if the latter is not a variable type. If it is a variable do
607         an assignment. Make use of component ref string lengths to set
608         the descriptor 'span'.
609         (gfc_conv_expr_descriptor): For pointer assignment, do not set
610         the span field if gfc_get_array_span returns zero.
611         * trans.c (get_array_span): If the upper bound a character type
612         is zero, use the descriptor span if available.
614 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
616         PR fortran/70149
617         * trans-decl.c (gfc_get_symbol_decl): A deferred character
618         length pointer that is initialized needs the string length to
619         be initialized as well.
621 2018-09-29  Paul Thomas  <pault@gcc.gnu.org>
623         PR fortran/65677
624         * trans-expr.c (gfc_trans_assignment_1): If there is dependency
625         fix the rse stringlength.
627 2018-09-25  Martin Liska  <mliska@suse.cz>
629         PR fortran/87394
630         * decl.c (add_hidden_procptr_result): Simplify condition
631         as we are in branch witch 'case1 || case2'.
633 2018-09-25  Martin Liska  <mliska@suse.cz>
635         * trans.c (remove_suffix): Remove
636         unused function.
638 2018-09-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
640         PR fortran/87397
641         * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
642         for variables in an associate statement.
644 2018-09-24  Bernhard Reuther-Fischer  <aldot@gcc.gnu.org>
645             Cesar Philippidis  <cesar@codesourcery.com>
647         * openmp.c (resolve_oacc_loop_blocks):
649 2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
651         PR fortran/87397
652         * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
653         for variables having the dimension attribute.
655 2018-09-23  Janne Blomqvist  <jb@gcc.gnu.org>
657         * trans-expr.c (gfc_caf_get_image_index): Do array index
658         calculations in gfc_array_index_type.
659         * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
660         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
661         (gfc_trans_event_post_wait): Likewise.
663 2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
665         PR fortran/87395
666         * gfc_conv_procedure_call: Reformat comments slightly. Do not add
667         clobber on INTENT(OUT) for saved variables.
669 2018-09-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
671         PR fortran/41453
672         * trans.h (gfc_conv_expr_reference): Add optional argument
673         add_clobber to prototype.
674         (gfc_conv_procedure_call):  Set add_clobber argument to
675         gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
676         non-pointer, non-allocatable, non-dummy variables whose type
677         is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
678         the procedure is not elemental.
679         * trans-expr.c (gfc_conv_procedure_reference): Add clobber
680         statement before call if add_clobber is set.
682 2018-09-22  Paul Thomas  <pault@gcc.gnu.org>
684         PR fortran/85603
685         * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
686         the charlen backend_decl before using the VAR_P macro.
688 2018-09-21  Paul Thomas  <pault@gcc.gnu.org>
690         PR fortran/77325
691         * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
692         rhs has a charlen expression, convert that and use it.
693         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
694         assignment of deferred character array vars to a realocatable
695         lhs should not be added to the exterior block since vector
696         indices, for example, generate temporaries indexed within the
697         loop.
699 2018-09-21  Paul Thomas  <pault@gcc.gnu.org>
701         PR fortran/87359
702         * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
703         components if must_finalize is set for expr3.
705 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
706             Kwok Cheung Yeung  <kcy@codesourcery.com>
708         * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
709         argument of a call to _gfortran_caf_register is of size_type_node.
710         * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
711         index to a size_type_node type.
712         * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
714 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
716         * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
718 2018-09-20  Janus Weil  <janus@gcc.gnu.org>
720         * gfortran.h (gfc_str_startswith): New macro.
721         * decl.c (variable_decl, gfc_match_end): Use it.
722         * iresolve.c (is_trig_resolved): Ditto.
723         * module.c (load_omp_udrs, read_module): Ditto.
724         * options.c (gfc_handle_runtime_check_option): Ditto.
725         * primary.c (match_arg_list_function): Ditto.
726         * trans-decl.c (gfc_get_symbol_decl): Ditto.
727         * trans-expr.c (gfc_conv_procedure_call): Ditto.
728         * interface.c (dtio_op): Replace strncmp by strcmp.
729         * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
730         * trans-expr.c (conv_arglist_function): Ditto.
731         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
732         STARTS_WITH by gfc_str_startswith.
734 2018-09-20  Cesar Philippidis  <cesar@codesourcery.com>
736         * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
737         and reorder the switch cases to match the enum in gfortran.h.
739 2018-09-19  Paul Thomas  <pault@gcc.gnu.org>
741         PR fortran/84109
742         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
743         assignment of deferred character intrinsic elemental function
744         results to a realocatable lhs must not be added to the exterior
745         block if they are array valued but must go to the loop body.
747 2018-09-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
749         PR fortran/29550
750         * gfortran.h (gfc_expr): Add external_blas flag.
751         * frontend-passes.c (matrix_case): Add case A2TB2T.
752         (optimize_namespace): Handle flag_external_blas by
753         calling call_external_blas.
754         (get_array_inq_function): Add argument okind. If
755         it is nonzero, use it as the kind of argument
756         to be used.
757         (inline_limit_check): Remove m_case argument, add
758         limit argument instead.  Remove assert about m_case.
759         Set the limit for inlining from the limit argument.
760         (matmul_lhs_realloc): Handle case A2TB2T.
761         (inline_matmul_assign): Handle inline limit for other cases with
762         two rank-two matrices.  Remove no-op calls to inline_limit_check.
763         (call_external_blas): New function.
764         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
765         argument to external BLAS if external_blas is already set.
767 2018-09-18  Paul Thomas  <pault@gcc.gnu.org>
769         PR fortran/87239
770         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
771         assignment of deferred character elemental function results to
772         a realocatable lhs must not be added to the exterior block but
773         must go to the loop body.
775 2018-09-18  Paul Thomas  <pault@gcc.gnu.org>
777         PR fortran/87336
778         * trans-array.c (gfc_get_array_span): Try to get the element
779         length of incomplete types. Return NULL_TREE otherwise.
780         (gfc_conv_expr_descriptor): Only set the 'span' field if the
781         above does not return NULL_TREE. Set 'span' field if possible
782         for all new descriptors.
784 2018-09-17  Paul Thomas  <pault@gcc.gnu.org>
786         PR fortran/64120
787         * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
788         characters with a variable length expression for deferred init.
789         (gfc_trans_deferred_vars): Perform the assignment for these
790         symbols by calling gfc_conv_string_length.
792 2018-09-17  Paul Thomas  <pault@gcc.gnu.org>
794         PR fortran/85954
795         * resolve.c (resolve_assoc_var): If the target expression is a
796         deferred charlen dummy and the associate name shares the
797         charlen, generate a new one. Make sure that new charlens are in
798         the namespace list so that they get cleaned up.
799         * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
800         not reallocatable.
801         * trans-decl.c (gfc_get_symbol_decl): Put deferred character
802         length dummy and result arrays on the deferred initialization
803         list so that the variable length arrays can be correctly dealt
804         with.
805         * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
806         NULL rather than ICEing..
808 2018-09-16  Janus Weil  <janus@gcc.gnu.org>
810         PR fortran/86484
811         PR fortran/84543
812         * match.c (gfc_match_assignment): For a polymorphic assignment,
813         make sure that the vtab for the rhs type is generated.
815 2018-09-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
817         PR fortran/37802
818         * frontend-passes.c (B_ERROR): New macro for matmul bounds
819         checking error messages.
820         (C_ERROR): Likewise.
821         (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
822         and C_ERROR macros.
824 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
826         * trans-array.c (gfc_conv_array_initializer): Remove excess precision
827         from overlength string initializers.
829 2018-09-12  Paul Thomas  <pault@gcc.gnu.org>
831         PR fortran/87284
832         * trans-expr.c (gfc_trans_class_init_assign): Access to
833         to array elements of the dynamic type requires that the array
834         reference be added to the class expression and not the _data
835         component, unlike scalar expressions.
837 2018-09-11  Janus Weil  <janus@gcc.gnu.org>
839         PR fortran/87172
840         * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
841         attribute, then it was declared in another module, so there should be
842         no error that it has not been declared.
844 2018-09-11  Paul Thomas  <pault@gcc.gnu.org>
846         PR fortran/87277
847         * expr.c (is_subref_array): Add the check of dimensionality for
848         class, dummy, pointer arrays.
850 2018-09-11  Janus Weil  <janus@gcc.gnu.org>
852         PR fortran/86830
853         * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
854         with non-polymorphic objects.
856 2018-09-10  Janus Weil  <janus@gcc.gnu.org>
858         PR fortran/85395
859         * decl.c (match_binding_attributes): Use correct default accessibility
860         for procedure pointer components.
862 2018-09-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
864         * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
865         'P' is zero and issue an error if it is.
867 2018-08-31  Paul Thomas  <pault@gcc.gnu.org>
869         PR fortran/86328
870         PR fortran/86760
871         * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
872         info->descriptor but pass it directly to gfc_build_array_ref.
873         (gfc_conv_array_ref): Likewise for se->expr.
874         * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
875         obtain the span field directly from it.
877 2017-08-28  Paul Thomas  <pault@gcc.gnu.org>
879         PR fortran/80477
880         * trans-expr.c (gfc_conv_procedure_call): Allocatable class
881         scalar results being passed to a derived type formal argument
882         are finalized if possible. Otherwise, rely on existing code for
883         deallocation. Make the deallocation of allocatable result
884         components conditional on finalization not taking place. Make
885         the freeing of data components after finalization conditional
886         on the data being NULL.
887         (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
888         condition to return NULL_TREE.
889         (gfc_trans_assignment_1): If the assignment is class to class
890         and the rhs expression must be finalized but the assignment
891         is not marked as a polymorphic assignment, use the vptr copy
892         function instead of gfc_trans_scalar_assign.
894         PR fortran/86481
895         * trans-expr.c (gfc_conv_expr_reference): Do not add the post
896         block to the pre block if the expression is to be finalized.
897         * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
898         finalized, load the post block into a finalization block and
899         add it right at the end of the allocation block.
901 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
903         PR 87091
904         * error.c (gfc_format_decoder): Update for conversion of
905         show_caret_p to a tri-state.
907 2018-08-25  Janus Weil  <janus@gcc.gnu.org>
909         PR fortran/86545
910         * resolve.c (resolve_transfer): Correctly determine typespec for
911         generic function calls, in order to throw a proper error.
913 2018-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
915         PR fortran/86837
916         * frontend-passes.c (var_in_expr_callback): New function.
917         (var_in_expr): New function.
918         (traverse_io_block): Use var_in_expr instead of
919         gfc_check_dependency for checking if the variable depends on the
920         previous interators.
922 2018-08-23  Janne Blomqvist  <blomqvist.janne@gmail.com>
924         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
925         HONOR_SIGNED_ZEROS checks.
927 2018-08-23  Paul Thomas  <pault@gcc.gnu.org>
929         PR fortran/86863
930         * resolve.c (resolve_typebound_call): If the TBP is not marked
931         as a subroutine, check the specific symbol.
933 2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
935         * gfortran.texi: Mention that asynchronous I/O does
936         not work on systems which lack condition variables, such
937         as AIX.
939 2018-08-22  Janus Weil  <janus@gcc.gnu.org>
941         PR fortran/86935
942         * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
943         statement.
945 2018-08-22  Andrew Benson  <abensonca@gmail.com>
947         * module.c (load_generic_interfaces): Move call to find_symbol()
948         so that only occurs if actually needed.
950 2018-08-22  Janus Weil  <janus@gcc.gnu.org>
952         PR fortran/86888
953         * decl.c (gfc_match_data_decl): Allow allocatable components of
954         indirectly recursive type.
955         * resolve.c (resolve_component): Remove two errors messages ...
956         (resolve_fl_derived): ... and replace them by a new one.
958 2018-08-21  Janne Blomqvist  <jb@gcc.gnu.org>
960         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
961         MAX_EXPR/MIN_EXPR unconditionally for real arguments.
962         * gfortran.texi (Compiler Characteristics): Document MAX/MIN
963         behavior wrt NaN.
965 2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
966         Thomas Koenig <tkoenig@gcc.gnu.org>
968         PR fortran/25829
969         * gfortran.texi: Add description of asynchronous I/O.
970         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
971         as volatile.
972         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
973         st_wait_async and change argument spec from ".X" to ".w".
974         (gfc_trans_wait): Pass ID argument via reference.
976 2018-08-16  Nathan Sidwell  <nathan@acm.org>
978         * cpp.c (dump_macro): Use cpp_user_macro_p.
980 2018-08-14  Janus Weil  <janus@gcc.gnu.org>
982         PR fortran/86116
983         * interface.c (compare_type): Remove a CLASS/TYPE check.
984         (compare_type_characteristics): New function that behaves like the old
985         'compare_type'.
986         (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
987         Call 'compare_type_characteristics' instead of 'compare_type'.
989 2018-08-12  Paul Thomas  <pault@gcc.gnu.org>
991         PR fortran/66679
992         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
993         elements are returned as references to the data element. Get
994         the class expression by stripping back the references. Use this
995         for the element size.
997 2018-08-12  Paul Thomas  <pault@gcc.gnu.org>
999         PR fortran/86906
1000         * resolve.c (resolve_fl_variable_derived): Check if the derived
1001         type is use associated before checking for the host association
1002         error.
1004 2018-08-10  Janus Weil  <janus@gcc.gnu.org>
1006         PR fortran/57160
1007         * invoke.texi (frontend-optimize): Mention short-circuiting.
1008         * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
1009         * resolve.c (resolve_operator): Warn about short-circuiting only with
1010         -ffrontend-optimize.
1011         * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
1012         with -ffrontend-optimize. Without that flag, make sure that both
1013         operands are evaluated.
1015 2018-08-08  Nathan Sidwell  <nathan@acm.org>
1017         * cpp.c (cb_file_change): Use linemap_included_from.
1019 2018-08-07  Cesar Philippidis  <cesar@codesourcery.com>
1021         * trans-stmt.h: Remove stale reference to trans-openacc.c.
1023 2018-08-04  Janus Weil  <janus@gcc.gnu.org>
1025         PR fortran/45521
1026         * interface.c (gfc_compare_interfaces): Apply additional
1027         distinguishability criteria of F08 to operator interfaces.
1029 2018-07-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1031         Revert 'AsyncI/O patch committed'
1032         2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
1033                 Thomas Koenig <tkoenig@gcc.gnu.org>
1035         PR fortran/25829
1036         * gfortran.texi: Add description of asynchronous I/O.
1037         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1038         as volatile.
1039         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1040         st_wait_async and change argument spec from ".X" to ".w".
1041         (gfc_trans_wait): Pass ID argument via reference.
1043 2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
1044         Thomas Koenig <tkoenig@gcc.gnu.org>
1046         PR fortran/25829
1047         * gfortran.texi: Add description of asynchronous I/O.
1048         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1049         as volatile.
1050         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1051         st_wait_async and change argument spec from ".X" to ".w".
1052         (gfc_trans_wait): Pass ID argument via reference.
1054 2018-07-20  Martin Sebor  <msebor@redhat.com>
1056         PR middle-end/82063
1057         * gfortran.h (gfc_handle_option): Change function argument
1058         to HOST_WIDE_INT.
1059         * options.c (gfc_handle_option): Same.
1061 2018-07-20  Andrew Benson  <abenson@carnegiescience.edu>
1063         * gfortran.h (gfc_symbol): Add pointer to next derived type.
1064         (gfc_dt_list, gfc_get_dt_list): Remove.
1065         (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
1066         * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
1067         simple nullification of gfc_derived_types.
1068         * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
1069         gfc_symbol.
1070         (add_dt_to_dt_list): Change derived type linked list insertion to
1071         utilize dt_next pointers in gfc_symbol.
1072         * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
1073         (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
1074         gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
1075         linked list search/insertion to utilize dt_next pointers in gfc_symbol.
1076         * trans-types.c (gfc_get_derived_type): Change derived type linked
1077         list search to utilize dt_next pointers in gfc_symbol.
1079 2018-07-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1081         * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
1082         or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
1084 2018-07-18  Janus Weil  <janus@gcc.gnu.org>
1085             Thomas Koenig  <tkoenig@gcc.gnu.org>
1087         PR fortran/85599
1088         * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
1089         * frontend-passes.c (do_warn_function_elimination): Do not warn for
1090         pure functions.
1091         * gfortran.h: Add prototypes for gfc_pure_function and
1092         gfc_implicit_pure_function.
1093         * gfortran.texi: Add chapter on evaluation of logical expressions.
1094         * invoke.texi: Mention that -Wfunction-elimination is implied
1095         by -Wextra.
1096         * lang.opt: Make -Wextra imply -Wfunction-elimination.
1097         * resolve.c (pure_function): Rename to gfc_pure_function.
1098         (gfc_implicit_pure_function): New function.
1099         (check_pure_function): Use it here.
1100         (impure_function_callback): New function.
1101         (resolve_operator): Call it via gfc_expr_walker.
1103 2018-07-16  Fritz Reese  <fritzoreese@gmail.com>
1105         PR fortran/83184
1106         * decl.c (match_old_style_init): Initialize locus of variable expr when
1107         creating a data variable.
1108         (match_clist_expr): Verify array is explicit shape/size before
1109         attempting to allocate constant array constructor.
1111 2018-07-16  Fritz Reese  <fritzoreese@gmail.com>
1113         PR fortran/86417
1114         * module.c (mio_component): Set component->loc when loading from module.
1116 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1118         PR fortran/86421
1119         * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
1120         _UVAL suffixes.
1121         (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
1122         on linear clauses.  Initialize n->where to gfc_current_locus.
1124 2018-07-05  Paul Thomas  <pault@gcc.gnu.org>
1126         PR fortran/86408
1127         * resolve.c.c (resolve_contained_fntype): Reference to C418 is
1128         in F2008 and not F2003.
1129         (resolve_function): Ditto in error message. Also, exclude
1130         deferred character length results from the error.
1132 2018-07-05  Fritz Reese  <fritzoreese@gmail.com>
1134         PR fortran/83183
1135         PR fortran/86325
1136         * expr.c (class_allocatable, class_pointer, comp_allocatable,
1137         comp_pointer): New helpers.
1138         (component_initializer): Generate EXPR_NULL for allocatable or pointer
1139         components. Do not generate initializers for components within BT_CLASS.
1140         Do not assign to comp->initializer.
1141         (gfc_generate_initializer): Use new helpers; move code to generate
1142         EXPR_NULL for class allocatable components into component_initializer().
1144 2018-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1146         PR fortran/82009
1147         * trans-decl.c (gfc_process_block_locals): Delete assert and set
1148         saved_local_decls = NULL_TREE.
1150 2018-07-02  Richard Biener  <rguenther@suse.de>
1152         PR lto/86321
1153         * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
1154         for the distinct type copy.
1156 2018-07-02  Paul Thomas  <pault@gcc.gnu.org>
1158         PR fortran/82969
1159         PR fortran/86242
1160         * trans-array.c (structure_alloc_comps): Do not explicitly copy
1161         procedure pointer components.
1163 2018-07-02  Paul Thomas  <pault@gcc.gnu.org>
1165         PR fortran/45305
1166         * expr.c : Add a prototype for scalarize_intrinsic_call.
1167         (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
1168         intrinsic function calls.
1169         (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
1170         the expression or any of the actual argument expressions are
1171         NULL. Before calling gfc_check_init_expr, check 'init_flag'.
1172         Only simplify the scalarized expressions if there are no errors
1173         on the stack.
1174         (gfc_check_init_expr): Set 'init_flag' true in the call to
1175         scalarize_intrinsic_call.
1177 2018-06-28  Fritz Reese  <fritzoreese@gmail.com>
1179         PR fortran/82865
1180         * decl.c (gfc_match_type): Refactor and check for PDT declarations.
1182 2018-06-28  Martin Liska  <mliska@suse.cz>
1184         * gfortranspec.c: Include opt-suggestions.h.
1186 2018-06-25  Fritz Reese  <fritzoreese@gmail.com>
1188         PR fortran/82972
1189         PR fortran/83088
1190         PR fortran/85851
1191         * expr.c (component_initializer): Assign init expr to c->initializer.
1192         (generate_isocbinding_initializer): New.
1193         (gfc_generate_initializer): Call generate_isocbinding_initializer to
1194         generate initializers for c_ptr and c_funptr with -finit-derived.
1196 2018-06-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1198         PR fortran/85983
1199         * interface.c (check_dtio_interface1): Delete assert.
1201 2018-06-22  Paul Thomas  <pault@gcc.gnu.org>
1202             Rainer Orth  <ro@gcc.gnu.org>
1204         PR fortran/86281
1205         * resolve.c (resolve_contained_fntype): Check for the charlen
1206         before testing the length.
1208 2018-06-21  Paul Thomas  <pault@gcc.gnu.org>
1210         PR fortran/49630
1211         * resolve.c (resolve_contained_fntype): Change standard ref.
1212         from F95 to F2003: C418. Correct a spelling error in a comment.
1213         It is an error for an abstract interface to have an assumed
1214         character length result.
1215         * trans-expr.c (gfc_conv_procedure_call): Likewise change the
1216         standard reference.
1218 2018-06-21  Paul Thomas  <pault@gcc.gnu.org>
1220         PR fortran/83118
1221         * resolve.c (resolve_ordinary_assign): Force the creation of a
1222         vtable for assignment of non-polymorphic expressions to an
1223         unlimited polymorphic object.
1224         * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
1225         size of the rhs type for such assignments. Set the dtype, _len
1226         and vptrs appropriately.
1227         * trans-expr.c (gfc_trans_assignment): Force the use of the
1228         _copy function for these assignments.
1230 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
1231             Thomas Schwinge <thomas@codesourcery.com>
1232             Cesar Philippidis  <cesar@codesourcery.com>
1234         * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
1235         bitfields.
1236         * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
1237         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1238         (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
1239         create, deviceptr, present_of_*. Add support for finalize and
1240         if_present.
1241         (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
1242         (OACC_KERNELS_CLAUSES): Likewise.
1243         (OACC_DATA_CLAUSES): Likewise.
1244         (OACC_DECLARE_CLAUSES): Likewise.
1245         (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
1246         (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
1247         (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
1248         (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
1249         * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
1250         and FINALIZE.
1252 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
1254         * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
1256 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
1258         * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
1259         (nonlocal_dummy_decls): Likewise.
1260         (gfc_nonlocal_dummy_array_decl): Likewise.
1261         (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
1262         (gfc_get_fake_result_decl): Do not generate a new DECL if simply
1263         reusing the result of a recursive call.
1264         (gfc_generate_function_code): Do not create, insert and destroy
1265         nonlocal_dummy_decls.
1267 2018-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1269         PR fortran/86110
1270         * array.c (gfc_resolve_character_array_constructor): Avoid NULL
1271         pointer dereference.
1273 2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
1275         PR fortran/85703
1276         * parse.c (decode_oacc_directive): Set gfc_matching_function
1277         to false.
1278         (decode_omp_directive): Likewise.
1280 2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
1282         PR fortran/85702
1283         * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
1285 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1287         PR other/69968
1288         * misc.c (gfc_closest_fuzzy_match): Update for renaming of
1289         levenshtein_distance to get_edit_distance.
1291 2018-06-12  Steven G. Kargl  <kargl@gcc.gnu.org>
1293         PR fortran/44491
1294         * expr.c (gfc_check_assign): Select non-NULL locus.
1296 2018-06-11  Janus Weil  <janus@gcc.gnu.org>
1298         PR fortran/45521
1299         * interface.c (compare_ptr_alloc): New function.
1300         (generic_correspondence): Call it.
1302 2018-06-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1304         * gfortran.h (gfc_expr): Add no_bounds_check field.
1305         * frontend-passes.c (get_array_inq_function): Set no_bounds_check
1306         on function and function argument.
1307         (inline_matmul_assign): Set no_bounds_check on zero expression
1308         and on lhs of zero expression.
1309         Also handle A1B2 case if realloc on assigment is active.
1310         * trans-array.c (gfc_conv_array_ref): Don't do range checking
1311         if expr has no_bounds_check set.
1312         (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
1313         has it set.
1314         * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
1315         on lss and lss if the corresponding expressions have it set.
1317 2018-06-10  Dominique d'Humieres  <dominiq@gcc.gnu.org>
1319         PR fortran/79854
1320         * trans-const.c: Remove include "diagnostic-core.h".
1321         (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
1323 2018-06-10  Janus Weil  <janus@gcc.gnu.org>
1325         PR fortran/85088
1326         * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
1327         INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
1328         and remove a TODO note.
1329         * gfortran.h: Add a comment to sym_intent.
1331 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1333         PR fortran/38351
1334         * resolve.c (resolve_operator): Provide better error message for
1335         derived type entity used in an binary intrinsic numeric operator.
1337 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1339         PR fortran/85138
1340         PR fortran/85996
1341         PR fortran/86051
1342         * decl.c (gfc_match_char_spec): Use private namespace in attempt to
1343         reduce a charlen to a constant.
1345 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1347         PR fortran/78278
1348         * data.c (gfc_assign_data_value): Re-arrange code to allow for
1349         an error for double initialization of CHARACTER entities.
1351 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1353         PR fortran/63514
1354         * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
1356 2018-06-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1358         PR fortran/85631
1359         * trans.h (gfc_ss): Add field no_bounds_check.
1360         * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
1361         ss->no_bounds_check is set, do not use runtime checks.
1362         * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
1363         for reallocatable lhs.
1365 2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1367         PR fortran/86059
1368         * array.c (match_array_cons_element): NULL() cannot be in an
1369         array constructor.
1371 2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1373         PR fortran/78571
1374         * data.c (create_character_initializer): Return early if type is
1375         incompatible with CHARACTER.
1377 2018-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1379         PR fortran/86045
1380         * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
1381         'P' is zero and issue an error if it is.
1383 2018-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1385         PR fortran/85641
1386         * frontend-passes.c (is_fe_temp): Add prototype.
1387         (realloc_string_callback): Early return for frontend-generated
1388         temporary.
1390 2018-06-05  Cesar Philippidis  <cesar@codesourcery.com>
1392         PR fortran/85701
1394         * openmp.c (gfc_resolve_oacc_declare): Error on functions and
1395         subroutine data clause arguments.
1397 2018-06-04  Steven G. Kargl  <kargl@gcc.gnu.org>
1399         PR fortran/85981
1400         * resolve.c (resolve_allocate_deallocate): Check errmsg is default
1401         character kind.
1403 2018-06-03  Paul Thomas  <pault@gcc.gnu.org>
1405         PR fortran/36497
1406         * decl.c (variable_decl): Use gfc_add_type for cray pointees.
1408 2018-06-01  Steven G. Kargl  <kargl@gcc.gnu.org>
1410         PR fortran/63570
1411         * check.c (gfc_check_random_init): New function. Check arguments of
1412         RANDOM_INIT.
1413         * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
1414         * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
1415         subroutines.
1416         (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
1417         * intrinsic.h: Add prototypes for gfc_check_random_init and
1418         gfc_resolve_random_init
1419         * intrinsic.texi: Document new intrinsic subprogram.
1420         * iresolve.c (gfc_resolve_random_init): Resolve routine name.
1421         * trans-decl.c: Declare gfor_fndecl_random_init
1422         * trans-intrinsic.c (conv_intrinsic_random_init): New function.
1423         Translate call to RANDOM_INIT.
1424         (gfc_conv_intrinsic_subroutine): Call it.
1425         * trans.h: Declare gfor_fndecl_random_init
1427 2018-05-27  Steven G. Kargl  <kargl@gcc.gnu.org>
1429         * decl.c (match_data_constant):  Fortran 2018 allows pointer
1430         initialization in a data statement.
1432 2018-05-25  Janus Weil  <janus@gcc.gnu.org>
1434         PR fortran/85839
1435         * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
1436         an obsolescent feature in Fortran 2018.
1437         (gfc_match_equivalence): Ditto.
1438         * resolve.c (resolve_common_blocks): Ditto.
1439         (gfc_resolve_forall): Ditto.
1440         * symbol.c (gfc_define_st_label): Ditto.
1442 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1444         PR fortran/85543
1445         * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
1446         pointer dereference.
1448 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1450         PR fortran/85780
1451         * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
1453 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1455         PR fortran/85779
1456         * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
1458 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1460         PR fortran/85895
1461         * resolve.c (resolve_sync): Resolve expression before checking for
1462         an error.
1464 2018-05-22  Janus Weil  <janus@gcc.gnu.org>
1466         PR fortran/85841
1467         * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
1468         GFC_STD_OPT_F08TS.
1469         * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
1470         * options.c (set_default_std_flags): Ditto.
1471         (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
1472         * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
1473         GFC_STD_F2018.
1474         * check.c (gfc_check_atomic, gfc_check_event_query,
1475         gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
1476         gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
1477         * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
1478         * intrinsic.c (add_functions, add_subroutines,
1479         gfc_check_intrinsic_standard): Ditto.
1480         * iso-c-binding.def: Ditto.
1481         * iso-fortran-env.def: Ditto.
1482         * match.c (gfc_match_event_post, gfc_match_event_wait,
1483         gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
1484         gfc_match_end_team, gfc_match_sync_team): Ditto.
1485         * gfortran.texi: Remove mention of -std=f2008ts.
1486         Move TSs into F2018 section.
1487         * invoke.texi: Update documentation of -std=f2008ts.
1489 2018-05-21  Janus Weil  <janus@gcc.gnu.org>
1491         PR fortran/85841
1492         * libgfortran.h: New macros GFC_STD_OPT_*.
1493         * error.c (notify_std_msg): New function.
1494         (gfc_notify_std): Adjust such that it can handle combinations of
1495         GFC_STD_* flags in the 'std' argument, not just a single one.
1496         * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
1497         in Fortran 2018.
1498         (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
1499         * options.c (set_default_std_flags): Warn for F2018 deleted features
1500         by default.
1501         (gfc_handle_option): F2018 deleted features are allowed in earlier
1502         standards.
1503         * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
1504         nonblock do constructs in Fortran 2018.
1506 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
1508         PR fortran/80657
1509         * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
1510         test for self refs to the function result in the character len
1511         expression. If a self reference is found, emit an error and
1512         return true.
1513         (resolve_fntype): Use the function symbol in the calls to the
1514         above.
1516 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
1518         PR fortran/49636
1519         * trans-array.c (gfc_get_array_span): Renamed from
1520         'get_array_span'.
1521         (gfc_conv_expr_descriptor): Change references to above.
1522         * trans-array.h : Add prototype for 'gfc_get_array_span'.
1523         * trans-intrinsic.c (gfc_conv_associated): Add pre and post
1524         blocks for 'arg1'.
1525         * trans-stmt.c (trans_associate_var): If the associate name is
1526         a subref array pointer, use gfc_get_array_span for the span.
1528 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
1530         PR fortran/82275
1531         * match.c (gfc_match_type_spec): Go through the array ref and
1532         decrement 'rank' for every dimension that is an element.
1534 2018-05-19  Paul Thomas  <pault@gcc.gnu.org>
1536         PR fortran/82923
1537         PR fortran/66694
1538         PR fortran/82617
1539         * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
1540         charlen backend_decl of the rhs expr to ss->info->string_length
1541         so that the value in the current scope is used.
1543 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1545         PR fortran/63529
1546         * gfortran.texi: Clarify documentation for Cray pointer and
1547         assumed-sized array.
1549 2018-05-13  Paul Thomas  <pault@gcc.gnu.org>
1551         PR fortran/85742
1552         * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
1553         of 'size'. If the element type is a pointer use the size of the
1554         TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
1555         case, set the size to zero.
1557 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1559         * gfortran.h: Remove prototype.
1560         * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
1562 2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1564         PR fortran/85542
1565         * expr.c (check_inquiry): Avoid NULL pointer dereference.
1567 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1569         PR fortran/85687
1570         * check.c (gfc_check_rank): Check that the argument is a data object.
1572 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1574         PR fortran/85521
1575         * array.c (gfc_resolve_character_array_constructor): Substrings
1576         with upper bound smaller than lower bound are zero length strings.
1578 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1580         PR fortran/70870
1581         * data.c (gfc_assign_data_value): Check that a data object does
1582         not also have default initialization.
1584 2018-05-10  Marek Polacek  <polacek@redhat.com>
1586         PR fortran/85735
1587         * options.c (gfc_post_options): Set main_input_filename.
1589 2018-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1591         PR fortran/54613
1592         * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
1594 2018-05-10  Paul Thomas  <pault@gcc.gnu.org>
1596         PR fortran/68846
1597         PR fortran/70864
1598         * resolve.c (get_temp_from_expr): The temporary must not have
1599         dummy or intent attributes.
1601 2018-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1603         PR fortran/54613
1604         * check.c (gfc_check_minmaxloc): Remove error for BACK not being
1605         implemented.  Use gfc_logical_4_kind for BACK.
1606         * simplify.c (min_max_choose): Add optional argument back_val.
1607         Handle it.
1608         (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
1609         back_val to min_max_choose.
1610         (simplify_minmaxloc_to_nodim): Likewise.
1611         (simplify_minmaxloc_to_array): Likewise.
1612         (gfc_simplify_minmaxloc): Add argument back, handle it.
1613         Pass back_val to specific simplification functions.
1614         (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
1615         pass it on to gfc_simplify_minmaxloc.
1616         (gfc_simplify_maxloc): Likewise.
1617         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
1618         comment. If BACK is true, use greater or equal (or lesser or
1619         equal) insteal of greater (or lesser). Mark the condition of
1620         having found a value which exceeds the limit as unlikely.
1622 2018-05-07  Jeff Law  <law@redhat.comg>
1624         * scanner.c (preprocessor_line): Call linemap_add after a line
1625         directive that changes the current filename.
1627 2018-05-06  Andre Vehreschild  <vehre@gcc.gnu.org>
1629         PR fortran/85507
1630         * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1631         introduced by r259385.
1632         * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1633         same variables in coarray assignments.
1635 2018-05-02  Tom de Vries  <tom@codesourcery.com>
1637         PR libgomp/82428
1638         * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
1640 2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1642         PR fortran/85520
1643         * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1645 2018-04-14  Andre Vehreschild  <vehre@gcc.gnu.org>
1647         PR fortran/81773
1648         PR fortran/83606
1649         * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1650         during dependency computation.  They define no data dependency.
1651         * trans-array.c (conv_array_index_offset): The stride can not be set
1652         here, prevent fail.
1653         * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1654         for caf_get's result and copying to the array with vectorial
1655         indexing.
1657 2018-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1659         PR fortran/85387
1660         * frontend-passes.c (traverse_io_block): Check for start, end or
1661         stride being defined by an outer implied DO loop.
1663 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1665         PR fortran/83064
1666         PR testsuite/85346
1667         * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1668         for annotation and remove dependence on -ftree-parallelize-loops.
1670 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
1672         PR fortran/85313
1673         * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1674         (resolve_oacc_nested_loops): Likewise.  Formatting fix.
1676 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1678         PR fortran/83064
1679         * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1680         parallell processing of DO CONCURRENT -ftree-parallelize-loops
1681         is set.
1683 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1685         PR fortran/51260
1686         * resolve.c (resolve_variable): Simplify cases where access to a
1687         parameter array results in a single constant.
1689 2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1691         PR fortran/85102
1692         * decl.c (variable_decl): If upper or lower bounds simplify
1693         to a constant, use that.
1695 2018-03-30  Paul Thomas  <pault@gcc.gnu.org>
1697         PR fortran/84931
1698         * simplify.c (gfc_convert_constant): Handle case of array
1699         constructors within an array that has no iterator and improve
1700         the conciseness of this section of code.
1702 2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1704         PR fortran/85111
1705         * array.c (gfc_resolve_character_array_constructor): Early
1706         exit for zero-size arrays.
1707         * simplify.c (simplify_transformation_to_array): Exit early
1708         if the result size is zero.
1709         (simplify_minmaxloc_to_array): Likewise.
1711 2018-03-28  Mikael Morin  <mikael@gcc.gnu.org>
1713         PR fortran/69497
1714         * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1715         from the root.
1716         (gfc_free_namespace): Restore assert (revert r258839).
1718 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
1720         * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1721         * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1722         (IOPARM_dt_dec_ext): ... this.
1723         * trans-io.c (build_dt): Adjust for default_exp renaming to
1724         dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1725         * io.c (match_io): Likewise.
1727 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1729         PR fortran/85084
1730         * frontend-passes.c (gfc_run_passes): Do not run front-end
1731         optimizations if a previous error occurred.
1733 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1734         Harald Anlauf  <anlauf@gmx.de>
1736         PR fortran/85083
1737         * primary.c (gfc_convert_to_structure_constructor): Check
1738         conformance of argument types in structure constructor.
1740 2018-03-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1742         PR fortran/66709
1743         * io.c: Include constructor.h.
1744         (resolve_tag_format): For a constant character array, concatenate
1745         into a single character expression.
1747 2018-03-25  Seth Johnson <johnsonsr@ornl.gov>
1748         Dominique d'Humieres  <dominiq@gcc.gnu.org>
1750         PR fortran/84924
1751         * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1752         scalar derived type with -std=f2003 and -std=f2008.
1754 2018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1755             Dominique d'Humieres  <dominiq@gcc.gnu.org>
1757         PR fortran/69497
1758         * symbol.c (gfc_free_namespace): Delete the assert and only if
1759         refs count is equals zero, free the namespace. Otherwise,
1760         something is halfway and other errors will resound.
1762 2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1764         PR fortran/70068
1765         * expr.c (find_substring_ref): Change types of start, end
1766         and length variables to gfc_charlen_t. Set length to zero
1767         for empty substring.
1769 2018-03-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1771         PR fortran/42651
1772         * decl.c (check_function_name): Improved error message
1773         (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1775 2018-03-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1777         PR fortran/84922
1778         * decl.c (get_proc_name): If the MODULE prefix appears in interface
1779         body, then it must appear on the contained subroutine or function.
1780         While here, fix nearby mis-indented code.
1782 2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1783         Harald Anlauf  <anlauf@gmx.de>
1785         PR fortran/84957
1786         * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1788 2018-03-21  Janne Blomqvist  <jb@gcc.gnu.org>
1790         PR fortran/84615
1791         * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1792         gfc_charlen_type_node when calling procedure.
1794 2018-03-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1796         PR fortran/85001
1797         * interface.c (symbol_rank): Remove bogus null pointer check that
1798         crept in when translating a ternary operator into an if-else
1799         constructor.
1801 2018-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1803         PR fortran/84931
1804         * simplify.c (gfc_convert_constant): Correctly handle iterators
1805         for type conversion.
1807 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1809         PR fortran/77414
1810         * decl.c (get_proc_name):  Check for a subroutine re-defined in
1811         the contain portion of a subroutine.  Change language of existing
1812         error message to better describe the issue. While here fix whitespace
1813         issues.
1815 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1817         PR fortran/65453
1818         * decl.c (get_proc_name): Catch clash between a procedure statement
1819         and a contained subprogram
1821 2018-03-16  Steven G. Kargl  <kargl@gcc.gnu.org>
1823         PR fortran/69395
1824         * decl.c (merge_array_spec): Correct the error condition.
1826 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1828         PR fortran/78741
1829         * decl.c (get_proc_name):  Check for clash of entry name with
1830         subroutine name.
1832 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1834         PR fortran/69395
1835         * decl.c (merge_array_spec): Limit the merging to maximum allowed
1836         dimensions, and issue error message if limit is exceeded.
1838 2018-03-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1840         * check.c (gfc_check_kill_sub):  Remove check for INTEGER(4) or (8).
1841         * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1842         (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1843         * intrinsic.texi: Update documentation.
1844         * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1845         * trans-decl.c (gfc_build_intrinsic_function_decls):  Add
1846         gfor_fndecl_kill and gfor_fndecl_kill_sub
1847         * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1848         functions.
1849         (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1850         (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1851         * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1853 2018-03-11  Paul Thomas  <pault@gcc.gnu.org>
1855         PR fortran/84546
1856         * trans-array.c (structure_alloc_comps): Make sure that the
1857         vptr is copied and that the unlimited polymorphic _len is used
1858         to compute the size to be allocated.
1859         * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1860         unlimited polymorphic _len for the offset to the element.
1861         (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1862         * trans.h : Add the boolean 'unlimited' to the prototype.
1864 2018-03-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1866         PR fortran/83939
1867         * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1869 2018-03-11  Steven G. Kargl  <kargls@gcc.gnu.org>
1871         * check.c (gfc_check_kill):  Check pid and sig are scalar.
1872         (gfc_check_kill_sub): Restrict kind to 4 and 8.
1873         * intrinsic.c (add_function): Sort keyword list.  Add pid and sig
1874         keywords for KILL.  Remove redundant *back="back" in favor of the
1875         original *bck="back".
1876         (add_subroutines): Sort keyword list.  Add pid and sig keywords
1877         for KILL.
1878         * intrinsic.texi: Fix documentation to consistently use pid and sig.
1879         * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8.  Choose the
1880         correct function.
1881         (gfc_resolve_rename_sub): Add comment.
1883 2018-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1885         PR fortran/66128
1886         * simplify.c (simplify_transformation): Return default result for
1887         empty array argument.
1888         (gfc_simplify_all): Remove special-case handling for zerosize.
1889         (gfc_simplify_any): Likewise.
1890         (gfc_simplify_count): Likewise.
1891         (gfc_simplify_iall): Likewise.
1892         (gfc_simplify_iany): Likewise.
1893         (gfc_simplify_iparity): Likewise.
1894         (gfc_simplify_minval): Likewise.
1895         (gfc_simplify_maxval): Likewise.
1896         (gfc_simplify_norm2): Likewise.
1897         (gfc_simplify_product): Likewise.
1898         (gfc_simplify_sum): Likewise.
1900 2018-03-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1902         PR fortran/84734
1903         * arith.c (check_result, eval_intrinsic):  If result overflows, pass
1904         the expression up the chain instead of a NULL pointer.
1906 2018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1908         PR fortran/64124
1909         PR fortran/70409
1910         * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1912 2017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1914         PR fortran/84697
1915         PR fortran/66128
1916         * expr.c (simplify_parameter_variable): If p is a size zero array
1917         and not an ARRAY_EXPR insert an empty array constructor and
1918         return.
1919         * gfortran.h: Add prototype for gfc_is_size_zero_array.
1920         * simplify.c (is_size_zero_array): Make non-static and rename into
1921         (gfc_is_size_zero_array):  Check for parameter arrays of zero
1922         size by comparing shape and absence of constructor.
1923         (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1924         is_size_zero_array.
1925         (gfc_simplify_count): Likewise.
1926         (gfc_simplify_iall): Likewise.
1927         (gfc_simplify_iany): Likewise.
1928         (gfc_simplify_iparity): Likewise.
1929         (gfc_simplify_minval): Likewise.
1930         (gfc_simplify_maxval): Likewise.
1931         (gfc_simplify_product): Likewise.
1932         (gfc_simplify_sum): Likewise.
1934 2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1936         PR fortran/56667
1937         * primary.c (match_sym_complex_part): Give the matcher for an implied
1938         do-loop a chance to run.
1940 2018-03-03  Harald Anlauf  <anlauf@gmx.de>
1942         PR fortran/71085
1943         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1944         dereference NULL pointer.
1946 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1948         PR fortran/66128
1949         * simplify.c (is_size_zero_array): New function to check for size
1950         zero array.
1951         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1952          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1953          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1954          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1955         requirements from F2018.
1957 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1959         PR fortran/51434
1960         * simplify.c (gfc_simplify_transfer): Resolve mold.
1962 2018-03-03  Paul Thomas  <pault@gcc.gnu.org>
1964         PR fortran/80965
1965         * resolve.c (build_loc_call): Change symtree name from 'loc' to
1966         '_loc'.
1968 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
1970         PR fortran/84219
1971         * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1972         components are caf tokens.
1973         (gfc_target_interpret_expr): Treat BT_VOID expressions as
1974         integers.
1976 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
1978         PR fortran/84538
1979         * class.c (class_array_ref_detected): Remove the condition that
1980         there be no reference after the array reference.
1981         (find_intrinsic_vtab): Remove excess whitespace.
1982         * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1983         as 'base and call build_class_array_ref earlier.
1985 2018-02-28  Paul Thomas  <pault@gcc.gnu.org>
1987         PR fortran/83901
1988         * trans-stmt.c (trans_associate_var): Make sure that the se
1989         expression is a pointer type before converting it to the symbol
1990         backend_decl type.
1992 2018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1994         PR fortran/83633
1995         * decl.c (variable_decl): Check that an explicit-shape-array with
1996         nonconstant bounds is allowed.
1998 2018-02-25  Paul Thomas  <pault@gcc.gnu.org>
2000         PR fortran/84523
2001         * trans-intrinsic.c (gfc_conv_allocated): If the argument se
2002         has a pre block, add it to the expression pre block.
2004 2018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
2006         PR fortran/78238
2007         * gfortran.h (gfc_integer_4_kind): Define.
2008         * resolve.c (resolve_select_type): Make sure that the
2009         kind of c->high is gfc_integer_4_kind.
2011 2018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
2013         PR fortran/30792
2014         * decl.c (gfc_match_data): Check for invalid substring in
2015         data-implied-do
2017 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
2019         * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
2021 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
2023         PR fortran/84511
2024         * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
2026 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
2028         PR fortran/84346
2029         * interface.c (compare_actual_formal): Issue error if keyword is
2030         used in a statement function.
2032 2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2034         PR fortran/84506
2035         * trans-io.c (set_parameter_value_inquire): Adjust range check of
2036         negative unit values for kind=8 units to the kind=4 negative limit.
2038 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
2040         PR fortran/83149
2041         * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
2042         accessing its components.
2044 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
2046         PR fortran/83149
2047         * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
2048         before accessing its components.
2050 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
2052         PR fortran/83148
2053         * trans-const.c : Clean up some whitespace issues.
2054         * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
2055         derived type has a kind value of zero, set it to the default
2056         integer kind.
2058 2018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
2060         PR fortran/84519
2061         * trans-decl.c (gfc_build_builtin_function_decls): Add bool
2062         argument to stop and error stop decls.
2063         * trans-stmt.c (gfc_trans_stop): Add false value to argument
2064         lists.
2066 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
2068         PR 78534
2069         PR 84509
2070         * trans-decl.c (gfc_build_builtin_function_decls): Pass
2071         gfc_int8_type node to pause_numeric, size_type_node to
2072         pause_string.
2073         * trans-stmt.c (gfc_trans_pause): Likewise.
2075 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
2077         * gfortran.texi: Update Coarray API description.
2078         * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
2079         character lengths, int for exit codes.
2080         (generate_coarray_sym_init): Use size_t for character length.
2081         * trans-intrinsic.c (conv_co_collective): Likewise.
2082         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
2083         (gfc_trans_event_post_wait): Likewise.
2084         (gfc_trans_sync): Likewise.
2085         (gfc_trans_stop): Use size_t for character lengths, int for exit
2086         codes.
2088 2018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
2090         PR fortran/48890
2091         PR fortran/83823
2092         * primary.c (gfc_convert_to_structure_constructor):
2093         For a constant string constructor, make sure the length
2094         is correct.
2096 2018-02-19  Paul Thomas  <pault@gcc.gnu.org>
2098         PR fortran/83344
2099         PR fortran/83975
2100         * resolve.c (resolve_assoc_var): Rearrange the logic for the
2101         determination of the character length of associate names. If
2102         the associate name is missing a length expression or the length
2103         expression is not a constant and the target is not a variable,
2104         make the associate name allocatable and deferred length.
2105         * trans-decl.c (gfc_get_symbol_decl): Null the character length
2106         backend_decl for deferred length associate names that are not
2107         variables. Set 'length' to gfc_index_zero_node for character
2108         associate names, whose character length is a PARM_DECL.
2110 2018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2112         PR fortran/35339
2113         * frontend-passes.c (traverse_io_block): Remove workaround for
2114         PR 80945.
2116 2018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
2118         * gfortran.texi: Document additional src/dst_type.  Fix some typos.
2119         * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
2120         argument of _caf_*_by_ref () with * e { get, send, sendget }.
2121         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
2122         data referenced when generating a call to caf_get_by_ref ().
2123         (conv_caf_send): Same but for caf_send_by_ref () and
2124         caf_sendget_by_ref ().
2126 2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2128         PR fortran/84389
2129         * io.c (check_format): Allow FMT_COLON.
2131 2018-02-18  Paul Thomas  <pault@gcc.gnu.org>
2133         PR fortran/80945
2134         * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
2135         the typenode in the case of deferred length characters.
2137 2018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
2139         PR fortran/84270
2140         * frontend-passes (scalarized_expr):  If the expression
2141         is an assumed size array, leave in the last reference
2142         and pass AR_SECTION instead of AR_FULL to gfc_resolve
2143         in order to avoid an error.
2145 2018-02-17  Paul Thomas  <pault@gcc.gnu.org>
2147         PR fortran/84115
2148         * resolve.c (resolve_assoc_var): If a non-constant target expr.
2149         has no string length expression, make the associate variable
2150         into a deferred length, allocatable symbol.
2151         * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
2152         the symbol.
2153         * trans-stmt.c (trans_associate_var): Null and free scalar
2154         associate names that are allocatable. After assignment, remove
2155         the allocatable attribute to prevent reallocation.
2157 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
2159         PR fortran/84418
2160         * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
2161         kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2163 2018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
2165         PR fortran/84354
2166         * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
2168 2018-02-15  Janus Weil  <janus@gcc.gnu.org>
2170         PR fortran/84409
2171         * interface.c (check_dtio_arg_TKR_intent): Add a check for character
2172         length.
2174 2018-02-14  Janus Weil  <janus@gcc.gnu.org>
2176         PR fortran/84385
2177         * match.c (gfc_match_select_type): Fix check for selector in
2178         SELECT TYPE statement.
2180 2018-02-13  Janus Weil  <janus@gcc.gnu.org>
2182         PR fortran/84313
2183         * symbol.c (check_conflict): Reject procedure pointers in common blocks.
2185 2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
2186             Janne Blomqvist  <jb@gcc.gnu.org>
2188         * module.c (dump_module): Use lbasename to ensure that module
2189         files are reproducible.
2191 2018-02-12  Janus Weil  <janus@gcc.gnu.org>
2193         PR fortran/84273
2194         * resolve.c (resolve_component): Fix checks of passed argument in
2195         procedure-pointer components.
2197 2018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2199         PR fortran/35299
2200         * resolve.c (resolve_formal_arglist): Update error message.
2202 2018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
2204         * gfortran.texi: Fix typos in documentation of caf_register ().
2205         * trans-array.c (structure_alloc_comps): Only register a component of
2206         a derived typed corray, not of an ultimate component coarray.
2208 2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
2210         PR fortran/54223
2211         PR fortran/84276
2212         * interface.c (compare_actual_formal): Add in_statement_function
2213         bool parameter.  Skip check of INTENT attribute for statement
2214         functions.  Arguments to a statement function cannot be optional,
2215         issue error for missing argument.
2216         (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2217          in_statement_function.
2219 2018-02-11  Paul Thomas  <pault@gcc.gnu.org>
2221         PR fortran/84074
2222         * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
2223         flag. If the is a vector subscript or the expression is not a
2224         variable, make the descriptor one-based.
2226 2018-02-10  Paul Thomas  <pault@gcc.gnu.org>
2228         PR fortran/84141
2229         PR fortran/84155
2230         * trans-array.c (gfc_array_init_size): Revert the change made
2231         in revision 257356 setting the dtype.
2232         * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
2233         Call gfc_get_dtype_rank_type every time.
2235         PR fortran/56691
2236         * trans-array.c (gfc_conv_expr_descriptor): If the source array
2237         is a descriptor type, use its offset, removing the condition
2238         that is be a class expression.
2240 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
2242         PR fortran/82994
2243         * match.c (gfc_match_deallocate): Check for NULL pointer.
2245 2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
2247         PR fortran/68560
2248         * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
2249         (gfc_conv_intrinsic_function): Call it.
2251 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
2253         PR fortran/82049
2254         * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
2255         try to resolve it.  While here return early if possible.
2257 2018-02-04  Paul Thomas  <pault@gcc.gnu.org>
2259         PR fortran/84115
2260         * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
2261         'length' if the symbol charlen backend_decl is an indirect ref.
2263 2018-02-03  Paul Thomas  <pault@gcc.gnu.org>
2265         PR fortran/84141
2266         PR fortran/84155
2267         * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
2268         use gfc_get_dtype_rank_type.
2270 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
2272         PR 83975
2273         PR 83344
2274         * resolve.c (resolve_assoc_var): Generate an error if
2275         target length unknown.
2277 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
2279         PR fortran/83705
2280         * simplify.c (gfc_simplify_repeat): Increase limit for deferring
2281         to runtime, print a warning message.
2283 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
2285         PR fortran/84116
2286         * openmp.c (gfc_match_omp_clauses): If all the linear
2287         gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
2288         nor set *head = NULL.  Formatting fixes.
2290 2018-01-31  Paul Thomas  <pault@gcc.gnu.org>
2292         PR fortran/84088
2293         * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
2294         an address expression passed to an assumed rank dummy, convert
2295         to an indirect reference.
2297 2018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
2299         * dump-parse-tree.c (write_proc): Use sym_name (which may
2300         be sym->binding_label) instead of sym->name.
2302 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
2304         * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
2305         of int for slen.
2307 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
2309         PR fortran/78534
2310         * trans-expr.c (fill_with_spaces): Use memset instead of
2311         generating loop.
2312         (gfc_trans_string_copy): Improve opportunity to use builtins with
2313         constant lengths.
2315 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
2317         PR debug/84131
2318         * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
2319         to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
2321 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2323         PR fortran/84134
2324         * array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
2325         zero, return false.
2327 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2329         PR fortran/84133
2330         * frontend-passes (matmul_to_var_expr): Return early if
2331         in association list.
2332         (inline_matmul_assign): Likewise.
2334 2017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
2336         PR fortran/84073
2337         * resolve.c (resolve_component): Ensure BIND(C) character
2338         components have length one.
2339         (resolve_symbol): Likewise for variables.
2341 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
2343         PR fortran/84065
2344         * decl.c (add_init_expr_to_sym): Ignore initializers for too large
2345         lengths.
2347 2018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
2348             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
2349             Soren Rasmussen  <s.c.rasmussen@gmail.com>
2351         Partial support for Fortran 2018 teams features.
2353         * array.c (gfc_match_array_ref): add team attribute in coarray
2354         transfers.
2355         * check.c (gfc_check_get_team, gfc_check_team_number): add new
2356         functions for get_team and team_number.
2357         * dump-parse-tree.c (show_code_node): add new statements: form team,
2358         change team, end team, and sync team.
2359         * expr.c (gfc_find_team_co): add new function.
2360         * gfortran.h: add new statements.
2361         * intrinsic.c (add_functions): add get_team and team_number functions.
2362         * intrinsic.h: add get_team and team_number prototypes for check,
2363         simplify, and resolve.
2364         * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
2365         functions.
2366         * iso-fortran-env.def: add the team_type derived type.
2367         * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
2368         (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
2369         add change team, end team, form team, sync team match and functions.
2370         * match.h: add new prototypes for change team, end team, form team,
2371         and sync team.
2372         * parse.c (decode_statement): add cases for change team, end team,
2373         form team, and sync team.
2374         * resolve.c: add cases for exec form team, change team, end team, and
2375         sync team.
2376         * simplify.c (gfc_simplify_get_team): add new function for get team.
2377         * st.c (gfc_free_statement): add cases exec for change team, end team,
2378         form team, sync team.
2379         * trans-decl.c (gfor_fndecl_caf_form_team)
2380         (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
2381         (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
2382         (gfor_fndecl_caf_team_number): add functions and definitions.
2383         * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
2384         new function and team_type argument support.
2385         * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
2386         (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
2387         * trans-stmt.h: add new prototypes.
2388         * trans-types.c (gfc_get_derived_type): check condition for team_type.
2389         * trans.c (trans_code): new exec cases for form team, change team, end
2390         team, and sync team.
2391         * trans.h: add new prototypes.
2393 2018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
2395         PR fortran/83998
2396         * simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
2397         or .false.  The summation does the correct type conversion.
2398         (gfc_simplify_dot_product): Special case zero-sized arrays.
2400 2018-25-01  Paul Thomas  <pault@gcc.gnu.org>
2402         PR fortran/37577
2403         * array.c (gfc_match_array_ref): If standard earlier than F2008
2404         it is an error if the reference dimension is greater than 7.
2405         libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
2406         dtype masks and shifts accordingly.
2407         * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
2408         type node to check the field.
2409         (gfc_conv_descriptor_dtype): Access the rank field of dtype.
2410         (duplicate_allocatable_coarray): Access the rank field of the
2411         dtype descriptor rather than the dtype itself.
2412         * trans-expr.c (get_scalar_to_descriptor_type): Store the type
2413         of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
2414         (ie. a character).
2415         (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
2416         get_scalar_to_descriptor_type if the actual expression is a
2417         constant.
2418         (gfc_trans_structure_assign): Assign the rank directly to the
2419         dtype rank field.
2420         * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
2421         to default integer kind.
2422         (gfc_conv_intrinsic_sizeof): Obtain the element size from the
2423         'elem_len' field of the dtype.
2424         * trans-io.c (gfc_build_io_library_fndecls): Replace
2425         gfc_int4_type_node with dtype_type_node where necessary.
2426         (transfer_namelist_element): Use gfc_get_dtype_rank_type for
2427         scalars.
2428         * trans-types.c : Provide 'get_dtype_type_node' to acces the
2429         dtype_type_node and, if necessary, build it.
2430         The maximum size of an array element is now determined by the
2431         maximum value of size_t.
2432         Update the description of the array descriptor, including the
2433         type def for the dtype_type.
2434         (gfc_get_dtype_rank_type): Build a constructor for the dtype.
2435         Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
2436         (gfc_get_array_descriptor_base): Change the type of the dtype
2437         field to dtype_type_node.
2438         (gfc_get_array_descr_info): Get the offset to the rank field of
2439         the dtype.
2440         * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
2441         * trans.h : Define the indices of the dtype fields.
2443 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
2445         PR fortran/83866
2446         * decl.c (gfc_match_derived_decl): If eos not matched, recover
2447         and emit error about garbage after declaration.
2449 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
2451         PR fortran/83898
2452         * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
2453         for characters.
2455 2018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
2457         PR 78534
2458         PR 83704
2459         * arith.c (gfc_arith_concat): Use size_t for string length.
2460         (gfc_compare_string): Likewise.
2461         (gfc_compare_with_Cstring): Likewise.
2462         * array.c (gfc_resolve_character_array_constructor): Use
2463         HOST_WIDE_INT, gfc_mpz_get_hwi.
2464         * check.c (gfc_check_fe_runtime_error): Use size_t.
2465         * data.c (create_character_initializer): Use HOST_WIDE_INT,
2466         gfc_extract_hwi.
2467         * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
2468         (add_init_expr_to_sym): Use HOST_WIDE_INT.
2469         * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
2470         gfc_extract_hwi.
2471         (gfc_apply_init): Likewise.
2472         * match.h (gfc_set_constant_character_len): Update prototype.
2473         * primary.c (match_string_constant): Use size_t.
2474         * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
2475         gfc_mpz_get_hwi.
2476         * simplify.c (init_result_expr): Likewise.
2477         (gfc_simplify_len_trim): Use size_t.
2478         * target-memory.c (gfc_encode_character): Use size_t.
2479         (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
2480         (interpret_array): Use size_t.
2481         (gfc_interpret_character): Likewise.
2482         * target-memory.h (gfc_encode_character): Update prototype.
2483         (gfc_interpret_character): Likewise.
2484         (gfc_target_interpret_expr): Likewise.
2485         * trans-const.c (gfc_build_string_const): Use size_t for length
2486         argument.
2487         (gfc_build_wide_string_const): Likewise.
2488         * trans-const.h (gfc_build_string_const): Likewise.
2489         (gfc_build_wide_string_const): Likewise.
2491 2018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
2493         PR fortran/83900
2494     * simplify.c (gfc_simplify_matmul): Set return type correctly.
2496 2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
2498         PR fortran/83900
2499         * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2501 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
2503         PR fortran/83864
2504         * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2506 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
2508         PR fortran/83874
2509         * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2511 2018-01-15  Louis Krupp  <louis.krupp@zoho.com>
2513         PR fortran/82257
2514         * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
2515         from symbol marked unlimited polymorphic.
2516         * resolve.c (resolve_structure_cons): Likewise.
2517         * misc.c (gfc_typename): Don't dereference derived->components
2518         if it's NULL.
2520 2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
2522         PR fortran/54613
2523         * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
2524         (gfc_logical_4_kind): New macro
2525         * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
2526         (gfc_simplify_maxloc): Likewise.
2527         (gfc_resolve_maxloc): Likewise.
2528         (gfc_resolve_minloc): Likewise.
2529         * check.c (gfc_check_minloc_maxloc): Add checking for "back"
2530         argument; also raise error if it is used (for now). Add it
2531         if it isn't present.
2532         * intrinsic.c (add_sym_4ml): Rename to
2533         (add_sym_5ml), adjust for extra argument.
2534         (add_functions): Add "back" constant. Adjust maxloc and minloc
2535         for back argument.
2536         * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
2537         not of gfc_logical_4_kind, convert.
2538         (gfc_resolve_minloc): Likewise.
2539         * simplify.c (gfc_simplify_minloc): Add back argument.
2540         (gfc_simplify_maxloc): Likewise.
2541         * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
2542         argument to %VAL to ensure passing by value.
2543         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
2544         also for library calls.
2546 2018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2548         PR fortran/82007
2549         * resolve.c (resolve_transfer): Delete code looking for 'DT'
2550         format specifiers in format strings. Set formatted to true if a
2551         format string or format label is present.
2552         * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2553         whitespace.
2555 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2557         PR fortran/83744
2558         * dump-parse-tree.c (get_c_type_name): Remove extra line.
2559         Change for loop to use declaration in for loop. Handle BT_LOGICAL
2560         and BT_CHARACTER.
2561         (write_decl): Add where argument. Fix indentation. Replace
2562         assert with error message. Add typename to warning
2563         in comment.
2564         (write_type): Adjust locus to call of write_decl.
2565         (write_variable): Likewise.
2566         (write_proc): Likewise. Replace assert with error message.
2568 2018-01-13  Paul Thomas  <pault@gcc.gnu.org>
2570         PR fortran/52162
2571         * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
2572         the rhs expression is neither an elemental nor a conversion
2573         function.
2575         PR fortran/83622
2576         * trans-array.c (is_pointer_array): Remove unconditional return
2577         of false for -fopenmp.
2579 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2580         <emsr@gcc.gnu.org>
2582         PR fortran/83803
2583         * dump-parse-tree.c (write_proc): Always emit closing parenthesis
2584         for functions.
2586 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
2588         PR fortran/82367
2589         * resolve.c (resolve_allocate_expr): Check for NULL pointer.
2591 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
2593         PR fortran/83093
2594         * resolve.c (resolve_charlen): Check the type of cl->length
2595         after resolution.
2597 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
2599         PR fortran/83740
2600         * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2602 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
2604         PR fortran/83740
2605         * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2606         LHS type when assigning.
2608 2018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2610         PR fortran/83742
2611         * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2613 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2615         * match.c (gfc_match_allocate): Check for NULL pointer.
2617 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2619         * expr.c (gfc_check_pointer_assign): Fix typo in comment.
2621 2018-01-08  Paul Thomas  <pault@gcc.gnu.org>
2623         PR fortran/83611
2624         * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2625         an initializer, convert the kind parameters and add to the
2626         component if the instance.
2627         * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2628         use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2629         for parameterized arrays. Clean up typos in comments. Convert
2630         parameterized array initializers and copy into the array.
2631         * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2632         parameterized types.
2633         *trans-stmt.c (trans_associate_var): Deallocate associate vars
2634         as necessary, when they are PDT function results for example.
2636         PR fortran/83731
2637         * trans-array.c (structure_alloc_comps): Only compare len parms
2638         when they are declared explicitly.
2640 2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
2642         PR fortran/50892
2643         * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2644         lhs type.
2646 2018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
2648         PR fortran/78534
2649         PR fortran/66310
2650         * array.c (got_charlen): Use gfc_charlen_int_kind.
2651         * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2652         hardcoded kind.
2653         (find_intrinsic_vtab): Likewise.
2654         * decl.c (match_char_length): Use gfc_charlen_int_kind.
2655         (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2656         (gfc_match_implicit): Use gfc_charlen_int_kind.
2657         * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2658         (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2659         * expr.c (gfc_get_character_expr): Length parameter of type
2660         gfc_charlen_t.
2661         (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2662         (gfc_extract_hwi): New function.
2663         (simplify_const_ref): Make string_len of type gfc_charlen_t.
2664         (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2665         * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2666         * gfortran.h (gfc_mpz_get_hwi): New prototype.
2667         (gfc_mpz_set_hwi): Likewise.
2668         (gfc_charlen_t): New typedef.
2669         (gfc_expr): Use gfc_charlen_t for character lengths.
2670         (gfc_size_kind): New extern variable.
2671         (gfc_extract_hwi): New prototype.
2672         (gfc_get_character_expr): Use gfc_charlen_t for character length.
2673         (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2674         * gfortran.texi: Update description of hidden string length argument.
2675         * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2676         (gfc_resolve_char_achar): Likewise.
2677         (gfc_resolve_repeat): Pass string length directly without
2678         temporary, use gfc_charlen_int_kind.
2679         (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2680         * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2681         * misc.c (gfc_mpz_get_hwi): New function.
2682         (gfc_mpz_set_hwi): New function.
2683         * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2684         (parse_integer): Don't complain about large integers.
2685         (write_atom): Use HOST_WIDE_INT for integers.
2686         (mio_integer): Handle integer type mismatch.
2687         (mio_hwi): New function.
2688         (mio_intrinsic_op): Use HOST_WIDE_INT.
2689         (mio_array_ref): Likewise.
2690         (mio_expr): Likewise.
2691         * primary.c (match_substring): Use gfc_charlen_int_kind.
2692         * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2693         (resolve_character_operator): Likewise.
2694         (resolve_assoc_var): Likewise.
2695         (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2696         (resolve_charlen): Use mpz_sgn to determine sign.
2697         * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2698         instead of long.
2699         * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2700         * target-memory.c (size_character): Length argument of type
2701         gfc_charlen_t.
2702         (gfc_encode_character): Likewise.
2703         (gfc_interpret_character): Use gfc_charlen_t.
2704         * target-memory.h (gfc_encode_character): Modify prototype.
2705         * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2706         (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2707         (trans_array_constructor): Use existing type.
2708         (get_array_charlen): Likewise.
2709         * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2710         * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2711         * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2712         (add_argument_checking): Likewise.
2713         * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2714         gfc_charlen_type_node.
2715         (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2716         4, fold_convert to correct type.
2717         (gfc_conv_class_to_class): Build const of type size_type_node for
2718         size.
2719         (gfc_copy_class_to_class): Likewise.
2720         (gfc_conv_string_length): Use same type in expression.
2721         (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2722         (gfc_conv_string_tmp): Make sure len is of the right type.
2723         (gfc_conv_concat_op): Use same type in expression.
2724         (gfc_conv_procedure_call): Likewise.
2725         (fill_with_spaces): Comment out memset() block due to spurious
2726         -Wstringop-overflow warnings.
2727         (gfc_trans_string_copy): Use gfc_charlen_type_node.
2728         (alloc_scalar_allocatable_for_subcomponent_assignment):
2729         fold_convert to right type.
2730         (gfc_trans_subcomponent_assign): Likewise.
2731         (trans_class_vptr_len_assignment): Build const of correct type.
2732         (gfc_trans_pointer_assignment): Likewise.
2733         (alloc_scalar_allocatable_for_assignment): fold_convert to right
2734         type in expr.
2735         (trans_class_assignment): Build const of correct type.
2736         * trans-intrinsic.c (gfc_conv_associated): Likewise.
2737         (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2738         * trans-io.c (gfc_build_io_library_fndecls): Use
2739         gfc_charlen_type_node for character lengths.
2740         (set_string): Convert to right type in assignment.
2741         * trans-stmt.c (gfc_trans_label_assign): Build const of
2742         gfc_charlen_type_node.
2743         (trans_associate_var): Likewise.
2744         (gfc_trans_character_select): Likewise.
2745         (gfc_trans_allocate): Likewise, don't typecast strlen result.
2746         (gfc_trans_deallocate): Don't typecast strlen result.
2747         * trans-types.c (gfc_size_kind): New variable.
2748         (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2749         from size_type_node.
2750         * trans-types.h: Fix comment.
2752 2018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
2754         PR fortran/83683
2755         PR fortran/45689
2756         * check.c (gfc_check_eoshift): Check for string length and
2757         for conformance of boundary.
2758         * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2759         * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2760         * simplify.c (gfc_simplify_eoshift): New function.
2762 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2763             Alan Hayward  <alan.hayward@arm.com>
2764             David Sherwood  <david.sherwood@arm.com>
2766         * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2769             Alan Hayward  <alan.hayward@arm.com>
2770             David Sherwood  <david.sherwood@arm.com>
2772         * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2774 2018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
2776         PR fortran/83664
2777         * check.c (gfc_check_eoshift): Error for missing boundary if array
2778         is not one of the standard types.
2780 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
2782         Update copyright years.
2784         * gfortranspec.c (lang_specific_driver): Update copyright notice
2785         dates.
2786         * gfc-internals.texi: Bump @copying's copyright year.
2787         * gfortran.texi: Ditto.
2788         * intrinsic.texi: Ditto.
2789         * invoke.texi: Ditto.
2791 2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2793         PR fortran/45689
2794         * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2795         gfc_simplify_minloc to maxloc and minloc, respectively.
2796         * intrinsic.h: Add prototypes for gfc_simplify_minloc
2797         and gfc_simplify_maxloc.
2798         * simplify.c (min_max_chose): Adjust prototype.  Modify function
2799         to have a return value which indicates if the extremum was found.
2800         (is_constant_array_expr): Fix typo in comment.
2801         (simplify_minmaxloc_to_scalar): New function.
2802         (simplify_minmaxloc_nodim): New function.
2803         (new_array): New function.
2804         (simplify_minmaxloc_to_array): New function.
2805         (gfc_simplify_minmaxloc): New function.
2806         (simplify_minloc): New function.
2807         (simplify_maxloc): New function.
2809 2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2811         PR fortran/45689
2812         PR fortran/83650
2813         * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2814         range of arguments.
2816 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
2818         PR fortran/83076
2819         * resolve.c (resolve_fl_derived0): Add caf_token fields for
2820         allocatable and pointer scalars, when -fcoarray selected.
2821         * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2822         field as well as the backend_decl.
2823         (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2824         derived types that are not vtypes. Components with caf_token
2825         attribute are pvoid types. For a component requiring it, find
2826         the caf_token field and have the component token field point to
2827         its backend_decl.
2829         PR fortran/83319
2830         *trans-types.c (gfc_get_array_descriptor_base): Add the token
2831         field to the descriptor even when codimen not set.
2833 Copyright (C) 2018 Free Software Foundation, Inc.
2835 Copying and distribution of this file, with or without modification,
2836 are permitted in any medium without royalty provided the copyright
2837 notice and this notice are preserved.
2839         PR fortran/87945
2840         * decl.c (var_element): Inquiry parameters cannit be data objects.
2842 2018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2844         PR fortran/88025
2845         * expr.c (gfc_apply_init):  Remove asserts that cannot trigger.
2846         Check for a NULL pointer.
2848 2018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2850         PR fortran/88357
2851         * class.c (insert_component_ref): Check for NULL pointer and 
2852         previous error message issued.
2853         * parse.c (parse_associate): Check for NULL pointer.
2854         * resolve.c (resolve_assoc_var): Check for NULL pointer.
2856 2018-12-07  Jakub Jelinek  <jakub@redhat.com>
2858         PR fortran/88377
2859         * trans-openmp.c (gfc_omp_clause_default_ctor,
2860         gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2861         gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
2862         GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
2863         have pointer type.
2865 2018-12-03  Fritz Reese  <fritzoreese@gmail.com>
2866             Mark Eggleston  <mark.eggleston@codethink.co.uk>
2868         PR fortran/87919
2869         * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
2870         (set_dec_flags): Set/unset DEC and std flags according to value.
2871         (post_dec_flags, set_init_local_zero): New functions.
2872         (gfc_init_options): Use set_init_local_zero and post_dec_flags.
2873         (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
2874         SET_BITFLAG.
2875         <case OPT_finit_local_zero>: Use set_init_local_zero.
2876         <case OPT_fdec>: Pass value to set_dec_flags.
2877         <case OPT_fdec_structure>: Remove.
2879 2018-11-30  Thomas Schwinge  <thomas@codesourcery.com>
2881         * gfortran.h (struct gfc_omp_clauses): Remove "wait".  Adjust all
2882         users.
2884         * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
2885         clauses.
2887 2018-11-27  Martin Liska  <mliska@suse.cz>
2889         * decl.c (gfc_match_gcc_builtin): New function.
2890         * gfortran.h (struct vect_builtin_tuple): New.
2891         (gfc_adjust_builtins): Likewise.
2892         * lang-specs.h (TARGET_F951_OPTIONS): New.
2893         (F951_OPTIONS): Use it.
2894         * lang.opt: Add new option -fpre-include.
2895         * match.h (gfc_match_gcc_builtin): Declare new function.
2896         * parse.c (decode_gcc_attribute): Handle builtin.
2897         (parse_progunit): Call gfc_adjust_builtins.
2898         * scanner.c (gfc_new_file): Load pre-included header file
2899         when provided.
2900         * trans-intrinsic.c (add_simd_flag_for_built_in): New.
2901         (gfc_adjust_builtins): Likewise.
2903 2018-11-24  Paul Thomas  <pault@gcc.gnu.org>
2905         PR fortran/88143
2906         * resolve.c (resolve_variable): Check for associate names with
2907         NULL target.
2909 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
2911         * lang.opt (fpad-source): New option.
2912         * scanner.c (load_line): Don't pad fixed form lines if
2913         !flag_pad_source.
2914         * invoke.texi (-fno-pad-source): Document.
2916 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
2918         * invoke.texi (-fdec-include): Document.
2920 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
2921             Mark Eggleston  <mark.eggleston@codethink.com>
2923         * lang.opt (fdec-include): New option.
2924         * options.c (set_dec_flags): Set also flag_dec_include.
2925         * scanner.c (include_line): Change return type from bool to int.
2926         In fixed form allow spaces in between include keyword letters.
2927         For -fdec-include, allow in fixed form 0 in column 6.  With
2928         -fdec-include return -1 if the parsed line is not full include
2929         statement and it could be successfully completed on continuation
2930         lines.
2931         (include_stmt): New function.
2932         (load_file): Adjust include_line caller.  If it returns -1, keep
2933         trying include_stmt until it stops returning -1 whenever adding
2934         further line of input.
2936 2018-11-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
2938         PR fortran/88073
2939         * frontend-passes.c (combine_array_constructor): Do not do
2940         anything if in a WHERE statement.
2942 2018-11-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
2944         PR fortran/70260
2945         * expr.c (gfc_check_assign): Reject assigning to an external
2946         symbol.
2947         (gfc_check_pointer_assign): Add suppress_type_test
2948         argument. Insert line after if. A non-proc pointer can not point
2949         to a constant.  Only check types if suppress_type_test is false.
2950         * gfortran.h (gfc_check_pointer_assign): Add optional
2951         suppress_type_test argument.
2952         * resolve.c (gfc_resolve_code):  Move up gfc_check_pointer_assign
2953         and give it the extra argument.
2954         (resolve_fl_procedure): Set error on value for a function with
2955         an inizializer.
2957 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2959         PR other/19165
2960         * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
2962 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2964         * cpp.c: Replace "source_location" with "location_t".
2965         * gfortran.h: Likewise.
2967 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
2969         * trans-openmp.c (gfc_trans_omp_clauses): Use
2970         OMP_CLAUSE_DEFAULTMAP_SET_KIND.
2971         (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
2972         rather than OMP_ATOMIC_SEQ_CST.
2973         (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
2974         make_node instead of build1_loc.
2975         * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2976         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2977         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2978         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2979         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2980         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2981         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
2983 2018-11-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2985         PR fortran/46020
2986         * decl.c (verify_bind_c_sym): Remove unnecessary space
2987         in error message.
2989 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
2991         PR fortran/87782
2992         * frontend-passes.c (constant_string_length): If there is a
2993         substring with a length which cannot be reduced to a constant,
2994         return NULL.
2996 2018-11-01  Paul Thomas  <pault@gcc.gnu.org>
2998         PR fortran/40196
2999         * dependency.c (are_identical_variables): Return false if the
3000         inquiry refs are not the same.
3001         (gfc_ref_needs_temporary_p): Break on an inquiry ref.
3002         * dump_parse_tree.c (show_ref): Show the inquiry ref type.
3003         * expr.c (gfc_free_ref_list): Break on an inquiry ref.
3004         (gfc_copy_ref): Copy the inquiry ref types.
3005         (find_inquiry_ref): New function.
3006         (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
3007         to simplify_ref_chain.
3008         (gfc_simplify_expr): Use the new arg in call to
3009         simplify_ref_chain.
3010         (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
3011         inquiry ref.
3012         (gfc_traverse_expr): Return true for inquiry ref.
3013         * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
3014         * gfortran.h : Add enums and union member in gfc_ref to
3015         implement inquiry refs.
3016         * intrinsic.c : Fix white nois.
3017         * match.c (gfc_match_assignment): A constant lavlue is an
3018         error.
3019         * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
3020         for inquiry_types.
3021         (mio_ref): Handle inquiry refs.
3022         * primary.c (is_inquiry_ref): New function.
3023         (gfc_match_varspec): Handle inquiry refs calling new function.
3024         (gfc_variable_attr): Detect inquiry ref for disambiguation
3025         with components.
3026         (caf_variable_attr): Treat inquiry and substring refs in the
3027         same way.
3028         * resolve.c (find_array_spec): ditto.
3029         (gfc_resolve_substring_charlen): If there is neither a charlen
3030         ref not an inquiry ref, return.
3031         (resolve_ref): Handle inqiry refs as appropriate.
3032         (resolve_allocate_expr): Entities with an inquiry ref cannot be
3033         allocated.
3034         * simplify.c (simplify_bound, simplify_cobound): Punt on
3035         inquiry refs.
3036         * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
3037         ref.
3038         *trans-expr.c (conv_inquiry): New function.
3039         (gfc_conv_variable): Retain the last typespec to pass to
3040         conv_inquiry on detecting an inquiry ref.
3042 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
3044         PR fortran/46020
3045         * decl.c (verify_bind_c_sym): Improve error message.
3047 2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
3049         PR fortran/54613
3050         * gfortran.texi (File format of unformatted sequential files):
3051         Replace random comma with period.
3052         * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
3053         (FINDLOC): Document.
3054         (MAXLOC): Add refrence to FINDLOC.
3055         (MINLOC): Likewise.
3057 2018-10-31  Nathan Sidwell  <nathan@acm.org>
3059         * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
3061 2018-10-31  Martin Liska  <mliska@suse.cz>
3063         * trans-decl.c (struct module_hasher): Call htab_hash_string
3064         for s->name and not for s.
3066 2018-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
3068         PR fortran/85896
3069         * simplify.c (simplify_min_max): Do not convert the type of the
3070         return expression.
3072 2017-10-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
3074         PR fortran/54613
3075         * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
3076         (gfc_check_f): Add f6fl field.
3077         (gfc_simplify_f): Add f6 field.
3078         (gfc_resolve_f): Likewise.
3079         (gfc_type_letter): Add optional logical_equas_int flag.
3080         * check.c (intrinsic_type_check): New function.
3081         (gfc_check_findloc): New function.
3082         * intrinsics.c (gfc_type_letter): If logical_equals_int is
3083         set, act accordingly.
3084         (add_sym_5ml):  Reformat comment.
3085         (add_sym_6fl): New function.
3086         (add_functions): Add findloc.
3087         (check_arglist): Add sixth argument, handle it.
3088         (resolve_intrinsic): Likewise.
3089         (check_specific): Handle findloc.
3090         * intrinsic.h (gfc_check_findloc): Add prototype.
3091         (gfc_simplify_findloc): Likewise.
3092         (gfc_resolve_findloc): Likewise.
3093         (MAX_INTRINSIC_ARGS): Adjust.
3094         * iresolve.c (gfc_resolve_findloc): New function.
3095         * simplify.c (gfc_simplify_minmaxloc): Make static.
3096         (simplify_findloc_to_scalar): New function.
3097         (simplify_findloc_nodim): New function.
3098         (simplify_findloc_to_array): New function.
3099         (gfc_simplify_findloc): New function.
3100         (gfc_conv_intrinsic_findloc): New function.
3101         (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
3102         (gfc_is_intrinsic_libcall): Likewise.
3104 2018-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
3106         PR fortran/86907
3107         * frontend-passes.c (check_locus_code): Add information that
3108         warning about missing location information points to an
3109         inconsisten internal state.
3110         (check_locus_expr): Likewise.
3112 2018-10-25  Jakub Jelinek  <jakub@redhat.com>
3114         PR fortran/87725
3115         * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
3116         nonmonotonic modifiers regardless of if they have been parsed
3117         already or if the opposite one has.  Fix up check whether
3118         comma after modifier should be parsed.
3119         (resolve_omp_clauses): Diagnose schedule modifier restrictions.
3121 2018-10-23  Paul Thomas  <pault@gcc.gnu.org>
3123         PR fortran/85603
3124         * frontend-passes.c (get_len_call): New function to generate a
3125         call to intrinsic LEN.
3126         (create_var): Use this to make length expressions for variable
3127         rhs string lengths.
3128         Clean up some white space issues.
3130 2018-10-21  Paul Thomas  <pault@gcc.gnu.org>
3132         PR fortran/71880
3133         * trans-expr.c (gfc_trans_pointer_assignment): Set the string
3134         length for array valued deferred length lhs.
3136 2018-10-18  Tobias Burnus  <burnus@net-b.de>
3138         PR fortran/87625
3139         * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
3140         polymorphic arrays.
3142 2018-10-18  Paul Thomas  <pault@gcc.gnu.org>
3144         PR fortran/58618
3145         * trans-stmt.c (trans_associate_var): All strings that return
3146         as pointer types can be assigned directly to the associate
3147         name so remove 'attr' and the condition that uses it.
3149 2018-10-18  Paul Thomas  <pault@gcc.gnu.org>
3151         PR fortran/58618
3152         * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
3153         initialization with NULL() of a deferred length pointer.
3155 2018-10-17  Tobias Burnus  <burnus@net-b.de>
3157         PR fortran/87632
3158         * resolve.c (resolve_select_type): Use correct variable.
3160 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
3162         * Make-lang.in (selftest-fortran): New.
3164 2018-10-17  Paul Thomas  <pault@gcc.gnu.org>
3166         PR fortran/56386
3167         PR fortran/58906
3168         PR fortran/77385
3169         PR fortran/80260
3170         PR fortran/82077
3171         * resolve.c (resolve_variable): Fix up expressions with array
3172         associate names, where the parser did not detect that this is
3173         array and there was no array part_ref in the expression.
3175 2018-10-16  Tobias Burnus  <burnus@net-b.de>
3177         PR fortran/67125
3178         * trans-array.c (gfc_array_init_size, gfc_array_allocate):
3179         Rename argument e3_is_array_constr to e3_has_nodescriptor
3180         and update comments.
3181         * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
3182         to 1 for nonalloc/nonpointer func results/vars besides
3183         array constructors.
3185 2018-10-16  Tobias Burnus  <burnus@net-b.de>
3187         PR fortran/87556
3188         * trans-stmt.c (form_team, change_team, sync_team):
3189         Don't ignore argse.pre/argse.post.
3191 2018-10-15  Paul Thomas  <pault@gcc.gnu.org>
3192         Tobias Burnus  <burnus@gcc.gnu.org>
3194         PR fortran/87566
3195         * resolve.c (resolve_assoc_var): Add missing array spec for
3196         class associate names.
3197         (resolve_select_type): Handle case where last typed component
3198         of the selector has a different type to the expression.
3199         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
3200         call to gfc_expr_to_initialize with call to gfc_copy_expr.
3201         (gfc_conv_class_to_class): Guard assignment to 'len' field
3202         against case where zero constant is supplied.
3204 2018-10-12  Tobias Burnus  <burnus@net-b.de>
3206         PR fortran/87597
3207         * expr.c (gfc_simplify_expr): Avoid simplifying
3208         the 'array' argument to lbound/ubound/lcobound/
3209         ucobound.
3211 2018-10-12  Tobias Burnus <burnus@net-b.de>
3213         PR fortran/58787
3214         * decl.c (get_proc_name): Return with error before
3215         creating sym_tree.
3217 2018-10-11  Tobias Burnus <burnus@net-b.de>
3219         Revert:
3220         2018-10-09  Tobias Burnus <burnus@net-b.de>
3222         PR fortran/83522
3223         * resolve.c (resolve_ref): Reject nonscalar
3224         substring references.
3226 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
3228         * cpp.c (gfc_cpp_init_0): Update for renamings.
3229         (cb_cpp_error): Rename to...
3230         (cb_cpp_diagnostic): ...this, converting level and reason to
3231         enums.
3233 2018-10-09  Tobias Burnus <burnus@net-b.de>
3235         PR fortran/83522
3236         * resolve.c (resolve_ref): Reject nonscalar
3237         substring references.
3239 2018-10-09  Paul Thomas  <pault@gcc.gnu.org>
3241         PR fortran/87151
3242         * trans-array.c (gfc_get_array_span): Deal with deferred char
3243         array components having a TYPE_MAX_VALUE of zero.
3244         (gfc_array_init_size): Use the hidden string length component
3245         to build the descriptor dtype.
3246         (gfc_array_allocate): Remove the erroneous replacement of the
3247         charlen backend decl with a temporary.
3248         (gfc_conv_expr_descriptor): Use the ss_info string length in
3249         the case of deferred character components.
3250         (gfc_alloc_allocatable_for_assignment): Actually compare the
3251         string lengths for deferred characters. Make sure that kind > 1
3252         is handled correctly. Set the span field of the descriptor.
3253         * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
3254         comment.
3256         PR fortran/80931
3257         * trans-array.c (gfc_array_allocate): Set the span field for
3258         variable length character arrays.
3260 2018-10-08  Cesar Philippidis  <cesar@codesourcery.com>
3262         * expr.c (gfc_check_pointer_assign): Demote "Assignment to
3263         contiguous pointer from non-contiguous target" to a warning.
3265 2018-10-08  Paul Thomas  <pault@gcc.gnu.org>
3267         PR fortran/86372
3268         * trans-stmt.c (trans_associate_var): Character associate names
3269         with variable string length do not have to be deferred length
3270         for the string length to be set, if variable.
3272 2018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
3274         PR fortran/86111
3275         * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
3276         * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
3277         (gfc_arith_concat):  If the types of op1 and op2 are not
3278         character of if their kinds do not match, issue ARITH_WRONGCONCAT.
3280 2018-10-06  Paul Thomas  <pault@gcc.gnu.org>
3282         PR fortran/83999
3283         * resolve.c (resolve_fl_procedure): Include class functions in
3284         the test that elemental function results be scalar.
3286 2018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
3288         PR fortran/84640
3289         * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
3290         by one. Set extents one past the array boundaries to zero to avoid
3291         warning with instrumented compiler.
3292         (gfc_simplify_eoshift): Likewise, only for ss_ex.
3294 2018-10-05  Paul Thomas  <pault@gcc.gnu.org>
3296         PR fortran/87487
3297         * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
3298         character length pointer initializer has the right type to fix
3299         problem with deferred_character_24.f90 on big endian.
3301 2018-10-03  Jeff Law  <law@redhat.comg>
3303         * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
3305 2018-10-01  Paul Thomas  <pault@gcc.gnu.org>
3307         PR fortran/65677
3308         * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
3309         flag in the call to gfc_check_dependency.
3311 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
3313         PR fortran/87359
3314         * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
3315         introduced by r264358, which prevented components of associate
3316         names from being reallocated on assignment.
3318 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
3320         PR fortran/70752
3321         PR fortran/72709
3322         * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
3323         deferred type and the info->descriptor is present, use the
3324         info->descriptor
3325         (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
3326         it as 'decl' rather than the symbol backend_decl.
3327         (gfc_array_allocate): If the se string_length is a component
3328         reference, fix it and use it for the expression string length
3329         if the latter is not a variable type. If it is a variable do
3330         an assignment. Make use of component ref string lengths to set
3331         the descriptor 'span'.
3332         (gfc_conv_expr_descriptor): For pointer assignment, do not set
3333         the span field if gfc_get_array_span returns zero.
3334         * trans.c (get_array_span): If the upper bound a character type
3335         is zero, use the descriptor span if available.
3337 2018-09-30  Paul Thomas  <pault@gcc.gnu.org>
3339         PR fortran/70149
3340         * trans-decl.c (gfc_get_symbol_decl): A deferred character
3341         length pointer that is initialized needs the string length to
3342         be initialized as well.
3344 2018-09-29  Paul Thomas  <pault@gcc.gnu.org>
3346         PR fortran/65677
3347         * trans-expr.c (gfc_trans_assignment_1): If there is dependency
3348         fix the rse stringlength.
3350 2018-09-25  Martin Liska  <mliska@suse.cz>
3352         PR fortran/87394
3353         * decl.c (add_hidden_procptr_result): Simplify condition
3354         as we are in branch witch 'case1 || case2'.
3356 2018-09-25  Martin Liska  <mliska@suse.cz>
3358         * trans.c (remove_suffix): Remove
3359         unused function.
3361 2018-09-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
3363         PR fortran/87397
3364         * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3365         for variables in an associate statement.
3367 2018-09-24  Bernhard Reuther-Fischer  <aldot@gcc.gnu.org>
3368             Cesar Philippidis  <cesar@codesourcery.com>
3370         * openmp.c (resolve_oacc_loop_blocks):
3372 2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
3374         PR fortran/87397
3375         * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3376         for variables having the dimension attribute.
3378 2018-09-23  Janne Blomqvist  <jb@gcc.gnu.org>
3380         * trans-expr.c (gfc_caf_get_image_index): Do array index
3381         calculations in gfc_array_index_type.
3382         * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
3383         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
3384         (gfc_trans_event_post_wait): Likewise.
3386 2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
3388         PR fortran/87395
3389         * gfc_conv_procedure_call: Reformat comments slightly. Do not add
3390         clobber on INTENT(OUT) for saved variables.
3392 2018-09-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
3394         PR fortran/41453
3395         * trans.h (gfc_conv_expr_reference): Add optional argument
3396         add_clobber to prototype.
3397         (gfc_conv_procedure_call):  Set add_clobber argument to
3398         gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
3399         non-pointer, non-allocatable, non-dummy variables whose type
3400         is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
3401         the procedure is not elemental.
3402         * trans-expr.c (gfc_conv_procedure_reference): Add clobber
3403         statement before call if add_clobber is set.
3405 2018-09-22  Paul Thomas  <pault@gcc.gnu.org>
3407         PR fortran/85603
3408         * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
3409         the charlen backend_decl before using the VAR_P macro.
3411 2018-09-21  Paul Thomas  <pault@gcc.gnu.org>
3413         PR fortran/77325
3414         * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
3415         rhs has a charlen expression, convert that and use it.
3416         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3417         assignment of deferred character array vars to a realocatable
3418         lhs should not be added to the exterior block since vector
3419         indices, for example, generate temporaries indexed within the
3420         loop.
3422 2018-09-21  Paul Thomas  <pault@gcc.gnu.org>
3424         PR fortran/87359
3425         * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
3426         components if must_finalize is set for expr3.
3428 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
3429             Kwok Cheung Yeung  <kcy@codesourcery.com>
3431         * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
3432         argument of a call to _gfortran_caf_register is of size_type_node.
3433         * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
3434         index to a size_type_node type.
3435         * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
3437 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
3439         * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
3441 2018-09-20  Janus Weil  <janus@gcc.gnu.org>
3443         * gfortran.h (gfc_str_startswith): New macro.
3444         * decl.c (variable_decl, gfc_match_end): Use it.
3445         * iresolve.c (is_trig_resolved): Ditto.
3446         * module.c (load_omp_udrs, read_module): Ditto.
3447         * options.c (gfc_handle_runtime_check_option): Ditto.
3448         * primary.c (match_arg_list_function): Ditto.
3449         * trans-decl.c (gfc_get_symbol_decl): Ditto.
3450         * trans-expr.c (gfc_conv_procedure_call): Ditto.
3451         * interface.c (dtio_op): Replace strncmp by strcmp.
3452         * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
3453         * trans-expr.c (conv_arglist_function): Ditto.
3454         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
3455         STARTS_WITH by gfc_str_startswith.
3457 2018-09-20  Cesar Philippidis  <cesar@codesourcery.com>
3459         * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
3460         and reorder the switch cases to match the enum in gfortran.h.
3462 2018-09-19  Paul Thomas  <pault@gcc.gnu.org>
3464         PR fortran/84109
3465         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3466         assignment of deferred character intrinsic elemental function
3467         results to a realocatable lhs must not be added to the exterior
3468         block if they are array valued but must go to the loop body.
3470 2018-09-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
3472         PR fortran/29550
3473         * gfortran.h (gfc_expr): Add external_blas flag.
3474         * frontend-passes.c (matrix_case): Add case A2TB2T.
3475         (optimize_namespace): Handle flag_external_blas by
3476         calling call_external_blas.
3477         (get_array_inq_function): Add argument okind. If
3478         it is nonzero, use it as the kind of argument
3479         to be used.
3480         (inline_limit_check): Remove m_case argument, add
3481         limit argument instead.  Remove assert about m_case.
3482         Set the limit for inlining from the limit argument.
3483         (matmul_lhs_realloc): Handle case A2TB2T.
3484         (inline_matmul_assign): Handle inline limit for other cases with
3485         two rank-two matrices.  Remove no-op calls to inline_limit_check.
3486         (call_external_blas): New function.
3487         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
3488         argument to external BLAS if external_blas is already set.
3490 2018-09-18  Paul Thomas  <pault@gcc.gnu.org>
3492         PR fortran/87239
3493         * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3494         assignment of deferred character elemental function results to
3495         a realocatable lhs must not be added to the exterior block but
3496         must go to the loop body.
3498 2018-09-18  Paul Thomas  <pault@gcc.gnu.org>
3500         PR fortran/87336
3501         * trans-array.c (gfc_get_array_span): Try to get the element
3502         length of incomplete types. Return NULL_TREE otherwise.
3503         (gfc_conv_expr_descriptor): Only set the 'span' field if the
3504         above does not return NULL_TREE. Set 'span' field if possible
3505         for all new descriptors.
3507 2018-09-17  Paul Thomas  <pault@gcc.gnu.org>
3509         PR fortran/64120
3510         * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
3511         characters with a variable length expression for deferred init.
3512         (gfc_trans_deferred_vars): Perform the assignment for these
3513         symbols by calling gfc_conv_string_length.
3515 2018-09-17  Paul Thomas  <pault@gcc.gnu.org>
3517         PR fortran/85954
3518         * resolve.c (resolve_assoc_var): If the target expression is a
3519         deferred charlen dummy and the associate name shares the
3520         charlen, generate a new one. Make sure that new charlens are in
3521         the namespace list so that they get cleaned up.
3522         * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
3523         not reallocatable.
3524         * trans-decl.c (gfc_get_symbol_decl): Put deferred character
3525         length dummy and result arrays on the deferred initialization
3526         list so that the variable length arrays can be correctly dealt
3527         with.
3528         * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
3529         NULL rather than ICEing..
3531 2018-09-16  Janus Weil  <janus@gcc.gnu.org>
3533         PR fortran/86484
3534         PR fortran/84543
3535         * match.c (gfc_match_assignment): For a polymorphic assignment,
3536         make sure that the vtab for the rhs type is generated.
3538 2018-09-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
3540         PR fortran/37802
3541         * frontend-passes.c (B_ERROR): New macro for matmul bounds
3542         checking error messages.
3543         (C_ERROR): Likewise.
3544         (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
3545         and C_ERROR macros.
3547 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3549         * trans-array.c (gfc_conv_array_initializer): Remove excess precision
3550         from overlength string initializers.
3552 2018-09-12  Paul Thomas  <pault@gcc.gnu.org>
3554         PR fortran/87284
3555         * trans-expr.c (gfc_trans_class_init_assign): Access to
3556         to array elements of the dynamic type requires that the array
3557         reference be added to the class expression and not the _data
3558         component, unlike scalar expressions.
3560 2018-09-11  Janus Weil  <janus@gcc.gnu.org>
3562         PR fortran/87172
3563         * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
3564         attribute, then it was declared in another module, so there should be
3565         no error that it has not been declared.
3567 2018-09-11  Paul Thomas  <pault@gcc.gnu.org>
3569         PR fortran/87277
3570         * expr.c (is_subref_array): Add the check of dimensionality for
3571         class, dummy, pointer arrays.
3573 2018-09-11  Janus Weil  <janus@gcc.gnu.org>
3575         PR fortran/86830
3576         * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
3577         with non-polymorphic objects.
3579 2018-09-10  Janus Weil  <janus@gcc.gnu.org>
3581         PR fortran/85395
3582         * decl.c (match_binding_attributes): Use correct default accessibility
3583         for procedure pointer components.
3585 2018-09-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3587         * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
3588         'P' is zero and issue an error if it is.
3590 2018-08-31  Paul Thomas  <pault@gcc.gnu.org>
3592         PR fortran/86328
3593         PR fortran/86760
3594         * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
3595         info->descriptor but pass it directly to gfc_build_array_ref.
3596         (gfc_conv_array_ref): Likewise for se->expr.
3597         * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
3598         obtain the span field directly from it.
3600 2017-08-28  Paul Thomas  <pault@gcc.gnu.org>
3602         PR fortran/80477
3603         * trans-expr.c (gfc_conv_procedure_call): Allocatable class
3604         scalar results being passed to a derived type formal argument
3605         are finalized if possible. Otherwise, rely on existing code for
3606         deallocation. Make the deallocation of allocatable result
3607         components conditional on finalization not taking place. Make
3608         the freeing of data components after finalization conditional
3609         on the data being NULL.
3610         (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
3611         condition to return NULL_TREE.
3612         (gfc_trans_assignment_1): If the assignment is class to class
3613         and the rhs expression must be finalized but the assignment
3614         is not marked as a polymorphic assignment, use the vptr copy
3615         function instead of gfc_trans_scalar_assign.
3617         PR fortran/86481
3618         * trans-expr.c (gfc_conv_expr_reference): Do not add the post
3619         block to the pre block if the expression is to be finalized.
3620         * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
3621         finalized, load the post block into a finalization block and
3622         add it right at the end of the allocation block.
3624 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3626         PR 87091
3627         * error.c (gfc_format_decoder): Update for conversion of
3628         show_caret_p to a tri-state.
3630 2018-08-25  Janus Weil  <janus@gcc.gnu.org>
3632         PR fortran/86545
3633         * resolve.c (resolve_transfer): Correctly determine typespec for
3634         generic function calls, in order to throw a proper error.
3636 2018-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
3638         PR fortran/86837
3639         * frontend-passes.c (var_in_expr_callback): New function.
3640         (var_in_expr): New function.
3641         (traverse_io_block): Use var_in_expr instead of
3642         gfc_check_dependency for checking if the variable depends on the
3643         previous interators.
3645 2018-08-23  Janne Blomqvist  <blomqvist.janne@gmail.com>
3647         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
3648         HONOR_SIGNED_ZEROS checks.
3650 2018-08-23  Paul Thomas  <pault@gcc.gnu.org>
3652         PR fortran/86863
3653         * resolve.c (resolve_typebound_call): If the TBP is not marked
3654         as a subroutine, check the specific symbol.
3656 2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
3658         * gfortran.texi: Mention that asynchronous I/O does
3659         not work on systems which lack condition variables, such
3660         as AIX.
3662 2018-08-22  Janus Weil  <janus@gcc.gnu.org>
3664         PR fortran/86935
3665         * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
3666         statement.
3668 2018-08-22  Andrew Benson  <abensonca@gmail.com>
3670         * module.c (load_generic_interfaces): Move call to find_symbol()
3671         so that only occurs if actually needed.
3673 2018-08-22  Janus Weil  <janus@gcc.gnu.org>
3675         PR fortran/86888
3676         * decl.c (gfc_match_data_decl): Allow allocatable components of
3677         indirectly recursive type.
3678         * resolve.c (resolve_component): Remove two errors messages ...
3679         (resolve_fl_derived): ... and replace them by a new one.
3681 2018-08-21  Janne Blomqvist  <jb@gcc.gnu.org>
3683         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
3684         MAX_EXPR/MIN_EXPR unconditionally for real arguments.
3685         * gfortran.texi (Compiler Characteristics): Document MAX/MIN
3686         behavior wrt NaN.
3688 2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
3689         Thomas Koenig <tkoenig@gcc.gnu.org>
3691         PR fortran/25829
3692         * gfortran.texi: Add description of asynchronous I/O.
3693         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3694         as volatile.
3695         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3696         st_wait_async and change argument spec from ".X" to ".w".
3697         (gfc_trans_wait): Pass ID argument via reference.
3699 2018-08-16  Nathan Sidwell  <nathan@acm.org>
3701         * cpp.c (dump_macro): Use cpp_user_macro_p.
3703 2018-08-14  Janus Weil  <janus@gcc.gnu.org>
3705         PR fortran/86116
3706         * interface.c (compare_type): Remove a CLASS/TYPE check.
3707         (compare_type_characteristics): New function that behaves like the old
3708         'compare_type'.
3709         (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
3710         Call 'compare_type_characteristics' instead of 'compare_type'.
3712 2018-08-12  Paul Thomas  <pault@gcc.gnu.org>
3714         PR fortran/66679
3715         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
3716         elements are returned as references to the data element. Get
3717         the class expression by stripping back the references. Use this
3718         for the element size.
3720 2018-08-12  Paul Thomas  <pault@gcc.gnu.org>
3722         PR fortran/86906
3723         * resolve.c (resolve_fl_variable_derived): Check if the derived
3724         type is use associated before checking for the host association
3725         error.
3727 2018-08-10  Janus Weil  <janus@gcc.gnu.org>
3729         PR fortran/57160
3730         * invoke.texi (frontend-optimize): Mention short-circuiting.
3731         * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
3732         * resolve.c (resolve_operator): Warn about short-circuiting only with
3733         -ffrontend-optimize.
3734         * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
3735         with -ffrontend-optimize. Without that flag, make sure that both
3736         operands are evaluated.
3738 2018-08-08  Nathan Sidwell  <nathan@acm.org>
3740         * cpp.c (cb_file_change): Use linemap_included_from.
3742 2018-08-07  Cesar Philippidis  <cesar@codesourcery.com>
3744         * trans-stmt.h: Remove stale reference to trans-openacc.c.
3746 2018-08-04  Janus Weil  <janus@gcc.gnu.org>
3748         PR fortran/45521
3749         * interface.c (gfc_compare_interfaces): Apply additional
3750         distinguishability criteria of F08 to operator interfaces.
3752 2018-07-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3754         Revert 'AsyncI/O patch committed'
3755         2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
3756                 Thomas Koenig <tkoenig@gcc.gnu.org>
3758         PR fortran/25829
3759         * gfortran.texi: Add description of asynchronous I/O.
3760         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3761         as volatile.
3762         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3763         st_wait_async and change argument spec from ".X" to ".w".
3764         (gfc_trans_wait): Pass ID argument via reference.
3766 2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
3767         Thomas Koenig <tkoenig@gcc.gnu.org>
3769         PR fortran/25829
3770         * gfortran.texi: Add description of asynchronous I/O.
3771         * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3772         as volatile.
3773         * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3774         st_wait_async and change argument spec from ".X" to ".w".
3775         (gfc_trans_wait): Pass ID argument via reference.
3777 2018-07-20  Martin Sebor  <msebor@redhat.com>
3779         PR middle-end/82063
3780         * gfortran.h (gfc_handle_option): Change function argument
3781         to HOST_WIDE_INT.
3782         * options.c (gfc_handle_option): Same.
3784 2018-07-20  Andrew Benson  <abenson@carnegiescience.edu>
3786         * gfortran.h (gfc_symbol): Add pointer to next derived type.
3787         (gfc_dt_list, gfc_get_dt_list): Remove.
3788         (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
3789         * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
3790         simple nullification of gfc_derived_types.
3791         * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
3792         gfc_symbol.
3793         (add_dt_to_dt_list): Change derived type linked list insertion to
3794         utilize dt_next pointers in gfc_symbol.
3795         * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
3796         (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
3797         gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
3798         linked list search/insertion to utilize dt_next pointers in gfc_symbol.
3799         * trans-types.c (gfc_get_derived_type): Change derived type linked
3800         list search to utilize dt_next pointers in gfc_symbol.
3802 2018-07-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3804         * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
3805         or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
3807 2018-07-18  Janus Weil  <janus@gcc.gnu.org>
3808             Thomas Koenig  <tkoenig@gcc.gnu.org>
3810         PR fortran/85599
3811         * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
3812         * frontend-passes.c (do_warn_function_elimination): Do not warn for
3813         pure functions.
3814         * gfortran.h: Add prototypes for gfc_pure_function and
3815         gfc_implicit_pure_function.
3816         * gfortran.texi: Add chapter on evaluation of logical expressions.
3817         * invoke.texi: Mention that -Wfunction-elimination is implied
3818         by -Wextra.
3819         * lang.opt: Make -Wextra imply -Wfunction-elimination.
3820         * resolve.c (pure_function): Rename to gfc_pure_function.
3821         (gfc_implicit_pure_function): New function.
3822         (check_pure_function): Use it here.
3823         (impure_function_callback): New function.
3824         (resolve_operator): Call it via gfc_expr_walker.
3826 2018-07-16  Fritz Reese  <fritzoreese@gmail.com>
3828         PR fortran/83184
3829         * decl.c (match_old_style_init): Initialize locus of variable expr when
3830         creating a data variable.
3831         (match_clist_expr): Verify array is explicit shape/size before
3832         attempting to allocate constant array constructor.
3834 2018-07-16  Fritz Reese  <fritzoreese@gmail.com>
3836         PR fortran/86417
3837         * module.c (mio_component): Set component->loc when loading from module.
3839 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3841         PR fortran/86421
3842         * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
3843         _UVAL suffixes.
3844         (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
3845         on linear clauses.  Initialize n->where to gfc_current_locus.
3847 2018-07-05  Paul Thomas  <pault@gcc.gnu.org>
3849         PR fortran/86408
3850         * resolve.c.c (resolve_contained_fntype): Reference to C418 is
3851         in F2008 and not F2003.
3852         (resolve_function): Ditto in error message. Also, exclude
3853         deferred character length results from the error.
3855 2018-07-05  Fritz Reese  <fritzoreese@gmail.com>
3857         PR fortran/83183
3858         PR fortran/86325
3859         * expr.c (class_allocatable, class_pointer, comp_allocatable,
3860         comp_pointer): New helpers.
3861         (component_initializer): Generate EXPR_NULL for allocatable or pointer
3862         components. Do not generate initializers for components within BT_CLASS.
3863         Do not assign to comp->initializer.
3864         (gfc_generate_initializer): Use new helpers; move code to generate
3865         EXPR_NULL for class allocatable components into component_initializer().
3867 2018-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3869         PR fortran/82009
3870         * trans-decl.c (gfc_process_block_locals): Delete assert and set
3871         saved_local_decls = NULL_TREE.
3873 2018-07-02  Richard Biener  <rguenther@suse.de>
3875         PR lto/86321
3876         * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
3877         for the distinct type copy.
3879 2018-07-02  Paul Thomas  <pault@gcc.gnu.org>
3881         PR fortran/82969
3882         PR fortran/86242
3883         * trans-array.c (structure_alloc_comps): Do not explicitly copy
3884         procedure pointer components.
3886 2018-07-02  Paul Thomas  <pault@gcc.gnu.org>
3888         PR fortran/45305
3889         * expr.c : Add a prototype for scalarize_intrinsic_call.
3890         (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
3891         intrinsic function calls.
3892         (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
3893         the expression or any of the actual argument expressions are
3894         NULL. Before calling gfc_check_init_expr, check 'init_flag'.
3895         Only simplify the scalarized expressions if there are no errors
3896         on the stack.
3897         (gfc_check_init_expr): Set 'init_flag' true in the call to
3898         scalarize_intrinsic_call.
3900 2018-06-28  Fritz Reese  <fritzoreese@gmail.com>
3902         PR fortran/82865
3903         * decl.c (gfc_match_type): Refactor and check for PDT declarations.
3905 2018-06-28  Martin Liska  <mliska@suse.cz>
3907         * gfortranspec.c: Include opt-suggestions.h.
3909 2018-06-25  Fritz Reese  <fritzoreese@gmail.com>
3911         PR fortran/82972
3912         PR fortran/83088
3913         PR fortran/85851
3914         * expr.c (component_initializer): Assign init expr to c->initializer.
3915         (generate_isocbinding_initializer): New.
3916         (gfc_generate_initializer): Call generate_isocbinding_initializer to
3917         generate initializers for c_ptr and c_funptr with -finit-derived.
3919 2018-06-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3921         PR fortran/85983
3922         * interface.c (check_dtio_interface1): Delete assert.
3924 2018-06-22  Paul Thomas  <pault@gcc.gnu.org>
3925             Rainer Orth  <ro@gcc.gnu.org>
3927         PR fortran/86281
3928         * resolve.c (resolve_contained_fntype): Check for the charlen
3929         before testing the length.
3931 2018-06-21  Paul Thomas  <pault@gcc.gnu.org>
3933         PR fortran/49630
3934         * resolve.c (resolve_contained_fntype): Change standard ref.
3935         from F95 to F2003: C418. Correct a spelling error in a comment.
3936         It is an error for an abstract interface to have an assumed
3937         character length result.
3938         * trans-expr.c (gfc_conv_procedure_call): Likewise change the
3939         standard reference.
3941 2018-06-21  Paul Thomas  <pault@gcc.gnu.org>
3943         PR fortran/83118
3944         * resolve.c (resolve_ordinary_assign): Force the creation of a
3945         vtable for assignment of non-polymorphic expressions to an
3946         unlimited polymorphic object.
3947         * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
3948         size of the rhs type for such assignments. Set the dtype, _len
3949         and vptrs appropriately.
3950         * trans-expr.c (gfc_trans_assignment): Force the use of the
3951         _copy function for these assignments.
3953 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3954             Thomas Schwinge <thomas@codesourcery.com>
3955             Cesar Philippidis  <cesar@codesourcery.com>
3957         * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
3958         bitfields.
3959         * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
3960         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3961         (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
3962         create, deviceptr, present_of_*. Add support for finalize and
3963         if_present.
3964         (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
3965         (OACC_KERNELS_CLAUSES): Likewise.
3966         (OACC_DATA_CLAUSES): Likewise.
3967         (OACC_DECLARE_CLAUSES): Likewise.
3968         (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
3969         (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
3970         (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
3971         (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
3972         * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
3973         and FINALIZE.
3975 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
3977         * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
3979 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
3981         * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
3982         (nonlocal_dummy_decls): Likewise.
3983         (gfc_nonlocal_dummy_array_decl): Likewise.
3984         (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
3985         (gfc_get_fake_result_decl): Do not generate a new DECL if simply
3986         reusing the result of a recursive call.
3987         (gfc_generate_function_code): Do not create, insert and destroy
3988         nonlocal_dummy_decls.
3990 2018-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
3992         PR fortran/86110
3993         * array.c (gfc_resolve_character_array_constructor): Avoid NULL
3994         pointer dereference.
3996 2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
3998         PR fortran/85703
3999         * parse.c (decode_oacc_directive): Set gfc_matching_function
4000         to false.
4001         (decode_omp_directive): Likewise.
4003 2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
4005         PR fortran/85702
4006         * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
4008 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
4010         PR other/69968
4011         * misc.c (gfc_closest_fuzzy_match): Update for renaming of
4012         levenshtein_distance to get_edit_distance.
4014 2018-06-12  Steven G. Kargl  <kargl@gcc.gnu.org>
4016         PR fortran/44491
4017         * expr.c (gfc_check_assign): Select non-NULL locus.
4019 2018-06-11  Janus Weil  <janus@gcc.gnu.org>
4021         PR fortran/45521
4022         * interface.c (compare_ptr_alloc): New function.
4023         (generic_correspondence): Call it.
4025 2018-06-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
4027         * gfortran.h (gfc_expr): Add no_bounds_check field.
4028         * frontend-passes.c (get_array_inq_function): Set no_bounds_check
4029         on function and function argument.
4030         (inline_matmul_assign): Set no_bounds_check on zero expression
4031         and on lhs of zero expression.
4032         Also handle A1B2 case if realloc on assigment is active.
4033         * trans-array.c (gfc_conv_array_ref): Don't do range checking
4034         if expr has no_bounds_check set.
4035         (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
4036         has it set.
4037         * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
4038         on lss and lss if the corresponding expressions have it set.
4040 2018-06-10  Dominique d'Humieres  <dominiq@gcc.gnu.org>
4042         PR fortran/79854
4043         * trans-const.c: Remove include "diagnostic-core.h".
4044         (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
4046 2018-06-10  Janus Weil  <janus@gcc.gnu.org>
4048         PR fortran/85088
4049         * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
4050         INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
4051         and remove a TODO note.
4052         * gfortran.h: Add a comment to sym_intent.
4054 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
4056         PR fortran/38351
4057         * resolve.c (resolve_operator): Provide better error message for
4058         derived type entity used in an binary intrinsic numeric operator.
4060 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
4062         PR fortran/85138
4063         PR fortran/85996
4064         PR fortran/86051
4065         * decl.c (gfc_match_char_spec): Use private namespace in attempt to
4066         reduce a charlen to a constant.
4068 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
4070         PR fortran/78278
4071         * data.c (gfc_assign_data_value): Re-arrange code to allow for
4072         an error for double initialization of CHARACTER entities.
4074 2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
4076         PR fortran/63514
4077         * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
4079 2018-06-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
4081         PR fortran/85631
4082         * trans.h (gfc_ss): Add field no_bounds_check.
4083         * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
4084         ss->no_bounds_check is set, do not use runtime checks.
4085         * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
4086         for reallocatable lhs.
4088 2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
4090         PR fortran/86059
4091         * array.c (match_array_cons_element): NULL() cannot be in an
4092         array constructor.
4094 2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
4096         PR fortran/78571
4097         * data.c (create_character_initializer): Return early if type is
4098         incompatible with CHARACTER.
4100 2018-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
4102         PR fortran/86045
4103         * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
4104         'P' is zero and issue an error if it is.
4106 2018-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
4108         PR fortran/85641
4109         * frontend-passes.c (is_fe_temp): Add prototype.
4110         (realloc_string_callback): Early return for frontend-generated
4111         temporary.
4113 2018-06-05  Cesar Philippidis  <cesar@codesourcery.com>
4115         PR fortran/85701
4117         * openmp.c (gfc_resolve_oacc_declare): Error on functions and
4118         subroutine data clause arguments.
4120 2018-06-04  Steven G. Kargl  <kargl@gcc.gnu.org>
4122         PR fortran/85981
4123         * resolve.c (resolve_allocate_deallocate): Check errmsg is default
4124         character kind.
4126 2018-06-03  Paul Thomas  <pault@gcc.gnu.org>
4128         PR fortran/36497
4129         * decl.c (variable_decl): Use gfc_add_type for cray pointees.
4131 2018-06-01  Steven G. Kargl  <kargl@gcc.gnu.org>
4133         PR fortran/63570
4134         * check.c (gfc_check_random_init): New function. Check arguments of
4135         RANDOM_INIT.
4136         * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
4137         * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
4138         subroutines.
4139         (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
4140         * intrinsic.h: Add prototypes for gfc_check_random_init and
4141         gfc_resolve_random_init
4142         * intrinsic.texi: Document new intrinsic subprogram.
4143         * iresolve.c (gfc_resolve_random_init): Resolve routine name.
4144         * trans-decl.c: Declare gfor_fndecl_random_init
4145         * trans-intrinsic.c (conv_intrinsic_random_init): New function.
4146         Translate call to RANDOM_INIT.
4147         (gfc_conv_intrinsic_subroutine): Call it.
4148         * trans.h: Declare gfor_fndecl_random_init
4150 2018-05-27  Steven G. Kargl  <kargl@gcc.gnu.org>
4152         * decl.c (match_data_constant):  Fortran 2018 allows pointer
4153         initialization in a data statement.
4155 2018-05-25  Janus Weil  <janus@gcc.gnu.org>
4157         PR fortran/85839
4158         * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
4159         an obsolescent feature in Fortran 2018.
4160         (gfc_match_equivalence): Ditto.
4161         * resolve.c (resolve_common_blocks): Ditto.
4162         (gfc_resolve_forall): Ditto.
4163         * symbol.c (gfc_define_st_label): Ditto.
4165 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
4167         PR fortran/85543
4168         * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
4169         pointer dereference.
4171 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
4173         PR fortran/85780
4174         * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
4176 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
4178         PR fortran/85779
4179         * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
4181 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
4183         PR fortran/85895
4184         * resolve.c (resolve_sync): Resolve expression before checking for
4185         an error.
4187 2018-05-22  Janus Weil  <janus@gcc.gnu.org>
4189         PR fortran/85841
4190         * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
4191         GFC_STD_OPT_F08TS.
4192         * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
4193         * options.c (set_default_std_flags): Ditto.
4194         (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
4195         * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
4196         GFC_STD_F2018.
4197         * check.c (gfc_check_atomic, gfc_check_event_query,
4198         gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
4199         gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
4200         * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
4201         * intrinsic.c (add_functions, add_subroutines,
4202         gfc_check_intrinsic_standard): Ditto.
4203         * iso-c-binding.def: Ditto.
4204         * iso-fortran-env.def: Ditto.
4205         * match.c (gfc_match_event_post, gfc_match_event_wait,
4206         gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
4207         gfc_match_end_team, gfc_match_sync_team): Ditto.
4208         * gfortran.texi: Remove mention of -std=f2008ts.
4209         Move TSs into F2018 section.
4210         * invoke.texi: Update documentation of -std=f2008ts.
4212 2018-05-21  Janus Weil  <janus@gcc.gnu.org>
4214         PR fortran/85841
4215         * libgfortran.h: New macros GFC_STD_OPT_*.
4216         * error.c (notify_std_msg): New function.
4217         (gfc_notify_std): Adjust such that it can handle combinations of
4218         GFC_STD_* flags in the 'std' argument, not just a single one.
4219         * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
4220         in Fortran 2018.
4221         (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
4222         * options.c (set_default_std_flags): Warn for F2018 deleted features
4223         by default.
4224         (gfc_handle_option): F2018 deleted features are allowed in earlier
4225         standards.
4226         * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
4227         nonblock do constructs in Fortran 2018.
4229 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
4231         PR fortran/80657
4232         * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
4233         test for self refs to the function result in the character len
4234         expression. If a self reference is found, emit an error and
4235         return true.
4236         (resolve_fntype): Use the function symbol in the calls to the
4237         above.
4239 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
4241         PR fortran/49636
4242         * trans-array.c (gfc_get_array_span): Renamed from
4243         'get_array_span'.
4244         (gfc_conv_expr_descriptor): Change references to above.
4245         * trans-array.h : Add prototype for 'gfc_get_array_span'.
4246         * trans-intrinsic.c (gfc_conv_associated): Add pre and post
4247         blocks for 'arg1'.
4248         * trans-stmt.c (trans_associate_var): If the associate name is
4249         a subref array pointer, use gfc_get_array_span for the span.
4251 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
4253         PR fortran/82275
4254         * match.c (gfc_match_type_spec): Go through the array ref and
4255         decrement 'rank' for every dimension that is an element.
4257 2018-05-19  Paul Thomas  <pault@gcc.gnu.org>
4259         PR fortran/82923
4260         PR fortran/66694
4261         PR fortran/82617
4262         * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
4263         charlen backend_decl of the rhs expr to ss->info->string_length
4264         so that the value in the current scope is used.
4266 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
4268         PR fortran/63529
4269         * gfortran.texi: Clarify documentation for Cray pointer and
4270         assumed-sized array.
4272 2018-05-13  Paul Thomas  <pault@gcc.gnu.org>
4274         PR fortran/85742
4275         * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
4276         of 'size'. If the element type is a pointer use the size of the
4277         TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
4278         case, set the size to zero.
4280 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
4282         * gfortran.h: Remove prototype.
4283         * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
4285 2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
4287         PR fortran/85542
4288         * expr.c (check_inquiry): Avoid NULL pointer dereference.
4290 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
4292         PR fortran/85687
4293         * check.c (gfc_check_rank): Check that the argument is a data object.
4295 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
4297         PR fortran/85521
4298         * array.c (gfc_resolve_character_array_constructor): Substrings
4299         with upper bound smaller than lower bound are zero length strings.
4301 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
4303         PR fortran/70870
4304         * data.c (gfc_assign_data_value): Check that a data object does
4305         not also have default initialization.
4307 2018-05-10  Marek Polacek  <polacek@redhat.com>
4309         PR fortran/85735
4310         * options.c (gfc_post_options): Set main_input_filename.
4312 2018-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
4314         PR fortran/54613
4315         * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
4317 2018-05-10  Paul Thomas  <pault@gcc.gnu.org>
4319         PR fortran/68846
4320         PR fortran/70864
4321         * resolve.c (get_temp_from_expr): The temporary must not have
4322         dummy or intent attributes.
4324 2018-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
4326         PR fortran/54613
4327         * check.c (gfc_check_minmaxloc): Remove error for BACK not being
4328         implemented.  Use gfc_logical_4_kind for BACK.
4329         * simplify.c (min_max_choose): Add optional argument back_val.
4330         Handle it.
4331         (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
4332         back_val to min_max_choose.
4333         (simplify_minmaxloc_to_nodim): Likewise.
4334         (simplify_minmaxloc_to_array): Likewise.
4335         (gfc_simplify_minmaxloc): Add argument back, handle it.
4336         Pass back_val to specific simplification functions.
4337         (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
4338         pass it on to gfc_simplify_minmaxloc.
4339         (gfc_simplify_maxloc): Likewise.
4340         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
4341         comment. If BACK is true, use greater or equal (or lesser or
4342         equal) insteal of greater (or lesser). Mark the condition of
4343         having found a value which exceeds the limit as unlikely.
4345 2018-05-07  Jeff Law  <law@redhat.comg>
4347         * scanner.c (preprocessor_line): Call linemap_add after a line
4348         directive that changes the current filename.
4350 2018-05-06  Andre Vehreschild  <vehre@gcc.gnu.org>
4352         PR fortran/85507
4353         * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
4354         introduced by r259385.
4355         * trans-intrinsic.c (conv_caf_send): Always report a dependency for
4356         same variables in coarray assignments.
4358 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4360         PR libgomp/82428
4361         * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
4363 2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
4365         PR fortran/85520
4366         * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
4368 2018-04-14  Andre Vehreschild  <vehre@gcc.gnu.org>
4370         PR fortran/81773
4371         PR fortran/83606
4372         * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
4373         during dependency computation.  They define no data dependency.
4374         * trans-array.c (conv_array_index_offset): The stride can not be set
4375         here, prevent fail.
4376         * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
4377         for caf_get's result and copying to the array with vectorial
4378         indexing.
4380 2018-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
4382         PR fortran/85387
4383         * frontend-passes.c (traverse_io_block): Check for start, end or
4384         stride being defined by an outer implied DO loop.
4386 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
4388         PR fortran/83064
4389         PR testsuite/85346
4390         * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
4391         for annotation and remove dependence on -ftree-parallelize-loops.
4393 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4395         PR fortran/85313
4396         * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
4397         (resolve_oacc_nested_loops): Likewise.  Formatting fix.
4399 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
4401         PR fortran/83064
4402         * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
4403         parallell processing of DO CONCURRENT -ftree-parallelize-loops
4404         is set.
4406 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
4408         PR fortran/51260
4409         * resolve.c (resolve_variable): Simplify cases where access to a
4410         parameter array results in a single constant.
4412 2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
4414         PR fortran/85102
4415         * decl.c (variable_decl): If upper or lower bounds simplify
4416         to a constant, use that.
4418 2018-03-30  Paul Thomas  <pault@gcc.gnu.org>
4420         PR fortran/84931
4421         * simplify.c (gfc_convert_constant): Handle case of array
4422         constructors within an array that has no iterator and improve
4423         the conciseness of this section of code.
4425 2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
4427         PR fortran/85111
4428         * array.c (gfc_resolve_character_array_constructor): Early
4429         exit for zero-size arrays.
4430         * simplify.c (simplify_transformation_to_array): Exit early
4431         if the result size is zero.
4432         (simplify_minmaxloc_to_array): Likewise.
4434 2018-03-28  Mikael Morin  <mikael@gcc.gnu.org>
4436         PR fortran/69497
4437         * symbol.c (gfc_symbol_done_2): Start freeing namespaces
4438         from the root.
4439         (gfc_free_namespace): Restore assert (revert r258839).
4441 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4443         * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
4444         * ioparm.def (IOPARM_dt_default_exp): Rename to ...
4445         (IOPARM_dt_dec_ext): ... this.
4446         * trans-io.c (build_dt): Adjust for default_exp renaming to
4447         dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
4448         * io.c (match_io): Likewise.
4450 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
4452         PR fortran/85084
4453         * frontend-passes.c (gfc_run_passes): Do not run front-end
4454         optimizations if a previous error occurred.
4456 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
4457         Harald Anlauf  <anlauf@gmx.de>
4459         PR fortran/85083
4460         * primary.c (gfc_convert_to_structure_constructor): Check
4461         conformance of argument types in structure constructor.
4463 2018-03-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
4465         PR fortran/66709
4466         * io.c: Include constructor.h.
4467         (resolve_tag_format): For a constant character array, concatenate
4468         into a single character expression.
4470 2018-03-25  Seth Johnson <johnsonsr@ornl.gov>
4471         Dominique d'Humieres  <dominiq@gcc.gnu.org>
4473         PR fortran/84924
4474         * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
4475         scalar derived type with -std=f2003 and -std=f2008.
4477 2018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4478             Dominique d'Humieres  <dominiq@gcc.gnu.org>
4480         PR fortran/69497
4481         * symbol.c (gfc_free_namespace): Delete the assert and only if
4482         refs count is equals zero, free the namespace. Otherwise,
4483         something is halfway and other errors will resound.
4485 2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
4487         PR fortran/70068
4488         * expr.c (find_substring_ref): Change types of start, end
4489         and length variables to gfc_charlen_t. Set length to zero
4490         for empty substring.
4492 2018-03-24  Steven G. Kargl  <kargl@gcc.gnu.org>
4494         PR fortran/42651
4495         * decl.c (check_function_name): Improved error message
4496         (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
4498 2018-03-22  Steven G. Kargl  <kargl@gcc.gnu.org>
4500         PR fortran/84922
4501         * decl.c (get_proc_name): If the MODULE prefix appears in interface
4502         body, then it must appear on the contained subroutine or function.
4503         While here, fix nearby mis-indented code.
4505 2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
4506         Harald Anlauf  <anlauf@gmx.de>
4508         PR fortran/84957
4509         * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
4511 2018-03-21  Janne Blomqvist  <jb@gcc.gnu.org>
4513         PR fortran/84615
4514         * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
4515         gfc_charlen_type_node when calling procedure.
4517 2018-03-20  Steven G. Kargl  <kargl@gcc.gnu.org>
4519         PR fortran/85001
4520         * interface.c (symbol_rank): Remove bogus null pointer check that
4521         crept in when translating a ternary operator into an if-else
4522         constructor.
4524 2018-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
4526         PR fortran/84931
4527         * simplify.c (gfc_convert_constant): Correctly handle iterators
4528         for type conversion.
4530 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
4532         PR fortran/77414
4533         * decl.c (get_proc_name):  Check for a subroutine re-defined in
4534         the contain portion of a subroutine.  Change language of existing
4535         error message to better describe the issue. While here fix whitespace
4536         issues.
4538 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
4540         PR fortran/65453
4541         * decl.c (get_proc_name): Catch clash between a procedure statement
4542         and a contained subprogram
4544 2018-03-16  Steven G. Kargl  <kargl@gcc.gnu.org>
4546         PR fortran/69395
4547         * decl.c (merge_array_spec): Correct the error condition.
4549 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
4551         PR fortran/78741
4552         * decl.c (get_proc_name):  Check for clash of entry name with
4553         subroutine name.
4555 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
4557         PR fortran/69395
4558         * decl.c (merge_array_spec): Limit the merging to maximum allowed
4559         dimensions, and issue error message if limit is exceeded.
4561 2018-03-13  Steven G. Kargl  <kargl@gcc.gnu.org>
4563         * check.c (gfc_check_kill_sub):  Remove check for INTEGER(4) or (8).
4564         * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
4565         (add_subroutines): Remove reference to gfc_resolve_kill_sub.
4566         * intrinsic.texi: Update documentation.
4567         * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
4568         * trans-decl.c (gfc_build_intrinsic_function_decls):  Add
4569         gfor_fndecl_kill and gfor_fndecl_kill_sub
4570         * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
4571         functions.
4572         (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
4573         (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
4574         * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
4576 2018-03-11  Paul Thomas  <pault@gcc.gnu.org>
4578         PR fortran/84546
4579         * trans-array.c (structure_alloc_comps): Make sure that the
4580         vptr is copied and that the unlimited polymorphic _len is used
4581         to compute the size to be allocated.
4582         * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
4583         unlimited polymorphic _len for the offset to the element.
4584         (gfc_copy_class_to_class): Set the new 'unlimited' argument.
4585         * trans.h : Add the boolean 'unlimited' to the prototype.
4587 2018-03-11  Steven G. Kargl  <kargl@gcc.gnu.org>
4589         PR fortran/83939
4590         * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
4592 2018-03-11  Steven G. Kargl  <kargls@gcc.gnu.org>
4594         * check.c (gfc_check_kill):  Check pid and sig are scalar.
4595         (gfc_check_kill_sub): Restrict kind to 4 and 8.
4596         * intrinsic.c (add_function): Sort keyword list.  Add pid and sig
4597         keywords for KILL.  Remove redundant *back="back" in favor of the
4598         original *bck="back".
4599         (add_subroutines): Sort keyword list.  Add pid and sig keywords
4600         for KILL.
4601         * intrinsic.texi: Fix documentation to consistently use pid and sig.
4602         * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8.  Choose the
4603         correct function.
4604         (gfc_resolve_rename_sub): Add comment.
4606 2018-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
4608         PR fortran/66128
4609         * simplify.c (simplify_transformation): Return default result for
4610         empty array argument.
4611         (gfc_simplify_all): Remove special-case handling for zerosize.
4612         (gfc_simplify_any): Likewise.
4613         (gfc_simplify_count): Likewise.
4614         (gfc_simplify_iall): Likewise.
4615         (gfc_simplify_iany): Likewise.
4616         (gfc_simplify_iparity): Likewise.
4617         (gfc_simplify_minval): Likewise.
4618         (gfc_simplify_maxval): Likewise.
4619         (gfc_simplify_norm2): Likewise.
4620         (gfc_simplify_product): Likewise.
4621         (gfc_simplify_sum): Likewise.
4623 2018-03-10  Steven G. Kargl  <kargl@gcc.gnu.org>
4625         PR fortran/84734
4626         * arith.c (check_result, eval_intrinsic):  If result overflows, pass
4627         the expression up the chain instead of a NULL pointer.
4629 2018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
4631         PR fortran/64124
4632         PR fortran/70409
4633         * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
4635 2017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
4637         PR fortran/84697
4638         PR fortran/66128
4639         * expr.c (simplify_parameter_variable): If p is a size zero array
4640         and not an ARRAY_EXPR insert an empty array constructor and
4641         return.
4642         * gfortran.h: Add prototype for gfc_is_size_zero_array.
4643         * simplify.c (is_size_zero_array): Make non-static and rename into
4644         (gfc_is_size_zero_array):  Check for parameter arrays of zero
4645         size by comparing shape and absence of constructor.
4646         (gfc_simplify_all): Use gfc_is_size_zero_array instead of
4647         is_size_zero_array.
4648         (gfc_simplify_count): Likewise.
4649         (gfc_simplify_iall): Likewise.
4650         (gfc_simplify_iany): Likewise.
4651         (gfc_simplify_iparity): Likewise.
4652         (gfc_simplify_minval): Likewise.
4653         (gfc_simplify_maxval): Likewise.
4654         (gfc_simplify_product): Likewise.
4655         (gfc_simplify_sum): Likewise.
4657 2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
4659         PR fortran/56667
4660         * primary.c (match_sym_complex_part): Give the matcher for an implied
4661         do-loop a chance to run.
4663 2018-03-03  Harald Anlauf  <anlauf@gmx.de>
4665         PR fortran/71085
4666         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
4667         dereference NULL pointer.
4669 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
4671         PR fortran/66128
4672         * simplify.c (is_size_zero_array): New function to check for size
4673         zero array.
4674         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
4675          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
4676          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
4677          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
4678         requirements from F2018.
4680 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
4682         PR fortran/51434
4683         * simplify.c (gfc_simplify_transfer): Resolve mold.
4685 2018-03-03  Paul Thomas  <pault@gcc.gnu.org>
4687         PR fortran/80965
4688         * resolve.c (build_loc_call): Change symtree name from 'loc' to
4689         '_loc'.
4691 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
4693         PR fortran/84219
4694         * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
4695         components are caf tokens.
4696         (gfc_target_interpret_expr): Treat BT_VOID expressions as
4697         integers.
4699 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
4701         PR fortran/84538
4702         * class.c (class_array_ref_detected): Remove the condition that
4703         there be no reference after the array reference.
4704         (find_intrinsic_vtab): Remove excess whitespace.
4705         * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
4706         as 'base and call build_class_array_ref earlier.
4708 2018-02-28  Paul Thomas  <pault@gcc.gnu.org>
4710         PR fortran/83901
4711         * trans-stmt.c (trans_associate_var): Make sure that the se
4712         expression is a pointer type before converting it to the symbol
4713         backend_decl type.
4715 2018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
4717         PR fortran/83633
4718         * decl.c (variable_decl): Check that an explicit-shape-array with
4719         nonconstant bounds is allowed.
4721 2018-02-25  Paul Thomas  <pault@gcc.gnu.org>
4723         PR fortran/84523
4724         * trans-intrinsic.c (gfc_conv_allocated): If the argument se
4725         has a pre block, add it to the expression pre block.
4727 2018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
4729         PR fortran/78238
4730         * gfortran.h (gfc_integer_4_kind): Define.
4731         * resolve.c (resolve_select_type): Make sure that the
4732         kind of c->high is gfc_integer_4_kind.
4734 2018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
4736         PR fortran/30792
4737         * decl.c (gfc_match_data): Check for invalid substring in
4738         data-implied-do
4740 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
4742         * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
4744 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
4746         PR fortran/84511
4747         * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
4749 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
4751         PR fortran/84346
4752         * interface.c (compare_actual_formal): Issue error if keyword is
4753         used in a statement function.
4755 2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4757         PR fortran/84506
4758         * trans-io.c (set_parameter_value_inquire): Adjust range check of
4759         negative unit values for kind=8 units to the kind=4 negative limit.
4761 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
4763         PR fortran/83149
4764         * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
4765         accessing its components.
4767 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
4769         PR fortran/83149
4770         * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
4771         before accessing its components.
4773 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
4775         PR fortran/83148
4776         * trans-const.c : Clean up some whitespace issues.
4777         * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
4778         derived type has a kind value of zero, set it to the default
4779         integer kind.
4781 2018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
4783         PR fortran/84519
4784         * trans-decl.c (gfc_build_builtin_function_decls): Add bool
4785         argument to stop and error stop decls.
4786         * trans-stmt.c (gfc_trans_stop): Add false value to argument
4787         lists.
4789 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
4791         PR 78534
4792         PR 84509
4793         * trans-decl.c (gfc_build_builtin_function_decls): Pass
4794         gfc_int8_type node to pause_numeric, size_type_node to
4795         pause_string.
4796         * trans-stmt.c (gfc_trans_pause): Likewise.
4798 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
4800         * gfortran.texi: Update Coarray API description.
4801         * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
4802         character lengths, int for exit codes.
4803         (generate_coarray_sym_init): Use size_t for character length.
4804         * trans-intrinsic.c (conv_co_collective): Likewise.
4805         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
4806         (gfc_trans_event_post_wait): Likewise.
4807         (gfc_trans_sync): Likewise.
4808         (gfc_trans_stop): Use size_t for character lengths, int for exit
4809         codes.
4811 2018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
4813         PR fortran/48890
4814         PR fortran/83823
4815         * primary.c (gfc_convert_to_structure_constructor):
4816         For a constant string constructor, make sure the length
4817         is correct.
4819 2018-02-19  Paul Thomas  <pault@gcc.gnu.org>
4821         PR fortran/83344
4822         PR fortran/83975
4823         * resolve.c (resolve_assoc_var): Rearrange the logic for the
4824         determination of the character length of associate names. If
4825         the associate name is missing a length expression or the length
4826         expression is not a constant and the target is not a variable,
4827         make the associate name allocatable and deferred length.
4828         * trans-decl.c (gfc_get_symbol_decl): Null the character length
4829         backend_decl for deferred length associate names that are not
4830         variables. Set 'length' to gfc_index_zero_node for character
4831         associate names, whose character length is a PARM_DECL.
4833 2018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
4835         PR fortran/35339
4836         * frontend-passes.c (traverse_io_block): Remove workaround for
4837         PR 80945.
4839 2018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
4841         * gfortran.texi: Document additional src/dst_type.  Fix some typos.
4842         * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
4843         argument of _caf_*_by_ref () with * e { get, send, sendget }.
4844         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
4845         data referenced when generating a call to caf_get_by_ref ().
4846         (conv_caf_send): Same but for caf_send_by_ref () and
4847         caf_sendget_by_ref ().
4849 2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4851         PR fortran/84389
4852         * io.c (check_format): Allow FMT_COLON.
4854 2018-02-18  Paul Thomas  <pault@gcc.gnu.org>
4856         PR fortran/80945
4857         * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
4858         the typenode in the case of deferred length characters.
4860 2018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
4862         PR fortran/84270
4863         * frontend-passes (scalarized_expr):  If the expression
4864         is an assumed size array, leave in the last reference
4865         and pass AR_SECTION instead of AR_FULL to gfc_resolve
4866         in order to avoid an error.
4868 2018-02-17  Paul Thomas  <pault@gcc.gnu.org>
4870         PR fortran/84115
4871         * resolve.c (resolve_assoc_var): If a non-constant target expr.
4872         has no string length expression, make the associate variable
4873         into a deferred length, allocatable symbol.
4874         * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
4875         the symbol.
4876         * trans-stmt.c (trans_associate_var): Null and free scalar
4877         associate names that are allocatable. After assignment, remove
4878         the allocatable attribute to prevent reallocation.
4880 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
4882         PR fortran/84418
4883         * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
4884         kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
4886 2018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
4888         PR fortran/84354
4889         * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
4891 2018-02-15  Janus Weil  <janus@gcc.gnu.org>
4893         PR fortran/84409
4894         * interface.c (check_dtio_arg_TKR_intent): Add a check for character
4895         length.
4897 2018-02-14  Janus Weil  <janus@gcc.gnu.org>
4899         PR fortran/84385
4900         * match.c (gfc_match_select_type): Fix check for selector in
4901         SELECT TYPE statement.
4903 2018-02-13  Janus Weil  <janus@gcc.gnu.org>
4905         PR fortran/84313
4906         * symbol.c (check_conflict): Reject procedure pointers in common blocks.
4908 2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
4909             Janne Blomqvist  <jb@gcc.gnu.org>
4911         * module.c (dump_module): Use lbasename to ensure that module
4912         files are reproducible.
4914 2018-02-12  Janus Weil  <janus@gcc.gnu.org>
4916         PR fortran/84273
4917         * resolve.c (resolve_component): Fix checks of passed argument in
4918         procedure-pointer components.
4920 2018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4922         PR fortran/35299
4923         * resolve.c (resolve_formal_arglist): Update error message.
4925 2018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
4927         * gfortran.texi: Fix typos in documentation of caf_register ().
4928         * trans-array.c (structure_alloc_comps): Only register a component of
4929         a derived typed corray, not of an ultimate component coarray.
4931 2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
4933         PR fortran/54223
4934         PR fortran/84276
4935         * interface.c (compare_actual_formal): Add in_statement_function
4936         bool parameter.  Skip check of INTENT attribute for statement
4937         functions.  Arguments to a statement function cannot be optional,
4938         issue error for missing argument.
4939         (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
4940          in_statement_function.
4942 2018-02-11  Paul Thomas  <pault@gcc.gnu.org>
4944         PR fortran/84074
4945         * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
4946         flag. If the is a vector subscript or the expression is not a
4947         variable, make the descriptor one-based.
4949 2018-02-10  Paul Thomas  <pault@gcc.gnu.org>
4951         PR fortran/84141
4952         PR fortran/84155
4953         * trans-array.c (gfc_array_init_size): Revert the change made
4954         in revision 257356 setting the dtype.
4955         * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
4956         Call gfc_get_dtype_rank_type every time.
4958         PR fortran/56691
4959         * trans-array.c (gfc_conv_expr_descriptor): If the source array
4960         is a descriptor type, use its offset, removing the condition
4961         that is be a class expression.
4963 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
4965         PR fortran/82994
4966         * match.c (gfc_match_deallocate): Check for NULL pointer.
4968 2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4970         PR fortran/68560
4971         * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
4972         (gfc_conv_intrinsic_function): Call it.
4974 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
4976         PR fortran/82049
4977         * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
4978         try to resolve it.  While here return early if possible.
4980 2018-02-04  Paul Thomas  <pault@gcc.gnu.org>
4982         PR fortran/84115
4983         * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
4984         'length' if the symbol charlen backend_decl is an indirect ref.
4986 2018-02-03  Paul Thomas  <pault@gcc.gnu.org>
4988         PR fortran/84141
4989         PR fortran/84155
4990         * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
4991         use gfc_get_dtype_rank_type.
4993 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
4995         PR 83975
4996         PR 83344
4997         * resolve.c (resolve_assoc_var): Generate an error if
4998         target length unknown.
5000 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
5002         PR fortran/83705
5003         * simplify.c (gfc_simplify_repeat): Increase limit for deferring
5004         to runtime, print a warning message.
5006 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
5008         PR fortran/84116
5009         * openmp.c (gfc_match_omp_clauses): If all the linear
5010         gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
5011         nor set *head = NULL.  Formatting fixes.
5013 2018-01-31  Paul Thomas  <pault@gcc.gnu.org>
5015         PR fortran/84088
5016         * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
5017         an address expression passed to an assumed rank dummy, convert
5018         to an indirect reference.
5020 2018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
5022         * dump-parse-tree.c (write_proc): Use sym_name (which may
5023         be sym->binding_label) instead of sym->name.
5025 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
5027         * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
5028         of int for slen.
5030 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
5032         PR fortran/78534
5033         * trans-expr.c (fill_with_spaces): Use memset instead of
5034         generating loop.
5035         (gfc_trans_string_copy): Improve opportunity to use builtins with
5036         constant lengths.
5038 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
5040         PR debug/84131
5041         * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
5042         to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
5044 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
5046         PR fortran/84134
5047         * array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
5048         zero, return false.
5050 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
5052         PR fortran/84133
5053         * frontend-passes (matmul_to_var_expr): Return early if
5054         in association list.
5055         (inline_matmul_assign): Likewise.
5057 2017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
5059         PR fortran/84073
5060         * resolve.c (resolve_component): Ensure BIND(C) character
5061         components have length one.
5062         (resolve_symbol): Likewise for variables.
5064 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
5066         PR fortran/84065
5067         * decl.c (add_init_expr_to_sym): Ignore initializers for too large
5068         lengths.
5070 2018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
5071             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
5072             Soren Rasmussen  <s.c.rasmussen@gmail.com>
5074         Partial support for Fortran 2018 teams features.
5076         * array.c (gfc_match_array_ref): add team attribute in coarray
5077         transfers.
5078         * check.c (gfc_check_get_team, gfc_check_team_number): add new
5079         functions for get_team and team_number.
5080         * dump-parse-tree.c (show_code_node): add new statements: form team,
5081         change team, end team, and sync team.
5082         * expr.c (gfc_find_team_co): add new function.
5083         * gfortran.h: add new statements.
5084         * intrinsic.c (add_functions): add get_team and team_number functions.
5085         * intrinsic.h: add get_team and team_number prototypes for check,
5086         simplify, and resolve.
5087         * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
5088         functions.
5089         * iso-fortran-env.def: add the team_type derived type.
5090         * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
5091         (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
5092         add change team, end team, form team, sync team match and functions.
5093         * match.h: add new prototypes for change team, end team, form team,
5094         and sync team.
5095         * parse.c (decode_statement): add cases for change team, end team,
5096         form team, and sync team.
5097         * resolve.c: add cases for exec form team, change team, end team, and
5098         sync team.
5099         * simplify.c (gfc_simplify_get_team): add new function for get team.
5100         * st.c (gfc_free_statement): add cases exec for change team, end team,
5101         form team, sync team.
5102         * trans-decl.c (gfor_fndecl_caf_form_team)
5103         (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
5104         (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
5105         (gfor_fndecl_caf_team_number): add functions and definitions.
5106         * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
5107         new function and team_type argument support.
5108         * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
5109         (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
5110         * trans-stmt.h: add new prototypes.
5111         * trans-types.c (gfc_get_derived_type): check condition for team_type.
5112         * trans.c (trans_code): new exec cases for form team, change team, end
5113         team, and sync team.
5114         * trans.h: add new prototypes.
5116 2018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
5118         PR fortran/83998
5119         * simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
5120         or .false.  The summation does the correct type conversion.
5121         (gfc_simplify_dot_product): Special case zero-sized arrays.
5123 2018-25-01  Paul Thomas  <pault@gcc.gnu.org>
5125         PR fortran/37577
5126         * array.c (gfc_match_array_ref): If standard earlier than F2008
5127         it is an error if the reference dimension is greater than 7.
5128         libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
5129         dtype masks and shifts accordingly.
5130         * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
5131         type node to check the field.
5132         (gfc_conv_descriptor_dtype): Access the rank field of dtype.
5133         (duplicate_allocatable_coarray): Access the rank field of the
5134         dtype descriptor rather than the dtype itself.
5135         * trans-expr.c (get_scalar_to_descriptor_type): Store the type
5136         of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
5137         (ie. a character).
5138         (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
5139         get_scalar_to_descriptor_type if the actual expression is a
5140         constant.
5141         (gfc_trans_structure_assign): Assign the rank directly to the
5142         dtype rank field.
5143         * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
5144         to default integer kind.
5145         (gfc_conv_intrinsic_sizeof): Obtain the element size from the
5146         'elem_len' field of the dtype.
5147         * trans-io.c (gfc_build_io_library_fndecls): Replace
5148         gfc_int4_type_node with dtype_type_node where necessary.
5149         (transfer_namelist_element): Use gfc_get_dtype_rank_type for
5150         scalars.
5151         * trans-types.c : Provide 'get_dtype_type_node' to acces the
5152         dtype_type_node and, if necessary, build it.
5153         The maximum size of an array element is now determined by the
5154         maximum value of size_t.
5155         Update the description of the array descriptor, including the
5156         type def for the dtype_type.
5157         (gfc_get_dtype_rank_type): Build a constructor for the dtype.
5158         Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
5159         (gfc_get_array_descriptor_base): Change the type of the dtype
5160         field to dtype_type_node.
5161         (gfc_get_array_descr_info): Get the offset to the rank field of
5162         the dtype.
5163         * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
5164         * trans.h : Define the indices of the dtype fields.
5166 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
5168         PR fortran/83866
5169         * decl.c (gfc_match_derived_decl): If eos not matched, recover
5170         and emit error about garbage after declaration.
5172 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
5174         PR fortran/83898
5175         * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
5176         for characters.
5178 2018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
5180         PR 78534
5181         PR 83704
5182         * arith.c (gfc_arith_concat): Use size_t for string length.
5183         (gfc_compare_string): Likewise.
5184         (gfc_compare_with_Cstring): Likewise.
5185         * array.c (gfc_resolve_character_array_constructor): Use
5186         HOST_WIDE_INT, gfc_mpz_get_hwi.
5187         * check.c (gfc_check_fe_runtime_error): Use size_t.
5188         * data.c (create_character_initializer): Use HOST_WIDE_INT,
5189         gfc_extract_hwi.
5190         * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
5191         (add_init_expr_to_sym): Use HOST_WIDE_INT.
5192         * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
5193         gfc_extract_hwi.
5194         (gfc_apply_init): Likewise.
5195         * match.h (gfc_set_constant_character_len): Update prototype.
5196         * primary.c (match_string_constant): Use size_t.
5197         * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
5198         gfc_mpz_get_hwi.
5199         * simplify.c (init_result_expr): Likewise.
5200         (gfc_simplify_len_trim): Use size_t.
5201         * target-memory.c (gfc_encode_character): Use size_t.
5202         (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
5203         (interpret_array): Use size_t.
5204         (gfc_interpret_character): Likewise.
5205         * target-memory.h (gfc_encode_character): Update prototype.
5206         (gfc_interpret_character): Likewise.
5207         (gfc_target_interpret_expr): Likewise.
5208         * trans-const.c (gfc_build_string_const): Use size_t for length
5209         argument.
5210         (gfc_build_wide_string_const): Likewise.
5211         * trans-const.h (gfc_build_string_const): Likewise.
5212         (gfc_build_wide_string_const): Likewise.
5214 2018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
5216         PR fortran/83900
5217     * simplify.c (gfc_simplify_matmul): Set return type correctly.
5219 2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
5221         PR fortran/83900
5222         * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
5224 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
5226         PR fortran/83864
5227         * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5229 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
5231         PR fortran/83874
5232         * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5234 2018-01-15  Louis Krupp  <louis.krupp@zoho.com>
5236         PR fortran/82257
5237         * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
5238         from symbol marked unlimited polymorphic.
5239         * resolve.c (resolve_structure_cons): Likewise.
5240         * misc.c (gfc_typename): Don't dereference derived->components
5241         if it's NULL.
5243 2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
5245         PR fortran/54613
5246         * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
5247         (gfc_logical_4_kind): New macro
5248         * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
5249         (gfc_simplify_maxloc): Likewise.
5250         (gfc_resolve_maxloc): Likewise.
5251         (gfc_resolve_minloc): Likewise.
5252         * check.c (gfc_check_minloc_maxloc): Add checking for "back"
5253         argument; also raise error if it is used (for now). Add it
5254         if it isn't present.
5255         * intrinsic.c (add_sym_4ml): Rename to
5256         (add_sym_5ml), adjust for extra argument.
5257         (add_functions): Add "back" constant. Adjust maxloc and minloc
5258         for back argument.
5259         * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
5260         not of gfc_logical_4_kind, convert.
5261         (gfc_resolve_minloc): Likewise.
5262         * simplify.c (gfc_simplify_minloc): Add back argument.
5263         (gfc_simplify_maxloc): Likewise.
5264         * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
5265         argument to %VAL to ensure passing by value.
5266         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
5267         also for library calls.
5269 2018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
5271         PR fortran/82007
5272         * resolve.c (resolve_transfer): Delete code looking for 'DT'
5273         format specifiers in format strings. Set formatted to true if a
5274         format string or format label is present.
5275         * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
5276         whitespace.
5278 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
5280         PR fortran/83744
5281         * dump-parse-tree.c (get_c_type_name): Remove extra line.
5282         Change for loop to use declaration in for loop. Handle BT_LOGICAL
5283         and BT_CHARACTER.
5284         (write_decl): Add where argument. Fix indentation. Replace
5285         assert with error message. Add typename to warning
5286         in comment.
5287         (write_type): Adjust locus to call of write_decl.
5288         (write_variable): Likewise.
5289         (write_proc): Likewise. Replace assert with error message.
5291 2018-01-13  Paul Thomas  <pault@gcc.gnu.org>
5293         PR fortran/52162
5294         * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
5295         the rhs expression is neither an elemental nor a conversion
5296         function.
5298         PR fortran/83622
5299         * trans-array.c (is_pointer_array): Remove unconditional return
5300         of false for -fopenmp.
5302 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
5303         <emsr@gcc.gnu.org>
5305         PR fortran/83803
5306         * dump-parse-tree.c (write_proc): Always emit closing parenthesis
5307         for functions.
5309 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
5311         PR fortran/82367
5312         * resolve.c (resolve_allocate_expr): Check for NULL pointer.
5314 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
5316         PR fortran/83093
5317         * resolve.c (resolve_charlen): Check the type of cl->length
5318         after resolution.
5320 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
5322         PR fortran/83740
5323         * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
5325 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
5327         PR fortran/83740
5328         * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
5329         LHS type when assigning.
5331 2018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
5333         PR fortran/83742
5334         * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
5336 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
5338         * match.c (gfc_match_allocate): Check for NULL pointer.
5340 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
5342         * expr.c (gfc_check_pointer_assign): Fix typo in comment.
5344 2018-01-08  Paul Thomas  <pault@gcc.gnu.org>
5346         PR fortran/83611
5347         * decl.c (gfc_get_pdt_instance): If parameterized arrays have
5348         an initializer, convert the kind parameters and add to the
5349         component if the instance.
5350         * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
5351         use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
5352         for parameterized arrays. Clean up typos in comments. Convert
5353         parameterized array initializers and copy into the array.
5354         * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
5355         parameterized types.
5356         *trans-stmt.c (trans_associate_var): Deallocate associate vars
5357         as necessary, when they are PDT function results for example.
5359         PR fortran/83731
5360         * trans-array.c (structure_alloc_comps): Only compare len parms
5361         when they are declared explicitly.
5363 2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
5365         PR fortran/50892
5366         * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
5367         lhs type.
5369 2018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
5371         PR fortran/78534
5372         PR fortran/66310
5373         * array.c (got_charlen): Use gfc_charlen_int_kind.
5374         * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
5375         hardcoded kind.
5376         (find_intrinsic_vtab): Likewise.
5377         * decl.c (match_char_length): Use gfc_charlen_int_kind.
5378         (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
5379         (gfc_match_implicit): Use gfc_charlen_int_kind.
5380         * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
5381         (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
5382         * expr.c (gfc_get_character_expr): Length parameter of type
5383         gfc_charlen_t.
5384         (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
5385         (gfc_extract_hwi): New function.
5386         (simplify_const_ref): Make string_len of type gfc_charlen_t.
5387         (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
5388         * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
5389         * gfortran.h (gfc_mpz_get_hwi): New prototype.
5390         (gfc_mpz_set_hwi): Likewise.
5391         (gfc_charlen_t): New typedef.
5392         (gfc_expr): Use gfc_charlen_t for character lengths.
5393         (gfc_size_kind): New extern variable.
5394         (gfc_extract_hwi): New prototype.
5395         (gfc_get_character_expr): Use gfc_charlen_t for character length.
5396         (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
5397         * gfortran.texi: Update description of hidden string length argument.
5398         * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
5399         (gfc_resolve_char_achar): Likewise.
5400         (gfc_resolve_repeat): Pass string length directly without
5401         temporary, use gfc_charlen_int_kind.
5402         (gfc_resolve_transfer): Use gfc_charlen_int_kind.
5403         * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
5404         * misc.c (gfc_mpz_get_hwi): New function.
5405         (gfc_mpz_set_hwi): New function.
5406         * module.c (atom_int): Change type from int to HOST_WIDE_INT.
5407         (parse_integer): Don't complain about large integers.
5408         (write_atom): Use HOST_WIDE_INT for integers.
5409         (mio_integer): Handle integer type mismatch.
5410         (mio_hwi): New function.
5411         (mio_intrinsic_op): Use HOST_WIDE_INT.
5412         (mio_array_ref): Likewise.
5413         (mio_expr): Likewise.
5414         * primary.c (match_substring): Use gfc_charlen_int_kind.
5415         * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
5416         (resolve_character_operator): Likewise.
5417         (resolve_assoc_var): Likewise.
5418         (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
5419         (resolve_charlen): Use mpz_sgn to determine sign.
5420         * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
5421         instead of long.
5422         * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
5423         * target-memory.c (size_character): Length argument of type
5424         gfc_charlen_t.
5425         (gfc_encode_character): Likewise.
5426         (gfc_interpret_character): Use gfc_charlen_t.
5427         * target-memory.h (gfc_encode_character): Modify prototype.
5428         * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
5429         (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
5430         (trans_array_constructor): Use existing type.
5431         (get_array_charlen): Likewise.
5432         * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
5433         * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
5434         * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
5435         (add_argument_checking): Likewise.
5436         * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
5437         gfc_charlen_type_node.
5438         (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
5439         4, fold_convert to correct type.
5440         (gfc_conv_class_to_class): Build const of type size_type_node for
5441         size.
5442         (gfc_copy_class_to_class): Likewise.
5443         (gfc_conv_string_length): Use same type in expression.
5444         (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
5445         (gfc_conv_string_tmp): Make sure len is of the right type.
5446         (gfc_conv_concat_op): Use same type in expression.
5447         (gfc_conv_procedure_call): Likewise.
5448         (fill_with_spaces): Comment out memset() block due to spurious
5449         -Wstringop-overflow warnings.
5450         (gfc_trans_string_copy): Use gfc_charlen_type_node.
5451         (alloc_scalar_allocatable_for_subcomponent_assignment):
5452         fold_convert to right type.
5453         (gfc_trans_subcomponent_assign): Likewise.
5454         (trans_class_vptr_len_assignment): Build const of correct type.
5455         (gfc_trans_pointer_assignment): Likewise.
5456         (alloc_scalar_allocatable_for_assignment): fold_convert to right
5457         type in expr.
5458         (trans_class_assignment): Build const of correct type.
5459         * trans-intrinsic.c (gfc_conv_associated): Likewise.
5460         (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
5461         * trans-io.c (gfc_build_io_library_fndecls): Use
5462         gfc_charlen_type_node for character lengths.
5463         (set_string): Convert to right type in assignment.
5464         * trans-stmt.c (gfc_trans_label_assign): Build const of
5465         gfc_charlen_type_node.
5466         (trans_associate_var): Likewise.
5467         (gfc_trans_character_select): Likewise.
5468         (gfc_trans_allocate): Likewise, don't typecast strlen result.
5469         (gfc_trans_deallocate): Don't typecast strlen result.
5470         * trans-types.c (gfc_size_kind): New variable.
5471         (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
5472         from size_type_node.
5473         * trans-types.h: Fix comment.
5475 2018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
5477         PR fortran/83683
5478         PR fortran/45689
5479         * check.c (gfc_check_eoshift): Check for string length and
5480         for conformance of boundary.
5481         * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
5482         * intrinsic.h: Add prototype for gfc_simplify_eoshift.
5483         * simplify.c (gfc_simplify_eoshift): New function.
5485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
5486             Alan Hayward  <alan.hayward@arm.com>
5487             David Sherwood  <david.sherwood@arm.com>
5489         * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
5491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
5492             Alan Hayward  <alan.hayward@arm.com>
5493             David Sherwood  <david.sherwood@arm.com>
5495         * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
5497 2018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
5499         PR fortran/83664
5500         * check.c (gfc_check_eoshift): Error for missing boundary if array
5501         is not one of the standard types.
5503 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
5505         Update copyright years.
5507         * gfortranspec.c (lang_specific_driver): Update copyright notice
5508         dates.
5509         * gfc-internals.texi: Bump @copying's copyright year.
5510         * gfortran.texi: Ditto.
5511         * intrinsic.texi: Ditto.
5512         * invoke.texi: Ditto.
5514 2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
5516         PR fortran/45689
5517         * intrinsic.c (add_function): Add gfc_simplify_maxloc and
5518         gfc_simplify_minloc to maxloc and minloc, respectively.
5519         * intrinsic.h: Add prototypes for gfc_simplify_minloc
5520         and gfc_simplify_maxloc.
5521         * simplify.c (min_max_chose): Adjust prototype.  Modify function
5522         to have a return value which indicates if the extremum was found.
5523         (is_constant_array_expr): Fix typo in comment.
5524         (simplify_minmaxloc_to_scalar): New function.
5525         (simplify_minmaxloc_nodim): New function.
5526         (new_array): New function.
5527         (simplify_minmaxloc_to_array): New function.
5528         (gfc_simplify_minmaxloc): New function.
5529         (simplify_minloc): New function.
5530         (simplify_maxloc): New function.
5532 2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
5534         PR fortran/45689
5535         PR fortran/83650
5536         * simplify.c (gfc_simplify_cshift): Re-implement to allow full
5537         range of arguments.
5539 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
5541         PR fortran/83076
5542         * resolve.c (resolve_fl_derived0): Add caf_token fields for
5543         allocatable and pointer scalars, when -fcoarray selected.
5544         * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
5545         field as well as the backend_decl.
5546         (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
5547         derived types that are not vtypes. Components with caf_token
5548         attribute are pvoid types. For a component requiring it, find
5549         the caf_token field and have the component token field point to
5550         its backend_decl.
5552         PR fortran/83319
5553         *trans-types.c (gfc_get_array_descriptor_base): Add the token
5554         field to the descriptor even when codimen not set.
5556 Copyright (C) 2018 Free Software Foundation, Inc.
5558 Copying and distribution of this file, with or without modification,
5559 are permitted in any medium without royalty provided the copyright
5560 notice and this notice are preserved.