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