2017-09-21 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob32d3b217a98c55423e4f954f366652e6a5af0e36
1 2017-09-21  Paul Thomas  <pault@gcc.gnu.org>
3         PR fortran/52832
4         * match.c (gfc_match_associate): Before failing the association
5         try again, allowing a proc pointer selector.
7         PR fortran/80120
8         PR fortran/81903
9         PR fortran/82121
10         * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
11         points to the associate selector, if any. Go through selector
12         references, after resolution for variables, to catch any full
13         or section array references. If a class associate name does
14         not have the same declared type as the selector, resolve the
15         selector and copy the declared type to the associate name.
16         Before throwing a no implicit type error, resolve all allowed
17         selector expressions, and copy the resulting typespec.
19         PR fortran/67543
20         * resolve.c (resolve_assoc_var): Selector must cannot be the
21         NULL expression and it must have a type.
23         PR fortran/78152
24         * resolve.c (resolve_symbol): Allow associate names to be
25         coarrays.
27 2017-09-21  Cesar Philippidis  <cesar@codesourcery.com>
29         * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
30         arguments to constant integers.
32 2017-09-17  Paul Thomas  <pault@gcc.gnu.org>
34         PR fortran/82173
35         * decl.c (gfc_get_pdt_instance): Use the component initializer
36         expression for the default, rather than the parameter value.
37         * resolve.c (resolve_pdt): New function.
38         (resolve_symbol): Call it. Remove false error, prohibiting
39         deferred type parameters for dummy arguments.
41         PR fortran/60483
42         * primary.c (gfc_match_varspec): If the type of an associate
43         name is unknown and yet there is a match, try resolving the
44         target expression and using its type.
46 2017-09-15  Paul Thomas  <pault@gcc.gnu.org>
48         PR fortran/82184
49         trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
50         field if the symbol is either implicitly or explicitly saved.
52 2017-09-13  Paul Thomas  <pault@gcc.gnu.org>
54         PR fortran/82173
55         * decl.c (match_char_kind): If the kind expression is
56         parameterized, save it in saved_kind_expr and set kind = 0.
57         (gfc_get_pdt_instance): Resolve and simplify before emitting
58         error on expression kind. Insert a missing simplification after
59         insertion of kind expressions.
61 2017-09-12  Paul Thomas  <pault@gcc.gnu.org>
63         PR fortran/82173
64         PR fortran/82168
65         * decl.c (variable_decl): Check pdt template components for
66         appearance of KIND/LEN components in the type parameter name
67         list, that components corresponding to type parameters have
68         either KIND or LEN attributes and that KIND or LEN components
69         are scalar. Copy the initializer to the parameter value.
70         (gfc_get_pdt_instance): Add a label 'error_return' and follow
71         it with repeated code, while replacing this code with a jump.
72         Check if a parameter appears as a component in the template.
73         Make sure that the parameter expressions are integer. Validate
74         KIND expressions.
75         (gfc_match_decl_type_spec): Search for pdt_types in the parent
76         namespace since they are instantiated in the template ns.
77         * expr.c (gfc_extract_int): Use a KIND parameter if it
78         appears as a component expression.
79         (gfc_check_init_expr): Allow expressions with the pdt_kind
80         attribute.
81         *primary.c (gfc_match_actual_arglist): Make sure that the first
82         keyword argument is recognised when 'pdt' is set.
84 2017-09-10  Paul Thomas  <pault@gcc.gnu.org>
86         PR fortran/34640
87         PR fortran/40737
88         PR fortran/55763
89         PR fortran/57019
90         PR fortran/57116
92         * expr.c (is_subref_array): Add class pointer array dummies
93         to the list of expressions that return true.
94         * trans-array.c: Add SPAN_FIELD and update indices for
95         subsequent fields.
96         (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
97         gfc_conv_descriptor_span_set, is_pointer_array,
98         get_array_span): New functions.
99         (gfc_get_descriptor_offsets_for_info): New function to preserve
100         API for access to descriptor fields for trans-types.c.
101         (gfc_conv_scalarized_array_ref): If the expression is a subref
102         array, make sure that info->descriptor is a descriptor type.
103         Otherwise, if info->descriptor is a pointer array, set 'decl'
104         and fix it if it is a component reference.
105         (build_array_ref): Simplify handling of class array refs by
106         passing the vptr to gfc_build_array_ref rather than generating
107         the pointer arithmetic in this function.
108         (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
109         'decl'.
110         (gfc_array_allocate): Set the span field if this is a pointer
111         array. Use the expr3 element size if it is available, so that
112         the dynamic type element size is used.
113         (gfc_conv_expr_descriptor): Set the span field for pointer
114         assignments.
115         * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
116         gfc_conv_descriptor_span_set and
117         gfc_get_descriptor_offsets_for_info added.
118         trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
119         array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
120         the setting of GFC_DECL_SPAN.
121         (gfc_trans_deferred_vars): Set the span field to zero in thge
122         originating scope.
123         * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
124         copy-out to pass subref expressions to a pointer dummy.
125         (gfc_trans_pointer_assignment): Remove code for setting of
126         GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
127         class function results. Likewise for rank remap. In the case
128         that the target is not a whole array, use the target array ref
129         for remap and, since the 'start' indices are missing, set the
130         lbounds to one, as required by the standard.
131         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
132         'token' offset from the field decl in the descriptor.
133         (conv_isocbinding_subroutine): Set the 'span' field.
134         * trans-io.c (gfc_trans_transfer): Always scalarize pointer
135         array io.
136         * trans-stmt.c (trans_associate_var): Set the 'span' field.
137         * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
138         field to the array descriptor.
139         (gfc_get_derived_type): Pointer array components are marked as
140         GFC_DECL_PTR_ARRAY_P.
141         (gfc_get_array_descr_info): Replaced API breaking code for
142         descriptor offset calling gfc_get_descriptor_offsets_for_info.
143         * trans.c (get_array_span): New function.
144         (gfc_build_array_ref): Simplify by calling get_array_span and
145         obtain 'span' if 'decl' or 'vptr' present.
146         * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
147         as GFC_DECL_PTR_ARRAY_P.
149 2017-09-09  Paul Thomas  <pault@gcc.gnu.org>
151         * decl.c : Add decl_type_param_list, type_param_spec_list as
152         static variables to hold PDT spec lists.
153         (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
154         (build_struct): Copy the 'saved_kind_expr' to the component
155         'kind_expr'. Check that KIND or LEN components appear in the
156         decl_type_param_list. These should appear as symbols in the
157         f2k_derived namespace. If the component is itself a PDT type,
158         copy the decl_type_param_list to the component param_list.
159         (gfc_match_kind_spec): If the KIND expression is parameterized
160         set KIND to zero and store the expression in 'saved_kind_expr'.
161         (insert_parameter_exprs): New function.
162         (gfc_insert_kind_parameter_exprs): New function.
163         (gfc_insert_parameter_exprs): New function.
164         (gfc_get_pdt_instance): New function.
165         (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
166         is present. If it is, call 'gfc_get_pdt_instance' to obtain the
167         specific instance of the PDT.
168         (match_attr_spec): Match KIND and LEN attributes. Check for the
169         standard and for type/kind of the parameter. They are also not
170         allowed outside a derived type definition.
171         (gfc_match_data_decl): Null the decl_type_param_list and the
172         type_param_spec_list on entry and free them on exit.
173         (gfc_match_formal_arglist): If 'typeparam' is true, add the
174         formal symbol to the f2k_derived namespace.
175         (gfc_match_derived_decl): Register the decl_type_param_list
176         if this is a PDT. If this is a type extension, gather up all
177         the type parameters and put them in the right order.
178         *dump-parse-tree.c (show_attr): Signal PDT templates and the
179         parameter attributes.
180         (show_components): Output parameter atrributes and component
181         parameter list.
182         (show_symbol): Show variable parameter lists.
183         * expr.c (expr.c): Copy the expression parameter list.
184         (gfc_is_constant_expr): Pass on symbols representing PDT
185         parameters.
186         (gfc_check_init_expr): Break on PDT KIND parameters and
187         PDT parameter expressions.
188         (gfc_check_assign): Assigning to KIND or LEN components is an
189         error.
190         (derived_parameter_expr): New function.
191         (gfc_derived_parameter_expr): New function.
192         (gfc_spec_list_type): New function.
193         * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
194         to the structure symbol_attr. Add the 'kind_expr' and
195         'param_list' field to the gfc_component structure. Comment on
196         the reuse of the gfc_actual_arglist structure as storage for
197         type parameter spec lists. Add the new field 'spec_type' to
198         this structure. Add 'param_list' fields to gfc_symbol and
199         gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
200         gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
201         gfc_derived_parameter_expr and gfc_spec_list_type.
202         * interface.c (gfc_compare_derived_types): Treat PDTs in the
203         same way as sequence types.
204         * match.c : Add variable 'type_param_spec_list'.
205         (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
206         trailing whitespace.
207         (match_derived_type_spec): Match PDTs and find specific
208         instance.
209         (gfc_match_type_spec): Remove more trailing whitespace.
210         (gfc_match_allocate): Assumed or deferred parameters cannot
211         appear here. Copy the type parameter spec list to the expr for
212         the allocatable entity. Free 'type_param_spec_list'.
213         (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
214         more trailing whitespace to remove.
215         (gfc_match_type_is): Allow PDT typespecs.
216         * match.h : Modify prototypes for gfc_match_formal_arglist and
217         gfc_match_actual_arglist.
218         * module.c (ab_attribute, mstring attr_bits): PDT attributes
219         added.
220         (mio_symbol_attribute): PDT attributes handled.
221         (mio_component): Deal with 'kind_expr' field.
222         (mio_full_f2k_derived): For PDT templates, transfer the formal
223         namespace symroot to the f2k_derived namespace.
224         *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
225         modifications to handle PDT spec lists. These are flagged in
226         both cases by new boolean arguments, whose prototype defaults
227         are false.
228         (gfc_match_structure_constructor, match_variable): Remove yet
229         more trailing whitespace.
230         * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
231         functions.
232         (resolve_structure_cons): If the constructor is a PDT template,
233         call get_pdt_constructor to build it using the parameter lists
234         and then get the specific instance of the PDT.
235         (resolve_component): PDT strings need a hidden string length
236         component like deferred characters.
237         (resolve_symbol): Dummy PDTs cannot have deferred parameters.
238         * symbol.c (gfc_add_kind, gfc_add_len): New functions.
239         (free_components): Free 'kind_expr' and 'param_list' fields.
240         (gfc_free_symbol): Free the 'param_list' field.
241         (gfc_find_sym_tree): If the current state is a PDT template,
242         look for the symtree in the f2k_derived namspaces.
243         trans-array.c (structure_alloc_comps): Allocate and deallocate
244         PDTs. Check dummy arguments for compliance of LEN parameters.
245         Add the new functions to the preceeding enum.
246         (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
247         gfc_check_pdt_dummy): New functions calling above.
248         * trans-array.h : Add prototypes for these functions.
249         trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
250         as appropriate for PDT symbols.
251         (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
252         they come into and out of scope. Exclude pdt_types from being
253         'gcc_unreachable'.
254         (gfc_trans_subcomponent_assign): PDT array components must be
255         handles as if they are allocatable.
256         * trans-stmt.c (gfc_trans_allocate): Handle initialization of
257         PDT entities.
258         (gfc_trans_deallocate): Likewise.
259         * trans-types.c (gfc_get_derived_type): PDT templates must not
260         arrive here. PDT string components are handles as if deferred.
261         Similarly, PDT arrays are treated as if allocatable. PDT
262         strings are pointer types.
263         * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
264         way as deferred characters.
266 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
268         PR c/81887
269         * parse.c (decode_omp_directive): Use matchs instead of matcho for
270         end ordered and ordered directives, except for ordered depend.  For
271         -fopenmp-simd and ordered depend, reject the stmt.
272         * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
273         threads clause and if simd clause isn't present, just translate the
274         body.
276 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
277             Alan Hayward  <alan.hayward@arm.com>
278             David Sherwood  <david.sherwood@arm.com>
280         * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
281         the mode iterator.
283 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
284             Alan Hayward  <alan.hayward@arm.com>
285             David Sherwood  <david.sherwood@arm.com>
287         * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
288         (size_logical): Likewise.
290 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
291             Alan Hayward  <alan.hayward@arm.com>
292             David Sherwood  <david.sherwood@arm.com>
294         * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
296 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
297             Alan Hayward  <alan.hayward@arm.com>
298             David Sherwood  <david.sherwood@arm.com>
300         * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
301         and FOR_EACH_MODE_IN_CLASS.
303 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
304             Alan Hayward  <alan.hayward@arm.com>
305             David Sherwood  <david.sherwood@arm.com>
307         * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
308         instead of TYPE_MODE.
310 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
311             Alan Hayward  <alan.hayward@arm.com>
312             David Sherwood  <david.sherwood@arm.com>
314         * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
315         for "mode".
317 2017-08-28  Janus Weil  <janus@gcc.gnu.org>
319         PR fortran/81770
320         * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
321         may outlive pointer target.
323 2017-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
325         PR fortran/81974
326         * frontend-passes (inline_matumul_assign):  Explicity
327         set typespec for call to CONJG.
329 2017-08-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
331         PR fortran/81296
332         * trans-io.c (get_dtio_proc): Add check for format label and set
333         formatted flag accordingly. Reorganize the code a little.
335 2017-08-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
337         PR fortran/81116
338         * frontend-passes.c (realloc_string_callback): If expression is a
339         concatenation, also check for dependency.
340         (constant_string_length): Check for presence of symtree.
342 2017-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
344         * gfortran.texi: Document format of unformatted sequential files.
346 2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
348         * invoke.texi:  Actually commit change about -Ofast.
350 2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
352         PR fortran/60355
353         * resolve.c (resolve_symbol): Adjust (and reformat)
354         comment.  Perform check if a BIND(C) is declared
355         at module level regardless of whether it is typed
356         implicitly or not.
358 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
360         * options.c (set_dec_flags): Only set legacy standards when value
361         is not zero.
363 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
365         * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
366         with -fdec when not set by user.
368 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
370         * decl.c (attr_seen): New static variable.
371         * decl.c (variable_decl): Match %FILL in STRUCTURE body.
372         * gfortran.texi: Update documentation.
374 2017-08-08  Martin Liska  <mliska@suse.cz>
376         * trans-types.c: Include header files.
378 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
380         PR fortran/68829
381         PR fortran/81701
382         * options.c: Make -Ofast honor -fmax-stack-var-size.
383         * invoke.texi: Document change.
385 2017-08-01  Thomas König  <tkoenig@gcc.gnu.org>
387         PR fortran/79312
388         * intrisic.c (gfc_convert_type_warn):  Only set typespec for
389         empty array constructors which don't have it already.
391 2017-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
393         PR fortran/45435
394         * lang.opt (fc-prototypes): Add option.
395         * gfortran.h (gfc_typespec): Add interop_kind to struct.
396         (gfc_dump_c_prototypes): Add prototype.
397         * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
398         * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
399         * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
400         (type_return): New enum.
401         (get_c_type_name): New function.
402         (write_decl): New function.
403         (write_type): New function.
404         (write_variable): New function.
405         (write_proc): New function.
406         (write_interop_decl): New function.
407         * invoke.texi: Document -fc-prototypes.
409 2017-08-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
411         PR fortran/53542
412         * expr.c (gfc_check_init_expr): Use the renamed name.
414 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
416         * check.c (gfc_check_num_images): Fix a pasto.
418 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
420         * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
421         the imported_module_or_decl debug hook.
423 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
425         * resolve.c (find_reachable_labels): Adjust.
427 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
429         * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
431 2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
433         * dump-parse-tree.c (show_symbol):  Show binding label if present.
435 2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
436             Mikael Morin  <mikael@gcc.gnu.org>
438         PR fortran/66102
439         * fortran/trans-array.c (gfc_conv_resolve_dependencies):
440         Break if dependency has been found.
442 2017-07-23  Alexander Monakov  <amonakov@ispras.ru>
444         * interface.c (pair_cmp): Fix gfc_symbol comparison.  Adjust comment.
446 2017-07-18  Nathan Sidwell  <nathan@acm.org>
448         * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
450 2017-07-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
452         PR fortran/81341
453         * class.c (class_array_ref_detected): Remove a redundant
454         condition.
456 2017-07-06  Harald Anlauf  <anlauf@gmx.de>
458         PR fortran/70071
459         * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
461 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
463         PR fortran/79866
464         * resolve.c (resolve_symbol): Fix typo.
466 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
468         PR fortran/79843
469         * symbol.c (check_conflict): Add missing "conflicts".
471 2017-06-29  Cesar Philippidis  <cesar@codesourcery.com>
473         PR fortran/77765
474         * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
475         comparing the routine name against it.
477 2017-06-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
479         PR fortran/80164
480         * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
481         as warning/error locus.
483 2017-06-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
485         PR fortran/81160
486         * arith.c (wprecision_int_real): Set return value before
487         mpz_clear and then return after it.
489 2017-06-15  Janus Weil  <janus@gcc.gnu.org>
491         PR fortran/80983
492         * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
493         scalar allocatable procedure-pointer components.
495 2017-06-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
497         PR fortran/80988
498         * frontend-passes.c (traverse_io_block):  Also
499         check for variables occurring as indices multiple
500         time in a single implied DO loop.
502 2017-06-05  Janus Weil  <janus@gcc.gnu.org>
504         PR fortran/70601
505         * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
506         function results.
508 2017-06-05  Nicolas Koenig  <koenigni@student.ethz.ch>
510         PR fortran/35339
511         * frontend-passes.c (traverse_io_block): New function.
512         (simplify_io_impl_do): New function.
513         (optimize_namespace): Invoke gfc_code_walker with
514         simplify_io_impl_do.
516 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
518         PR fortran/80918
519         * openmp.c (resolve_omp_clauses): Fix a typo.
521 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
523         * error.c (gfc_format_decoder): Update for new bool and
524         const char ** params.
526 2017-05-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
528         PR fortran/37131
529         * frontend-passes.c (check_conjg_transpose_variable):
530         Add prototype.
531         (has_dimen_vector_ref):  Likewise
532         (matmul_temp_args):  New function. Add prototype.
533         (optimize_namespace):  Call matmul_temp_args.
535 2017-05-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
537         * frontend-passes.c (matmul_lhs_realloc):  Correct
538         allocation size for case A1B2.
540 2017-05-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
542         * dump-parse-tree.c (show_expr):  Also replace
543         with dumpfile for showing values for forgotten
544         case.
546 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
548         * dump-parse-tree.c (show_expr):  Replace stdout
549         with dumpfile for showing values.
551 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
553         PR fortran/66094
554         * frontend-passes.c (matrix_case):  Add A2TB2.
555         (inline_limit_check):  Handle MATMUL(TRANSPOSE(A),B)
556         (inline_matmul_assign):  Likewise.
558 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
560         * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
561         "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
563 2017-05-22  Janus Weil  <janus@gcc.gnu.org>
565         PR fortran/80766
566         * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
567         properly resolved.
569 2017-05-19  Paul Thomas  <pault@gcc.gnu.org>
571         PR fortran/80333
572         * trans-io.c (nml_get_addr_expr): If we are dealing with class
573         type data set tmp tree to get that address.
574         (transfer_namelist_element): Set the array spec to point to the
575         the class data.
577 2017-05-19  David Malcolm  <dmalcolm@redhat.com>
579         PR fortran/79852
580         * bbt.c (insert): Remove trailing exclamation mark from message.
581         * decl.c (gfc_match_final_decl): Likewise.
582         * dump-parse-tree.c (show_expr): Likewise.
583         * module.c (gfc_use_module): Likewise.
584         * primary.c (build_actual_constructor): Likewise.
585         (gfc_convert_to_structure_constructor): Likewise.
587 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
589         * gfortran.h (enum gfc_omp_default_sharing): Add
590         "OMP_DEFAULT_PRESENT".
591         * dump-parse-tree.c (show_omp_clauses): Handle it.
592         * openmp.c (gfc_match_omp_clauses): Likewise.
593         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
595 2017-05-18  Fritz Reese <fritzoreese@gmail.com>
597         PR fortran/79968
598         * decl.c (match_attr_spec, gfc_match_automatic,
599         gfc_match_static, gfc_match_structure_decl): Unify diagnostic
600         errors regarding -fdec options.
601         * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
603 2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
605         PR fortran/80741
606         * trans-io.c (transfer_namelist_element): Change check from
607         NULL_TREE to null_pointer_node.
609 2017-05-17  Fritz Reese <fritzoreese@gmail.com>
611         PR fortran/80668
612         * expr.c (component_initializer): Don't generate initializers for
613         pointer components.
614         * invoke.texi (-finit-derived): Document.
616 2017-05-16  Paul Thomas  <pault@gcc.gnu.org>
618         PR fortran/80554
619         * decl.c (build_sym): In a submodule allow overriding of host
620         associated symbols from the ancestor module with a new
621         declaration.
623 2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>
625         PR fortran/80674
626         * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
628 2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>
630         PR fortran/80752
631         * expr.c (gfc_generate_initializer):  If type conversion fails,
632         check for error and return NULL.
634 2017-05-14  Nicolas Koenig  <koenigni@student.ethz.ch>
636         PR fortran/80442
637         * array.c (gfc_ref_dimen_size): Simplify stride
638         expression
639         * data.c (gfc_advance_section): Simplify start,
640         end and stride expressions
641         (gfc_advance_section): Simplify start and end
642         expressions
643         (gfc_get_section_index): Simplify start expression
645 2017-05-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
647         * io.c (gfc_resolve_dt): Fix returns to bool type.
649 2017-05-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
651         PR fortran/78659
652         * io.c (dtio_procs_present): Add new function to check for DTIO
653         procedures relative to I/O statement READ or WRITE.
654         (gfc_resolve_dt): Add namelist checks using the new function.
655         * resolve.c (dtio_procs_present): Remove function and related
656         namelist checks. (resolve_fl_namelist): Add check specific to
657         Fortran 95 restriction on namelist objects.
659 2017-05-11  Nathan Sidwell  <nathan@acm.org>
661         * trans-decl.c: Include dumpfile.h not tree-dump.h,
663 2017-05-09  Janus Weil  <janus@gcc.gnu.org>
665         PR fortran/79311
666         * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
667         components have a their finalizers resolved, also if the superordinate
668         type itself has a finalizer.
670 2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
672         PR fortran/79930
673         * frontend-passes.c (matmul_to_var_expr): New function,
674         add prototype.
675         (matmul_to_var_code):  Likewise.
676         (optimize_namespace):  Use them from gfc_code_walker.
678 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
680         * cpp.c (cb_cpp_error): Replace report_diagnostic
681         with diagnostic_report_diagnostic.
682         * error.c (gfc_warning): Likewise.
683         (gfc_warning_now_at): Likewise.
684         (gfc_warning_now): Likewise.
685         (gfc_warning_internal): Likewise.
686         (gfc_error_now): Likewise.
687         (gfc_fatal_error): Likewise.
688         (gfc_error_opt): Likewise.
689         (gfc_internal_error): Likewise.
691 2017-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
693         PR fortran/37131
694         * frontend-passes.c (inline_matmul_assign): Also check bounds
695         for allocatable lhs and matrix-vector-multiplication.
697 2017-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
699         PR fortran/80484
700         * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
701         (check_format): Move FMT_DT checking code to data_desc section.
702         * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
704 2017-04-22  Janus Weil  <janus@gcc.gnu.org>
706         PR fortran/80121
707         * trans-types.c (gfc_conv_procedure_call): Deallocate the components
708         of allocatable intent(out) arguments.
710 2017-04-21  Janus Weil  <janus@gcc.gnu.org>
712         PR fortran/80392
713         * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
714         building a derived type that includes a procedure pointer component
715         with a polymorphic result.
717 2017-04-17  Paul Thomas  <pault@gcc.gnu.org>
719         PR fortran/80440
720         * module.c (find_symtree_for_symbol): Delete.
721         (read_module): Remove the call to the above.
723 2017-04-14  Janus Weil  <janus@gcc.gnu.org>
725         PR fortran/80361
726         * class.c (generate_finalization_wrapper): Give the finalization wrapper
727         the recursive attribute.
729 2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>
730             Paul Thomas  <pault@gcc.gnu.org>
732         PR fortran/69498
733         * module.c (gfc_match_submodule): Add error
734         if function is called in the wrong state.
736 2017-04-10  Janus Weil  <janus@gcc.gnu.org>
738         PR fortran/80046
739         * expr.c (gfc_check_pointer_assign): Check if procedure pointer
740         components in a pointer assignment need an explicit interface.
742 2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
744         PR fortran/69498
745         * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
746         everything before it.
748 2017-03-28  Janus Weil  <janus@gcc.gnu.org>
750         PR fortran/78661
751         * trans-io.c (transfer_namelist_element): Perform a polymorphic call
752         to a DTIO procedure if necessary.
754 2017-03-25  Paul Thomas  <pault@gcc.gnu.org>
756         PR fortran/80156
757         PR fortran/79382
758         * decl.c (access_attr_decl): Remove the error for an absent
759         generic DTIO interface and ensure that symbol has the flavor
760         FL_PROCEDURE.
762 2017-03-22  Dominique d'Humieres  <dominiq@lps.ens.fr>
764         PR fortran/79838
765         * module.c: Remove trailing period.
767 2017-03-22  Dominique d'Humieres  <dominiq@lps.ens.fr>
769         PR fortran/79602
770         * decl.c: Replace '%s' with %qs.
771         * expr.c: Likewise.
772         * interface.c: Likewise.
773         * match.c: Likewise.
774         * primary.c: Likewise.
775         * resolve.c: Likewise.
777         PR fortran/79844
778         PR fortran/80011
779         * io.c: Remove trailing spaces.
780         * match.c: Likewise.
781         * openmp.c: Likewise.
782         * resolve.c: Likewise.
783         * trans-intrinsic.c: Likewise.
785         PR fortran/79853
786         * expr.c: Remove a double spaces.
788         PR fortran/79859
789         * primary.c: Remove spurious quotes around %qs.
791 2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
793         PR fortran/80142
794         * frontend-passes.c (combine_array_constructor): Take
795         location of new expression from constructor expression instead
796         of constructor.
798 2017-03-20  Nicolas Koenig  <koenigni@student.ethz.ch>
800         PR fortran/39239
801         * symbol.c (check_conflict): Report an error if an EQUIVALENCE
802         object is BIND(C)
804 2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
806         PR fortran/69498
807         * decl.c (add_hidden_procptr_result): Fixed Refs count of the
808         created "ppr@" symbol.
810 2017-03-18  Paul Thomas  <pault@gcc.gnu.org>
812         PR fortran/79676
813         * module.c (mio_symbol_attribute): Remove reset of the flag
814         'no_module_procedures'.
815         (check_for_module_procedures): New function. Move declaration
816         of 'no_module_procedures' to above it.
817         (gfc_dump_module): Traverse namespace calling new function.
819 2017-03-18  Paul Thomas  <pault@gcc.gnu.org>
821         PR fortran/71838
822         * symbol.c (check_conflict): A dummy procedure in a submodule,
823         module procedure is not an error.
824         (gfc_add_flavor): Ditto.
826 2017-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
828         PR fortran/79841
829         * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
831 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
833         PR fortran/80010
834         * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
835         and ST_OACC_END_ATOMIC, instead of !ACC.
836         * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
837         * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
838         gfc_resolve_oacc_declare): Likewise.
840         PR fortran/79886
841         * error.c (gfc_format_decoder): Rename plus argument to set_locus,
842         remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
843         if not a Fortran specific spec.
844         * trans-io.c: Include options.h.
845         (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
846         of artificial IO data structures.
848 2017-03-15  David Malcolm  <dmalcolm@redhat.com>
850         PR fortran/79860
851         * resolve.c (resolve_contained_fntype): Make error messages more
852         amenable to translation.
854 2017-03-06  Richard Biener  <rguenther@suse.de>
856         PR fortran/79894
857         * trans.c (gfc_add_modify_loc): Weaken assert.
859 2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>,
860             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
862         * check.c (positive_check): Add new function checking constant for
863         being greater then zero.
864         (gfc_check_image_status): Add checking of image_status arguments.
865         (gfc_check_failed_or_stopped_images): Same but for failed_- and
866         stopped_images function.
867         * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
868         * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
869         (enum gfc_isym_id): Added new intrinsic symbols.
870         (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
871         * gfortran.texi: Added description for the new API functions. Updated
872         coverage of gfortran of TS18508.
873         * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
874         functions.
875         * intrinsic.h: Added prototypes.
876         * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
877         intrinsic.
878         (gfc_resolve_image_status): Same for image_status.
879         (gfc_resolve_stopped_images): Same for stopped_images.
880         * libgfortran.h: Added prototypes.
881         * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
882         (gfc_match_fail_image): Match a FAIL IMAGE statement.
883         * match.h: Added prototype.
884         * parse.c (decode_statement): Added matching for FAIL IMAGE.
885         (next_statement): Same.
886         (gfc_ascii_statement): Same.
887         * resolve.c: Same.
888         * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
889         single a constant result can be returne.d
890         (gfc_simplify_image_status): For COARRAY=single the result is constant.
891         * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
892         * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
893         new intrinsics.
894         * trans-expr.c (gfc_conv_procedure_call): This is first time all
895         arguments of a function are optional, which is now handled here
896         correctly.
897         * trans-intrinsic.c (conv_intrinsic_image_status): Translate
898         image_status.
899         (gfc_conv_intrinsic_function): Add support for image_status.
900         (gfc_is_intrinsic_libcall): Add support for the remaining new
901         intrinsics.
902         * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
903         * trans-stmt.h: Add the prototype for the above.
904         * trans.c (trans_code): Dispatch for fail_image.
905         * trans.h: Add the trees for the new intrinsics.
907 2017-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
909         PR fortran/79841
910         * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
912 2017-02-28  Paul Thomas  <pault@gcc.gnu.org>
914         PR fortran/79739
915         * resolve.c (resolve_fl_procedure): Deal with the case where
916         'submodule_name' is NULL so that gfc_error does not ICE.
917         Reformat the error message to make it more consistent.
919 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
921         * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
922         instead of just cond ? "..." : "...".
923         * scanner.c (gfc_next_char_literal): Likewise.
924         * match.c (match_exit_cycle): Likewise.
926 2017-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
928         PR fortran/51119
929         * options.c (gfc_post_options): Set default limit for matmul
930         inlining to 30.
931         * invoke.texi: Document change.
933 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
935         PR fortran/79601
936         * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
937         to 'INTENT'.
939 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
941         PR fortran/79597
942         * interface.c (gfc_match_end_interface): Remove spurious comma
943         and space, replace 'got %s' with 'got %qs'.
945 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
947         PR fortran/79599
948         * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
949         missing from error message.
951 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
953         PR fortran/79523
954         * interface.c (gfc_find_typebound_dtio_proc): Guard test for
955         flavor attribute by checking that symbol is resolved.
957 2017-02-16  Paul Thomas  <pault@gcc.gnu.org>
959         PR fortran/79382
960         * decl.c (access_attr_decl): Test for presence of generic DTIO
961         interface and emit error if not present.
963 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
965         PR fortran/79434
966         * parse.c (check_component, parse_union): Whitespace.
967         (set_syms_host_assoc): For a derived type, check if the module
968         in which it was declared is one of the submodule ancestors. If
969         it is, make the components public. Otherwise, reset attribute
970         'host_assoc' and set 'use-assoc' so that encapsulation is
971         preserved.
973 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
975         PR fortran/79447
976         * decl.c (gfc_set_constant_character_len): Whitespace.
977         (gfc_match_end): Catch case where a procedure is contained in
978         a module procedure and ensure that 'end procedure' is the
979         correct termination.
981 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
983         PR fortran/79402
984         * resolve.c (fixup_unique_dummy): New function.
985         (gfc_resolve_expr): Call it for dummy variables with a unique
986         symtree name.
988 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
990         PR fortran/79229
991         * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
992         compiling with -fcheck=mem to check the pointer and not the data.
994 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
996         PR fortran/79335
997         * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
998         passed are properly initialized.
999         (structure_alloc_comps): Same.
1000         * trans-expr.c (gfc_trans_structure_assign): Same.
1002 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1004         * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1006 2017-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1008         PR fortran/65542
1009         * intrinsic.c (gfc_intrinsic_func_interface):  Return an error
1010         for -std=f95 for disallowed transformational functions in
1011         initialization expressions.
1013 2017-02-09  Cesar Philippidis  <cesar@codesourcery.com>
1014             Joseph Myers  <joseph@codesourcery.com>
1016         * openmp.c (resolve_omp_clauses): Error on directives
1017         containing both tile and collapse clauses.
1018         (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1019         * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1020         collapsed loops.
1022 2017-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1024         * trans-types.c (gfc_get_int_kind_from_width_isofortranen):  Choose
1025         REAL type with the widest precision if two (or more) have the same
1026         storage size.
1028 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1030         PR fortran/79344
1031         * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1032         the temporary, when a new object was created for the temporary.  Not
1033         when it is just an alias to an existing object.
1035 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1037         PR fortran/79335
1038         * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1039         attributes before using them.
1041 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1043         PR fortran/78958
1044         * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1045         component of unlimited polymorphic objects when source-allocating.
1047 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1049         PR fortran/79230
1050         * trans-array.c (structure_alloc_comps): Ignore pointer components when
1051         freeing structures.
1053 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1055         PR lto/79061
1056         * f95-lang.c (gfc_create_decls): Include stringpool.h.
1057         Pass main_input_filename to build_translation_unit_decl.
1059 2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>
1061         * arith.c (arith_power):  If simplifying integer power expression
1062         to zero, warn if -Winteger-division is given.
1064 2017-01-22  Jakub Jelinek  <jakub@redhat.com>
1066         PR fortran/79154
1067         * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1068         with { ret = st; goto finish; }.
1069         (decode_omp_directive): Allow declare simd, declare target and
1070         simd directives in PURE/ELEMENTAL procedures.  Only call
1071         gfc_unset_implicit_pure on successful match of other procedures.
1073 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
1075         * gfc-internals.texi (Symbol Versioning): Change references
1076         to www.akkadia.org to https.
1078 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
1080         * gfortran.h (gfc_extract_int): Change return type to bool.  Add
1081         int argument with = 0.
1082         * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1083         1 as new last argument to it, don't emit gfc_error.
1084         (match_char_kind): Likewise.
1085         (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1086         gfc_get_string (x).
1087         (gfc_match_derived_decl, match_binding_attributes): Likewise.
1088         (gfc_match_structure_decl): Don't sprintf back to name, call
1089         get_struct_decl directly with gfc_dt_upper_string (name) result.
1090         * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1091         instead of gfc_get_string (x).
1092         * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1093         gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1094         mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1095         load_omp_udrs, load_needed, read_module, dump_module,
1096         create_intrinsic_function, import_iso_c_binding_module,
1097         create_int_parameter, create_int_parameter_array, create_derived_type,
1098         use_iso_fortran_env_module): Likewise.
1099         * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1100         pp_verbatim (context->printer, "%s", x) instead of
1101         pp_verbatim (context->printer, x).
1102         * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1103         1 as new last argument to it, don't emit gfc_error.
1104         (gfc_match_small_int_expr): Likewise.
1105         * iresolve.c (gfc_get_string): Optimize format "%s" case.
1106         (resolve_bound): Use gfc_get_string ("%s", x) instead of
1107         gfc_get_string (x).
1108         (resolve_transformational): Formatting fix.
1109         (gfc_resolve_char_achar): Change name argument to bool is_achar,
1110         use a single format string and if is_achar add "a" before "char".
1111         (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1112         * expr.c (gfc_extract_int): Change return type to bool, return true
1113         if some error occurred.  Add REPORT_ERROR argument, if non-zero
1114         call either gfc_error or gfc_error_now depending on its sign.
1115         * arith.c (arith_power): Adjust gfc_extract_int caller.
1116         * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1117         of gfc_get_string (x).
1118         (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1119         gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1120         * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1121         -1 as new last argument to it, don't emit gfc_error_now.
1122         (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1123         instead of gfc_get_string (x).
1124         * check.c (kind_check): Adjust gfc_extract_int caller.
1125         * intrinsic.c (add_sym, find_sym, make_alias): Use
1126         gfc_get_string ("%s", x) instead of gfc_get_string (x).
1127         * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1128         gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1129         gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1130         Adjust gfc_extract_int callers.
1131         * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1132         instead of gfc_get_string (x).
1133         * matchexp.c (expression_syntax): Add const.
1134         * primary.c (match_kind_param, match_hollerith_constant,
1135         match_string_constant): Adjust gfc_extract_int callers.
1136         (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1137         gfc_get_string (x).
1138         * frontend-passes.c (optimize_minmaxloc): Likewise.
1140 2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1142         PR fortran/70696
1143         * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1144         function only, when the decl-context is not the translation unit.
1146 2017-01-18  Louis Krupp  <louis.krupp@zoho.com>
1148         PR fortran/50069
1149         PR fortran/55086
1150         * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1151         as function arguments.
1152         * trans-stmt.c (forall_make_variable_temp,
1153         generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1154         gfc_trans_forall_1): Don't adjust offset of forall temporary
1155         for array sections, make forall temporaries work for substring
1156         expressions, improve test coverage by adding -ftest-forall-temp
1157         option to request usage of temporary array in forall code.
1158         * lang.opt: Add -ftest-forall-temp option.
1159         * invoke.texi: Add -ftest-forall-temp option.
1161 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1163         * primary.c (caf_variable_attr): Improve figuring whether the current
1164         component is the last one refed.
1165         * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1166         when allocating pointer or allocatable components.
1168 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1170         * gfortran.texi: Add missing parameters to caf-API functions.  Correct
1171         typos and clarify some descriptions.
1173 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1175         PR fortran/70696
1176         Missed some cases, here they are:
1177         * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1178         parent function's scope.
1179         * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code.  Remove
1180         unnecessary assert.
1182 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1184         PR fortran/70697
1185         * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1186         event's until_count.
1188 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1190         PR fortran/70696
1191         * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1192         is valid before accessing it.
1194 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
1196         PR translation/79019
1197         PR translation/79020
1198         * decl.c (attr_decl1): Fix spelling in translatable string.
1199         * intrinsic.texi: Fix spelling - invokation -> invocation.
1200         * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1201         typos in descriptions.
1202         * openmp.c (resolve_omp_clauses): Add missing whitespace to
1203         translatable strings.
1205 2017-01-08  Martin Sebor  <msebor@redhat.com>
1207         PR tree-optimization/78913
1208         PR middle-end/77708
1209         * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1210         truncation for any argument.
1211         * trans-types.c (gfc_build_logical_type): Same.
1213 2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>
1215         PR fortran/78781
1216         PR fortran/78935
1217         * expr.c (gfc_check_pointer_assign): Return the same error message for
1218         rewritten coarray pointer assignments like for plain ones.
1219         * gfortran.h: Change prototype.
1220         * primary.c (caf_variable_attr): Set attributes used ones only only
1221         ones.  Add setting of pointer_comp attribute.
1222         (gfc_caf_attr): Add setting of pointer_comp attribute.
1223         * trans-array.c (gfc_array_allocate): Add flag that the component to
1224         allocate is not an ultimate coarray component.  Add allocation of
1225         pointer arrays.
1226         (structure_alloc_comps): Extend nullify to treat pointer components in
1227         coarrays correctly.  Restructure nullify to remove redundant code.
1228         (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1229         * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1230         * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1231         derived type coarrays with pointer components.
1232         * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1233         components.
1234         (trans_caf_token_assign): Handle assignment of token of scalar pointer
1235         components.
1236         (gfc_trans_pointer_assignment): Call above routine.
1237         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1238         components.
1239         (gfc_conv_intrinsic_caf_get): Likewise.
1240         (conv_caf_send): Likewise.
1241         * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1242         a coarray pre-register the tokens.
1243         (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1244         array) and deregistering it correctly.
1245         * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1246         actual codim to allow lookup of array types in the cache.
1247         (gfc_build_array_type): Likewise.
1248         (gfc_get_array_descriptor_base): Likewise.
1249         (gfc_get_array_type_bounds): Likewise.
1250         (gfc_get_derived_type): Likewise.
1251         * trans-types.h: Likewise.
1252         * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1253         of coarray components.
1254         (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1255         instead of caf_deregister.
1257 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
1259         * simplify.c (simplify_transformation_to_array): Use
1260         GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1261         #pragma GCC diagnostic {push,ignored,pop}.
1263 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
1265         * simplify.c (simplify_transformation_to_array): Silence
1266         array bounds warning.  Fix whitespace.
1268 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1270         * module.c (load_omp_udrs): Initialize name.
1272 2017-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
1274         PR fortran/78534
1275         * trans-expr.c (gfc_trans_string_copy): Rework string copy
1276         algorithm to avoid -Wstringop-overflow warning.
1278 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1280         Update copyright years.
1282         * gfortranspec.c (lang_specific_driver): Update copyright notice
1283         dates.
1284         * gfc-internals.texi: Bump @copying's copyright year.
1285         * gfortran.texi: Ditto.
1286         * intrinsic.texi: Ditto.
1287         * invoke.texi: Ditto.
1289 Copyright (C) 2017 Free Software Foundation, Inc.
1291 Copying and distribution of this file, with or without modification,
1292 are permitted in any medium without royalty provided the copyright
1293 notice and this notice are preserved.