2017-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blobf653267b8e6760dd8e747ee1b68261e85de71403
1 2017-11-03  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/82796
4         * resolve.c (resolve_equivalence): An entity in a common block within
5         a module cannot appear in an equivalence statement if the entity is
6         with a pure procedure.
8 2017-10-31  Jim Wilson  <wilson@tuliptree.org>
10         * parse.c (unexpected_eof): Call gcc_unreachable before return.
12 2017-10-30  Paul Thomas  <pault@gcc.gnu.org>
14         PR fortran/80850
15         * trans_expr.c (gfc_conv_procedure_call): When passing a class
16         argument to an unlimited polymorphic dummy, it is wrong to cast
17         the passed expression as unlimited, unless it is unlimited. The
18         correct way is to assign to each of the fields and set the _len
19         field to zero.
21 2017-10-30  Steven G. Kargl   <kargl@gcc.gnu.org>
23         * resolve.c (resolve_transfer): Set derived to correct symbol for
24         BT_CLASS.
26 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
28         * invoke.texi: Delete adb and sdb references.
30 2017-10-28  Andre Vehreschild  <vehre@gcc.gnu.org>
32         * check.c (gfc_check_co_reduce): Clarify error message.
34 2017-10-28  Paul Thomas  <pault@gcc.gnu.org>
36         PR fortran/81758
37         * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
38         must only be set if the right hand side expression is of type
39         class.
41 2017-10-27  Steven G. Kargl  <kargl@gcc.gnu.org>
43         PR fortran/82620
44         * match.c (gfc_match_allocate): Exit early on syntax error.
46 2017-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
48         PR fortran/56342
49         * simplify.c (is_constant_array_expr): If the expression is
50         a parameter array, call gfc_simplify_expr.
52 2017-10-25  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
54         * match.c (gfc_match_type_is): Fix typo in error message.
56 2017-10-21  Paul Thomas  <pault@gcc.gnu.org>
58         PR fortran/82586
59         * decl.c (gfc_get_pdt_instance): Remove the error message that
60         the parameter does not have a corresponding component since
61         this is now taken care of when the derived type is resolved. Go
62         straight to error return instead.
63         (gfc_match_formal_arglist): Make the PDT relevant errors
64         immediate so that parsing of the derived type can continue.
65         (gfc_match_derived_decl): Do not check the match status on
66         return from gfc_match_formal_arglist for the same reason.
67         * resolve.c (resolve_fl_derived0): Check that each type
68         parameter has a corresponding component.
70         PR fortran/82587
71         * resolve.c (resolve_generic_f): Check that the derived type
72         can be used before resolving the struture constructor.
74         PR fortran/82589
75         * symbol.c (check_conflict): Add the conflicts involving PDT
76         KIND and LEN attributes.
78 2017-10-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
80         * interface.c (check_sym_interfaces, check_uop_interfaces,
81         gfc_check_interfaces): Base interface_name buffer off
82         GFC_MAX_SYMBOL_LEN.
84 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
86         PR fortran/82568
87         * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
88         (gfc_resolve_omp_local_vars): New declaration.
89         * openmp.c (omp_current_ctx): Make static.
90         (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
91         and EXEC_OMP_TASKLOOP_SIMD.
92         (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
93         don't actually add any clause.  Move omp_current_ctx test
94         earlier.
95         (handle_local_var, gfc_resolve_omp_local_vars): New functions.
96         * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
97         instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
98         and EXEC_OMP_TASKLOOP_SIMD.
99         (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
100         (resolve_codes): Call gfc_resolve_omp_local_vars.
102 2017-10-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
104         * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
105         (gfc_closest_fuzzy_match): New declaration.
106         (vec_push): New definition.
107         * misc.c (gfc_closest_fuzzy_match): New definition.
108         * resolve.c: Include spellcheck.h.
109         (lookup_function_fuzzy_find_candidates): New static function.
110         (lookup_uop_fuzzy_find_candidates): Likewise.
111         (lookup_uop_fuzzy): Likewise.
112         (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
113         (gfc_lookup_function_fuzzy): New definition.
114         (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
115         * interface.c (check_interface0): Likewise.
116         (lookup_arg_fuzzy_find_candidates): New static function.
117         (lookup_arg_fuzzy ): Likewise.
118         (compare_actual_formal): Call lookup_arg_fuzzy.
119         * symbol.c: Include spellcheck.h.
120         (lookup_symbol_fuzzy_find_candidates): New static function.
121         (lookup_symbol_fuzzy): Likewise.
122         (gfc_set_default_type): Call lookup_symbol_fuzzy.
123         (lookup_component_fuzzy_find_candidates): New static function.
124         (lookup_component_fuzzy): Likewise.
125         (gfc_find_component): Call lookup_component_fuzzy.
127 2017-10-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
129         PR fortran/82567
130         * frontend-passes.c (combine_array_constructor): If an array
131         constructor is all constants and has more elements than a small
132         constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
133         times.
135 2017-10-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
137         PR fortran/79795
138         * resolve.c (resovle_symbol): Change gcc_assert to
139         sensible error message.
141 2017-10-18  Paul Thomas  <pault@gcc.gnu.org>
143         PR fortran/82550
144         * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
145         have the 'used_in_submodule' attribute should be processed by
146         'gfc_get_extern_function_decl'.
148 2017-10-16  Fritz Reese <fritzoreese@gmail.com>
150         PR fortran/82511
151         * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
153 2017-10-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
155         PR fortran/82372
156         * fortran/scanner.c (last_error_char):  New global variable.
157         (gfc_scanner_init_1): Set last_error_char to NULL.
158         (gfc_gobble_whitespace): If a character not printable or
159         not newline, issue an error.
161 2017-10-13  Paul Thomas  <pault@gcc.gnu.org>
163         PR fortran/81048
164         * resolve.c (resolve_symbol): Ensure that derived type array
165         results get default initialization.
167 2017-10-11  Nathan Sidwell  <nathan@acm.org>
169         * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
170         (gfc_cpp_add_include_path_after): Likewise.
172 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
174         * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
175         operating on trees as wide_ints.
176         * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
177         * trans-expr.c (gfc_conv_cst_int_power): Likewise.
178         * trans-intrinsic.c (trans_this_image): Likewise.
179         (gfc_conv_intrinsic_bound): Likewise.
180         (conv_intrinsic_cobound): Likewise.
182 2017-10-08  Steven G. Kargl  <kargl@gcc.gnu.org>
184         * check.c (gfc_check_x): Remove function.
185         * intrinsic.c (add_functions): Use gfc_check_fn_r.
187 2017-10-08  Paul Thomas  <pault@gcc.gnu.org>
189         PR fortran/82375
190         * module.c : Bump up MOD_VERSION to 15.
191         (mio_component): Edit comment about PDT specification list.
192         (mio_expr, mio_symbol): Include the expression and symbol PDT
193         specification lists in the same way as in mio_component.
195 2017-10-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
197         * dump_prase_tree (show_symbol): Output list of variables in
198         NAMELIST.
199         (show_code_node): Add new line for ELSE and END DO for DO
200         CONCURRENT.
201         * invoke.texi: Document that the output of
202         -fdump-fortran-original, -fdump-fortran-optimized and
203         -fdump-parse-tree is unsable and may lead to ICEs.
205 2017-10-07  Paul Thomas  <pault@gcc.gnu.org>
207         PR fortran/82375
208         * class.c (gfc_find_derived_vtab): Return NULL for a passed
209         pdt template to prevent bad procedures from being written.
210         * decl.c (gfc_get_pdt_instance): Do not use the default
211         initializer for pointer and allocatable pdt type components. If
212         the component is allocatbale, set the 'alloc_comp' attribute of
213         'instance'.
214         * module.c : Add a prototype for 'mio_actual_arglist'. Add a
215         boolean argument 'pdt'.
216         (mio_component): Call it for the parameter list of pdt type
217         components with 'pdt' set to true.
218         (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
219         mio_integer for the 'spec_type'.
220         (mio_actual_arglist): Add the boolean 'pdt' and use it in the
221         call to mio_actual_arg.
222         (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
223         'pdt' set false.
224         * resolve.c (get_pdt_spec_expr): Add the parameter name to the
225         KIND parameter error.
226         (get_pdt_constructor): Check that cons->expr is non-null.
227         * trans-array.c (structure_alloc_comps): For deallocation of
228         allocatable components, ensure that parameterized components
229         are deallocated first. Likewise, when parameterized components
230         are allocated, nullify allocatable components first. Do not
231         recurse into pointer or allocatable pdt components while
232         allocating or deallocating parameterized components. Test that
233         parameterized arrays or strings are allocated before freeing
234         them.
235         (gfc_trans_pointer_assignment): Call the new function. Tidy up
236         a minor whitespace issue.
237         trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
238         to prevent the expression from being used a second time.
240 2017-10-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
242         PR fortran/49232
243         * expr.c (gfc_check_pointer_assign): Error
244         for non-contiguous rhs.
246 2017-10-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
248         * gfortran.h (async_io_dt): Add external reference.
249         * io.c (async_io_dt): Add variable.
250         (compare_to_allowed_values): Add prototyte. Add optional argument
251         num. If present, set it to the number of the entry that was
252         matched.
253         (check_io_constraints): If this is for an asynchronous I/O
254         statement, set async_io_dt and set the asynchronous flag for
255         a SIZE tag.
256         * resolve.c (resolve_transfer): If async_io_dt is set, set
257         the asynchronous flag on the variable.
258         (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
259         flag on all elements of the namelist.
261 2017-10-04  Paul Thomas  <pault@gcc.gnu.org>
263         PR fortran/60458
264         PR fortran/77296
265         * resolve.c (resolve_assoc_var): Deferred character type
266         associate names must not receive an integer conatant length.
267         * symbol.c (gfc_is_associate_pointer): Deferred character
268         length functions also require an associate pointer.
269         * trans-decl.c (gfc_get_symbol_decl): Deferred character
270         length functions or derived type components require the assoc
271         name to have variable string length.
272         * trans-stmt.c (trans_associate_var): Set the string length of
273         deferred string length associate names. The address expression
274         is not needed for allocatable, pointer or dummy targets. Change
275         the comment about defered string length targets.
277 2017-10-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
279         * io.c (match_wait_element): Correctly match END and EOR tags.
280         * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
282 2017-10-02  Paul Thomas  <pault@gcc.gnu.org>
284         PR fortran/82312
285         * resolve.c (gfc_resolve_code): Simplify condition for class
286         pointer assignments becoming regular assignments by asserting
287         that only class valued targets are permitted.
288         * trans-expr.c (trans_class_pointer_fcn): New function using a
289         block of code from gfc_trans_pointer_assignment.
290         (gfc_trans_pointer_assignment): Call the new function. Tidy up
291         a minor whitespace issue.
293 2017-10-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
295         PR fortran/61450
296         * parse.c (gfc_global_used): Replace the gfc_internal_error
297         with an error.
299 2017-09-29  Dominique d'Humieres  <dominiq@lps.ens.fr>
301         PR fortran/25071
302         * interface.c (compare_actual_formal): Change warnings to errors
303         when "Actual argument contains too few elements for dummy
304         argument", unless -std=legacy is used.
306 2017-09-27  Thomas Schwinge  <thomas@codesourcery.com>
308         * lang.opt <Wdo-subscript>: End help text with a period.
310 2017-09-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
312         * frontend-passes.c (do_subscript): Don't do anything
313         if inside an associate list.
315 2017-09-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
317         * lang.opt:  Add -Wdo-subscript.
318         * frontend-passes.c (do_t): New type.
319         (doloop_list): Use variable of do_type.
320         (if_level): Variable to track if levels.
321         (select_level): Variable to track select levels.
322         (gfc_run_passes): Initialize i_level and select_level.
323         (doloop_code): Record current level of if + select
324         level in doloop_list.  Add seen_goto if there could
325         be a branch outside the loop. Use different type for
326         doloop_list.
327         (doloop_function): Call do_intent and do_subscript; move
328         functionality of checking INTENT to do_intent.
329         (insert_index_t): New type, for callback_insert_index.
330         (callback_insert_index): New function.
331         (insert_index): New function.
332         (do_subscript): New function.
333         (do_intent): New function.
334         (gfc_code_walker): Keep track of if_level and select_level.
335         * invoke.texi: Document -Wdo-subscript.
337 2017-09-25  Janne Blomqvist  <jb@gcc.gnu.org>
339         * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
340         (gfc_likely): Likewise.
342 2017-09-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
343             Steven G. Kargl  <kargl@gcc.gnu.org>
345         PR fortran/80118
346         * expr.c (gfc_get_full_arrayspec_from_expr): If there is
347         no symtree, set array spec to NULL.
349 2017-09-23  Janus Weil  <janus@gcc.gnu.org>
351         PR fortran/82143
352         * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
353         Rename flag_default_real to flag_default_real_8.
354         * invoke.texi: Add documentation.
355         * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
356         * trans-types.c (gfc_init_kinds): Implement the flags
357         -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
358         without -fdefault-real-8.
360 2017-09-21  Paul Thomas  <pault@gcc.gnu.org>
362         PR fortran/52832
363         * match.c (gfc_match_associate): Before failing the association
364         try again, allowing a proc pointer selector.
366         PR fortran/80120
367         PR fortran/81903
368         PR fortran/82121
369         * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
370         points to the associate selector, if any. Go through selector
371         references, after resolution for variables, to catch any full
372         or section array references. If a class associate name does
373         not have the same declared type as the selector, resolve the
374         selector and copy the declared type to the associate name.
375         Before throwing a no implicit type error, resolve all allowed
376         selector expressions, and copy the resulting typespec.
378         PR fortran/67543
379         * resolve.c (resolve_assoc_var): Selector must cannot be the
380         NULL expression and it must have a type.
382         PR fortran/78152
383         * resolve.c (resolve_symbol): Allow associate names to be
384         coarrays.
386 2017-09-21  Cesar Philippidis  <cesar@codesourcery.com>
388         * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
389         arguments to constant integers.
391 2017-09-17  Paul Thomas  <pault@gcc.gnu.org>
393         PR fortran/82173
394         * decl.c (gfc_get_pdt_instance): Use the component initializer
395         expression for the default, rather than the parameter value.
396         * resolve.c (resolve_pdt): New function.
397         (resolve_symbol): Call it. Remove false error, prohibiting
398         deferred type parameters for dummy arguments.
400         PR fortran/60483
401         * primary.c (gfc_match_varspec): If the type of an associate
402         name is unknown and yet there is a match, try resolving the
403         target expression and using its type.
405 2017-09-15  Paul Thomas  <pault@gcc.gnu.org>
407         PR fortran/82184
408         trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
409         field if the symbol is either implicitly or explicitly saved.
411 2017-09-13  Paul Thomas  <pault@gcc.gnu.org>
413         PR fortran/82173
414         * decl.c (match_char_kind): If the kind expression is
415         parameterized, save it in saved_kind_expr and set kind = 0.
416         (gfc_get_pdt_instance): Resolve and simplify before emitting
417         error on expression kind. Insert a missing simplification after
418         insertion of kind expressions.
420 2017-09-12  Paul Thomas  <pault@gcc.gnu.org>
422         PR fortran/82173
423         PR fortran/82168
424         * decl.c (variable_decl): Check pdt template components for
425         appearance of KIND/LEN components in the type parameter name
426         list, that components corresponding to type parameters have
427         either KIND or LEN attributes and that KIND or LEN components
428         are scalar. Copy the initializer to the parameter value.
429         (gfc_get_pdt_instance): Add a label 'error_return' and follow
430         it with repeated code, while replacing this code with a jump.
431         Check if a parameter appears as a component in the template.
432         Make sure that the parameter expressions are integer. Validate
433         KIND expressions.
434         (gfc_match_decl_type_spec): Search for pdt_types in the parent
435         namespace since they are instantiated in the template ns.
436         * expr.c (gfc_extract_int): Use a KIND parameter if it
437         appears as a component expression.
438         (gfc_check_init_expr): Allow expressions with the pdt_kind
439         attribute.
440         *primary.c (gfc_match_actual_arglist): Make sure that the first
441         keyword argument is recognised when 'pdt' is set.
443 2017-09-10  Paul Thomas  <pault@gcc.gnu.org>
445         PR fortran/34640
446         PR fortran/40737
447         PR fortran/55763
448         PR fortran/57019
449         PR fortran/57116
451         * expr.c (is_subref_array): Add class pointer array dummies
452         to the list of expressions that return true.
453         * trans-array.c: Add SPAN_FIELD and update indices for
454         subsequent fields.
455         (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
456         gfc_conv_descriptor_span_set, is_pointer_array,
457         get_array_span): New functions.
458         (gfc_get_descriptor_offsets_for_info): New function to preserve
459         API for access to descriptor fields for trans-types.c.
460         (gfc_conv_scalarized_array_ref): If the expression is a subref
461         array, make sure that info->descriptor is a descriptor type.
462         Otherwise, if info->descriptor is a pointer array, set 'decl'
463         and fix it if it is a component reference.
464         (build_array_ref): Simplify handling of class array refs by
465         passing the vptr to gfc_build_array_ref rather than generating
466         the pointer arithmetic in this function.
467         (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
468         'decl'.
469         (gfc_array_allocate): Set the span field if this is a pointer
470         array. Use the expr3 element size if it is available, so that
471         the dynamic type element size is used.
472         (gfc_conv_expr_descriptor): Set the span field for pointer
473         assignments.
474         * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
475         gfc_conv_descriptor_span_set and
476         gfc_get_descriptor_offsets_for_info added.
477         trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
478         array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
479         the setting of GFC_DECL_SPAN.
480         (gfc_trans_deferred_vars): Set the span field to zero in thge
481         originating scope.
482         * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
483         copy-out to pass subref expressions to a pointer dummy.
484         (gfc_trans_pointer_assignment): Remove code for setting of
485         GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
486         class function results. Likewise for rank remap. In the case
487         that the target is not a whole array, use the target array ref
488         for remap and, since the 'start' indices are missing, set the
489         lbounds to one, as required by the standard.
490         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
491         'token' offset from the field decl in the descriptor.
492         (conv_isocbinding_subroutine): Set the 'span' field.
493         * trans-io.c (gfc_trans_transfer): Always scalarize pointer
494         array io.
495         * trans-stmt.c (trans_associate_var): Set the 'span' field.
496         * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
497         field to the array descriptor.
498         (gfc_get_derived_type): Pointer array components are marked as
499         GFC_DECL_PTR_ARRAY_P.
500         (gfc_get_array_descr_info): Replaced API breaking code for
501         descriptor offset calling gfc_get_descriptor_offsets_for_info.
502         * trans.c (get_array_span): New function.
503         (gfc_build_array_ref): Simplify by calling get_array_span and
504         obtain 'span' if 'decl' or 'vptr' present.
505         * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
506         as GFC_DECL_PTR_ARRAY_P.
508 2017-09-09  Paul Thomas  <pault@gcc.gnu.org>
510         * decl.c : Add decl_type_param_list, type_param_spec_list as
511         static variables to hold PDT spec lists.
512         (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
513         (build_struct): Copy the 'saved_kind_expr' to the component
514         'kind_expr'. Check that KIND or LEN components appear in the
515         decl_type_param_list. These should appear as symbols in the
516         f2k_derived namespace. If the component is itself a PDT type,
517         copy the decl_type_param_list to the component param_list.
518         (gfc_match_kind_spec): If the KIND expression is parameterized
519         set KIND to zero and store the expression in 'saved_kind_expr'.
520         (insert_parameter_exprs): New function.
521         (gfc_insert_kind_parameter_exprs): New function.
522         (gfc_insert_parameter_exprs): New function.
523         (gfc_get_pdt_instance): New function.
524         (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
525         is present. If it is, call 'gfc_get_pdt_instance' to obtain the
526         specific instance of the PDT.
527         (match_attr_spec): Match KIND and LEN attributes. Check for the
528         standard and for type/kind of the parameter. They are also not
529         allowed outside a derived type definition.
530         (gfc_match_data_decl): Null the decl_type_param_list and the
531         type_param_spec_list on entry and free them on exit.
532         (gfc_match_formal_arglist): If 'typeparam' is true, add the
533         formal symbol to the f2k_derived namespace.
534         (gfc_match_derived_decl): Register the decl_type_param_list
535         if this is a PDT. If this is a type extension, gather up all
536         the type parameters and put them in the right order.
537         *dump-parse-tree.c (show_attr): Signal PDT templates and the
538         parameter attributes.
539         (show_components): Output parameter atrributes and component
540         parameter list.
541         (show_symbol): Show variable parameter lists.
542         * expr.c (expr.c): Copy the expression parameter list.
543         (gfc_is_constant_expr): Pass on symbols representing PDT
544         parameters.
545         (gfc_check_init_expr): Break on PDT KIND parameters and
546         PDT parameter expressions.
547         (gfc_check_assign): Assigning to KIND or LEN components is an
548         error.
549         (derived_parameter_expr): New function.
550         (gfc_derived_parameter_expr): New function.
551         (gfc_spec_list_type): New function.
552         * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
553         to the structure symbol_attr. Add the 'kind_expr' and
554         'param_list' field to the gfc_component structure. Comment on
555         the reuse of the gfc_actual_arglist structure as storage for
556         type parameter spec lists. Add the new field 'spec_type' to
557         this structure. Add 'param_list' fields to gfc_symbol and
558         gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
559         gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
560         gfc_derived_parameter_expr and gfc_spec_list_type.
561         * interface.c (gfc_compare_derived_types): Treat PDTs in the
562         same way as sequence types.
563         * match.c : Add variable 'type_param_spec_list'.
564         (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
565         trailing whitespace.
566         (match_derived_type_spec): Match PDTs and find specific
567         instance.
568         (gfc_match_type_spec): Remove more trailing whitespace.
569         (gfc_match_allocate): Assumed or deferred parameters cannot
570         appear here. Copy the type parameter spec list to the expr for
571         the allocatable entity. Free 'type_param_spec_list'.
572         (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
573         more trailing whitespace to remove.
574         (gfc_match_type_is): Allow PDT typespecs.
575         * match.h : Modify prototypes for gfc_match_formal_arglist and
576         gfc_match_actual_arglist.
577         * module.c (ab_attribute, mstring attr_bits): PDT attributes
578         added.
579         (mio_symbol_attribute): PDT attributes handled.
580         (mio_component): Deal with 'kind_expr' field.
581         (mio_full_f2k_derived): For PDT templates, transfer the formal
582         namespace symroot to the f2k_derived namespace.
583         *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
584         modifications to handle PDT spec lists. These are flagged in
585         both cases by new boolean arguments, whose prototype defaults
586         are false.
587         (gfc_match_structure_constructor, match_variable): Remove yet
588         more trailing whitespace.
589         * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
590         functions.
591         (resolve_structure_cons): If the constructor is a PDT template,
592         call get_pdt_constructor to build it using the parameter lists
593         and then get the specific instance of the PDT.
594         (resolve_component): PDT strings need a hidden string length
595         component like deferred characters.
596         (resolve_symbol): Dummy PDTs cannot have deferred parameters.
597         * symbol.c (gfc_add_kind, gfc_add_len): New functions.
598         (free_components): Free 'kind_expr' and 'param_list' fields.
599         (gfc_free_symbol): Free the 'param_list' field.
600         (gfc_find_sym_tree): If the current state is a PDT template,
601         look for the symtree in the f2k_derived namspaces.
602         trans-array.c (structure_alloc_comps): Allocate and deallocate
603         PDTs. Check dummy arguments for compliance of LEN parameters.
604         Add the new functions to the preceeding enum.
605         (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
606         gfc_check_pdt_dummy): New functions calling above.
607         * trans-array.h : Add prototypes for these functions.
608         trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
609         as appropriate for PDT symbols.
610         (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
611         they come into and out of scope. Exclude pdt_types from being
612         'gcc_unreachable'.
613         (gfc_trans_subcomponent_assign): PDT array components must be
614         handles as if they are allocatable.
615         * trans-stmt.c (gfc_trans_allocate): Handle initialization of
616         PDT entities.
617         (gfc_trans_deallocate): Likewise.
618         * trans-types.c (gfc_get_derived_type): PDT templates must not
619         arrive here. PDT string components are handles as if deferred.
620         Similarly, PDT arrays are treated as if allocatable. PDT
621         strings are pointer types.
622         * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
623         way as deferred characters.
625 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
627         PR c/81887
628         * parse.c (decode_omp_directive): Use matchs instead of matcho for
629         end ordered and ordered directives, except for ordered depend.  For
630         -fopenmp-simd and ordered depend, reject the stmt.
631         * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
632         threads clause and if simd clause isn't present, just translate the
633         body.
635 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
636             Alan Hayward  <alan.hayward@arm.com>
637             David Sherwood  <david.sherwood@arm.com>
639         * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
640         the mode iterator.
642 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
643             Alan Hayward  <alan.hayward@arm.com>
644             David Sherwood  <david.sherwood@arm.com>
646         * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
647         (size_logical): Likewise.
649 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
650             Alan Hayward  <alan.hayward@arm.com>
651             David Sherwood  <david.sherwood@arm.com>
653         * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
655 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
656             Alan Hayward  <alan.hayward@arm.com>
657             David Sherwood  <david.sherwood@arm.com>
659         * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
660         and FOR_EACH_MODE_IN_CLASS.
662 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
663             Alan Hayward  <alan.hayward@arm.com>
664             David Sherwood  <david.sherwood@arm.com>
666         * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
667         instead of TYPE_MODE.
669 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
670             Alan Hayward  <alan.hayward@arm.com>
671             David Sherwood  <david.sherwood@arm.com>
673         * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
674         for "mode".
676 2017-08-28  Janus Weil  <janus@gcc.gnu.org>
678         PR fortran/81770
679         * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
680         may outlive pointer target.
682 2017-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
684         PR fortran/81974
685         * frontend-passes (inline_matumul_assign):  Explicity
686         set typespec for call to CONJG.
688 2017-08-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
690         PR fortran/81296
691         * trans-io.c (get_dtio_proc): Add check for format label and set
692         formatted flag accordingly. Reorganize the code a little.
694 2017-08-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
696         PR fortran/81116
697         * frontend-passes.c (realloc_string_callback): If expression is a
698         concatenation, also check for dependency.
699         (constant_string_length): Check for presence of symtree.
701 2017-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
703         * gfortran.texi: Document format of unformatted sequential files.
705 2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
707         * invoke.texi:  Actually commit change about -Ofast.
709 2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
711         PR fortran/60355
712         * resolve.c (resolve_symbol): Adjust (and reformat)
713         comment.  Perform check if a BIND(C) is declared
714         at module level regardless of whether it is typed
715         implicitly or not.
717 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
719         * options.c (set_dec_flags): Only set legacy standards when value
720         is not zero.
722 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
724         * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
725         with -fdec when not set by user.
727 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
729         * decl.c (attr_seen): New static variable.
730         * decl.c (variable_decl): Match %FILL in STRUCTURE body.
731         * gfortran.texi: Update documentation.
733 2017-08-08  Martin Liska  <mliska@suse.cz>
735         * trans-types.c: Include header files.
737 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
739         PR fortran/68829
740         PR fortran/81701
741         * options.c: Make -Ofast honor -fmax-stack-var-size.
742         * invoke.texi: Document change.
744 2017-08-01  Thomas König  <tkoenig@gcc.gnu.org>
746         PR fortran/79312
747         * intrisic.c (gfc_convert_type_warn):  Only set typespec for
748         empty array constructors which don't have it already.
750 2017-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
752         PR fortran/45435
753         * lang.opt (fc-prototypes): Add option.
754         * gfortran.h (gfc_typespec): Add interop_kind to struct.
755         (gfc_dump_c_prototypes): Add prototype.
756         * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
757         * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
758         * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
759         (type_return): New enum.
760         (get_c_type_name): New function.
761         (write_decl): New function.
762         (write_type): New function.
763         (write_variable): New function.
764         (write_proc): New function.
765         (write_interop_decl): New function.
766         * invoke.texi: Document -fc-prototypes.
768 2017-08-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
770         PR fortran/53542
771         * expr.c (gfc_check_init_expr): Use the renamed name.
773 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
775         * check.c (gfc_check_num_images): Fix a pasto.
777 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
779         * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
780         the imported_module_or_decl debug hook.
782 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
784         * resolve.c (find_reachable_labels): Adjust.
786 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
788         * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
790 2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
792         * dump-parse-tree.c (show_symbol):  Show binding label if present.
794 2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
795             Mikael Morin  <mikael@gcc.gnu.org>
797         PR fortran/66102
798         * fortran/trans-array.c (gfc_conv_resolve_dependencies):
799         Break if dependency has been found.
801 2017-07-23  Alexander Monakov  <amonakov@ispras.ru>
803         * interface.c (pair_cmp): Fix gfc_symbol comparison.  Adjust comment.
805 2017-07-18  Nathan Sidwell  <nathan@acm.org>
807         * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
809 2017-07-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
811         PR fortran/81341
812         * class.c (class_array_ref_detected): Remove a redundant
813         condition.
815 2017-07-06  Harald Anlauf  <anlauf@gmx.de>
817         PR fortran/70071
818         * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
820 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
822         PR fortran/79866
823         * resolve.c (resolve_symbol): Fix typo.
825 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
827         PR fortran/79843
828         * symbol.c (check_conflict): Add missing "conflicts".
830 2017-06-29  Cesar Philippidis  <cesar@codesourcery.com>
832         PR fortran/77765
833         * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
834         comparing the routine name against it.
836 2017-06-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
838         PR fortran/80164
839         * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
840         as warning/error locus.
842 2017-06-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
844         PR fortran/81160
845         * arith.c (wprecision_int_real): Set return value before
846         mpz_clear and then return after it.
848 2017-06-15  Janus Weil  <janus@gcc.gnu.org>
850         PR fortran/80983
851         * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
852         scalar allocatable procedure-pointer components.
854 2017-06-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
856         PR fortran/80988
857         * frontend-passes.c (traverse_io_block):  Also
858         check for variables occurring as indices multiple
859         time in a single implied DO loop.
861 2017-06-05  Janus Weil  <janus@gcc.gnu.org>
863         PR fortran/70601
864         * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
865         function results.
867 2017-06-05  Nicolas Koenig  <koenigni@student.ethz.ch>
869         PR fortran/35339
870         * frontend-passes.c (traverse_io_block): New function.
871         (simplify_io_impl_do): New function.
872         (optimize_namespace): Invoke gfc_code_walker with
873         simplify_io_impl_do.
875 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
877         PR fortran/80918
878         * openmp.c (resolve_omp_clauses): Fix a typo.
880 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
882         * error.c (gfc_format_decoder): Update for new bool and
883         const char ** params.
885 2017-05-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
887         PR fortran/37131
888         * frontend-passes.c (check_conjg_transpose_variable):
889         Add prototype.
890         (has_dimen_vector_ref):  Likewise
891         (matmul_temp_args):  New function. Add prototype.
892         (optimize_namespace):  Call matmul_temp_args.
894 2017-05-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
896         * frontend-passes.c (matmul_lhs_realloc):  Correct
897         allocation size for case A1B2.
899 2017-05-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
901         * dump-parse-tree.c (show_expr):  Also replace
902         with dumpfile for showing values for forgotten
903         case.
905 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
907         * dump-parse-tree.c (show_expr):  Replace stdout
908         with dumpfile for showing values.
910 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
912         PR fortran/66094
913         * frontend-passes.c (matrix_case):  Add A2TB2.
914         (inline_limit_check):  Handle MATMUL(TRANSPOSE(A),B)
915         (inline_matmul_assign):  Likewise.
917 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
919         * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
920         "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
922 2017-05-22  Janus Weil  <janus@gcc.gnu.org>
924         PR fortran/80766
925         * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
926         properly resolved.
928 2017-05-19  Paul Thomas  <pault@gcc.gnu.org>
930         PR fortran/80333
931         * trans-io.c (nml_get_addr_expr): If we are dealing with class
932         type data set tmp tree to get that address.
933         (transfer_namelist_element): Set the array spec to point to the
934         the class data.
936 2017-05-19  David Malcolm  <dmalcolm@redhat.com>
938         PR fortran/79852
939         * bbt.c (insert): Remove trailing exclamation mark from message.
940         * decl.c (gfc_match_final_decl): Likewise.
941         * dump-parse-tree.c (show_expr): Likewise.
942         * module.c (gfc_use_module): Likewise.
943         * primary.c (build_actual_constructor): Likewise.
944         (gfc_convert_to_structure_constructor): Likewise.
946 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
948         * gfortran.h (enum gfc_omp_default_sharing): Add
949         "OMP_DEFAULT_PRESENT".
950         * dump-parse-tree.c (show_omp_clauses): Handle it.
951         * openmp.c (gfc_match_omp_clauses): Likewise.
952         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
954 2017-05-18  Fritz Reese <fritzoreese@gmail.com>
956         PR fortran/79968
957         * decl.c (match_attr_spec, gfc_match_automatic,
958         gfc_match_static, gfc_match_structure_decl): Unify diagnostic
959         errors regarding -fdec options.
960         * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
962 2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
964         PR fortran/80741
965         * trans-io.c (transfer_namelist_element): Change check from
966         NULL_TREE to null_pointer_node.
968 2017-05-17  Fritz Reese <fritzoreese@gmail.com>
970         PR fortran/80668
971         * expr.c (component_initializer): Don't generate initializers for
972         pointer components.
973         * invoke.texi (-finit-derived): Document.
975 2017-05-16  Paul Thomas  <pault@gcc.gnu.org>
977         PR fortran/80554
978         * decl.c (build_sym): In a submodule allow overriding of host
979         associated symbols from the ancestor module with a new
980         declaration.
982 2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>
984         PR fortran/80674
985         * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
987 2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>
989         PR fortran/80752
990         * expr.c (gfc_generate_initializer):  If type conversion fails,
991         check for error and return NULL.
993 2017-05-14  Nicolas Koenig  <koenigni@student.ethz.ch>
995         PR fortran/80442
996         * array.c (gfc_ref_dimen_size): Simplify stride
997         expression
998         * data.c (gfc_advance_section): Simplify start,
999         end and stride expressions
1000         (gfc_advance_section): Simplify start and end
1001         expressions
1002         (gfc_get_section_index): Simplify start expression
1004 2017-05-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1006         * io.c (gfc_resolve_dt): Fix returns to bool type.
1008 2017-05-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1010         PR fortran/78659
1011         * io.c (dtio_procs_present): Add new function to check for DTIO
1012         procedures relative to I/O statement READ or WRITE.
1013         (gfc_resolve_dt): Add namelist checks using the new function.
1014         * resolve.c (dtio_procs_present): Remove function and related
1015         namelist checks. (resolve_fl_namelist): Add check specific to
1016         Fortran 95 restriction on namelist objects.
1018 2017-05-11  Nathan Sidwell  <nathan@acm.org>
1020         * trans-decl.c: Include dumpfile.h not tree-dump.h,
1022 2017-05-09  Janus Weil  <janus@gcc.gnu.org>
1024         PR fortran/79311
1025         * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1026         components have a their finalizers resolved, also if the superordinate
1027         type itself has a finalizer.
1029 2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1031         PR fortran/79930
1032         * frontend-passes.c (matmul_to_var_expr): New function,
1033         add prototype.
1034         (matmul_to_var_code):  Likewise.
1035         (optimize_namespace):  Use them from gfc_code_walker.
1037 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
1039         * cpp.c (cb_cpp_error): Replace report_diagnostic
1040         with diagnostic_report_diagnostic.
1041         * error.c (gfc_warning): Likewise.
1042         (gfc_warning_now_at): Likewise.
1043         (gfc_warning_now): Likewise.
1044         (gfc_warning_internal): Likewise.
1045         (gfc_error_now): Likewise.
1046         (gfc_fatal_error): Likewise.
1047         (gfc_error_opt): Likewise.
1048         (gfc_internal_error): Likewise.
1050 2017-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1052         PR fortran/37131
1053         * frontend-passes.c (inline_matmul_assign): Also check bounds
1054         for allocatable lhs and matrix-vector-multiplication.
1056 2017-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1058         PR fortran/80484
1059         * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1060         (check_format): Move FMT_DT checking code to data_desc section.
1061         * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1063 2017-04-22  Janus Weil  <janus@gcc.gnu.org>
1065         PR fortran/80121
1066         * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1067         of allocatable intent(out) arguments.
1069 2017-04-21  Janus Weil  <janus@gcc.gnu.org>
1071         PR fortran/80392
1072         * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1073         building a derived type that includes a procedure pointer component
1074         with a polymorphic result.
1076 2017-04-17  Paul Thomas  <pault@gcc.gnu.org>
1078         PR fortran/80440
1079         * module.c (find_symtree_for_symbol): Delete.
1080         (read_module): Remove the call to the above.
1082 2017-04-14  Janus Weil  <janus@gcc.gnu.org>
1084         PR fortran/80361
1085         * class.c (generate_finalization_wrapper): Give the finalization wrapper
1086         the recursive attribute.
1088 2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>
1089             Paul Thomas  <pault@gcc.gnu.org>
1091         PR fortran/69498
1092         * module.c (gfc_match_submodule): Add error
1093         if function is called in the wrong state.
1095 2017-04-10  Janus Weil  <janus@gcc.gnu.org>
1097         PR fortran/80046
1098         * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1099         components in a pointer assignment need an explicit interface.
1101 2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
1103         PR fortran/69498
1104         * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1105         everything before it.
1107 2017-03-28  Janus Weil  <janus@gcc.gnu.org>
1109         PR fortran/78661
1110         * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1111         to a DTIO procedure if necessary.
1113 2017-03-25  Paul Thomas  <pault@gcc.gnu.org>
1115         PR fortran/80156
1116         PR fortran/79382
1117         * decl.c (access_attr_decl): Remove the error for an absent
1118         generic DTIO interface and ensure that symbol has the flavor
1119         FL_PROCEDURE.
1121 2017-03-22  Dominique d'Humieres  <dominiq@lps.ens.fr>
1123         PR fortran/79838
1124         * module.c: Remove trailing period.
1126 2017-03-22  Dominique d'Humieres  <dominiq@lps.ens.fr>
1128         PR fortran/79602
1129         * decl.c: Replace '%s' with %qs.
1130         * expr.c: Likewise.
1131         * interface.c: Likewise.
1132         * match.c: Likewise.
1133         * primary.c: Likewise.
1134         * resolve.c: Likewise.
1136         PR fortran/79844
1137         PR fortran/80011
1138         * io.c: Remove trailing spaces.
1139         * match.c: Likewise.
1140         * openmp.c: Likewise.
1141         * resolve.c: Likewise.
1142         * trans-intrinsic.c: Likewise.
1144         PR fortran/79853
1145         * expr.c: Remove a double spaces.
1147         PR fortran/79859
1148         * primary.c: Remove spurious quotes around %qs.
1150 2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1152         PR fortran/80142
1153         * frontend-passes.c (combine_array_constructor): Take
1154         location of new expression from constructor expression instead
1155         of constructor.
1157 2017-03-20  Nicolas Koenig  <koenigni@student.ethz.ch>
1159         PR fortran/39239
1160         * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1161         object is BIND(C)
1163 2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
1165         PR fortran/69498
1166         * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1167         created "ppr@" symbol.
1169 2017-03-18  Paul Thomas  <pault@gcc.gnu.org>
1171         PR fortran/79676
1172         * module.c (mio_symbol_attribute): Remove reset of the flag
1173         'no_module_procedures'.
1174         (check_for_module_procedures): New function. Move declaration
1175         of 'no_module_procedures' to above it.
1176         (gfc_dump_module): Traverse namespace calling new function.
1178 2017-03-18  Paul Thomas  <pault@gcc.gnu.org>
1180         PR fortran/71838
1181         * symbol.c (check_conflict): A dummy procedure in a submodule,
1182         module procedure is not an error.
1183         (gfc_add_flavor): Ditto.
1185 2017-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1187         PR fortran/79841
1188         * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1190 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
1192         PR fortran/80010
1193         * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1194         and ST_OACC_END_ATOMIC, instead of !ACC.
1195         * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1196         * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1197         gfc_resolve_oacc_declare): Likewise.
1199         PR fortran/79886
1200         * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1201         remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1202         if not a Fortran specific spec.
1203         * trans-io.c: Include options.h.
1204         (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1205         of artificial IO data structures.
1207 2017-03-15  David Malcolm  <dmalcolm@redhat.com>
1209         PR fortran/79860
1210         * resolve.c (resolve_contained_fntype): Make error messages more
1211         amenable to translation.
1213 2017-03-06  Richard Biener  <rguenther@suse.de>
1215         PR fortran/79894
1216         * trans.c (gfc_add_modify_loc): Weaken assert.
1218 2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>,
1219             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1221         * check.c (positive_check): Add new function checking constant for
1222         being greater then zero.
1223         (gfc_check_image_status): Add checking of image_status arguments.
1224         (gfc_check_failed_or_stopped_images): Same but for failed_- and
1225         stopped_images function.
1226         * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1227         * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1228         (enum gfc_isym_id): Added new intrinsic symbols.
1229         (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1230         * gfortran.texi: Added description for the new API functions. Updated
1231         coverage of gfortran of TS18508.
1232         * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1233         functions.
1234         * intrinsic.h: Added prototypes.
1235         * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1236         intrinsic.
1237         (gfc_resolve_image_status): Same for image_status.
1238         (gfc_resolve_stopped_images): Same for stopped_images.
1239         * libgfortran.h: Added prototypes.
1240         * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1241         (gfc_match_fail_image): Match a FAIL IMAGE statement.
1242         * match.h: Added prototype.
1243         * parse.c (decode_statement): Added matching for FAIL IMAGE.
1244         (next_statement): Same.
1245         (gfc_ascii_statement): Same.
1246         * resolve.c: Same.
1247         * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1248         single a constant result can be returne.d
1249         (gfc_simplify_image_status): For COARRAY=single the result is constant.
1250         * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1251         * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1252         new intrinsics.
1253         * trans-expr.c (gfc_conv_procedure_call): This is first time all
1254         arguments of a function are optional, which is now handled here
1255         correctly.
1256         * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1257         image_status.
1258         (gfc_conv_intrinsic_function): Add support for image_status.
1259         (gfc_is_intrinsic_libcall): Add support for the remaining new
1260         intrinsics.
1261         * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1262         * trans-stmt.h: Add the prototype for the above.
1263         * trans.c (trans_code): Dispatch for fail_image.
1264         * trans.h: Add the trees for the new intrinsics.
1266 2017-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1268         PR fortran/79841
1269         * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1271 2017-02-28  Paul Thomas  <pault@gcc.gnu.org>
1273         PR fortran/79739
1274         * resolve.c (resolve_fl_procedure): Deal with the case where
1275         'submodule_name' is NULL so that gfc_error does not ICE.
1276         Reformat the error message to make it more consistent.
1278 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
1280         * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1281         instead of just cond ? "..." : "...".
1282         * scanner.c (gfc_next_char_literal): Likewise.
1283         * match.c (match_exit_cycle): Likewise.
1285 2017-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1287         PR fortran/51119
1288         * options.c (gfc_post_options): Set default limit for matmul
1289         inlining to 30.
1290         * invoke.texi: Document change.
1292 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
1294         PR fortran/79601
1295         * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1296         to 'INTENT'.
1298 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
1300         PR fortran/79597
1301         * interface.c (gfc_match_end_interface): Remove spurious comma
1302         and space, replace 'got %s' with 'got %qs'.
1304 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
1306         PR fortran/79599
1307         * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1308         missing from error message.
1310 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
1312         PR fortran/79523
1313         * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1314         flavor attribute by checking that symbol is resolved.
1316 2017-02-16  Paul Thomas  <pault@gcc.gnu.org>
1318         PR fortran/79382
1319         * decl.c (access_attr_decl): Test for presence of generic DTIO
1320         interface and emit error if not present.
1322 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
1324         PR fortran/79434
1325         * parse.c (check_component, parse_union): Whitespace.
1326         (set_syms_host_assoc): For a derived type, check if the module
1327         in which it was declared is one of the submodule ancestors. If
1328         it is, make the components public. Otherwise, reset attribute
1329         'host_assoc' and set 'use-assoc' so that encapsulation is
1330         preserved.
1332 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
1334         PR fortran/79447
1335         * decl.c (gfc_set_constant_character_len): Whitespace.
1336         (gfc_match_end): Catch case where a procedure is contained in
1337         a module procedure and ensure that 'end procedure' is the
1338         correct termination.
1340 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
1342         PR fortran/79402
1343         * resolve.c (fixup_unique_dummy): New function.
1344         (gfc_resolve_expr): Call it for dummy variables with a unique
1345         symtree name.
1347 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1349         PR fortran/79229
1350         * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1351         compiling with -fcheck=mem to check the pointer and not the data.
1353 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1355         PR fortran/79335
1356         * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1357         passed are properly initialized.
1358         (structure_alloc_comps): Same.
1359         * trans-expr.c (gfc_trans_structure_assign): Same.
1361 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1363         * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1365 2017-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1367         PR fortran/65542
1368         * intrinsic.c (gfc_intrinsic_func_interface):  Return an error
1369         for -std=f95 for disallowed transformational functions in
1370         initialization expressions.
1372 2017-02-09  Cesar Philippidis  <cesar@codesourcery.com>
1373             Joseph Myers  <joseph@codesourcery.com>
1375         * openmp.c (resolve_omp_clauses): Error on directives
1376         containing both tile and collapse clauses.
1377         (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1378         * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1379         collapsed loops.
1381 2017-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1383         * trans-types.c (gfc_get_int_kind_from_width_isofortranen):  Choose
1384         REAL type with the widest precision if two (or more) have the same
1385         storage size.
1387 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1389         PR fortran/79344
1390         * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1391         the temporary, when a new object was created for the temporary.  Not
1392         when it is just an alias to an existing object.
1394 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1396         PR fortran/79335
1397         * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1398         attributes before using them.
1400 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1402         PR fortran/78958
1403         * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1404         component of unlimited polymorphic objects when source-allocating.
1406 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1408         PR fortran/79230
1409         * trans-array.c (structure_alloc_comps): Ignore pointer components when
1410         freeing structures.
1412 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1414         PR lto/79061
1415         * f95-lang.c (gfc_create_decls): Include stringpool.h.
1416         Pass main_input_filename to build_translation_unit_decl.
1418 2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>
1420         * arith.c (arith_power):  If simplifying integer power expression
1421         to zero, warn if -Winteger-division is given.
1423 2017-01-22  Jakub Jelinek  <jakub@redhat.com>
1425         PR fortran/79154
1426         * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1427         with { ret = st; goto finish; }.
1428         (decode_omp_directive): Allow declare simd, declare target and
1429         simd directives in PURE/ELEMENTAL procedures.  Only call
1430         gfc_unset_implicit_pure on successful match of other procedures.
1432 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
1434         * gfc-internals.texi (Symbol Versioning): Change references
1435         to www.akkadia.org to https.
1437 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
1439         * gfortran.h (gfc_extract_int): Change return type to bool.  Add
1440         int argument with = 0.
1441         * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1442         1 as new last argument to it, don't emit gfc_error.
1443         (match_char_kind): Likewise.
1444         (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1445         gfc_get_string (x).
1446         (gfc_match_derived_decl, match_binding_attributes): Likewise.
1447         (gfc_match_structure_decl): Don't sprintf back to name, call
1448         get_struct_decl directly with gfc_dt_upper_string (name) result.
1449         * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1450         instead of gfc_get_string (x).
1451         * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1452         gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1453         mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1454         load_omp_udrs, load_needed, read_module, dump_module,
1455         create_intrinsic_function, import_iso_c_binding_module,
1456         create_int_parameter, create_int_parameter_array, create_derived_type,
1457         use_iso_fortran_env_module): Likewise.
1458         * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1459         pp_verbatim (context->printer, "%s", x) instead of
1460         pp_verbatim (context->printer, x).
1461         * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1462         1 as new last argument to it, don't emit gfc_error.
1463         (gfc_match_small_int_expr): Likewise.
1464         * iresolve.c (gfc_get_string): Optimize format "%s" case.
1465         (resolve_bound): Use gfc_get_string ("%s", x) instead of
1466         gfc_get_string (x).
1467         (resolve_transformational): Formatting fix.
1468         (gfc_resolve_char_achar): Change name argument to bool is_achar,
1469         use a single format string and if is_achar add "a" before "char".
1470         (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1471         * expr.c (gfc_extract_int): Change return type to bool, return true
1472         if some error occurred.  Add REPORT_ERROR argument, if non-zero
1473         call either gfc_error or gfc_error_now depending on its sign.
1474         * arith.c (arith_power): Adjust gfc_extract_int caller.
1475         * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1476         of gfc_get_string (x).
1477         (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1478         gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1479         * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1480         -1 as new last argument to it, don't emit gfc_error_now.
1481         (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1482         instead of gfc_get_string (x).
1483         * check.c (kind_check): Adjust gfc_extract_int caller.
1484         * intrinsic.c (add_sym, find_sym, make_alias): Use
1485         gfc_get_string ("%s", x) instead of gfc_get_string (x).
1486         * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1487         gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1488         gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1489         Adjust gfc_extract_int callers.
1490         * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1491         instead of gfc_get_string (x).
1492         * matchexp.c (expression_syntax): Add const.
1493         * primary.c (match_kind_param, match_hollerith_constant,
1494         match_string_constant): Adjust gfc_extract_int callers.
1495         (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1496         gfc_get_string (x).
1497         * frontend-passes.c (optimize_minmaxloc): Likewise.
1499 2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1501         PR fortran/70696
1502         * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1503         function only, when the decl-context is not the translation unit.
1505 2017-01-18  Louis Krupp  <louis.krupp@zoho.com>
1507         PR fortran/50069
1508         PR fortran/55086
1509         * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1510         as function arguments.
1511         * trans-stmt.c (forall_make_variable_temp,
1512         generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1513         gfc_trans_forall_1): Don't adjust offset of forall temporary
1514         for array sections, make forall temporaries work for substring
1515         expressions, improve test coverage by adding -ftest-forall-temp
1516         option to request usage of temporary array in forall code.
1517         * lang.opt: Add -ftest-forall-temp option.
1518         * invoke.texi: Add -ftest-forall-temp option.
1520 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1522         * primary.c (caf_variable_attr): Improve figuring whether the current
1523         component is the last one refed.
1524         * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1525         when allocating pointer or allocatable components.
1527 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1529         * gfortran.texi: Add missing parameters to caf-API functions.  Correct
1530         typos and clarify some descriptions.
1532 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1534         PR fortran/70696
1535         Missed some cases, here they are:
1536         * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1537         parent function's scope.
1538         * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code.  Remove
1539         unnecessary assert.
1541 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1543         PR fortran/70697
1544         * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1545         event's until_count.
1547 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1549         PR fortran/70696
1550         * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1551         is valid before accessing it.
1553 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
1555         PR translation/79019
1556         PR translation/79020
1557         * decl.c (attr_decl1): Fix spelling in translatable string.
1558         * intrinsic.texi: Fix spelling - invokation -> invocation.
1559         * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1560         typos in descriptions.
1561         * openmp.c (resolve_omp_clauses): Add missing whitespace to
1562         translatable strings.
1564 2017-01-08  Martin Sebor  <msebor@redhat.com>
1566         PR tree-optimization/78913
1567         PR middle-end/77708
1568         * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1569         truncation for any argument.
1570         * trans-types.c (gfc_build_logical_type): Same.
1572 2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>
1574         PR fortran/78781
1575         PR fortran/78935
1576         * expr.c (gfc_check_pointer_assign): Return the same error message for
1577         rewritten coarray pointer assignments like for plain ones.
1578         * gfortran.h: Change prototype.
1579         * primary.c (caf_variable_attr): Set attributes used ones only only
1580         ones.  Add setting of pointer_comp attribute.
1581         (gfc_caf_attr): Add setting of pointer_comp attribute.
1582         * trans-array.c (gfc_array_allocate): Add flag that the component to
1583         allocate is not an ultimate coarray component.  Add allocation of
1584         pointer arrays.
1585         (structure_alloc_comps): Extend nullify to treat pointer components in
1586         coarrays correctly.  Restructure nullify to remove redundant code.
1587         (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1588         * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1589         * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1590         derived type coarrays with pointer components.
1591         * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1592         components.
1593         (trans_caf_token_assign): Handle assignment of token of scalar pointer
1594         components.
1595         (gfc_trans_pointer_assignment): Call above routine.
1596         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1597         components.
1598         (gfc_conv_intrinsic_caf_get): Likewise.
1599         (conv_caf_send): Likewise.
1600         * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1601         a coarray pre-register the tokens.
1602         (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1603         array) and deregistering it correctly.
1604         * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1605         actual codim to allow lookup of array types in the cache.
1606         (gfc_build_array_type): Likewise.
1607         (gfc_get_array_descriptor_base): Likewise.
1608         (gfc_get_array_type_bounds): Likewise.
1609         (gfc_get_derived_type): Likewise.
1610         * trans-types.h: Likewise.
1611         * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1612         of coarray components.
1613         (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1614         instead of caf_deregister.
1616 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
1618         * simplify.c (simplify_transformation_to_array): Use
1619         GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1620         #pragma GCC diagnostic {push,ignored,pop}.
1622 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
1624         * simplify.c (simplify_transformation_to_array): Silence
1625         array bounds warning.  Fix whitespace.
1627 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1629         * module.c (load_omp_udrs): Initialize name.
1631 2017-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
1633         PR fortran/78534
1634         * trans-expr.c (gfc_trans_string_copy): Rework string copy
1635         algorithm to avoid -Wstringop-overflow warning.
1637 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1639         Update copyright years.
1641         * gfortranspec.c (lang_specific_driver): Update copyright notice
1642         dates.
1643         * gfc-internals.texi: Bump @copying's copyright year.
1644         * gfortran.texi: Ditto.
1645         * intrinsic.texi: Ditto.
1646         * invoke.texi: Ditto.
1648 Copyright (C) 2017 Free Software Foundation, Inc.
1650 Copying and distribution of this file, with or without modification,
1651 are permitted in any medium without royalty provided the copyright
1652 notice and this notice are preserved.