Fix ifunc detection in target-supports.exp file.
[official-gcc.git] / gcc / fortran / ChangeLog
blob796b58dd6f31c8da235705ac72a3753e248364a3
1 2018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/64124
4         PR fortran/70409
5         * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
7 2017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
9         PR fortran/84697
10         PR fortran/66128
11         * expr.c (simplify_parameter_variable): If p is a size zero array
12         and not an ARRAY_EXPR insert an empty array constructor and
13         return.
14         * gfortran.h: Add prototype for gfc_is_size_zero_array.
15         * simplify.c (is_size_zero_array): Make non-static and rename into
16         (gfc_is_size_zero_array):  Check for parameter arrays of zero
17         size by comparing shape and absence of constructor.
18         (gfc_simplify_all): Use gfc_is_size_zero_array instead of
19         is_size_zero_array.
20         (gfc_simplify_count): Likewise.
21         (gfc_simplify_iall): Likewise.
22         (gfc_simplify_iany): Likewise.
23         (gfc_simplify_iparity): Likewise.
24         (gfc_simplify_minval): Likewise.
25         (gfc_simplify_maxval): Likewise.
26         (gfc_simplify_product): Likewise.
27         (gfc_simplify_sum): Likewise.
29 2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
31         PR fortran/56667
32         * primary.c (match_sym_complex_part): Give the matcher for an implied
33         do-loop a chance to run.
35 2018-03-03  Harald Anlauf  <anlauf@gmx.de>
37         PR fortran/71085
38         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
39         dereference NULL pointer.
41 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
43         PR fortran/66128
44         * simplify.c (is_size_zero_array): New function to check for size
45         zero array.
46         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count, 
47          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
48          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
49          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
50         requirements from F2018.
52 2018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
54         PR fortran/51434
55         * simplify.c (gfc_simplify_transfer): Resolve mold.
57 2018-03-03  Paul Thomas  <pault@gcc.gnu.org>
59         PR fortran/80965
60         * resolve.c (build_loc_call): Change symtree name from 'loc' to
61         '_loc'.
63 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
65         PR fortran/84219
66         * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
67         components are caf tokens.
68         (gfc_target_interpret_expr): Treat BT_VOID expressions as
69         integers.
71 2018-03-01  Paul Thomas  <pault@gcc.gnu.org>
73         PR fortran/84538
74         * class.c (class_array_ref_detected): Remove the condition that
75         there be no reference after the array reference.
76         (find_intrinsic_vtab): Remove excess whitespace.
77         * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
78         as 'base and call build_class_array_ref earlier.
80 2018-02-28  Paul Thomas  <pault@gcc.gnu.org>
82         PR fortran/83901
83         * trans-stmt.c (trans_associate_var): Make sure that the se
84         expression is a pointer type before converting it to the symbol
85         backend_decl type.
87 2018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
89         PR fortran/83633
90         * decl.c (variable_decl): Check that an explicit-shape-array with
91         nonconstant bounds is allowed.
93 2018-02-25  Paul Thomas  <pault@gcc.gnu.org>
95         PR fortran/84523
96         * trans-intrinsic.c (gfc_conv_allocated): If the argument se
97         has a pre block, add it to the expression pre block.
99 2018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
101         PR fortran/78238
102         * gfortran.h (gfc_integer_4_kind): Define.
103         * resolve.c (resolve_select_type): Make sure that the
104         kind of c->high is gfc_integer_4_kind.
106 2018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
108         PR fortran/30792
109         * decl.c (gfc_match_data): Check for invalid substring in
110         data-implied-do
112 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
114         * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
116 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
118         PR fortran/84511
119         * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
121 2018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
123         PR fortran/84346
124         * interface.c (compare_actual_formal): Issue error if keyword is
125         used in a statement function.
127 2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
129         PR fortran/84506
130         * trans-io.c (set_parameter_value_inquire): Adjust range check of
131         negative unit values for kind=8 units to the kind=4 negative limit.
133 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
135         PR fortran/83149
136         * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
137         accessing its components.
139 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
141         PR fortran/83149
142         * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
143         before accessing its components.
145 2018-02-23  Paul Thomas  <pault@gcc.gnu.org>
147         PR fortran/83148
148         * trans-const.c : Clean up some whitespace issues.
149         * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
150         derived type has a kind value of zero, set it to the default
151         integer kind.
153 2018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
155         PR fortran/84519
156         * trans-decl.c (gfc_build_builtin_function_decls): Add bool
157         argument to stop and error stop decls.
158         * trans-stmt.c (gfc_trans_stop): Add false value to argument
159         lists.
161 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
163         PR 78534
164         PR 84509
165         * trans-decl.c (gfc_build_builtin_function_decls): Pass
166         gfc_int8_type node to pause_numeric, size_type_node to
167         pause_string.
168         * trans-stmt.c (gfc_trans_pause): Likewise.
170 2018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
172         * gfortran.texi: Update Coarray API description.
173         * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
174         character lengths, int for exit codes.
175         (generate_coarray_sym_init): Use size_t for character length.
176         * trans-intrinsic.c (conv_co_collective): Likewise.
177         * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
178         (gfc_trans_event_post_wait): Likewise.
179         (gfc_trans_sync): Likewise.
180         (gfc_trans_stop): Use size_t for character lengths, int for exit
181         codes.
183 2018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
185         PR fortran/48890
186         PR fortran/83823
187         * primary.c (gfc_convert_to_structure_constructor):
188         For a constant string constructor, make sure the length
189         is correct.
191 2018-02-19  Paul Thomas  <pault@gcc.gnu.org>
193         PR fortran/83344
194         PR fortran/83975
195         * resolve.c (resolve_assoc_var): Rearrange the logic for the
196         determination of the character length of associate names. If
197         the associate name is missing a length expression or the length
198         expression is not a constant and the target is not a variable,
199         make the associate name allocatable and deferred length.
200         * trans-decl.c (gfc_get_symbol_decl): Null the character length
201         backend_decl for deferred length associate names that are not
202         variables. Set 'length' to gfc_index_zero_node for character
203         associate names, whose character length is a PARM_DECL.
205 2018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
207         PR fortran/35339
208         * frontend-passes.c (traverse_io_block): Remove workaround for
209         PR 80945.
211 2018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
213         * gfortran.texi: Document additional src/dst_type.  Fix some typos.
214         * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
215         argument of _caf_*_by_ref () with * e { get, send, sendget }.
216         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
217         data referenced when generating a call to caf_get_by_ref ().
218         (conv_caf_send): Same but for caf_send_by_ref () and
219         caf_sendget_by_ref ().
221 2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
223         PR fortran/84389
224         * io.c (check_format): Allow FMT_COLON.
226 2018-02-18  Paul Thomas  <pault@gcc.gnu.org>
228         PR fortran/80945
229         * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
230         the typenode in the case of deferred length characters.
232 2018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
234         PR fortran/84270
235         * frontend-passes (scalarized_expr):  If the expression
236         is an assumed size array, leave in the last reference
237         and pass AR_SECTION instead of AR_FULL to gfc_resolve
238         in order to avoid an error.
240 2018-02-17  Paul Thomas  <pault@gcc.gnu.org>
242         PR fortran/84115
243         * resolve.c (resolve_assoc_var): If a non-constant target expr.
244         has no string length expression, make the associate variable
245         into a deferred length, allocatable symbol.
246         * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
247         the symbol.
248         * trans-stmt.c (trans_associate_var): Null and free scalar
249         associate names that are allocatable. After assignment, remove
250         the allocatable attribute to prevent reallocation.
252 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
254         PR fortran/84418
255         * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
256         kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
258 2018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
260         PR fortran/84354
261         * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
263 2018-02-15  Janus Weil  <janus@gcc.gnu.org>
265         PR fortran/84409
266         * interface.c (check_dtio_arg_TKR_intent): Add a check for character
267         length.
269 2018-02-14  Janus Weil  <janus@gcc.gnu.org>
271         PR fortran/84385
272         * match.c (gfc_match_select_type): Fix check for selector in
273         SELECT TYPE statement.
275 2018-02-13  Janus Weil  <janus@gcc.gnu.org>
277         PR fortran/84313
278         * symbol.c (check_conflict): Reject procedure pointers in common blocks.
280 2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
281             Janne Blomqvist  <jb@gcc.gnu.org>
283         * module.c (dump_module): Use lbasename to ensure that module
284         files are reproducible.
286 2018-02-12  Janus Weil  <janus@gcc.gnu.org>
288         PR fortran/84273
289         * resolve.c (resolve_component): Fix checks of passed argument in
290         procedure-pointer components.
292 2018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
294         PR fortran/35299
295         * resolve.c (resolve_formal_arglist): Update error message.
297 2018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
299         * gfortran.texi: Fix typos in documentation of caf_register ().
300         * trans-array.c (structure_alloc_comps): Only register a component of
301         a derived typed corray, not of an ultimate component coarray.
303 2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
305         PR fortran/54223
306         PR fortran/84276
307         * interface.c (compare_actual_formal): Add in_statement_function
308         bool parameter.  Skip check of INTENT attribute for statement
309         functions.  Arguments to a statement function cannot be optional,
310         issue error for missing argument.
311         (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
312          in_statement_function.
314 2018-02-11  Paul Thomas  <pault@gcc.gnu.org>
316         PR fortran/84074
317         * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
318         flag. If the is a vector subscript or the expression is not a
319         variable, make the descriptor one-based.
321 2018-02-10  Paul Thomas  <pault@gcc.gnu.org>
323         PR fortran/84141
324         PR fortran/84155
325         * trans-array.c (gfc_array_init_size): Revert the change made
326         in revision 257356 setting the dtype.
327         * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
328         Call gfc_get_dtype_rank_type every time.
330         PR fortran/56691
331         * trans-array.c (gfc_conv_expr_descriptor): If the source array
332         is a descriptor type, use its offset, removing the condition
333         that is be a class expression.
335 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
337         PR fortran/82994
338         * match.c (gfc_match_deallocate): Check for NULL pointer.
340 2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
342         PR fortran/68560
343         * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
344         (gfc_conv_intrinsic_function): Call it.
346 2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
348         PR fortran/82049
349         * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
350         try to resolve it.  While here return early if possible.
352 2018-02-04  Paul Thomas  <pault@gcc.gnu.org>
354         PR fortran/84115
355         * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
356         'length' if the symbol charlen backend_decl is an indirect ref.
358 2018-02-03  Paul Thomas  <pault@gcc.gnu.org>
360         PR fortran/84141
361         PR fortran/84155
362         * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
363         use gfc_get_dtype_rank_type.
365 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
367         PR 83975
368         PR 83344
369         * resolve.c (resolve_assoc_var): Generate an error if
370         target length unknown.
372 2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
374         PR fortran/83705
375         * simplify.c (gfc_simplify_repeat): Increase limit for deferring
376         to runtime, print a warning message.
378 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
380         PR fortran/84116
381         * openmp.c (gfc_match_omp_clauses): If all the linear
382         gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
383         nor set *head = NULL.  Formatting fixes.
385 2018-01-31  Paul Thomas  <pault@gcc.gnu.org>
387         PR fortran/84088
388         * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
389         an address expression passed to an assumed rank dummy, convert
390         to an indirect reference.
392 2018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
394         * dump-parse-tree.c (write_proc): Use sym_name (which may
395         be sym->binding_label) instead of sym->name.
397 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
399         * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
400         of int for slen.
402 2018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
404         PR fortran/78534
405         * trans-expr.c (fill_with_spaces): Use memset instead of
406         generating loop.
407         (gfc_trans_string_copy): Improve opportunity to use builtins with
408         constant lengths.
410 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
412         PR debug/84131
413         * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
414         to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
416 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
418         PR fortran/84134
419         * array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
420         zero, return false.
422 2018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
424         PR fortran/84133
425         * frontend-passes (matmul_to_var_expr): Return early if
426         in association list.
427         (inline_matmul_assign): Likewise.
429 2017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
431         PR fortran/84073
432         * resolve.c (resolve_component): Ensure BIND(C) character
433         components have length one.
434         (resolve_symbol): Likewise for variables.
436 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
438         PR fortran/84065
439         * decl.c (add_init_expr_to_sym): Ignore initializers for too large
440         lengths.
442 2018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
443             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
444             Soren Rasmussen  <s.c.rasmussen@gmail.com>
446         Partial support for Fortran 2018 teams features.
448         * array.c (gfc_match_array_ref): add team attribute in coarray
449         transfers.
450         * check.c (gfc_check_get_team, gfc_check_team_number): add new
451         functions for get_team and team_number.
452         * dump-parse-tree.c (show_code_node): add new statements: form team,
453         change team, end team, and sync team.
454         * expr.c (gfc_find_team_co): add new function.
455         * gfortran.h: add new statements.
456         * intrinsic.c (add_functions): add get_team and team_number functions.
457         * intrinsic.h: add get_team and team_number prototypes for check,
458         simplify, and resolve.
459         * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
460         functions.
461         * iso-fortran-env.def: add the team_type derived type.
462         * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
463         (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
464         add change team, end team, form team, sync team match and functions.
465         * match.h: add new prototypes for change team, end team, form team,
466         and sync team.
467         * parse.c (decode_statement): add cases for change team, end team,
468         form team, and sync team.
469         * resolve.c: add cases for exec form team, change team, end team, and
470         sync team.
471         * simplify.c (gfc_simplify_get_team): add new function for get team.
472         * st.c (gfc_free_statement): add cases exec for change team, end team,
473         form team, sync team.
474         * trans-decl.c (gfor_fndecl_caf_form_team)
475         (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
476         (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
477         (gfor_fndecl_caf_team_number): add functions and definitions.
478         * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
479         new function and team_type argument support.
480         * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
481         (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
482         * trans-stmt.h: add new prototypes.
483         * trans-types.c (gfc_get_derived_type): check condition for team_type.
484         * trans.c (trans_code): new exec cases for form team, change team, end
485         team, and sync team.
486         * trans.h: add new prototypes.
488 2018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
490         PR fortran/83998
491         * simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
492         or .false.  The summation does the correct type conversion.
493         (gfc_simplify_dot_product): Special case zero-sized arrays.
495 2018-25-01  Paul Thomas  <pault@gcc.gnu.org>
497         PR fortran/37577
498         * array.c (gfc_match_array_ref): If standard earlier than F2008
499         it is an error if the reference dimension is greater than 7.
500         libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
501         dtype masks and shifts accordingly.
502         * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
503         type node to check the field.
504         (gfc_conv_descriptor_dtype): Access the rank field of dtype.
505         (duplicate_allocatable_coarray): Access the rank field of the
506         dtype descriptor rather than the dtype itself.
507         * trans-expr.c (get_scalar_to_descriptor_type): Store the type
508         of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
509         (ie. a character).
510         (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
511         get_scalar_to_descriptor_type if the actual expression is a
512         constant.
513         (gfc_trans_structure_assign): Assign the rank directly to the
514         dtype rank field.
515         * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
516         to default integer kind.
517         (gfc_conv_intrinsic_sizeof): Obtain the element size from the
518         'elem_len' field of the dtype.
519         * trans-io.c (gfc_build_io_library_fndecls): Replace
520         gfc_int4_type_node with dtype_type_node where necessary.
521         (transfer_namelist_element): Use gfc_get_dtype_rank_type for
522         scalars.
523         * trans-types.c : Provide 'get_dtype_type_node' to acces the
524         dtype_type_node and, if necessary, build it.
525         The maximum size of an array element is now determined by the
526         maximum value of size_t.
527         Update the description of the array descriptor, including the
528         type def for the dtype_type.
529         (gfc_get_dtype_rank_type): Build a constructor for the dtype.
530         Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
531         (gfc_get_array_descriptor_base): Change the type of the dtype
532         field to dtype_type_node.
533         (gfc_get_array_descr_info): Get the offset to the rank field of
534         the dtype.
535         * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
536         * trans.h : Define the indices of the dtype fields.
538 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
540         PR fortran/83866
541         * decl.c (gfc_match_derived_decl): If eos not matched, recover
542         and emit error about garbage after declaration.
544 2018-23-01  Paul Thomas  <pault@gcc.gnu.org>
546         PR fortran/83898
547         * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
548         for characters.
550 2018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
552         PR 78534
553         PR 83704
554         * arith.c (gfc_arith_concat): Use size_t for string length.
555         (gfc_compare_string): Likewise.
556         (gfc_compare_with_Cstring): Likewise.
557         * array.c (gfc_resolve_character_array_constructor): Use
558         HOST_WIDE_INT, gfc_mpz_get_hwi.
559         * check.c (gfc_check_fe_runtime_error): Use size_t.
560         * data.c (create_character_initializer): Use HOST_WIDE_INT,
561         gfc_extract_hwi.
562         * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
563         (add_init_expr_to_sym): Use HOST_WIDE_INT.
564         * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
565         gfc_extract_hwi.
566         (gfc_apply_init): Likewise.
567         * match.h (gfc_set_constant_character_len): Update prototype.
568         * primary.c (match_string_constant): Use size_t.
569         * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
570         gfc_mpz_get_hwi.
571         * simplify.c (init_result_expr): Likewise.
572         (gfc_simplify_len_trim): Use size_t.
573         * target-memory.c (gfc_encode_character): Use size_t.
574         (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
575         (interpret_array): Use size_t.
576         (gfc_interpret_character): Likewise.
577         * target-memory.h (gfc_encode_character): Update prototype.
578         (gfc_interpret_character): Likewise.
579         (gfc_target_interpret_expr): Likewise.
580         * trans-const.c (gfc_build_string_const): Use size_t for length
581         argument.
582         (gfc_build_wide_string_const): Likewise.
583         * trans-const.h (gfc_build_string_const): Likewise.
584         (gfc_build_wide_string_const): Likewise.
586 2018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
588         PR fortran/83900
589     * simplify.c (gfc_simplify_matmul): Set return type correctly.
591 2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
593         PR fortran/83900
594         * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
596 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
598         PR fortran/83864
599         * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
601 2018-01-17  Harald Anlauf  <anlauf@gmx.de>
603         PR fortran/83874
604         * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
606 2018-01-15  Louis Krupp  <louis.krupp@zoho.com>
608         PR fortran/82257
609         * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
610         from symbol marked unlimited polymorphic.
611         * resolve.c (resolve_structure_cons): Likewise.
612         * misc.c (gfc_typename): Don't dereference derived->components
613         if it's NULL.
615 2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
617         PR fortran/54613
618         * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
619         (gfc_logical_4_kind): New macro
620         * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
621         (gfc_simplify_maxloc): Likewise.
622         (gfc_resolve_maxloc): Likewise.
623         (gfc_resolve_minloc): Likewise.
624         * check.c (gfc_check_minloc_maxloc): Add checking for "back"
625         argument; also raise error if it is used (for now). Add it
626         if it isn't present.
627         * intrinsic.c (add_sym_4ml): Rename to
628         (add_sym_5ml), adjust for extra argument.
629         (add_functions): Add "back" constant. Adjust maxloc and minloc
630         for back argument.
631         * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
632         not of gfc_logical_4_kind, convert.
633         (gfc_resolve_minloc): Likewise.
634         * simplify.c (gfc_simplify_minloc): Add back argument.
635         (gfc_simplify_maxloc): Likewise.
636         * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
637         argument to %VAL to ensure passing by value.
638         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
639         also for library calls.
641 2018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
643         PR fortran/82007
644         * resolve.c (resolve_transfer): Delete code looking for 'DT'
645         format specifiers in format strings. Set formatted to true if a
646         format string or format label is present.
647         * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
648         whitespace.
650 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
652         PR fortran/83744
653         * dump-parse-tree.c (get_c_type_name): Remove extra line.
654         Change for loop to use declaration in for loop. Handle BT_LOGICAL
655         and BT_CHARACTER.
656         (write_decl): Add where argument. Fix indentation. Replace
657         assert with error message. Add typename to warning
658         in comment.
659         (write_type): Adjust locus to call of write_decl.
660         (write_variable): Likewise.
661         (write_proc): Likewise. Replace assert with error message.
663 2018-01-13  Paul Thomas  <pault@gcc.gnu.org>
665         PR fortran/52162
666         * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
667         the rhs expression is neither an elemental nor a conversion
668         function.
670         PR fortran/83622
671         * trans-array.c (is_pointer_array): Remove unconditional return
672         of false for -fopenmp.
674 2018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
675         <emsr@gcc.gnu.org>
677         PR fortran/83803
678         * dump-parse-tree.c (write_proc): Always emit closing parenthesis
679         for functions.
681 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
683         PR fortran/82367
684         * resolve.c (resolve_allocate_expr): Check for NULL pointer.
686 2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
688         PR fortran/83093
689         * resolve.c (resolve_charlen): Check the type of cl->length
690         after resolution.
692 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
694         PR fortran/83740
695         * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
697 2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
699         PR fortran/83740
700         * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
701         LHS type when assigning.
703 2018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
705         PR fortran/83742
706         * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
708 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
710         * match.c (gfc_match_allocate): Check for NULL pointer.
712 2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
714         * expr.c (gfc_check_pointer_assign): Fix typo in comment.
716 2018-01-08  Paul Thomas  <pault@gcc.gnu.org>
718         PR fortran/83611
719         * decl.c (gfc_get_pdt_instance): If parameterized arrays have
720         an initializer, convert the kind parameters and add to the
721         component if the instance.
722         * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
723         use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
724         for parameterized arrays. Clean up typos in comments. Convert
725         parameterized array initializers and copy into the array.
726         * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
727         parameterized types.
728         *trans-stmt.c (trans_associate_var): Deallocate associate vars
729         as necessary, when they are PDT function results for example.
731         PR fortran/83731
732         * trans-array.c (structure_alloc_comps): Only compare len parms
733         when they are declared explicitly.
735 2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
737         PR fortran/50892
738         * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
739         lhs type.
741 2018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
743         PR fortran/78534
744         PR fortran/66310
745         * array.c (got_charlen): Use gfc_charlen_int_kind.
746         * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
747         hardcoded kind.
748         (find_intrinsic_vtab): Likewise.
749         * decl.c (match_char_length): Use gfc_charlen_int_kind.
750         (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
751         (gfc_match_implicit): Use gfc_charlen_int_kind.
752         * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
753         (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
754         * expr.c (gfc_get_character_expr): Length parameter of type
755         gfc_charlen_t.
756         (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
757         (gfc_extract_hwi): New function.
758         (simplify_const_ref): Make string_len of type gfc_charlen_t.
759         (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
760         * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
761         * gfortran.h (gfc_mpz_get_hwi): New prototype.
762         (gfc_mpz_set_hwi): Likewise.
763         (gfc_charlen_t): New typedef.
764         (gfc_expr): Use gfc_charlen_t for character lengths.
765         (gfc_size_kind): New extern variable.
766         (gfc_extract_hwi): New prototype.
767         (gfc_get_character_expr): Use gfc_charlen_t for character length.
768         (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
769         * gfortran.texi: Update description of hidden string length argument.
770         * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
771         (gfc_resolve_char_achar): Likewise.
772         (gfc_resolve_repeat): Pass string length directly without
773         temporary, use gfc_charlen_int_kind.
774         (gfc_resolve_transfer): Use gfc_charlen_int_kind.
775         * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
776         * misc.c (gfc_mpz_get_hwi): New function.
777         (gfc_mpz_set_hwi): New function.
778         * module.c (atom_int): Change type from int to HOST_WIDE_INT.
779         (parse_integer): Don't complain about large integers.
780         (write_atom): Use HOST_WIDE_INT for integers.
781         (mio_integer): Handle integer type mismatch.
782         (mio_hwi): New function.
783         (mio_intrinsic_op): Use HOST_WIDE_INT.
784         (mio_array_ref): Likewise.
785         (mio_expr): Likewise.
786         * primary.c (match_substring): Use gfc_charlen_int_kind.
787         * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
788         (resolve_character_operator): Likewise.
789         (resolve_assoc_var): Likewise.
790         (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
791         (resolve_charlen): Use mpz_sgn to determine sign.
792         * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
793         instead of long.
794         * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
795         * target-memory.c (size_character): Length argument of type
796         gfc_charlen_t.
797         (gfc_encode_character): Likewise.
798         (gfc_interpret_character): Use gfc_charlen_t.
799         * target-memory.h (gfc_encode_character): Modify prototype.
800         * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
801         (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
802         (trans_array_constructor): Use existing type.
803         (get_array_charlen): Likewise.
804         * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
805         * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
806         * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
807         (add_argument_checking): Likewise.
808         * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
809         gfc_charlen_type_node.
810         (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
811         4, fold_convert to correct type.
812         (gfc_conv_class_to_class): Build const of type size_type_node for
813         size.
814         (gfc_copy_class_to_class): Likewise.
815         (gfc_conv_string_length): Use same type in expression.
816         (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
817         (gfc_conv_string_tmp): Make sure len is of the right type.
818         (gfc_conv_concat_op): Use same type in expression.
819         (gfc_conv_procedure_call): Likewise.
820         (fill_with_spaces): Comment out memset() block due to spurious
821         -Wstringop-overflow warnings.
822         (gfc_trans_string_copy): Use gfc_charlen_type_node.
823         (alloc_scalar_allocatable_for_subcomponent_assignment):
824         fold_convert to right type.
825         (gfc_trans_subcomponent_assign): Likewise.
826         (trans_class_vptr_len_assignment): Build const of correct type.
827         (gfc_trans_pointer_assignment): Likewise.
828         (alloc_scalar_allocatable_for_assignment): fold_convert to right
829         type in expr.
830         (trans_class_assignment): Build const of correct type.
831         * trans-intrinsic.c (gfc_conv_associated): Likewise.
832         (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
833         * trans-io.c (gfc_build_io_library_fndecls): Use
834         gfc_charlen_type_node for character lengths.
835         (set_string): Convert to right type in assignment.
836         * trans-stmt.c (gfc_trans_label_assign): Build const of
837         gfc_charlen_type_node.
838         (trans_associate_var): Likewise.
839         (gfc_trans_character_select): Likewise.
840         (gfc_trans_allocate): Likewise, don't typecast strlen result.
841         (gfc_trans_deallocate): Don't typecast strlen result.
842         * trans-types.c (gfc_size_kind): New variable.
843         (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
844         from size_type_node.
845         * trans-types.h: Fix comment.
847 2018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
849         PR fortran/83683
850         PR fortran/45689
851         * check.c (gfc_check_eoshift): Check for string length and
852         for conformance of boundary.
853         * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
854         * intrinsic.h: Add prototype for gfc_simplify_eoshift.
855         * simplify.c (gfc_simplify_eoshift): New function.
857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
858             Alan Hayward  <alan.hayward@arm.com>
859             David Sherwood  <david.sherwood@arm.com>
861         * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
863 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
864             Alan Hayward  <alan.hayward@arm.com>
865             David Sherwood  <david.sherwood@arm.com>
867         * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
869 2018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
871         PR fortran/83664
872         * check.c (gfc_check_eoshift): Error for missing boundary if array
873         is not one of the standard types.
875 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
877         Update copyright years.
879         * gfortranspec.c (lang_specific_driver): Update copyright notice
880         dates.
881         * gfc-internals.texi: Bump @copying's copyright year.
882         * gfortran.texi: Ditto.
883         * intrinsic.texi: Ditto.
884         * invoke.texi: Ditto.
886 2017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
888         PR fortran/45689
889         * intrinsic.c (add_function): Add gfc_simplify_maxloc and
890         gfc_simplify_minloc to maxloc and minloc, respectively.
891         * intrinsic.h: Add prototypes for gfc_simplify_minloc
892         and gfc_simplify_maxloc.
893         * simplify.c (min_max_chose): Adjust prototype.  Modify function
894         to have a return value which indicates if the extremum was found.
895         (is_constant_array_expr): Fix typo in comment.
896         (simplify_minmaxloc_to_scalar): New function.
897         (simplify_minmaxloc_nodim): New function.
898         (new_array): New function.
899         (simplify_minmaxloc_to_array): New function.
900         (gfc_simplify_minmaxloc): New function.
901         (simplify_minloc): New function.
902         (simplify_maxloc): New function.
904 2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
906         PR fortran/45689
907         PR fortran/83650
908         * simplify.c (gfc_simplify_cshift): Re-implement to allow full
909         range of arguments.
911 2018-01-01  Paul Thomas  <pault@gcc.gnu.org>
913         PR fortran/83076
914         * resolve.c (resolve_fl_derived0): Add caf_token fields for
915         allocatable and pointer scalars, when -fcoarray selected.
916         * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
917         field as well as the backend_decl.
918         (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
919         derived types that are not vtypes. Components with caf_token
920         attribute are pvoid types. For a component requiring it, find
921         the caf_token field and have the component token field point to
922         its backend_decl.
924         PR fortran/83319
925         *trans-types.c (gfc_get_array_descriptor_base): Add the token
926         field to the descriptor even when codimen not set.
928 Copyright (C) 2018 Free Software Foundation, Inc.
930 Copying and distribution of this file, with or without modification,
931 are permitted in any medium without royalty provided the copyright
932 notice and this notice are preserved.