gfortran.h: Remove prototype.
[official-gcc.git] / gcc / fortran / ChangeLog
blob72bbda396409a49fa80bf01614ec135bdf14f045
1 2018-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
3         * gfortran.h: Remove prototype.
4         * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
6 2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
8         PR fortran/85542
9         * expr.c (check_inquiry): Avoid NULL pointer dereference.
11 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
13         PR fortran/85687
14         * check.c (gfc_check_rank): Check that the argument is a data object.
16 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
18         PR fortran/85521
19         * array.c (gfc_resolve_character_array_constructor): Substrings
20         with upper bound smaller than lower bound are zero length strings.
22 2018-05-10  Steven G. Kargl  <kargl@gcc.gnu.org>
24         PR fortran/70870
25         * data.c (gfc_assign_data_value): Check that a data object does
26         not also have default initialization.
28 2018-05-10  Marek Polacek  <polacek@redhat.com>
30         PR fortran/85735
31         * options.c (gfc_post_options): Set main_input_filename.
33 2018-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
35         PR fortran/54613
36         * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
38 2018-05-10  Paul Thomas  <pault@gcc.gnu.org>
40         PR fortran/68846
41         PR fortran/70864
42         * resolve.c (get_temp_from_expr): The temporary must not have
43         dummy or intent attributes.
45 2018-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
47         PR fortran/54613
48         * check.c (gfc_check_minmaxloc): Remove error for BACK not being
49         implemented.  Use gfc_logical_4_kind for BACK.
50         * simplify.c (min_max_choose): Add optional argument back_val.
51         Handle it.
52         (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
53         back_val to min_max_choose.
54         (simplify_minmaxloc_to_nodim): Likewise.
55         (simplify_minmaxloc_to_array): Likewise.
56         (gfc_simplify_minmaxloc): Add argument back, handle it.
57         Pass back_val to specific simplification functions.
58         (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
59         pass it on to gfc_simplify_minmaxloc.
60         (gfc_simplify_maxloc): Likewise.
61         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
62         comment. If BACK is true, use greater or equal (or lesser or
63         equal) insteal of greater (or lesser). Mark the condition of
64         having found a value which exceeds the limit as unlikely.
66 2018-05-07  Jeff Law  <law@redhat.comg>
68         * scanner.c (preprocessor_line): Call linemap_add after a line
69         directive that changes the current filename.
71 2018-05-06  Andre Vehreschild  <vehre@gcc.gnu.org>
73         PR fortran/85507
74         * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
75         introduced by r259385.
76         * trans-intrinsic.c (conv_caf_send): Always report a dependency for
77         same variables in coarray assignments.
79 2018-05-02  Tom de Vries  <tom@codesourcery.com>
81         PR libgomp/82428
82         * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
84 2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
86         PR fortran/85520
87         * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
89 2018-04-14  Andre Vehreschild  <vehre@gcc.gnu.org>
91         PR fortran/81773
92         PR fortran/83606
93         * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
94         during dependency computation.  They define no data dependency.
95         * trans-array.c (conv_array_index_offset): The stride can not be set
96         here, prevent fail.
97         * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
98         for caf_get's result and copying to the array with vectorial
99         indexing.
101 2018-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
103         PR fortran/85387
104         * frontend-passes.c (traverse_io_block): Check for start, end or
105         stride being defined by an outer implied DO loop.
107 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
109         PR fortran/83064
110         PR testsuite/85346
111         * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
112         for annotation and remove dependence on -ftree-parallelize-loops.
114 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
116         PR fortran/85313
117         * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
118         (resolve_oacc_nested_loops): Likewise.  Formatting fix.
120 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
122         PR fortran/83064
123         * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
124         parallell processing of DO CONCURRENT -ftree-parallelize-loops
125         is set.
127 2018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
129         PR fortran/51260
130         * resolve.c (resolve_variable): Simplify cases where access to a
131         parameter array results in a single constant.
133 2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
135         PR fortran/85102
136         * decl.c (variable_decl): If upper or lower bounds simplify
137         to a constant, use that.
139 2018-03-30  Paul Thomas  <pault@gcc.gnu.org>
141         PR fortran/84931
142         * simplify.c (gfc_convert_constant): Handle case of array
143         constructors within an array that has no iterator and improve
144         the conciseness of this section of code.
146 2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
148         PR fortran/85111
149         * array.c (gfc_resolve_character_array_constructor): Early
150         exit for zero-size arrays.
151         * simplify.c (simplify_transformation_to_array): Exit early
152         if the result size is zero.
153         (simplify_minmaxloc_to_array): Likewise.
155 2018-03-28  Mikael Morin  <mikael@gcc.gnu.org>
157         PR fortran/69497
158         * symbol.c (gfc_symbol_done_2): Start freeing namespaces
159         from the root.
160         (gfc_free_namespace): Restore assert (revert r258839).
162 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
164         * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
165         * ioparm.def (IOPARM_dt_default_exp): Rename to ...
166         (IOPARM_dt_dec_ext): ... this.
167         * trans-io.c (build_dt): Adjust for default_exp renaming to
168         dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
169         * io.c (match_io): Likewise.
171 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
173         PR fortran/85084
174         * frontend-passes.c (gfc_run_passes): Do not run front-end
175         optimizations if a previous error occurred.
177 2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
178         Harald Anlauf  <anlauf@gmx.de>
180         PR fortran/85083
181         * primary.c (gfc_convert_to_structure_constructor): Check
182         conformance of argument types in structure constructor.
184 2018-03-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
186         PR fortran/66709
187         * io.c: Include constructor.h.
188         (resolve_tag_format): For a constant character array, concatenate
189         into a single character expression.
191 2018-03-25  Seth Johnson <johnsonsr@ornl.gov>
192         Dominique d'Humieres  <dominiq@gcc.gnu.org>
194         PR fortran/84924
195         * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
196         scalar derived type with -std=f2003 and -std=f2008.
198 2018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
199             Dominique d'Humieres  <dominiq@gcc.gnu.org>
201         PR fortran/69497
202         * symbol.c (gfc_free_namespace): Delete the assert and only if
203         refs count is equals zero, free the namespace. Otherwise,
204         something is halfway and other errors will resound.
206 2018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
208         PR fortran/70068
209         * expr.c (find_substring_ref): Change types of start, end
210         and length variables to gfc_charlen_t. Set length to zero
211         for empty substring.
213 2018-03-24  Steven G. Kargl  <kargl@gcc.gnu.org>
215         PR fortran/42651
216         * decl.c (check_function_name): Improved error message
217         (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
219 2018-03-22  Steven G. Kargl  <kargl@gcc.gnu.org>
221         PR fortran/84922
222         * decl.c (get_proc_name): If the MODULE prefix appears in interface
223         body, then it must appear on the contained subroutine or function.
224         While here, fix nearby mis-indented code.
226 2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
227         Harald Anlauf  <anlauf@gmx.de>
229         PR fortran/84957
230         * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
232 2018-03-21  Janne Blomqvist  <jb@gcc.gnu.org>
234         PR fortran/84615
235         * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
236         gfc_charlen_type_node when calling procedure.
238 2018-03-20  Steven G. Kargl  <kargl@gcc.gnu.org>
240         PR fortran/85001
241         * interface.c (symbol_rank): Remove bogus null pointer check that
242         crept in when translating a ternary operator into an if-else
243         constructor.
245 2018-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
247         PR fortran/84931
248         * simplify.c (gfc_convert_constant): Correctly handle iterators
249         for type conversion.
251 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
253         PR fortran/77414
254         * decl.c (get_proc_name):  Check for a subroutine re-defined in
255         the contain portion of a subroutine.  Change language of existing
256         error message to better describe the issue. While here fix whitespace
257         issues.
259 2018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
261         PR fortran/65453
262         * decl.c (get_proc_name): Catch clash between a procedure statement
263         and a contained subprogram
265 2018-03-16  Steven G. Kargl  <kargl@gcc.gnu.org>
267         PR fortran/69395
268         * decl.c (merge_array_spec): Correct the error condition.
270 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
272         PR fortran/78741
273         * decl.c (get_proc_name):  Check for clash of entry name with
274         subroutine name.
276 2018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
278         PR fortran/69395
279         * decl.c (merge_array_spec): Limit the merging to maximum allowed
280         dimensions, and issue error message if limit is exceeded.
282 2018-03-13  Steven G. Kargl  <kargl@gcc.gnu.org>
284         * check.c (gfc_check_kill_sub):  Remove check for INTEGER(4) or (8).
285         * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
286         (add_subroutines): Remove reference to gfc_resolve_kill_sub.
287         * intrinsic.texi: Update documentation.
288         * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
289         * trans-decl.c (gfc_build_intrinsic_function_decls):  Add
290         gfor_fndecl_kill and gfor_fndecl_kill_sub
291         * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
292         functions.
293         (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
294         (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
295         * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
297 2018-03-11  Paul Thomas  <pault@gcc.gnu.org>
299         PR fortran/84546
300         * trans-array.c (structure_alloc_comps): Make sure that the
301         vptr is copied and that the unlimited polymorphic _len is used
302         to compute the size to be allocated.
303         * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
304         unlimited polymorphic _len for the offset to the element.
305         (gfc_copy_class_to_class): Set the new 'unlimited' argument.
306         * trans.h : Add the boolean 'unlimited' to the prototype.
308 2018-03-11  Steven G. Kargl  <kargl@gcc.gnu.org>
310         PR fortran/83939
311         * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
313 2018-03-11  Steven G. Kargl  <kargls@gcc.gnu.org>
315         * check.c (gfc_check_kill):  Check pid and sig are scalar.
316         (gfc_check_kill_sub): Restrict kind to 4 and 8.
317         * intrinsic.c (add_function): Sort keyword list.  Add pid and sig
318         keywords for KILL.  Remove redundant *back="back" in favor of the
319         original *bck="back".
320         (add_subroutines): Sort keyword list.  Add pid and sig keywords
321         for KILL.
322         * intrinsic.texi: Fix documentation to consistently use pid and sig.
323         * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8.  Choose the
324         correct function.
325         (gfc_resolve_rename_sub): Add comment.
327 2018-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
329         PR fortran/66128
330         * simplify.c (simplify_transformation): Return default result for
331         empty array argument.
332         (gfc_simplify_all): Remove special-case handling for zerosize.
333         (gfc_simplify_any): Likewise.
334         (gfc_simplify_count): Likewise.
335         (gfc_simplify_iall): Likewise.
336         (gfc_simplify_iany): Likewise.
337         (gfc_simplify_iparity): Likewise.
338         (gfc_simplify_minval): Likewise.
339         (gfc_simplify_maxval): Likewise.
340         (gfc_simplify_norm2): Likewise.
341         (gfc_simplify_product): Likewise.
342         (gfc_simplify_sum): Likewise.
344 2018-03-10  Steven G. Kargl  <kargl@gcc.gnu.org>
346         PR fortran/84734
347         * arith.c (check_result, eval_intrinsic):  If result overflows, pass
348         the expression up the chain instead of a NULL pointer.
350 2018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
352         PR fortran/64124
353         PR fortran/70409
354         * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
356 2017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
358         PR fortran/84697
359         PR fortran/66128
360         * expr.c (simplify_parameter_variable): If p is a size zero array
361         and not an ARRAY_EXPR insert an empty array constructor and
362         return.
363         * gfortran.h: Add prototype for gfc_is_size_zero_array.
364         * simplify.c (is_size_zero_array): Make non-static and rename into
365         (gfc_is_size_zero_array):  Check for parameter arrays of zero
366         size by comparing shape and absence of constructor.
367         (gfc_simplify_all): Use gfc_is_size_zero_array instead of
368         is_size_zero_array.
369         (gfc_simplify_count): Likewise.
370         (gfc_simplify_iall): Likewise.
371         (gfc_simplify_iany): Likewise.
372         (gfc_simplify_iparity): Likewise.
373         (gfc_simplify_minval): Likewise.
374         (gfc_simplify_maxval): Likewise.
375         (gfc_simplify_product): Likewise.
376         (gfc_simplify_sum): Likewise.
378 2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
380         PR fortran/56667
381         * primary.c (match_sym_complex_part): Give the matcher for an implied
382         do-loop a chance to run.
384 2018-03-03  Harald Anlauf  <anlauf@gmx.de>
386         PR fortran/71085
387         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
388         dereference NULL pointer.
390 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
392         PR fortran/66128
393         * simplify.c (is_size_zero_array): New function to check for size
394         zero array.
395         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
396          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
397          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
398          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
399         requirements from F2018.
401 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
403         PR fortran/51434
404         * simplify.c (gfc_simplify_transfer): Resolve mold.
406 2018-03-03  Paul Thomas  <pault@gcc.gnu.org>
408         PR fortran/80965
409         * resolve.c (build_loc_call): Change symtree name from 'loc' to
410         '_loc'.
412 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
414         PR fortran/84219
415         * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
416         components are caf tokens.
417         (gfc_target_interpret_expr): Treat BT_VOID expressions as
418         integers.
420 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
422         PR fortran/84538
423         * class.c (class_array_ref_detected): Remove the condition that
424         there be no reference after the array reference.
425         (find_intrinsic_vtab): Remove excess whitespace.
426         * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
427         as 'base and call build_class_array_ref earlier.
429 2018-02-28  Paul Thomas  <pault@gcc.gnu.org>
431         PR fortran/83901
432         * trans-stmt.c (trans_associate_var): Make sure that the se
433         expression is a pointer type before converting it to the symbol
434         backend_decl type.
436 2018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
438         PR fortran/83633
439         * decl.c (variable_decl): Check that an explicit-shape-array with
440         nonconstant bounds is allowed.
442 2018-02-25  Paul Thomas  <pault@gcc.gnu.org>
444         PR fortran/84523
445         * trans-intrinsic.c (gfc_conv_allocated): If the argument se
446         has a pre block, add it to the expression pre block.
448 2018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
450         PR fortran/78238
451         * gfortran.h (gfc_integer_4_kind): Define.
452         * resolve.c (resolve_select_type): Make sure that the
453         kind of c->high is gfc_integer_4_kind.
455 2018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
457         PR fortran/30792
458         * decl.c (gfc_match_data): Check for invalid substring in
459         data-implied-do
461 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
463         * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
465 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
467         PR fortran/84511
468         * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
470 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
472         PR fortran/84346
473         * interface.c (compare_actual_formal): Issue error if keyword is
474         used in a statement function.
476 2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
478         PR fortran/84506
479         * trans-io.c (set_parameter_value_inquire): Adjust range check of
480         negative unit values for kind=8 units to the kind=4 negative limit.
482 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
484         PR fortran/83149
485         * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
486         accessing its components.
488 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
490         PR fortran/83149
491         * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
492         before accessing its components.
494 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
496         PR fortran/83148
497         * trans-const.c : Clean up some whitespace issues.
498         * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
499         derived type has a kind value of zero, set it to the default
500         integer kind.
502 2018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
504         PR fortran/84519
505         * trans-decl.c (gfc_build_builtin_function_decls): Add bool
506         argument to stop and error stop decls.
507         * trans-stmt.c (gfc_trans_stop): Add false value to argument
508         lists.
510 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
512         PR 78534
513         PR 84509
514         * trans-decl.c (gfc_build_builtin_function_decls): Pass
515         gfc_int8_type node to pause_numeric, size_type_node to
516         pause_string.
517         * trans-stmt.c (gfc_trans_pause): Likewise.
519 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
521         * gfortran.texi: Update Coarray API description.
522         * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
523         character lengths, int for exit codes.
524         (generate_coarray_sym_init): Use size_t for character length.
525         * trans-intrinsic.c (conv_co_collective): Likewise.
526         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
527         (gfc_trans_event_post_wait): Likewise.
528         (gfc_trans_sync): Likewise.
529         (gfc_trans_stop): Use size_t for character lengths, int for exit
530         codes.
532 2018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
534         PR fortran/48890
535         PR fortran/83823
536         * primary.c (gfc_convert_to_structure_constructor):
537         For a constant string constructor, make sure the length
538         is correct.
540 2018-02-19  Paul Thomas  <pault@gcc.gnu.org>
542         PR fortran/83344
543         PR fortran/83975
544         * resolve.c (resolve_assoc_var): Rearrange the logic for the
545         determination of the character length of associate names. If
546         the associate name is missing a length expression or the length
547         expression is not a constant and the target is not a variable,
548         make the associate name allocatable and deferred length.
549         * trans-decl.c (gfc_get_symbol_decl): Null the character length
550         backend_decl for deferred length associate names that are not
551         variables. Set 'length' to gfc_index_zero_node for character
552         associate names, whose character length is a PARM_DECL.
554 2018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
556         PR fortran/35339
557         * frontend-passes.c (traverse_io_block): Remove workaround for
558         PR 80945.
560 2018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
562         * gfortran.texi: Document additional src/dst_type.  Fix some typos.
563         * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
564         argument of _caf_*_by_ref () with * e { get, send, sendget }.
565         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
566         data referenced when generating a call to caf_get_by_ref ().
567         (conv_caf_send): Same but for caf_send_by_ref () and
568         caf_sendget_by_ref ().
570 2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
572         PR fortran/84389
573         * io.c (check_format): Allow FMT_COLON.
575 2018-02-18  Paul Thomas  <pault@gcc.gnu.org>
577         PR fortran/80945
578         * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
579         the typenode in the case of deferred length characters.
581 2018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
583         PR fortran/84270
584         * frontend-passes (scalarized_expr):  If the expression
585         is an assumed size array, leave in the last reference
586         and pass AR_SECTION instead of AR_FULL to gfc_resolve
587         in order to avoid an error.
589 2018-02-17  Paul Thomas  <pault@gcc.gnu.org>
591         PR fortran/84115
592         * resolve.c (resolve_assoc_var): If a non-constant target expr.
593         has no string length expression, make the associate variable
594         into a deferred length, allocatable symbol.
595         * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
596         the symbol.
597         * trans-stmt.c (trans_associate_var): Null and free scalar
598         associate names that are allocatable. After assignment, remove
599         the allocatable attribute to prevent reallocation.
601 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
603         PR fortran/84418
604         * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
605         kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
607 2018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
609         PR fortran/84354
610         * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
612 2018-02-15  Janus Weil  <janus@gcc.gnu.org>
614         PR fortran/84409
615         * interface.c (check_dtio_arg_TKR_intent): Add a check for character
616         length.
618 2018-02-14  Janus Weil  <janus@gcc.gnu.org>
620         PR fortran/84385
621         * match.c (gfc_match_select_type): Fix check for selector in
622         SELECT TYPE statement.
624 2018-02-13  Janus Weil  <janus@gcc.gnu.org>
626         PR fortran/84313
627         * symbol.c (check_conflict): Reject procedure pointers in common blocks.
629 2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
630             Janne Blomqvist  <jb@gcc.gnu.org>
632         * module.c (dump_module): Use lbasename to ensure that module
633         files are reproducible.
635 2018-02-12  Janus Weil  <janus@gcc.gnu.org>
637         PR fortran/84273
638         * resolve.c (resolve_component): Fix checks of passed argument in
639         procedure-pointer components.
641 2018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
643         PR fortran/35299
644         * resolve.c (resolve_formal_arglist): Update error message.
646 2018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
648         * gfortran.texi: Fix typos in documentation of caf_register ().
649         * trans-array.c (structure_alloc_comps): Only register a component of
650         a derived typed corray, not of an ultimate component coarray.
652 2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
654         PR fortran/54223
655         PR fortran/84276
656         * interface.c (compare_actual_formal): Add in_statement_function
657         bool parameter.  Skip check of INTENT attribute for statement
658         functions.  Arguments to a statement function cannot be optional,
659         issue error for missing argument.
660         (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
661          in_statement_function.
663 2018-02-11  Paul Thomas  <pault@gcc.gnu.org>
665         PR fortran/84074
666         * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
667         flag. If the is a vector subscript or the expression is not a
668         variable, make the descriptor one-based.
670 2018-02-10  Paul Thomas  <pault@gcc.gnu.org>
672         PR fortran/84141
673         PR fortran/84155
674         * trans-array.c (gfc_array_init_size): Revert the change made
675         in revision 257356 setting the dtype.
676         * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
677         Call gfc_get_dtype_rank_type every time.
679         PR fortran/56691
680         * trans-array.c (gfc_conv_expr_descriptor): If the source array
681         is a descriptor type, use its offset, removing the condition
682         that is be a class expression.
684 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
686         PR fortran/82994
687         * match.c (gfc_match_deallocate): Check for NULL pointer.
689 2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
691         PR fortran/68560
692         * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
693         (gfc_conv_intrinsic_function): Call it.
695 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
697         PR fortran/82049
698         * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
699         try to resolve it.  While here return early if possible.
701 2018-02-04  Paul Thomas  <pault@gcc.gnu.org>
703         PR fortran/84115
704         * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
705         'length' if the symbol charlen backend_decl is an indirect ref.
707 2018-02-03  Paul Thomas  <pault@gcc.gnu.org>
709         PR fortran/84141
710         PR fortran/84155
711         * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
712         use gfc_get_dtype_rank_type.
714 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
716         PR 83975
717         PR 83344
718         * resolve.c (resolve_assoc_var): Generate an error if
719         target length unknown.
721 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
723         PR fortran/83705
724         * simplify.c (gfc_simplify_repeat): Increase limit for deferring
725         to runtime, print a warning message.
727 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
729         PR fortran/84116
730         * openmp.c (gfc_match_omp_clauses): If all the linear
731         gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
732         nor set *head = NULL.  Formatting fixes.
734 2018-01-31  Paul Thomas  <pault@gcc.gnu.org>
736         PR fortran/84088
737         * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
738         an address expression passed to an assumed rank dummy, convert
739         to an indirect reference.
741 2018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
743         * dump-parse-tree.c (write_proc): Use sym_name (which may
744         be sym->binding_label) instead of sym->name.
746 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
748         * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
749         of int for slen.
751 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
753         PR fortran/78534
754         * trans-expr.c (fill_with_spaces): Use memset instead of
755         generating loop.
756         (gfc_trans_string_copy): Improve opportunity to use builtins with
757         constant lengths.
759 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
761         PR debug/84131
762         * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
763         to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
765 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
767         PR fortran/84134
768         * array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
769         zero, return false.
771 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
773         PR fortran/84133
774         * frontend-passes (matmul_to_var_expr): Return early if
775         in association list.
776         (inline_matmul_assign): Likewise.
778 2017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
780         PR fortran/84073
781         * resolve.c (resolve_component): Ensure BIND(C) character
782         components have length one.
783         (resolve_symbol): Likewise for variables.
785 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
787         PR fortran/84065
788         * decl.c (add_init_expr_to_sym): Ignore initializers for too large
789         lengths.
791 2018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
792             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
793             Soren Rasmussen  <s.c.rasmussen@gmail.com>
795         Partial support for Fortran 2018 teams features.
797         * array.c (gfc_match_array_ref): add team attribute in coarray
798         transfers.
799         * check.c (gfc_check_get_team, gfc_check_team_number): add new
800         functions for get_team and team_number.
801         * dump-parse-tree.c (show_code_node): add new statements: form team,
802         change team, end team, and sync team.
803         * expr.c (gfc_find_team_co): add new function.
804         * gfortran.h: add new statements.
805         * intrinsic.c (add_functions): add get_team and team_number functions.
806         * intrinsic.h: add get_team and team_number prototypes for check,
807         simplify, and resolve.
808         * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
809         functions.
810         * iso-fortran-env.def: add the team_type derived type.
811         * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
812         (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
813         add change team, end team, form team, sync team match and functions.
814         * match.h: add new prototypes for change team, end team, form team,
815         and sync team.
816         * parse.c (decode_statement): add cases for change team, end team,
817         form team, and sync team.
818         * resolve.c: add cases for exec form team, change team, end team, and
819         sync team.
820         * simplify.c (gfc_simplify_get_team): add new function for get team.
821         * st.c (gfc_free_statement): add cases exec for change team, end team,
822         form team, sync team.
823         * trans-decl.c (gfor_fndecl_caf_form_team)
824         (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
825         (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
826         (gfor_fndecl_caf_team_number): add functions and definitions.
827         * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
828         new function and team_type argument support.
829         * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
830         (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
831         * trans-stmt.h: add new prototypes.
832         * trans-types.c (gfc_get_derived_type): check condition for team_type.
833         * trans.c (trans_code): new exec cases for form team, change team, end
834         team, and sync team.
835         * trans.h: add new prototypes.
837 2018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
839         PR fortran/83998
840         * simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
841         or .false.  The summation does the correct type conversion.
842         (gfc_simplify_dot_product): Special case zero-sized arrays.
844 2018-25-01  Paul Thomas  <pault@gcc.gnu.org>
846         PR fortran/37577
847         * array.c (gfc_match_array_ref): If standard earlier than F2008
848         it is an error if the reference dimension is greater than 7.
849         libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
850         dtype masks and shifts accordingly.
851         * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
852         type node to check the field.
853         (gfc_conv_descriptor_dtype): Access the rank field of dtype.
854         (duplicate_allocatable_coarray): Access the rank field of the
855         dtype descriptor rather than the dtype itself.
856         * trans-expr.c (get_scalar_to_descriptor_type): Store the type
857         of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
858         (ie. a character).
859         (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
860         get_scalar_to_descriptor_type if the actual expression is a
861         constant.
862         (gfc_trans_structure_assign): Assign the rank directly to the
863         dtype rank field.
864         * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
865         to default integer kind.
866         (gfc_conv_intrinsic_sizeof): Obtain the element size from the
867         'elem_len' field of the dtype.
868         * trans-io.c (gfc_build_io_library_fndecls): Replace
869         gfc_int4_type_node with dtype_type_node where necessary.
870         (transfer_namelist_element): Use gfc_get_dtype_rank_type for
871         scalars.
872         * trans-types.c : Provide 'get_dtype_type_node' to acces the
873         dtype_type_node and, if necessary, build it.
874         The maximum size of an array element is now determined by the
875         maximum value of size_t.
876         Update the description of the array descriptor, including the
877         type def for the dtype_type.
878         (gfc_get_dtype_rank_type): Build a constructor for the dtype.
879         Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
880         (gfc_get_array_descriptor_base): Change the type of the dtype
881         field to dtype_type_node.
882         (gfc_get_array_descr_info): Get the offset to the rank field of
883         the dtype.
884         * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
885         * trans.h : Define the indices of the dtype fields.
887 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
889         PR fortran/83866
890         * decl.c (gfc_match_derived_decl): If eos not matched, recover
891         and emit error about garbage after declaration.
893 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
895         PR fortran/83898
896         * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
897         for characters.
899 2018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
901         PR 78534
902         PR 83704
903         * arith.c (gfc_arith_concat): Use size_t for string length.
904         (gfc_compare_string): Likewise.
905         (gfc_compare_with_Cstring): Likewise.
906         * array.c (gfc_resolve_character_array_constructor): Use
907         HOST_WIDE_INT, gfc_mpz_get_hwi.
908         * check.c (gfc_check_fe_runtime_error): Use size_t.
909         * data.c (create_character_initializer): Use HOST_WIDE_INT,
910         gfc_extract_hwi.
911         * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
912         (add_init_expr_to_sym): Use HOST_WIDE_INT.
913         * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
914         gfc_extract_hwi.
915         (gfc_apply_init): Likewise.
916         * match.h (gfc_set_constant_character_len): Update prototype.
917         * primary.c (match_string_constant): Use size_t.
918         * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
919         gfc_mpz_get_hwi.
920         * simplify.c (init_result_expr): Likewise.
921         (gfc_simplify_len_trim): Use size_t.
922         * target-memory.c (gfc_encode_character): Use size_t.
923         (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
924         (interpret_array): Use size_t.
925         (gfc_interpret_character): Likewise.
926         * target-memory.h (gfc_encode_character): Update prototype.
927         (gfc_interpret_character): Likewise.
928         (gfc_target_interpret_expr): Likewise.
929         * trans-const.c (gfc_build_string_const): Use size_t for length
930         argument.
931         (gfc_build_wide_string_const): Likewise.
932         * trans-const.h (gfc_build_string_const): Likewise.
933         (gfc_build_wide_string_const): Likewise.
935 2018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
937         PR fortran/83900
938     * simplify.c (gfc_simplify_matmul): Set return type correctly.
940 2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
942         PR fortran/83900
943         * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
945 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
947         PR fortran/83864
948         * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
950 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
952         PR fortran/83874
953         * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
955 2018-01-15  Louis Krupp  <louis.krupp@zoho.com>
957         PR fortran/82257
958         * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
959         from symbol marked unlimited polymorphic.
960         * resolve.c (resolve_structure_cons): Likewise.
961         * misc.c (gfc_typename): Don't dereference derived->components
962         if it's NULL.
964 2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
966         PR fortran/54613
967         * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
968         (gfc_logical_4_kind): New macro
969         * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
970         (gfc_simplify_maxloc): Likewise.
971         (gfc_resolve_maxloc): Likewise.
972         (gfc_resolve_minloc): Likewise.
973         * check.c (gfc_check_minloc_maxloc): Add checking for "back"
974         argument; also raise error if it is used (for now). Add it
975         if it isn't present.
976         * intrinsic.c (add_sym_4ml): Rename to
977         (add_sym_5ml), adjust for extra argument.
978         (add_functions): Add "back" constant. Adjust maxloc and minloc
979         for back argument.
980         * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
981         not of gfc_logical_4_kind, convert.
982         (gfc_resolve_minloc): Likewise.
983         * simplify.c (gfc_simplify_minloc): Add back argument.
984         (gfc_simplify_maxloc): Likewise.
985         * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
986         argument to %VAL to ensure passing by value.
987         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
988         also for library calls.
990 2018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
992         PR fortran/82007
993         * resolve.c (resolve_transfer): Delete code looking for 'DT'
994         format specifiers in format strings. Set formatted to true if a
995         format string or format label is present.
996         * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
997         whitespace.
999 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1001         PR fortran/83744
1002         * dump-parse-tree.c (get_c_type_name): Remove extra line.
1003         Change for loop to use declaration in for loop. Handle BT_LOGICAL
1004         and BT_CHARACTER.
1005         (write_decl): Add where argument. Fix indentation. Replace
1006         assert with error message. Add typename to warning
1007         in comment.
1008         (write_type): Adjust locus to call of write_decl.
1009         (write_variable): Likewise.
1010         (write_proc): Likewise. Replace assert with error message.
1012 2018-01-13  Paul Thomas  <pault@gcc.gnu.org>
1014         PR fortran/52162
1015         * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1016         the rhs expression is neither an elemental nor a conversion
1017         function.
1019         PR fortran/83622
1020         * trans-array.c (is_pointer_array): Remove unconditional return
1021         of false for -fopenmp.
1023 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1024         <emsr@gcc.gnu.org>
1026         PR fortran/83803
1027         * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1028         for functions.
1030 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1032         PR fortran/82367
1033         * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1035 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1037         PR fortran/83093
1038         * resolve.c (resolve_charlen): Check the type of cl->length
1039         after resolution.
1041 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
1043         PR fortran/83740
1044         * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
1046 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
1048         PR fortran/83740
1049         * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1050         LHS type when assigning.
1052 2018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1054         PR fortran/83742
1055         * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1057 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1059         * match.c (gfc_match_allocate): Check for NULL pointer.
1061 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1063         * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1065 2018-01-08  Paul Thomas  <pault@gcc.gnu.org>
1067         PR fortran/83611
1068         * decl.c (gfc_get_pdt_instance): If parameterized arrays have
1069         an initializer, convert the kind parameters and add to the
1070         component if the instance.
1071         * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
1072         use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
1073         for parameterized arrays. Clean up typos in comments. Convert
1074         parameterized array initializers and copy into the array.
1075         * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
1076         parameterized types.
1077         *trans-stmt.c (trans_associate_var): Deallocate associate vars
1078         as necessary, when they are PDT function results for example.
1080         PR fortran/83731
1081         * trans-array.c (structure_alloc_comps): Only compare len parms
1082         when they are declared explicitly.
1084 2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
1086         PR fortran/50892
1087         * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
1088         lhs type.
1090 2018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
1092         PR fortran/78534
1093         PR fortran/66310
1094         * array.c (got_charlen): Use gfc_charlen_int_kind.
1095         * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
1096         hardcoded kind.
1097         (find_intrinsic_vtab): Likewise.
1098         * decl.c (match_char_length): Use gfc_charlen_int_kind.
1099         (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
1100         (gfc_match_implicit): Use gfc_charlen_int_kind.
1101         * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
1102         (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
1103         * expr.c (gfc_get_character_expr): Length parameter of type
1104         gfc_charlen_t.
1105         (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
1106         (gfc_extract_hwi): New function.
1107         (simplify_const_ref): Make string_len of type gfc_charlen_t.
1108         (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
1109         * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
1110         * gfortran.h (gfc_mpz_get_hwi): New prototype.
1111         (gfc_mpz_set_hwi): Likewise.
1112         (gfc_charlen_t): New typedef.
1113         (gfc_expr): Use gfc_charlen_t for character lengths.
1114         (gfc_size_kind): New extern variable.
1115         (gfc_extract_hwi): New prototype.
1116         (gfc_get_character_expr): Use gfc_charlen_t for character length.
1117         (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
1118         * gfortran.texi: Update description of hidden string length argument.
1119         * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
1120         (gfc_resolve_char_achar): Likewise.
1121         (gfc_resolve_repeat): Pass string length directly without
1122         temporary, use gfc_charlen_int_kind.
1123         (gfc_resolve_transfer): Use gfc_charlen_int_kind.
1124         * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
1125         * misc.c (gfc_mpz_get_hwi): New function.
1126         (gfc_mpz_set_hwi): New function.
1127         * module.c (atom_int): Change type from int to HOST_WIDE_INT.
1128         (parse_integer): Don't complain about large integers.
1129         (write_atom): Use HOST_WIDE_INT for integers.
1130         (mio_integer): Handle integer type mismatch.
1131         (mio_hwi): New function.
1132         (mio_intrinsic_op): Use HOST_WIDE_INT.
1133         (mio_array_ref): Likewise.
1134         (mio_expr): Likewise.
1135         * primary.c (match_substring): Use gfc_charlen_int_kind.
1136         * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
1137         (resolve_character_operator): Likewise.
1138         (resolve_assoc_var): Likewise.
1139         (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
1140         (resolve_charlen): Use mpz_sgn to determine sign.
1141         * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
1142         instead of long.
1143         * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
1144         * target-memory.c (size_character): Length argument of type
1145         gfc_charlen_t.
1146         (gfc_encode_character): Likewise.
1147         (gfc_interpret_character): Use gfc_charlen_t.
1148         * target-memory.h (gfc_encode_character): Modify prototype.
1149         * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
1150         (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
1151         (trans_array_constructor): Use existing type.
1152         (get_array_charlen): Likewise.
1153         * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
1154         * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
1155         * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
1156         (add_argument_checking): Likewise.
1157         * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
1158         gfc_charlen_type_node.
1159         (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
1160         4, fold_convert to correct type.
1161         (gfc_conv_class_to_class): Build const of type size_type_node for
1162         size.
1163         (gfc_copy_class_to_class): Likewise.
1164         (gfc_conv_string_length): Use same type in expression.
1165         (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
1166         (gfc_conv_string_tmp): Make sure len is of the right type.
1167         (gfc_conv_concat_op): Use same type in expression.
1168         (gfc_conv_procedure_call): Likewise.
1169         (fill_with_spaces): Comment out memset() block due to spurious
1170         -Wstringop-overflow warnings.
1171         (gfc_trans_string_copy): Use gfc_charlen_type_node.
1172         (alloc_scalar_allocatable_for_subcomponent_assignment):
1173         fold_convert to right type.
1174         (gfc_trans_subcomponent_assign): Likewise.
1175         (trans_class_vptr_len_assignment): Build const of correct type.
1176         (gfc_trans_pointer_assignment): Likewise.
1177         (alloc_scalar_allocatable_for_assignment): fold_convert to right
1178         type in expr.
1179         (trans_class_assignment): Build const of correct type.
1180         * trans-intrinsic.c (gfc_conv_associated): Likewise.
1181         (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
1182         * trans-io.c (gfc_build_io_library_fndecls): Use
1183         gfc_charlen_type_node for character lengths.
1184         (set_string): Convert to right type in assignment.
1185         * trans-stmt.c (gfc_trans_label_assign): Build const of
1186         gfc_charlen_type_node.
1187         (trans_associate_var): Likewise.
1188         (gfc_trans_character_select): Likewise.
1189         (gfc_trans_allocate): Likewise, don't typecast strlen result.
1190         (gfc_trans_deallocate): Don't typecast strlen result.
1191         * trans-types.c (gfc_size_kind): New variable.
1192         (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
1193         from size_type_node.
1194         * trans-types.h: Fix comment.
1196 2018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1198         PR fortran/83683
1199         PR fortran/45689
1200         * check.c (gfc_check_eoshift): Check for string length and
1201         for conformance of boundary.
1202         * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
1203         * intrinsic.h: Add prototype for gfc_simplify_eoshift.
1204         * simplify.c (gfc_simplify_eoshift): New function.
1206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1207             Alan Hayward  <alan.hayward@arm.com>
1208             David Sherwood  <david.sherwood@arm.com>
1210         * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
1212 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1213             Alan Hayward  <alan.hayward@arm.com>
1214             David Sherwood  <david.sherwood@arm.com>
1216         * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
1218 2018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
1220         PR fortran/83664
1221         * check.c (gfc_check_eoshift): Error for missing boundary if array
1222         is not one of the standard types.
1224 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1226         Update copyright years.
1228         * gfortranspec.c (lang_specific_driver): Update copyright notice
1229         dates.
1230         * gfc-internals.texi: Bump @copying's copyright year.
1231         * gfortran.texi: Ditto.
1232         * intrinsic.texi: Ditto.
1233         * invoke.texi: Ditto.
1235 2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1237         PR fortran/45689
1238         * intrinsic.c (add_function): Add gfc_simplify_maxloc and
1239         gfc_simplify_minloc to maxloc and minloc, respectively.
1240         * intrinsic.h: Add prototypes for gfc_simplify_minloc
1241         and gfc_simplify_maxloc.
1242         * simplify.c (min_max_chose): Adjust prototype.  Modify function
1243         to have a return value which indicates if the extremum was found.
1244         (is_constant_array_expr): Fix typo in comment.
1245         (simplify_minmaxloc_to_scalar): New function.
1246         (simplify_minmaxloc_nodim): New function.
1247         (new_array): New function.
1248         (simplify_minmaxloc_to_array): New function.
1249         (gfc_simplify_minmaxloc): New function.
1250         (simplify_minloc): New function.
1251         (simplify_maxloc): New function.
1253 2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1255         PR fortran/45689
1256         PR fortran/83650
1257         * simplify.c (gfc_simplify_cshift): Re-implement to allow full
1258         range of arguments.
1260 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
1262         PR fortran/83076
1263         * resolve.c (resolve_fl_derived0): Add caf_token fields for
1264         allocatable and pointer scalars, when -fcoarray selected.
1265         * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
1266         field as well as the backend_decl.
1267         (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
1268         derived types that are not vtypes. Components with caf_token
1269         attribute are pvoid types. For a component requiring it, find
1270         the caf_token field and have the component token field point to
1271         its backend_decl.
1273         PR fortran/83319
1274         *trans-types.c (gfc_get_array_descriptor_base): Add the token
1275         field to the descriptor even when codimen not set.
1277 Copyright (C) 2018 Free Software Foundation, Inc.
1279 Copying and distribution of this file, with or without modification,
1280 are permitted in any medium without royalty provided the copyright
1281 notice and this notice are preserved.