re PR fortran/85779 (ICE in gfc_typename, at fortran/misc.c:156)
[official-gcc.git] / gcc / fortran / ChangeLog
blob534b27722c02825d5457bdbfe4ece0575e8db931
1 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/85779
4         * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
6 2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>
8         PR fortran/85895
9         * resolve.c (resolve_sync): Resolve expression before checking for
10         an error.
12 2018-05-22  Janus Weil  <janus@gcc.gnu.org>
14         PR fortran/85841
15         * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
16         GFC_STD_OPT_F08TS.
17         * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
18         * options.c (set_default_std_flags): Ditto.
19         (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
20         * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
21         GFC_STD_F2018.
22         * check.c (gfc_check_atomic, gfc_check_event_query,
23         gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
24         gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
25         * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
26         * intrinsic.c (add_functions, add_subroutines,
27         gfc_check_intrinsic_standard): Ditto.
28         * iso-c-binding.def: Ditto.
29         * iso-fortran-env.def: Ditto.
30         * match.c (gfc_match_event_post, gfc_match_event_wait,
31         gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
32         gfc_match_end_team, gfc_match_sync_team): Ditto.
33         * gfortran.texi: Remove mention of -std=f2008ts.
34         Move TSs into F2018 section.
35         * invoke.texi: Update documentation of -std=f2008ts.
37 2018-05-21  Janus Weil  <janus@gcc.gnu.org>
39         PR fortran/85841
40         * libgfortran.h: New macros GFC_STD_OPT_*.
41         * error.c (notify_std_msg): New function.
42         (gfc_notify_std): Adjust such that it can handle combinations of
43         GFC_STD_* flags in the 'std' argument, not just a single one.
44         * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
45         in Fortran 2018.
46         (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
47         * options.c (set_default_std_flags): Warn for F2018 deleted features
48         by default.
49         (gfc_handle_option): F2018 deleted features are allowed in earlier
50         standards.
51         * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
52         nonblock do constructs in Fortran 2018.
54 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
56         PR fortran/80657
57         * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
58         test for self refs to the function result in the character len
59         expression. If a self reference is found, emit an error and
60         return true.
61         (resolve_fntype): Use the function symbol in the calls to the
62         above.
64 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
66         PR fortran/49636
67         * trans-array.c (gfc_get_array_span): Renamed from
68         'get_array_span'.
69         (gfc_conv_expr_descriptor): Change references to above.
70         * trans-array.h : Add prototype for 'gfc_get_array_span'.
71         * trans-intrinsic.c (gfc_conv_associated): Add pre and post
72         blocks for 'arg1'.
73         * trans-stmt.c (trans_associate_var): If the associate name is
74         a subref array pointer, use gfc_get_array_span for the span.
76 2018-05-20  Paul Thomas  <pault@gcc.gnu.org>
78         PR fortran/82275
79         * match.c (gfc_match_type_spec): Go through the array ref and
80         decrement 'rank' for every dimension that is an element.
82 2018-05-19  Paul Thomas  <pault@gcc.gnu.org>
84         PR fortran/82923
85         PR fortran/66694
86         PR fortran/82617
87         * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
88         charlen backend_decl of the rhs expr to ss->info->string_length
89         so that the value in the current scope is used.
91 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
93         PR fortran/63529
94         * gfortran.texi: Clarify documentation for Cray pointer and
95         assumed-sized array.
97 2018-05-13  Paul Thomas  <pault@gcc.gnu.org>
99         PR fortran/85742
100         * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
101         of 'size'. If the element type is a pointer use the size of the
102         TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
103         case, set the size to zero.
105 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
107         * gfortran.h: Remove prototype.
108         * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
110 2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
112         PR fortran/85542
113         * expr.c (check_inquiry): Avoid NULL pointer dereference.
115 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
117         PR fortran/85687
118         * check.c (gfc_check_rank): Check that the argument is a data object.
120 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
122         PR fortran/85521
123         * array.c (gfc_resolve_character_array_constructor): Substrings
124         with upper bound smaller than lower bound are zero length strings.
126 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
128         PR fortran/70870
129         * data.c (gfc_assign_data_value): Check that a data object does
130         not also have default initialization.
132 2018-05-10  Marek Polacek  <polacek@redhat.com>
134         PR fortran/85735
135         * options.c (gfc_post_options): Set main_input_filename.
137 2018-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
139         PR fortran/54613
140         * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
142 2018-05-10  Paul Thomas  <pault@gcc.gnu.org>
144         PR fortran/68846
145         PR fortran/70864
146         * resolve.c (get_temp_from_expr): The temporary must not have
147         dummy or intent attributes.
149 2018-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
151         PR fortran/54613
152         * check.c (gfc_check_minmaxloc): Remove error for BACK not being
153         implemented.  Use gfc_logical_4_kind for BACK.
154         * simplify.c (min_max_choose): Add optional argument back_val.
155         Handle it.
156         (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
157         back_val to min_max_choose.
158         (simplify_minmaxloc_to_nodim): Likewise.
159         (simplify_minmaxloc_to_array): Likewise.
160         (gfc_simplify_minmaxloc): Add argument back, handle it.
161         Pass back_val to specific simplification functions.
162         (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
163         pass it on to gfc_simplify_minmaxloc.
164         (gfc_simplify_maxloc): Likewise.
165         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
166         comment. If BACK is true, use greater or equal (or lesser or
167         equal) insteal of greater (or lesser). Mark the condition of
168         having found a value which exceeds the limit as unlikely.
170 2018-05-07  Jeff Law  <law@redhat.comg>
172         * scanner.c (preprocessor_line): Call linemap_add after a line
173         directive that changes the current filename.
175 2018-05-06  Andre Vehreschild  <vehre@gcc.gnu.org>
177         PR fortran/85507
178         * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
179         introduced by r259385.
180         * trans-intrinsic.c (conv_caf_send): Always report a dependency for
181         same variables in coarray assignments.
183 2018-05-02  Tom de Vries  <tom@codesourcery.com>
185         PR libgomp/82428
186         * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
188 2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
190         PR fortran/85520
191         * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
193 2018-04-14  Andre Vehreschild  <vehre@gcc.gnu.org>
195         PR fortran/81773
196         PR fortran/83606
197         * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
198         during dependency computation.  They define no data dependency.
199         * trans-array.c (conv_array_index_offset): The stride can not be set
200         here, prevent fail.
201         * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
202         for caf_get's result and copying to the array with vectorial
203         indexing.
205 2018-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
207         PR fortran/85387
208         * frontend-passes.c (traverse_io_block): Check for start, end or
209         stride being defined by an outer implied DO loop.
211 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
213         PR fortran/83064
214         PR testsuite/85346
215         * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
216         for annotation and remove dependence on -ftree-parallelize-loops.
218 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
220         PR fortran/85313
221         * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
222         (resolve_oacc_nested_loops): Likewise.  Formatting fix.
224 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
226         PR fortran/83064
227         * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
228         parallell processing of DO CONCURRENT -ftree-parallelize-loops
229         is set.
231 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
233         PR fortran/51260
234         * resolve.c (resolve_variable): Simplify cases where access to a
235         parameter array results in a single constant.
237 2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
239         PR fortran/85102
240         * decl.c (variable_decl): If upper or lower bounds simplify
241         to a constant, use that.
243 2018-03-30  Paul Thomas  <pault@gcc.gnu.org>
245         PR fortran/84931
246         * simplify.c (gfc_convert_constant): Handle case of array
247         constructors within an array that has no iterator and improve
248         the conciseness of this section of code.
250 2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
252         PR fortran/85111
253         * array.c (gfc_resolve_character_array_constructor): Early
254         exit for zero-size arrays.
255         * simplify.c (simplify_transformation_to_array): Exit early
256         if the result size is zero.
257         (simplify_minmaxloc_to_array): Likewise.
259 2018-03-28  Mikael Morin  <mikael@gcc.gnu.org>
261         PR fortran/69497
262         * symbol.c (gfc_symbol_done_2): Start freeing namespaces
263         from the root.
264         (gfc_free_namespace): Restore assert (revert r258839).
266 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
268         * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
269         * ioparm.def (IOPARM_dt_default_exp): Rename to ...
270         (IOPARM_dt_dec_ext): ... this.
271         * trans-io.c (build_dt): Adjust for default_exp renaming to
272         dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
273         * io.c (match_io): Likewise.
275 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
277         PR fortran/85084
278         * frontend-passes.c (gfc_run_passes): Do not run front-end
279         optimizations if a previous error occurred.
281 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
282         Harald Anlauf  <anlauf@gmx.de>
284         PR fortran/85083
285         * primary.c (gfc_convert_to_structure_constructor): Check
286         conformance of argument types in structure constructor.
288 2018-03-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
290         PR fortran/66709
291         * io.c: Include constructor.h.
292         (resolve_tag_format): For a constant character array, concatenate
293         into a single character expression.
295 2018-03-25  Seth Johnson <johnsonsr@ornl.gov>
296         Dominique d'Humieres  <dominiq@gcc.gnu.org>
298         PR fortran/84924
299         * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
300         scalar derived type with -std=f2003 and -std=f2008.
302 2018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
303             Dominique d'Humieres  <dominiq@gcc.gnu.org>
305         PR fortran/69497
306         * symbol.c (gfc_free_namespace): Delete the assert and only if
307         refs count is equals zero, free the namespace. Otherwise,
308         something is halfway and other errors will resound.
310 2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
312         PR fortran/70068
313         * expr.c (find_substring_ref): Change types of start, end
314         and length variables to gfc_charlen_t. Set length to zero
315         for empty substring.
317 2018-03-24  Steven G. Kargl  <kargl@gcc.gnu.org>
319         PR fortran/42651
320         * decl.c (check_function_name): Improved error message
321         (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
323 2018-03-22  Steven G. Kargl  <kargl@gcc.gnu.org>
325         PR fortran/84922
326         * decl.c (get_proc_name): If the MODULE prefix appears in interface
327         body, then it must appear on the contained subroutine or function.
328         While here, fix nearby mis-indented code.
330 2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
331         Harald Anlauf  <anlauf@gmx.de>
333         PR fortran/84957
334         * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
336 2018-03-21  Janne Blomqvist  <jb@gcc.gnu.org>
338         PR fortran/84615
339         * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
340         gfc_charlen_type_node when calling procedure.
342 2018-03-20  Steven G. Kargl  <kargl@gcc.gnu.org>
344         PR fortran/85001
345         * interface.c (symbol_rank): Remove bogus null pointer check that
346         crept in when translating a ternary operator into an if-else
347         constructor.
349 2018-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
351         PR fortran/84931
352         * simplify.c (gfc_convert_constant): Correctly handle iterators
353         for type conversion.
355 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
357         PR fortran/77414
358         * decl.c (get_proc_name):  Check for a subroutine re-defined in
359         the contain portion of a subroutine.  Change language of existing
360         error message to better describe the issue. While here fix whitespace
361         issues.
363 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
365         PR fortran/65453
366         * decl.c (get_proc_name): Catch clash between a procedure statement
367         and a contained subprogram
369 2018-03-16  Steven G. Kargl  <kargl@gcc.gnu.org>
371         PR fortran/69395
372         * decl.c (merge_array_spec): Correct the error condition.
374 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
376         PR fortran/78741
377         * decl.c (get_proc_name):  Check for clash of entry name with
378         subroutine name.
380 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
382         PR fortran/69395
383         * decl.c (merge_array_spec): Limit the merging to maximum allowed
384         dimensions, and issue error message if limit is exceeded.
386 2018-03-13  Steven G. Kargl  <kargl@gcc.gnu.org>
388         * check.c (gfc_check_kill_sub):  Remove check for INTEGER(4) or (8).
389         * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
390         (add_subroutines): Remove reference to gfc_resolve_kill_sub.
391         * intrinsic.texi: Update documentation.
392         * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
393         * trans-decl.c (gfc_build_intrinsic_function_decls):  Add
394         gfor_fndecl_kill and gfor_fndecl_kill_sub
395         * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
396         functions.
397         (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
398         (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
399         * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
401 2018-03-11  Paul Thomas  <pault@gcc.gnu.org>
403         PR fortran/84546
404         * trans-array.c (structure_alloc_comps): Make sure that the
405         vptr is copied and that the unlimited polymorphic _len is used
406         to compute the size to be allocated.
407         * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
408         unlimited polymorphic _len for the offset to the element.
409         (gfc_copy_class_to_class): Set the new 'unlimited' argument.
410         * trans.h : Add the boolean 'unlimited' to the prototype.
412 2018-03-11  Steven G. Kargl  <kargl@gcc.gnu.org>
414         PR fortran/83939
415         * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
417 2018-03-11  Steven G. Kargl  <kargls@gcc.gnu.org>
419         * check.c (gfc_check_kill):  Check pid and sig are scalar.
420         (gfc_check_kill_sub): Restrict kind to 4 and 8.
421         * intrinsic.c (add_function): Sort keyword list.  Add pid and sig
422         keywords for KILL.  Remove redundant *back="back" in favor of the
423         original *bck="back".
424         (add_subroutines): Sort keyword list.  Add pid and sig keywords
425         for KILL.
426         * intrinsic.texi: Fix documentation to consistently use pid and sig.
427         * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8.  Choose the
428         correct function.
429         (gfc_resolve_rename_sub): Add comment.
431 2018-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
433         PR fortran/66128
434         * simplify.c (simplify_transformation): Return default result for
435         empty array argument.
436         (gfc_simplify_all): Remove special-case handling for zerosize.
437         (gfc_simplify_any): Likewise.
438         (gfc_simplify_count): Likewise.
439         (gfc_simplify_iall): Likewise.
440         (gfc_simplify_iany): Likewise.
441         (gfc_simplify_iparity): Likewise.
442         (gfc_simplify_minval): Likewise.
443         (gfc_simplify_maxval): Likewise.
444         (gfc_simplify_norm2): Likewise.
445         (gfc_simplify_product): Likewise.
446         (gfc_simplify_sum): Likewise.
448 2018-03-10  Steven G. Kargl  <kargl@gcc.gnu.org>
450         PR fortran/84734
451         * arith.c (check_result, eval_intrinsic):  If result overflows, pass
452         the expression up the chain instead of a NULL pointer.
454 2018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
456         PR fortran/64124
457         PR fortran/70409
458         * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
460 2017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
462         PR fortran/84697
463         PR fortran/66128
464         * expr.c (simplify_parameter_variable): If p is a size zero array
465         and not an ARRAY_EXPR insert an empty array constructor and
466         return.
467         * gfortran.h: Add prototype for gfc_is_size_zero_array.
468         * simplify.c (is_size_zero_array): Make non-static and rename into
469         (gfc_is_size_zero_array):  Check for parameter arrays of zero
470         size by comparing shape and absence of constructor.
471         (gfc_simplify_all): Use gfc_is_size_zero_array instead of
472         is_size_zero_array.
473         (gfc_simplify_count): Likewise.
474         (gfc_simplify_iall): Likewise.
475         (gfc_simplify_iany): Likewise.
476         (gfc_simplify_iparity): Likewise.
477         (gfc_simplify_minval): Likewise.
478         (gfc_simplify_maxval): Likewise.
479         (gfc_simplify_product): Likewise.
480         (gfc_simplify_sum): Likewise.
482 2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
484         PR fortran/56667
485         * primary.c (match_sym_complex_part): Give the matcher for an implied
486         do-loop a chance to run.
488 2018-03-03  Harald Anlauf  <anlauf@gmx.de>
490         PR fortran/71085
491         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
492         dereference NULL pointer.
494 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
496         PR fortran/66128
497         * simplify.c (is_size_zero_array): New function to check for size
498         zero array.
499         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
500          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
501          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
502          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
503         requirements from F2018.
505 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
507         PR fortran/51434
508         * simplify.c (gfc_simplify_transfer): Resolve mold.
510 2018-03-03  Paul Thomas  <pault@gcc.gnu.org>
512         PR fortran/80965
513         * resolve.c (build_loc_call): Change symtree name from 'loc' to
514         '_loc'.
516 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
518         PR fortran/84219
519         * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
520         components are caf tokens.
521         (gfc_target_interpret_expr): Treat BT_VOID expressions as
522         integers.
524 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
526         PR fortran/84538
527         * class.c (class_array_ref_detected): Remove the condition that
528         there be no reference after the array reference.
529         (find_intrinsic_vtab): Remove excess whitespace.
530         * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
531         as 'base and call build_class_array_ref earlier.
533 2018-02-28  Paul Thomas  <pault@gcc.gnu.org>
535         PR fortran/83901
536         * trans-stmt.c (trans_associate_var): Make sure that the se
537         expression is a pointer type before converting it to the symbol
538         backend_decl type.
540 2018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
542         PR fortran/83633
543         * decl.c (variable_decl): Check that an explicit-shape-array with
544         nonconstant bounds is allowed.
546 2018-02-25  Paul Thomas  <pault@gcc.gnu.org>
548         PR fortran/84523
549         * trans-intrinsic.c (gfc_conv_allocated): If the argument se
550         has a pre block, add it to the expression pre block.
552 2018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
554         PR fortran/78238
555         * gfortran.h (gfc_integer_4_kind): Define.
556         * resolve.c (resolve_select_type): Make sure that the
557         kind of c->high is gfc_integer_4_kind.
559 2018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
561         PR fortran/30792
562         * decl.c (gfc_match_data): Check for invalid substring in
563         data-implied-do
565 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
567         * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
569 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
571         PR fortran/84511
572         * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
574 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
576         PR fortran/84346
577         * interface.c (compare_actual_formal): Issue error if keyword is
578         used in a statement function.
580 2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
582         PR fortran/84506
583         * trans-io.c (set_parameter_value_inquire): Adjust range check of
584         negative unit values for kind=8 units to the kind=4 negative limit.
586 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
588         PR fortran/83149
589         * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
590         accessing its components.
592 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
594         PR fortran/83149
595         * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
596         before accessing its components.
598 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
600         PR fortran/83148
601         * trans-const.c : Clean up some whitespace issues.
602         * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
603         derived type has a kind value of zero, set it to the default
604         integer kind.
606 2018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
608         PR fortran/84519
609         * trans-decl.c (gfc_build_builtin_function_decls): Add bool
610         argument to stop and error stop decls.
611         * trans-stmt.c (gfc_trans_stop): Add false value to argument
612         lists.
614 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
616         PR 78534
617         PR 84509
618         * trans-decl.c (gfc_build_builtin_function_decls): Pass
619         gfc_int8_type node to pause_numeric, size_type_node to
620         pause_string.
621         * trans-stmt.c (gfc_trans_pause): Likewise.
623 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
625         * gfortran.texi: Update Coarray API description.
626         * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
627         character lengths, int for exit codes.
628         (generate_coarray_sym_init): Use size_t for character length.
629         * trans-intrinsic.c (conv_co_collective): Likewise.
630         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
631         (gfc_trans_event_post_wait): Likewise.
632         (gfc_trans_sync): Likewise.
633         (gfc_trans_stop): Use size_t for character lengths, int for exit
634         codes.
636 2018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
638         PR fortran/48890
639         PR fortran/83823
640         * primary.c (gfc_convert_to_structure_constructor):
641         For a constant string constructor, make sure the length
642         is correct.
644 2018-02-19  Paul Thomas  <pault@gcc.gnu.org>
646         PR fortran/83344
647         PR fortran/83975
648         * resolve.c (resolve_assoc_var): Rearrange the logic for the
649         determination of the character length of associate names. If
650         the associate name is missing a length expression or the length
651         expression is not a constant and the target is not a variable,
652         make the associate name allocatable and deferred length.
653         * trans-decl.c (gfc_get_symbol_decl): Null the character length
654         backend_decl for deferred length associate names that are not
655         variables. Set 'length' to gfc_index_zero_node for character
656         associate names, whose character length is a PARM_DECL.
658 2018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
660         PR fortran/35339
661         * frontend-passes.c (traverse_io_block): Remove workaround for
662         PR 80945.
664 2018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
666         * gfortran.texi: Document additional src/dst_type.  Fix some typos.
667         * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
668         argument of _caf_*_by_ref () with * e { get, send, sendget }.
669         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
670         data referenced when generating a call to caf_get_by_ref ().
671         (conv_caf_send): Same but for caf_send_by_ref () and
672         caf_sendget_by_ref ().
674 2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
676         PR fortran/84389
677         * io.c (check_format): Allow FMT_COLON.
679 2018-02-18  Paul Thomas  <pault@gcc.gnu.org>
681         PR fortran/80945
682         * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
683         the typenode in the case of deferred length characters.
685 2018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
687         PR fortran/84270
688         * frontend-passes (scalarized_expr):  If the expression
689         is an assumed size array, leave in the last reference
690         and pass AR_SECTION instead of AR_FULL to gfc_resolve
691         in order to avoid an error.
693 2018-02-17  Paul Thomas  <pault@gcc.gnu.org>
695         PR fortran/84115
696         * resolve.c (resolve_assoc_var): If a non-constant target expr.
697         has no string length expression, make the associate variable
698         into a deferred length, allocatable symbol.
699         * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
700         the symbol.
701         * trans-stmt.c (trans_associate_var): Null and free scalar
702         associate names that are allocatable. After assignment, remove
703         the allocatable attribute to prevent reallocation.
705 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
707         PR fortran/84418
708         * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
709         kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
711 2018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
713         PR fortran/84354
714         * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
716 2018-02-15  Janus Weil  <janus@gcc.gnu.org>
718         PR fortran/84409
719         * interface.c (check_dtio_arg_TKR_intent): Add a check for character
720         length.
722 2018-02-14  Janus Weil  <janus@gcc.gnu.org>
724         PR fortran/84385
725         * match.c (gfc_match_select_type): Fix check for selector in
726         SELECT TYPE statement.
728 2018-02-13  Janus Weil  <janus@gcc.gnu.org>
730         PR fortran/84313
731         * symbol.c (check_conflict): Reject procedure pointers in common blocks.
733 2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
734             Janne Blomqvist  <jb@gcc.gnu.org>
736         * module.c (dump_module): Use lbasename to ensure that module
737         files are reproducible.
739 2018-02-12  Janus Weil  <janus@gcc.gnu.org>
741         PR fortran/84273
742         * resolve.c (resolve_component): Fix checks of passed argument in
743         procedure-pointer components.
745 2018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
747         PR fortran/35299
748         * resolve.c (resolve_formal_arglist): Update error message.
750 2018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
752         * gfortran.texi: Fix typos in documentation of caf_register ().
753         * trans-array.c (structure_alloc_comps): Only register a component of
754         a derived typed corray, not of an ultimate component coarray.
756 2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
758         PR fortran/54223
759         PR fortran/84276
760         * interface.c (compare_actual_formal): Add in_statement_function
761         bool parameter.  Skip check of INTENT attribute for statement
762         functions.  Arguments to a statement function cannot be optional,
763         issue error for missing argument.
764         (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
765          in_statement_function.
767 2018-02-11  Paul Thomas  <pault@gcc.gnu.org>
769         PR fortran/84074
770         * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
771         flag. If the is a vector subscript or the expression is not a
772         variable, make the descriptor one-based.
774 2018-02-10  Paul Thomas  <pault@gcc.gnu.org>
776         PR fortran/84141
777         PR fortran/84155
778         * trans-array.c (gfc_array_init_size): Revert the change made
779         in revision 257356 setting the dtype.
780         * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
781         Call gfc_get_dtype_rank_type every time.
783         PR fortran/56691
784         * trans-array.c (gfc_conv_expr_descriptor): If the source array
785         is a descriptor type, use its offset, removing the condition
786         that is be a class expression.
788 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
790         PR fortran/82994
791         * match.c (gfc_match_deallocate): Check for NULL pointer.
793 2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
795         PR fortran/68560
796         * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
797         (gfc_conv_intrinsic_function): Call it.
799 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
801         PR fortran/82049
802         * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
803         try to resolve it.  While here return early if possible.
805 2018-02-04  Paul Thomas  <pault@gcc.gnu.org>
807         PR fortran/84115
808         * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
809         'length' if the symbol charlen backend_decl is an indirect ref.
811 2018-02-03  Paul Thomas  <pault@gcc.gnu.org>
813         PR fortran/84141
814         PR fortran/84155
815         * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
816         use gfc_get_dtype_rank_type.
818 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
820         PR 83975
821         PR 83344
822         * resolve.c (resolve_assoc_var): Generate an error if
823         target length unknown.
825 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
827         PR fortran/83705
828         * simplify.c (gfc_simplify_repeat): Increase limit for deferring
829         to runtime, print a warning message.
831 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
833         PR fortran/84116
834         * openmp.c (gfc_match_omp_clauses): If all the linear
835         gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
836         nor set *head = NULL.  Formatting fixes.
838 2018-01-31  Paul Thomas  <pault@gcc.gnu.org>
840         PR fortran/84088
841         * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
842         an address expression passed to an assumed rank dummy, convert
843         to an indirect reference.
845 2018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
847         * dump-parse-tree.c (write_proc): Use sym_name (which may
848         be sym->binding_label) instead of sym->name.
850 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
852         * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
853         of int for slen.
855 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
857         PR fortran/78534
858         * trans-expr.c (fill_with_spaces): Use memset instead of
859         generating loop.
860         (gfc_trans_string_copy): Improve opportunity to use builtins with
861         constant lengths.
863 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
865         PR debug/84131
866         * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
867         to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
869 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
871         PR fortran/84134
872         * array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
873         zero, return false.
875 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
877         PR fortran/84133
878         * frontend-passes (matmul_to_var_expr): Return early if
879         in association list.
880         (inline_matmul_assign): Likewise.
882 2017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
884         PR fortran/84073
885         * resolve.c (resolve_component): Ensure BIND(C) character
886         components have length one.
887         (resolve_symbol): Likewise for variables.
889 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
891         PR fortran/84065
892         * decl.c (add_init_expr_to_sym): Ignore initializers for too large
893         lengths.
895 2018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
896             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
897             Soren Rasmussen  <s.c.rasmussen@gmail.com>
899         Partial support for Fortran 2018 teams features.
901         * array.c (gfc_match_array_ref): add team attribute in coarray
902         transfers.
903         * check.c (gfc_check_get_team, gfc_check_team_number): add new
904         functions for get_team and team_number.
905         * dump-parse-tree.c (show_code_node): add new statements: form team,
906         change team, end team, and sync team.
907         * expr.c (gfc_find_team_co): add new function.
908         * gfortran.h: add new statements.
909         * intrinsic.c (add_functions): add get_team and team_number functions.
910         * intrinsic.h: add get_team and team_number prototypes for check,
911         simplify, and resolve.
912         * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
913         functions.
914         * iso-fortran-env.def: add the team_type derived type.
915         * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
916         (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
917         add change team, end team, form team, sync team match and functions.
918         * match.h: add new prototypes for change team, end team, form team,
919         and sync team.
920         * parse.c (decode_statement): add cases for change team, end team,
921         form team, and sync team.
922         * resolve.c: add cases for exec form team, change team, end team, and
923         sync team.
924         * simplify.c (gfc_simplify_get_team): add new function for get team.
925         * st.c (gfc_free_statement): add cases exec for change team, end team,
926         form team, sync team.
927         * trans-decl.c (gfor_fndecl_caf_form_team)
928         (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
929         (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
930         (gfor_fndecl_caf_team_number): add functions and definitions.
931         * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
932         new function and team_type argument support.
933         * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
934         (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
935         * trans-stmt.h: add new prototypes.
936         * trans-types.c (gfc_get_derived_type): check condition for team_type.
937         * trans.c (trans_code): new exec cases for form team, change team, end
938         team, and sync team.
939         * trans.h: add new prototypes.
941 2018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
943         PR fortran/83998
944         * simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
945         or .false.  The summation does the correct type conversion.
946         (gfc_simplify_dot_product): Special case zero-sized arrays.
948 2018-25-01  Paul Thomas  <pault@gcc.gnu.org>
950         PR fortran/37577
951         * array.c (gfc_match_array_ref): If standard earlier than F2008
952         it is an error if the reference dimension is greater than 7.
953         libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
954         dtype masks and shifts accordingly.
955         * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
956         type node to check the field.
957         (gfc_conv_descriptor_dtype): Access the rank field of dtype.
958         (duplicate_allocatable_coarray): Access the rank field of the
959         dtype descriptor rather than the dtype itself.
960         * trans-expr.c (get_scalar_to_descriptor_type): Store the type
961         of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
962         (ie. a character).
963         (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
964         get_scalar_to_descriptor_type if the actual expression is a
965         constant.
966         (gfc_trans_structure_assign): Assign the rank directly to the
967         dtype rank field.
968         * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
969         to default integer kind.
970         (gfc_conv_intrinsic_sizeof): Obtain the element size from the
971         'elem_len' field of the dtype.
972         * trans-io.c (gfc_build_io_library_fndecls): Replace
973         gfc_int4_type_node with dtype_type_node where necessary.
974         (transfer_namelist_element): Use gfc_get_dtype_rank_type for
975         scalars.
976         * trans-types.c : Provide 'get_dtype_type_node' to acces the
977         dtype_type_node and, if necessary, build it.
978         The maximum size of an array element is now determined by the
979         maximum value of size_t.
980         Update the description of the array descriptor, including the
981         type def for the dtype_type.
982         (gfc_get_dtype_rank_type): Build a constructor for the dtype.
983         Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
984         (gfc_get_array_descriptor_base): Change the type of the dtype
985         field to dtype_type_node.
986         (gfc_get_array_descr_info): Get the offset to the rank field of
987         the dtype.
988         * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
989         * trans.h : Define the indices of the dtype fields.
991 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
993         PR fortran/83866
994         * decl.c (gfc_match_derived_decl): If eos not matched, recover
995         and emit error about garbage after declaration.
997 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
999         PR fortran/83898
1000         * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
1001         for characters.
1003 2018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
1005         PR 78534
1006         PR 83704
1007         * arith.c (gfc_arith_concat): Use size_t for string length.
1008         (gfc_compare_string): Likewise.
1009         (gfc_compare_with_Cstring): Likewise.
1010         * array.c (gfc_resolve_character_array_constructor): Use
1011         HOST_WIDE_INT, gfc_mpz_get_hwi.
1012         * check.c (gfc_check_fe_runtime_error): Use size_t.
1013         * data.c (create_character_initializer): Use HOST_WIDE_INT,
1014         gfc_extract_hwi.
1015         * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
1016         (add_init_expr_to_sym): Use HOST_WIDE_INT.
1017         * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
1018         gfc_extract_hwi.
1019         (gfc_apply_init): Likewise.
1020         * match.h (gfc_set_constant_character_len): Update prototype.
1021         * primary.c (match_string_constant): Use size_t.
1022         * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
1023         gfc_mpz_get_hwi.
1024         * simplify.c (init_result_expr): Likewise.
1025         (gfc_simplify_len_trim): Use size_t.
1026         * target-memory.c (gfc_encode_character): Use size_t.
1027         (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
1028         (interpret_array): Use size_t.
1029         (gfc_interpret_character): Likewise.
1030         * target-memory.h (gfc_encode_character): Update prototype.
1031         (gfc_interpret_character): Likewise.
1032         (gfc_target_interpret_expr): Likewise.
1033         * trans-const.c (gfc_build_string_const): Use size_t for length
1034         argument.
1035         (gfc_build_wide_string_const): Likewise.
1036         * trans-const.h (gfc_build_string_const): Likewise.
1037         (gfc_build_wide_string_const): Likewise.
1039 2018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1041         PR fortran/83900
1042     * simplify.c (gfc_simplify_matmul): Set return type correctly.
1044 2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1046         PR fortran/83900
1047         * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
1049 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
1051         PR fortran/83864
1052         * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1054 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
1056         PR fortran/83874
1057         * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1059 2018-01-15  Louis Krupp  <louis.krupp@zoho.com>
1061         PR fortran/82257
1062         * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
1063         from symbol marked unlimited polymorphic.
1064         * resolve.c (resolve_structure_cons): Likewise.
1065         * misc.c (gfc_typename): Don't dereference derived->components
1066         if it's NULL.
1068 2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1070         PR fortran/54613
1071         * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
1072         (gfc_logical_4_kind): New macro
1073         * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
1074         (gfc_simplify_maxloc): Likewise.
1075         (gfc_resolve_maxloc): Likewise.
1076         (gfc_resolve_minloc): Likewise.
1077         * check.c (gfc_check_minloc_maxloc): Add checking for "back"
1078         argument; also raise error if it is used (for now). Add it
1079         if it isn't present.
1080         * intrinsic.c (add_sym_4ml): Rename to
1081         (add_sym_5ml), adjust for extra argument.
1082         (add_functions): Add "back" constant. Adjust maxloc and minloc
1083         for back argument.
1084         * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
1085         not of gfc_logical_4_kind, convert.
1086         (gfc_resolve_minloc): Likewise.
1087         * simplify.c (gfc_simplify_minloc): Add back argument.
1088         (gfc_simplify_maxloc): Likewise.
1089         * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
1090         argument to %VAL to ensure passing by value.
1091         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
1092         also for library calls.
1094 2018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1096         PR fortran/82007
1097         * resolve.c (resolve_transfer): Delete code looking for 'DT'
1098         format specifiers in format strings. Set formatted to true if a
1099         format string or format label is present.
1100         * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
1101         whitespace.
1103 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1105         PR fortran/83744
1106         * dump-parse-tree.c (get_c_type_name): Remove extra line.
1107         Change for loop to use declaration in for loop. Handle BT_LOGICAL
1108         and BT_CHARACTER.
1109         (write_decl): Add where argument. Fix indentation. Replace
1110         assert with error message. Add typename to warning
1111         in comment.
1112         (write_type): Adjust locus to call of write_decl.
1113         (write_variable): Likewise.
1114         (write_proc): Likewise. Replace assert with error message.
1116 2018-01-13  Paul Thomas  <pault@gcc.gnu.org>
1118         PR fortran/52162
1119         * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1120         the rhs expression is neither an elemental nor a conversion
1121         function.
1123         PR fortran/83622
1124         * trans-array.c (is_pointer_array): Remove unconditional return
1125         of false for -fopenmp.
1127 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1128         <emsr@gcc.gnu.org>
1130         PR fortran/83803
1131         * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1132         for functions.
1134 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1136         PR fortran/82367
1137         * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1139 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1141         PR fortran/83093
1142         * resolve.c (resolve_charlen): Check the type of cl->length
1143         after resolution.
1145 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
1147         PR fortran/83740
1148         * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
1150 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
1152         PR fortran/83740
1153         * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1154         LHS type when assigning.
1156 2018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1158         PR fortran/83742
1159         * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1161 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1163         * match.c (gfc_match_allocate): Check for NULL pointer.
1165 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1167         * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1169 2018-01-08  Paul Thomas  <pault@gcc.gnu.org>
1171         PR fortran/83611
1172         * decl.c (gfc_get_pdt_instance): If parameterized arrays have
1173         an initializer, convert the kind parameters and add to the
1174         component if the instance.
1175         * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
1176         use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
1177         for parameterized arrays. Clean up typos in comments. Convert
1178         parameterized array initializers and copy into the array.
1179         * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
1180         parameterized types.
1181         *trans-stmt.c (trans_associate_var): Deallocate associate vars
1182         as necessary, when they are PDT function results for example.
1184         PR fortran/83731
1185         * trans-array.c (structure_alloc_comps): Only compare len parms
1186         when they are declared explicitly.
1188 2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
1190         PR fortran/50892
1191         * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
1192         lhs type.
1194 2018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
1196         PR fortran/78534
1197         PR fortran/66310
1198         * array.c (got_charlen): Use gfc_charlen_int_kind.
1199         * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
1200         hardcoded kind.
1201         (find_intrinsic_vtab): Likewise.
1202         * decl.c (match_char_length): Use gfc_charlen_int_kind.
1203         (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
1204         (gfc_match_implicit): Use gfc_charlen_int_kind.
1205         * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
1206         (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
1207         * expr.c (gfc_get_character_expr): Length parameter of type
1208         gfc_charlen_t.
1209         (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
1210         (gfc_extract_hwi): New function.
1211         (simplify_const_ref): Make string_len of type gfc_charlen_t.
1212         (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
1213         * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
1214         * gfortran.h (gfc_mpz_get_hwi): New prototype.
1215         (gfc_mpz_set_hwi): Likewise.
1216         (gfc_charlen_t): New typedef.
1217         (gfc_expr): Use gfc_charlen_t for character lengths.
1218         (gfc_size_kind): New extern variable.
1219         (gfc_extract_hwi): New prototype.
1220         (gfc_get_character_expr): Use gfc_charlen_t for character length.
1221         (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
1222         * gfortran.texi: Update description of hidden string length argument.
1223         * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
1224         (gfc_resolve_char_achar): Likewise.
1225         (gfc_resolve_repeat): Pass string length directly without
1226         temporary, use gfc_charlen_int_kind.
1227         (gfc_resolve_transfer): Use gfc_charlen_int_kind.
1228         * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
1229         * misc.c (gfc_mpz_get_hwi): New function.
1230         (gfc_mpz_set_hwi): New function.
1231         * module.c (atom_int): Change type from int to HOST_WIDE_INT.
1232         (parse_integer): Don't complain about large integers.
1233         (write_atom): Use HOST_WIDE_INT for integers.
1234         (mio_integer): Handle integer type mismatch.
1235         (mio_hwi): New function.
1236         (mio_intrinsic_op): Use HOST_WIDE_INT.
1237         (mio_array_ref): Likewise.
1238         (mio_expr): Likewise.
1239         * primary.c (match_substring): Use gfc_charlen_int_kind.
1240         * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
1241         (resolve_character_operator): Likewise.
1242         (resolve_assoc_var): Likewise.
1243         (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
1244         (resolve_charlen): Use mpz_sgn to determine sign.
1245         * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
1246         instead of long.
1247         * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
1248         * target-memory.c (size_character): Length argument of type
1249         gfc_charlen_t.
1250         (gfc_encode_character): Likewise.
1251         (gfc_interpret_character): Use gfc_charlen_t.
1252         * target-memory.h (gfc_encode_character): Modify prototype.
1253         * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
1254         (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
1255         (trans_array_constructor): Use existing type.
1256         (get_array_charlen): Likewise.
1257         * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
1258         * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
1259         * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
1260         (add_argument_checking): Likewise.
1261         * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
1262         gfc_charlen_type_node.
1263         (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
1264         4, fold_convert to correct type.
1265         (gfc_conv_class_to_class): Build const of type size_type_node for
1266         size.
1267         (gfc_copy_class_to_class): Likewise.
1268         (gfc_conv_string_length): Use same type in expression.
1269         (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
1270         (gfc_conv_string_tmp): Make sure len is of the right type.
1271         (gfc_conv_concat_op): Use same type in expression.
1272         (gfc_conv_procedure_call): Likewise.
1273         (fill_with_spaces): Comment out memset() block due to spurious
1274         -Wstringop-overflow warnings.
1275         (gfc_trans_string_copy): Use gfc_charlen_type_node.
1276         (alloc_scalar_allocatable_for_subcomponent_assignment):
1277         fold_convert to right type.
1278         (gfc_trans_subcomponent_assign): Likewise.
1279         (trans_class_vptr_len_assignment): Build const of correct type.
1280         (gfc_trans_pointer_assignment): Likewise.
1281         (alloc_scalar_allocatable_for_assignment): fold_convert to right
1282         type in expr.
1283         (trans_class_assignment): Build const of correct type.
1284         * trans-intrinsic.c (gfc_conv_associated): Likewise.
1285         (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
1286         * trans-io.c (gfc_build_io_library_fndecls): Use
1287         gfc_charlen_type_node for character lengths.
1288         (set_string): Convert to right type in assignment.
1289         * trans-stmt.c (gfc_trans_label_assign): Build const of
1290         gfc_charlen_type_node.
1291         (trans_associate_var): Likewise.
1292         (gfc_trans_character_select): Likewise.
1293         (gfc_trans_allocate): Likewise, don't typecast strlen result.
1294         (gfc_trans_deallocate): Don't typecast strlen result.
1295         * trans-types.c (gfc_size_kind): New variable.
1296         (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
1297         from size_type_node.
1298         * trans-types.h: Fix comment.
1300 2018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1302         PR fortran/83683
1303         PR fortran/45689
1304         * check.c (gfc_check_eoshift): Check for string length and
1305         for conformance of boundary.
1306         * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
1307         * intrinsic.h: Add prototype for gfc_simplify_eoshift.
1308         * simplify.c (gfc_simplify_eoshift): New function.
1310 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1311             Alan Hayward  <alan.hayward@arm.com>
1312             David Sherwood  <david.sherwood@arm.com>
1314         * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
1316 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1317             Alan Hayward  <alan.hayward@arm.com>
1318             David Sherwood  <david.sherwood@arm.com>
1320         * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
1322 2018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
1324         PR fortran/83664
1325         * check.c (gfc_check_eoshift): Error for missing boundary if array
1326         is not one of the standard types.
1328 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1330         Update copyright years.
1332         * gfortranspec.c (lang_specific_driver): Update copyright notice
1333         dates.
1334         * gfc-internals.texi: Bump @copying's copyright year.
1335         * gfortran.texi: Ditto.
1336         * intrinsic.texi: Ditto.
1337         * invoke.texi: Ditto.
1339 2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1341         PR fortran/45689
1342         * intrinsic.c (add_function): Add gfc_simplify_maxloc and
1343         gfc_simplify_minloc to maxloc and minloc, respectively.
1344         * intrinsic.h: Add prototypes for gfc_simplify_minloc
1345         and gfc_simplify_maxloc.
1346         * simplify.c (min_max_chose): Adjust prototype.  Modify function
1347         to have a return value which indicates if the extremum was found.
1348         (is_constant_array_expr): Fix typo in comment.
1349         (simplify_minmaxloc_to_scalar): New function.
1350         (simplify_minmaxloc_nodim): New function.
1351         (new_array): New function.
1352         (simplify_minmaxloc_to_array): New function.
1353         (gfc_simplify_minmaxloc): New function.
1354         (simplify_minloc): New function.
1355         (simplify_maxloc): New function.
1357 2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1359         PR fortran/45689
1360         PR fortran/83650
1361         * simplify.c (gfc_simplify_cshift): Re-implement to allow full
1362         range of arguments.
1364 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
1366         PR fortran/83076
1367         * resolve.c (resolve_fl_derived0): Add caf_token fields for
1368         allocatable and pointer scalars, when -fcoarray selected.
1369         * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
1370         field as well as the backend_decl.
1371         (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
1372         derived types that are not vtypes. Components with caf_token
1373         attribute are pvoid types. For a component requiring it, find
1374         the caf_token field and have the component token field point to
1375         its backend_decl.
1377         PR fortran/83319
1378         *trans-types.c (gfc_get_array_descriptor_base): Add the token
1379         field to the descriptor even when codimen not set.
1381 Copyright (C) 2018 Free Software Foundation, Inc.
1383 Copying and distribution of this file, with or without modification,
1384 are permitted in any medium without royalty provided the copyright
1385 notice and this notice are preserved.