2017-11-08 Steven G. Kargl <kargl@kgcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob6c9f246d64ea2bddfb1249e1e9072edf41727d32
1 2017-11-08  Steven G. Kargl  <kargl@kgcc.gnu.org>
3         PR Fortran/82841
4         * simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
5         Unwrap a short line.
7 2017-11-08  Steven G. Kargl  <kargl@gcc.gnu.org>
9         PR fortran/82884
10         * arith.c (gfc_hollerith2character): Clear pad.
12 2017-11-08  Janne Blomqvist  <jb@gcc.gnu.org>
14         PR 82869
15         * convert.c (truthvalue_conversion): Use logical_type_node.
16         * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
17         (gfc_trans_create_temp_array): Likewise.
18         (gfc_trans_array_ctor_element): Likewise.
19         (gfc_trans_array_constructor_value): Likewise.
20         (trans_array_constructor): Likewise.
21         (trans_array_bound_check): Likewise.
22         (gfc_conv_array_ref): Likewise.
23         (gfc_trans_scalarized_loop_end): Likewise.
24         (gfc_conv_array_extent_dim): Likewise.
25         (gfc_array_init_size): Likewise.
26         (gfc_array_allocate): Likewise.
27         (gfc_trans_array_bounds): Likewise.
28         (gfc_trans_dummy_array_bias): Likewise.
29         (gfc_conv_array_parameter): Likewise.
30         (duplicate_allocatable): Likewise.
31         (duplicate_allocatable_coarray): Likewise.
32         (structure_alloc_comps): Likewise
33         (get_std_lbound): Likewise
34         (gfc_alloc_allocatable_for_assignment): Likewise
35         * trans-decl.c (add_argument_checking): Likewise
36         (gfc_generate_function_code): Likewise
37         * trans-expr.c (gfc_copy_class_to_class): Likewise
38         (gfc_trans_class_array_init_assign): Likewise
39         (gfc_trans_class_init_assign): Likewise
40         (gfc_conv_expr_present): Likewise
41         (gfc_conv_substring): Likewise
42         (gfc_conv_cst_int_power): Likewise
43         (gfc_conv_expr_op): Likewise
44         (gfc_conv_procedure_call): Likewise
45         (fill_with_spaces): Likewise
46         (gfc_trans_string_copy): Likewise
47         (gfc_trans_alloc_subarray_assign): Likewise
48         (gfc_trans_pointer_assignment): Likewise
49         (gfc_trans_scalar_assign): Likewise
50         (fcncall_realloc_result): Likewise
51         (alloc_scalar_allocatable_for_assignment): Likewise
52         (trans_class_assignment): Likewise
53         (gfc_trans_assignment_1): Likewise
54         * trans-intrinsic.c (build_fixbound_expr): Likewise
55         (gfc_conv_intrinsic_aint): Likewise
56         (gfc_trans_same_strlen_check): Likewise
57         (conv_caf_send): Likewise
58         (trans_this_image): Likewise
59         (conv_intrinsic_image_status): Likewise
60         (trans_image_index): Likewise
61         (gfc_conv_intrinsic_bound): Likewise
62         (conv_intrinsic_cobound): Likewise
63         (gfc_conv_intrinsic_mod): Likewise
64         (gfc_conv_intrinsic_dshift): Likewise
65         (gfc_conv_intrinsic_dim): Likewise
66         (gfc_conv_intrinsic_sign): Likewise
67         (gfc_conv_intrinsic_ctime): Likewise
68         (gfc_conv_intrinsic_fdate): Likewise
69         (gfc_conv_intrinsic_ttynam): Likewise
70         (gfc_conv_intrinsic_minmax): Likewise
71         (gfc_conv_intrinsic_minmax_char): Likewise
72         (gfc_conv_intrinsic_anyall): Likewise
73         (gfc_conv_intrinsic_arith): Likewise
74         (gfc_conv_intrinsic_minmaxloc): Likewise
75         (gfc_conv_intrinsic_minmaxval): Likewise
76         (gfc_conv_intrinsic_btest): Likewise
77         (gfc_conv_intrinsic_bitcomp): Likewise
78         (gfc_conv_intrinsic_shift): Likewise
79         (gfc_conv_intrinsic_ishft): Likewise
80         (gfc_conv_intrinsic_ishftc): Likewise
81         (gfc_conv_intrinsic_leadz): Likewise
82         (gfc_conv_intrinsic_trailz): Likewise
83         (gfc_conv_intrinsic_mask): Likewise
84         (gfc_conv_intrinsic_spacing): Likewise
85         (gfc_conv_intrinsic_rrspacing): Likewise
86         (gfc_conv_intrinsic_size): Likewise
87         (gfc_conv_intrinsic_sizeof): Likewise
88         (gfc_conv_intrinsic_transfer): Likewise
89         (gfc_conv_allocated): Likewise
90         (gfc_conv_associated): Likewise
91         (gfc_conv_same_type_as): Likewise
92         (gfc_conv_intrinsic_trim): Likewise
93         (gfc_conv_intrinsic_repeat): Likewise
94         (conv_isocbinding_function): Likewise
95         (conv_intrinsic_ieee_is_normal): Likewise
96         (conv_intrinsic_ieee_is_negative): Likewise
97         (conv_intrinsic_ieee_copy_sign): Likewise
98         (conv_intrinsic_move_alloc): Likewise
99         * trans-io.c (set_parameter_value_chk): Likewise
100         (set_parameter_value_inquire): Likewise
101         (set_string): Likewise
102         * trans-openmp.c (gfc_walk_alloc_comps): Likewise
103         (gfc_omp_clause_default_ctor): Likewise
104         (gfc_omp_clause_copy_ctor): Likewise
105         (gfc_omp_clause_assign_op): Likewise
106         (gfc_omp_clause_dtor): Likewise
107         (gfc_omp_finish_clause): Likewise
108         (gfc_trans_omp_clauses): Likewise
109         (gfc_trans_omp_do): Likewise
110         * trans-stmt.c (gfc_trans_goto): Likewise
111         (gfc_trans_sync): Likewise
112         (gfc_trans_arithmetic_if): Likewise
113         (gfc_trans_simple_do): Likewise
114         (gfc_trans_do): Likewise
115         (gfc_trans_forall_loop): Likewise
116         (gfc_trans_where_2): Likewise
117         (gfc_trans_allocate): Likewise
118         (gfc_trans_deallocate): Likewise
119         * trans-types.c (gfc_init_types): Initialize logical_type_node and
120         their true/false trees.
121         (gfc_get_array_descr_info): Use logical_type_node.
122         * trans-types.h (logical_type_node): New tree.
123         (logical_true_node): Likewise.
124         (logical_false_node): Likewise.
125         * trans.c (gfc_trans_runtime_check): Use logical_type_node.
126         (gfc_call_malloc): Likewise
127         (gfc_allocate_using_malloc): Likewise
128         (gfc_allocate_allocatable): Likewise
129         (gfc_add_comp_finalizer_call): Likewise
130         (gfc_add_finalizer_call): Likewise
131         (gfc_deallocate_with_status): Likewise
132         (gfc_deallocate_scalar_with_status): Likewise
133         (gfc_call_realloc): Likewise
135 2017-11-06  Paul Thomas  <pault@gcc.gnu.org>
137         PR fortran/69739
138         * trans-expr.c (gfc_map_intrinsic_function): Return false for
139         bounds without the DIM argument instead of ICEing.
141 2017-11-06  Martin Liska  <mliska@suse.cz>
143         PR middle-end/82404
144         * options.c (gfc_post_options): Set default value of
145         -Wreturn-type to false.
147 2017-11-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
149         PR fortran/82471
150         * lang.opt (ffrontend-loop-interchange): New option.
151         (Wfrontend-loop-interchange): New option.
152         * options.c (gfc_post_options): Handle ffrontend-loop-interchange.
153         * frontend-passes.c (gfc_run_passes): Run
154         optimize_namespace if flag_frontend_optimize or
155         flag_frontend_loop_interchange are set.
156         (optimize_namespace): Run functions according to flags set;
157         also call index_interchange.
158         (ind_type): New function.
159         (has_var): New function.
160         (index_cost): New function.
161         (loop_comp): New function.
163 2017-11-05  Paul Thomas  <pault@gcc.gnu.org>
165         PR fortran/78641
166         * resolve.c (resolve_ordinary_assign): Do not add the _data
167         component for class valued array constructors being assigned
168         to derived type arrays.
169         * trans-array.c (gfc_trans_array_ctor_element): Take the _data
170         of class valued elements for assignment to derived type arrays.
172 2017-11-05  Paul Thomas  <pault@gcc.gnu.org>
174         PR fortran/81447
175         PR fortran/82783
176         * resolve.c (resolve_component): There is no need to resolve
177         the components of a use associated vtype.
178         (resolve_fl_derived): Unconditionally generate a vtable for any
179         module derived type, as long as the standard is F2003 or later
180         and it is not a vtype or a PDT template.
182 2017-11-05  Tom de Vries  <tom@codesourcery.com>
184         PR other/82784
185         * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
186         semicolon after "do {} while (0)".
188 2017-11-04  Andre Vehreschild  <vehre@gcc.gnu.org>
190         * trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
191         create a loop variant temporary, too.
192         * trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
193         not as scalars.
194         * trans.c (get_array_span): Take the character kind into account when
195         doing pointer arithmetic.
197 2017-11-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
199         PR fortran/29600
200         * gfortran.h (gfc_check_f): Replace fm3l with fm4l.
201         * intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
202         list in protoytpe.
203         (gfc_resolve_minloc): Likewise.
204         * check.c (gfc_check_minloc_maxloc): Handle kind argument.
205         * intrinsic.c (add_sym_3_ml): Rename to
206         (add_sym_4_ml): and handle kind argument.
207         (add_function): Replace add_sym_3ml with add_sym_4ml and add
208         extra arguments for maxloc and minloc.
209         (check_specific): Change use of check.f3ml with check.f4ml.
210         * iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
211         the kind is smaller than the smallest library version available,
212         use gfc_default_integer_kind and convert afterwards.
213         (gfc_resolve_minloc): Likewise.
215 2017-11-04  Paul Thomas  <pault@gcc.gnu.org>
217         PR fortran/81735
218         * trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
219         case where 'tmp' was used unititialized and remove TODO.
221 2017-11-03  Steven G. Kargl  <kargl@gcc.gnu.org>
223         PR fortran/82796
224         * resolve.c (resolve_equivalence): An entity in a common block within
225         a module cannot appear in an equivalence statement if the entity is
226         with a pure procedure.
228 2017-10-31  Jim Wilson  <wilson@tuliptree.org>
230         * parse.c (unexpected_eof): Call gcc_unreachable before return.
232 2017-10-30  Paul Thomas  <pault@gcc.gnu.org>
234         PR fortran/80850
235         * trans_expr.c (gfc_conv_procedure_call): When passing a class
236         argument to an unlimited polymorphic dummy, it is wrong to cast
237         the passed expression as unlimited, unless it is unlimited. The
238         correct way is to assign to each of the fields and set the _len
239         field to zero.
241 2017-10-30  Steven G. Kargl   <kargl@gcc.gnu.org>
243         * resolve.c (resolve_transfer): Set derived to correct symbol for
244         BT_CLASS.
246 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
248         * invoke.texi: Delete adb and sdb references.
250 2017-10-28  Andre Vehreschild  <vehre@gcc.gnu.org>
252         * check.c (gfc_check_co_reduce): Clarify error message.
254 2017-10-28  Paul Thomas  <pault@gcc.gnu.org>
256         PR fortran/81758
257         * trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
258         must only be set if the right hand side expression is of type
259         class.
261 2017-10-27  Steven G. Kargl  <kargl@gcc.gnu.org>
263         PR fortran/82620
264         * match.c (gfc_match_allocate): Exit early on syntax error.
266 2017-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
268         PR fortran/56342
269         * simplify.c (is_constant_array_expr): If the expression is
270         a parameter array, call gfc_simplify_expr.
272 2017-10-25  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
274         * match.c (gfc_match_type_is): Fix typo in error message.
276 2017-10-21  Paul Thomas  <pault@gcc.gnu.org>
278         PR fortran/82586
279         * decl.c (gfc_get_pdt_instance): Remove the error message that
280         the parameter does not have a corresponding component since
281         this is now taken care of when the derived type is resolved. Go
282         straight to error return instead.
283         (gfc_match_formal_arglist): Make the PDT relevant errors
284         immediate so that parsing of the derived type can continue.
285         (gfc_match_derived_decl): Do not check the match status on
286         return from gfc_match_formal_arglist for the same reason.
287         * resolve.c (resolve_fl_derived0): Check that each type
288         parameter has a corresponding component.
290         PR fortran/82587
291         * resolve.c (resolve_generic_f): Check that the derived type
292         can be used before resolving the struture constructor.
294         PR fortran/82589
295         * symbol.c (check_conflict): Add the conflicts involving PDT
296         KIND and LEN attributes.
298 2017-10-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
300         * interface.c (check_sym_interfaces, check_uop_interfaces,
301         gfc_check_interfaces): Base interface_name buffer off
302         GFC_MAX_SYMBOL_LEN.
304 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
306         PR fortran/82568
307         * gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
308         (gfc_resolve_omp_local_vars): New declaration.
309         * openmp.c (omp_current_ctx): Make static.
310         (gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
311         and EXEC_OMP_TASKLOOP_SIMD.
312         (gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
313         don't actually add any clause.  Move omp_current_ctx test
314         earlier.
315         (handle_local_var, gfc_resolve_omp_local_vars): New functions.
316         * resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
317         instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
318         and EXEC_OMP_TASKLOOP_SIMD.
319         (gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
320         (resolve_codes): Call gfc_resolve_omp_local_vars.
322 2017-10-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
324         * gfortran.h (gfc_lookup_function_fuzzy): New declaration.
325         (gfc_closest_fuzzy_match): New declaration.
326         (vec_push): New definition.
327         * misc.c (gfc_closest_fuzzy_match): New definition.
328         * resolve.c: Include spellcheck.h.
329         (lookup_function_fuzzy_find_candidates): New static function.
330         (lookup_uop_fuzzy_find_candidates): Likewise.
331         (lookup_uop_fuzzy): Likewise.
332         (resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
333         (gfc_lookup_function_fuzzy): New definition.
334         (resolve_unknown_f): Call gfc_lookup_function_fuzzy.
335         * interface.c (check_interface0): Likewise.
336         (lookup_arg_fuzzy_find_candidates): New static function.
337         (lookup_arg_fuzzy ): Likewise.
338         (compare_actual_formal): Call lookup_arg_fuzzy.
339         * symbol.c: Include spellcheck.h.
340         (lookup_symbol_fuzzy_find_candidates): New static function.
341         (lookup_symbol_fuzzy): Likewise.
342         (gfc_set_default_type): Call lookup_symbol_fuzzy.
343         (lookup_component_fuzzy_find_candidates): New static function.
344         (lookup_component_fuzzy): Likewise.
345         (gfc_find_component): Call lookup_component_fuzzy.
347 2017-10-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
349         PR fortran/82567
350         * frontend-passes.c (combine_array_constructor): If an array
351         constructor is all constants and has more elements than a small
352         constant, don't convert a*[b,c] to [a*b,a*c] to reduce compilation
353         times.
355 2017-10-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
357         PR fortran/79795
358         * resolve.c (resovle_symbol): Change gcc_assert to
359         sensible error message.
361 2017-10-18  Paul Thomas  <pault@gcc.gnu.org>
363         PR fortran/82550
364         * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
365         have the 'used_in_submodule' attribute should be processed by
366         'gfc_get_extern_function_decl'.
368 2017-10-16  Fritz Reese <fritzoreese@gmail.com>
370         PR fortran/82511
371         * trans-io.c (transfer_expr): Treat BT_UNION as BT_DERIVED.
373 2017-10-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
375         PR fortran/82372
376         * fortran/scanner.c (last_error_char):  New global variable.
377         (gfc_scanner_init_1): Set last_error_char to NULL.
378         (gfc_gobble_whitespace): If a character not printable or
379         not newline, issue an error.
381 2017-10-13  Paul Thomas  <pault@gcc.gnu.org>
383         PR fortran/81048
384         * resolve.c (resolve_symbol): Ensure that derived type array
385         results get default initialization.
387 2017-10-11  Nathan Sidwell  <nathan@acm.org>
389         * cpp.c (gfc_cpp_add_include_path): Update incpath_e names.
390         (gfc_cpp_add_include_path_after): Likewise.
392 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
394         * target-memory.c (gfc_interpret_logical): Use wi::to_wide when
395         operating on trees as wide_ints.
396         * trans-const.c (gfc_conv_tree_to_mpz): Likewise.
397         * trans-expr.c (gfc_conv_cst_int_power): Likewise.
398         * trans-intrinsic.c (trans_this_image): Likewise.
399         (gfc_conv_intrinsic_bound): Likewise.
400         (conv_intrinsic_cobound): Likewise.
402 2017-10-08  Steven G. Kargl  <kargl@gcc.gnu.org>
404         * check.c (gfc_check_x): Remove function.
405         * intrinsic.c (add_functions): Use gfc_check_fn_r.
407 2017-10-08  Paul Thomas  <pault@gcc.gnu.org>
409         PR fortran/82375
410         * module.c : Bump up MOD_VERSION to 15.
411         (mio_component): Edit comment about PDT specification list.
412         (mio_expr, mio_symbol): Include the expression and symbol PDT
413         specification lists in the same way as in mio_component.
415 2017-10-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
417         * dump_prase_tree (show_symbol): Output list of variables in
418         NAMELIST.
419         (show_code_node): Add new line for ELSE and END DO for DO
420         CONCURRENT.
421         * invoke.texi: Document that the output of
422         -fdump-fortran-original, -fdump-fortran-optimized and
423         -fdump-parse-tree is unsable and may lead to ICEs.
425 2017-10-07  Paul Thomas  <pault@gcc.gnu.org>
427         PR fortran/82375
428         * class.c (gfc_find_derived_vtab): Return NULL for a passed
429         pdt template to prevent bad procedures from being written.
430         * decl.c (gfc_get_pdt_instance): Do not use the default
431         initializer for pointer and allocatable pdt type components. If
432         the component is allocatbale, set the 'alloc_comp' attribute of
433         'instance'.
434         * module.c : Add a prototype for 'mio_actual_arglist'. Add a
435         boolean argument 'pdt'.
436         (mio_component): Call it for the parameter list of pdt type
437         components with 'pdt' set to true.
438         (mio_actual_arg): Add the boolean 'pdt' and, if it is set, call
439         mio_integer for the 'spec_type'.
440         (mio_actual_arglist): Add the boolean 'pdt' and use it in the
441         call to mio_actual_arg.
442         (mio_expr, mio_omp_udr_expr): Call mio_actual_arglist with
443         'pdt' set false.
444         * resolve.c (get_pdt_spec_expr): Add the parameter name to the
445         KIND parameter error.
446         (get_pdt_constructor): Check that cons->expr is non-null.
447         * trans-array.c (structure_alloc_comps): For deallocation of
448         allocatable components, ensure that parameterized components
449         are deallocated first. Likewise, when parameterized components
450         are allocated, nullify allocatable components first. Do not
451         recurse into pointer or allocatable pdt components while
452         allocating or deallocating parameterized components. Test that
453         parameterized arrays or strings are allocated before freeing
454         them.
455         (gfc_trans_pointer_assignment): Call the new function. Tidy up
456         a minor whitespace issue.
457         trans-decl.c (gfc_trans_deferred_vars): Set 'tmp' to NULL_TREE
458         to prevent the expression from being used a second time.
460 2017-10-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
462         PR fortran/49232
463         * expr.c (gfc_check_pointer_assign): Error
464         for non-contiguous rhs.
466 2017-10-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
468         * gfortran.h (async_io_dt): Add external reference.
469         * io.c (async_io_dt): Add variable.
470         (compare_to_allowed_values): Add prototyte. Add optional argument
471         num. If present, set it to the number of the entry that was
472         matched.
473         (check_io_constraints): If this is for an asynchronous I/O
474         statement, set async_io_dt and set the asynchronous flag for
475         a SIZE tag.
476         * resolve.c (resolve_transfer): If async_io_dt is set, set
477         the asynchronous flag on the variable.
478         (resolve_fl_namelist): If async_io_dt is set, set the asynchronous
479         flag on all elements of the namelist.
481 2017-10-04  Paul Thomas  <pault@gcc.gnu.org>
483         PR fortran/60458
484         PR fortran/77296
485         * resolve.c (resolve_assoc_var): Deferred character type
486         associate names must not receive an integer conatant length.
487         * symbol.c (gfc_is_associate_pointer): Deferred character
488         length functions also require an associate pointer.
489         * trans-decl.c (gfc_get_symbol_decl): Deferred character
490         length functions or derived type components require the assoc
491         name to have variable string length.
492         * trans-stmt.c (trans_associate_var): Set the string length of
493         deferred string length associate names. The address expression
494         is not needed for allocatable, pointer or dummy targets. Change
495         the comment about defered string length targets.
497 2017-10-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
499         * io.c (match_wait_element): Correctly match END and EOR tags.
500         * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT.
502 2017-10-02  Paul Thomas  <pault@gcc.gnu.org>
504         PR fortran/82312
505         * resolve.c (gfc_resolve_code): Simplify condition for class
506         pointer assignments becoming regular assignments by asserting
507         that only class valued targets are permitted.
508         * trans-expr.c (trans_class_pointer_fcn): New function using a
509         block of code from gfc_trans_pointer_assignment.
510         (gfc_trans_pointer_assignment): Call the new function. Tidy up
511         a minor whitespace issue.
513 2017-10-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
515         PR fortran/61450
516         * parse.c (gfc_global_used): Replace the gfc_internal_error
517         with an error.
519 2017-09-29  Dominique d'Humieres  <dominiq@lps.ens.fr>
521         PR fortran/25071
522         * interface.c (compare_actual_formal): Change warnings to errors
523         when "Actual argument contains too few elements for dummy
524         argument", unless -std=legacy is used.
526 2017-09-27  Thomas Schwinge  <thomas@codesourcery.com>
528         * lang.opt <Wdo-subscript>: End help text with a period.
530 2017-09-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
532         * frontend-passes.c (do_subscript): Don't do anything
533         if inside an associate list.
535 2017-09-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
537         * lang.opt:  Add -Wdo-subscript.
538         * frontend-passes.c (do_t): New type.
539         (doloop_list): Use variable of do_type.
540         (if_level): Variable to track if levels.
541         (select_level): Variable to track select levels.
542         (gfc_run_passes): Initialize i_level and select_level.
543         (doloop_code): Record current level of if + select
544         level in doloop_list.  Add seen_goto if there could
545         be a branch outside the loop. Use different type for
546         doloop_list.
547         (doloop_function): Call do_intent and do_subscript; move
548         functionality of checking INTENT to do_intent.
549         (insert_index_t): New type, for callback_insert_index.
550         (callback_insert_index): New function.
551         (insert_index): New function.
552         (do_subscript): New function.
553         (do_intent): New function.
554         (gfc_code_walker): Keep track of if_level and select_level.
555         * invoke.texi: Document -Wdo-subscript.
557 2017-09-25  Janne Blomqvist  <jb@gcc.gnu.org>
559         * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
560         (gfc_likely): Likewise.
562 2017-09-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
563             Steven G. Kargl  <kargl@gcc.gnu.org>
565         PR fortran/80118
566         * expr.c (gfc_get_full_arrayspec_from_expr): If there is
567         no symtree, set array spec to NULL.
569 2017-09-23  Janus Weil  <janus@gcc.gnu.org>
571         PR fortran/82143
572         * lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
573         Rename flag_default_real to flag_default_real_8.
574         * invoke.texi: Add documentation.
575         * module.c (use_iso_fortran_env_module): flag_default_real is renamed.
576         * trans-types.c (gfc_init_kinds): Implement the flags
577         -fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
578         without -fdefault-real-8.
580 2017-09-21  Paul Thomas  <pault@gcc.gnu.org>
582         PR fortran/52832
583         * match.c (gfc_match_associate): Before failing the association
584         try again, allowing a proc pointer selector.
586         PR fortran/80120
587         PR fortran/81903
588         PR fortran/82121
589         * primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
590         points to the associate selector, if any. Go through selector
591         references, after resolution for variables, to catch any full
592         or section array references. If a class associate name does
593         not have the same declared type as the selector, resolve the
594         selector and copy the declared type to the associate name.
595         Before throwing a no implicit type error, resolve all allowed
596         selector expressions, and copy the resulting typespec.
598         PR fortran/67543
599         * resolve.c (resolve_assoc_var): Selector must cannot be the
600         NULL expression and it must have a type.
602         PR fortran/78152
603         * resolve.c (resolve_symbol): Allow associate names to be
604         coarrays.
606 2017-09-21  Cesar Philippidis  <cesar@codesourcery.com>
608         * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
609         arguments to constant integers.
611 2017-09-17  Paul Thomas  <pault@gcc.gnu.org>
613         PR fortran/82173
614         * decl.c (gfc_get_pdt_instance): Use the component initializer
615         expression for the default, rather than the parameter value.
616         * resolve.c (resolve_pdt): New function.
617         (resolve_symbol): Call it. Remove false error, prohibiting
618         deferred type parameters for dummy arguments.
620         PR fortran/60483
621         * primary.c (gfc_match_varspec): If the type of an associate
622         name is unknown and yet there is a match, try resolving the
623         target expression and using its type.
625 2017-09-15  Paul Thomas  <pault@gcc.gnu.org>
627         PR fortran/82184
628         trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
629         field if the symbol is either implicitly or explicitly saved.
631 2017-09-13  Paul Thomas  <pault@gcc.gnu.org>
633         PR fortran/82173
634         * decl.c (match_char_kind): If the kind expression is
635         parameterized, save it in saved_kind_expr and set kind = 0.
636         (gfc_get_pdt_instance): Resolve and simplify before emitting
637         error on expression kind. Insert a missing simplification after
638         insertion of kind expressions.
640 2017-09-12  Paul Thomas  <pault@gcc.gnu.org>
642         PR fortran/82173
643         PR fortran/82168
644         * decl.c (variable_decl): Check pdt template components for
645         appearance of KIND/LEN components in the type parameter name
646         list, that components corresponding to type parameters have
647         either KIND or LEN attributes and that KIND or LEN components
648         are scalar. Copy the initializer to the parameter value.
649         (gfc_get_pdt_instance): Add a label 'error_return' and follow
650         it with repeated code, while replacing this code with a jump.
651         Check if a parameter appears as a component in the template.
652         Make sure that the parameter expressions are integer. Validate
653         KIND expressions.
654         (gfc_match_decl_type_spec): Search for pdt_types in the parent
655         namespace since they are instantiated in the template ns.
656         * expr.c (gfc_extract_int): Use a KIND parameter if it
657         appears as a component expression.
658         (gfc_check_init_expr): Allow expressions with the pdt_kind
659         attribute.
660         *primary.c (gfc_match_actual_arglist): Make sure that the first
661         keyword argument is recognised when 'pdt' is set.
663 2017-09-10  Paul Thomas  <pault@gcc.gnu.org>
665         PR fortran/34640
666         PR fortran/40737
667         PR fortran/55763
668         PR fortran/57019
669         PR fortran/57116
671         * expr.c (is_subref_array): Add class pointer array dummies
672         to the list of expressions that return true.
673         * trans-array.c: Add SPAN_FIELD and update indices for
674         subsequent fields.
675         (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
676         gfc_conv_descriptor_span_set, is_pointer_array,
677         get_array_span): New functions.
678         (gfc_get_descriptor_offsets_for_info): New function to preserve
679         API for access to descriptor fields for trans-types.c.
680         (gfc_conv_scalarized_array_ref): If the expression is a subref
681         array, make sure that info->descriptor is a descriptor type.
682         Otherwise, if info->descriptor is a pointer array, set 'decl'
683         and fix it if it is a component reference.
684         (build_array_ref): Simplify handling of class array refs by
685         passing the vptr to gfc_build_array_ref rather than generating
686         the pointer arithmetic in this function.
687         (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
688         'decl'.
689         (gfc_array_allocate): Set the span field if this is a pointer
690         array. Use the expr3 element size if it is available, so that
691         the dynamic type element size is used.
692         (gfc_conv_expr_descriptor): Set the span field for pointer
693         assignments.
694         * trans-array.h: Prototypes for gfc_conv_descriptor_span_get
695         gfc_conv_descriptor_span_set and
696         gfc_get_descriptor_offsets_for_info added.
697         trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
698         array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
699         the setting of GFC_DECL_SPAN.
700         (gfc_trans_deferred_vars): Set the span field to zero in thge
701         originating scope.
702         * trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
703         copy-out to pass subref expressions to a pointer dummy.
704         (gfc_trans_pointer_assignment): Remove code for setting of
705         GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
706         class function results. Likewise for rank remap. In the case
707         that the target is not a whole array, use the target array ref
708         for remap and, since the 'start' indices are missing, set the
709         lbounds to one, as required by the standard.
710         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
711         'token' offset from the field decl in the descriptor.
712         (conv_isocbinding_subroutine): Set the 'span' field.
713         * trans-io.c (gfc_trans_transfer): Always scalarize pointer
714         array io.
715         * trans-stmt.c (trans_associate_var): Set the 'span' field.
716         * trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
717         field to the array descriptor.
718         (gfc_get_derived_type): Pointer array components are marked as
719         GFC_DECL_PTR_ARRAY_P.
720         (gfc_get_array_descr_info): Replaced API breaking code for
721         descriptor offset calling gfc_get_descriptor_offsets_for_info.
722         * trans.c (get_array_span): New function.
723         (gfc_build_array_ref): Simplify by calling get_array_span and
724         obtain 'span' if 'decl' or 'vptr' present.
725         * trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
726         as GFC_DECL_PTR_ARRAY_P.
728 2017-09-09  Paul Thomas  <pault@gcc.gnu.org>
730         * decl.c : Add decl_type_param_list, type_param_spec_list as
731         static variables to hold PDT spec lists.
732         (build_sym): Copy 'type_param_spec_list' to symbol spec_list.
733         (build_struct): Copy the 'saved_kind_expr' to the component
734         'kind_expr'. Check that KIND or LEN components appear in the
735         decl_type_param_list. These should appear as symbols in the
736         f2k_derived namespace. If the component is itself a PDT type,
737         copy the decl_type_param_list to the component param_list.
738         (gfc_match_kind_spec): If the KIND expression is parameterized
739         set KIND to zero and store the expression in 'saved_kind_expr'.
740         (insert_parameter_exprs): New function.
741         (gfc_insert_kind_parameter_exprs): New function.
742         (gfc_insert_parameter_exprs): New function.
743         (gfc_get_pdt_instance): New function.
744         (gfc_match_decl_type_spec): Match the decl_type_spec_list if it
745         is present. If it is, call 'gfc_get_pdt_instance' to obtain the
746         specific instance of the PDT.
747         (match_attr_spec): Match KIND and LEN attributes. Check for the
748         standard and for type/kind of the parameter. They are also not
749         allowed outside a derived type definition.
750         (gfc_match_data_decl): Null the decl_type_param_list and the
751         type_param_spec_list on entry and free them on exit.
752         (gfc_match_formal_arglist): If 'typeparam' is true, add the
753         formal symbol to the f2k_derived namespace.
754         (gfc_match_derived_decl): Register the decl_type_param_list
755         if this is a PDT. If this is a type extension, gather up all
756         the type parameters and put them in the right order.
757         *dump-parse-tree.c (show_attr): Signal PDT templates and the
758         parameter attributes.
759         (show_components): Output parameter atrributes and component
760         parameter list.
761         (show_symbol): Show variable parameter lists.
762         * expr.c (expr.c): Copy the expression parameter list.
763         (gfc_is_constant_expr): Pass on symbols representing PDT
764         parameters.
765         (gfc_check_init_expr): Break on PDT KIND parameters and
766         PDT parameter expressions.
767         (gfc_check_assign): Assigning to KIND or LEN components is an
768         error.
769         (derived_parameter_expr): New function.
770         (gfc_derived_parameter_expr): New function.
771         (gfc_spec_list_type): New function.
772         * gfortran.h : Add enum gfc_param_spec_type. Add the PDT attrs
773         to the structure symbol_attr. Add the 'kind_expr' and
774         'param_list' field to the gfc_component structure. Comment on
775         the reuse of the gfc_actual_arglist structure as storage for
776         type parameter spec lists. Add the new field 'spec_type' to
777         this structure. Add 'param_list' fields to gfc_symbol and
778         gfc_expr. Add prototypes for gfc_insert_kind_parameter_exprs,
779         gfc_insert_parameter_exprs, gfc_add_kind, gfc_add_len,
780         gfc_derived_parameter_expr and gfc_spec_list_type.
781         * interface.c (gfc_compare_derived_types): Treat PDTs in the
782         same way as sequence types.
783         * match.c : Add variable 'type_param_spec_list'.
784         (gfc_op2string, gfc_match_member_sep, gfc_match_label): Remove
785         trailing whitespace.
786         (match_derived_type_spec): Match PDTs and find specific
787         instance.
788         (gfc_match_type_spec): Remove more trailing whitespace.
789         (gfc_match_allocate): Assumed or deferred parameters cannot
790         appear here. Copy the type parameter spec list to the expr for
791         the allocatable entity. Free 'type_param_spec_list'.
792         (gfc_match_common, gfc_match_namelist, gfc_match_module): Still
793         more trailing whitespace to remove.
794         (gfc_match_type_is): Allow PDT typespecs.
795         * match.h : Modify prototypes for gfc_match_formal_arglist and
796         gfc_match_actual_arglist.
797         * module.c (ab_attribute, mstring attr_bits): PDT attributes
798         added.
799         (mio_symbol_attribute): PDT attributes handled.
800         (mio_component): Deal with 'kind_expr' field.
801         (mio_full_f2k_derived): For PDT templates, transfer the formal
802         namespace symroot to the f2k_derived namespace.
803         *primary.c (match_keyword_arg, gfc_match_actual_arglist): Add
804         modifications to handle PDT spec lists. These are flagged in
805         both cases by new boolean arguments, whose prototype defaults
806         are false.
807         (gfc_match_structure_constructor, match_variable): Remove yet
808         more trailing whitespace.
809         * resolve.c (get_pdt_spec_expr, get_pdt_constructor): New
810         functions.
811         (resolve_structure_cons): If the constructor is a PDT template,
812         call get_pdt_constructor to build it using the parameter lists
813         and then get the specific instance of the PDT.
814         (resolve_component): PDT strings need a hidden string length
815         component like deferred characters.
816         (resolve_symbol): Dummy PDTs cannot have deferred parameters.
817         * symbol.c (gfc_add_kind, gfc_add_len): New functions.
818         (free_components): Free 'kind_expr' and 'param_list' fields.
819         (gfc_free_symbol): Free the 'param_list' field.
820         (gfc_find_sym_tree): If the current state is a PDT template,
821         look for the symtree in the f2k_derived namspaces.
822         trans-array.c (structure_alloc_comps): Allocate and deallocate
823         PDTs. Check dummy arguments for compliance of LEN parameters.
824         Add the new functions to the preceeding enum.
825         (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp and
826         gfc_check_pdt_dummy): New functions calling above.
827         * trans-array.h : Add prototypes for these functions.
828         trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init
829         as appropriate for PDT symbols.
830         (gfc_trans_deferred_vars): Allocate/deallocate PDT entities as
831         they come into and out of scope. Exclude pdt_types from being
832         'gcc_unreachable'.
833         (gfc_trans_subcomponent_assign): PDT array components must be
834         handles as if they are allocatable.
835         * trans-stmt.c (gfc_trans_allocate): Handle initialization of
836         PDT entities.
837         (gfc_trans_deallocate): Likewise.
838         * trans-types.c (gfc_get_derived_type): PDT templates must not
839         arrive here. PDT string components are handles as if deferred.
840         Similarly, PDT arrays are treated as if allocatable. PDT
841         strings are pointer types.
842         * trans.c (gfc_deferred_strlen): Handle PDT strings in the same
843         way as deferred characters.
845 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
847         PR c/81887
848         * parse.c (decode_omp_directive): Use matchs instead of matcho for
849         end ordered and ordered directives, except for ordered depend.  For
850         -fopenmp-simd and ordered depend, reject the stmt.
851         * trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
852         threads clause and if simd clause isn't present, just translate the
853         body.
855 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
856             Alan Hayward  <alan.hayward@arm.com>
857             David Sherwood  <david.sherwood@arm.com>
859         * trans-types.c (gfc_init_kinds): Use opt_scalar_int_mode for
860         the mode iterator.
862 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
863             Alan Hayward  <alan.hayward@arm.com>
864             David Sherwood  <david.sherwood@arm.com>
866         * target-memory.c (size_integer): Use SCALAR_INT_TYPE_MODE.
867         (size_logical): Likewise.
869 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
870             Alan Hayward  <alan.hayward@arm.com>
871             David Sherwood  <david.sherwood@arm.com>
873         * trans-types.c (gfc_type_for_mode): Use is_a <scalar_int_mode>.
875 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
876             Alan Hayward  <alan.hayward@arm.com>
877             David Sherwood  <david.sherwood@arm.com>
879         * trans-types.c (gfc_init_kinds): Use opt_scalar_float_mode
880         and FOR_EACH_MODE_IN_CLASS.
882 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
883             Alan Hayward  <alan.hayward@arm.com>
884             David Sherwood  <david.sherwood@arm.com>
886         * target-memory.c (size_float): Use SCALAR_FLOAT_TYPE_MODE
887         instead of TYPE_MODE.
889 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
890             Alan Hayward  <alan.hayward@arm.com>
891             David Sherwood  <david.sherwood@arm.com>
893         * trans-types.c (gfc_init_kinds): Use machine_mode instead of int
894         for "mode".
896 2017-08-28  Janus Weil  <janus@gcc.gnu.org>
898         PR fortran/81770
899         * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
900         may outlive pointer target.
902 2017-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
904         PR fortran/81974
905         * frontend-passes (inline_matumul_assign):  Explicity
906         set typespec for call to CONJG.
908 2017-08-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
910         PR fortran/81296
911         * trans-io.c (get_dtio_proc): Add check for format label and set
912         formatted flag accordingly. Reorganize the code a little.
914 2017-08-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
916         PR fortran/81116
917         * frontend-passes.c (realloc_string_callback): If expression is a
918         concatenation, also check for dependency.
919         (constant_string_length): Check for presence of symtree.
921 2017-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
923         * gfortran.texi: Document format of unformatted sequential files.
925 2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
927         * invoke.texi:  Actually commit change about -Ofast.
929 2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
931         PR fortran/60355
932         * resolve.c (resolve_symbol): Adjust (and reformat)
933         comment.  Perform check if a BIND(C) is declared
934         at module level regardless of whether it is typed
935         implicitly or not.
937 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
939         * options.c (set_dec_flags): Only set legacy standards when value
940         is not zero.
942 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
944         * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
945         with -fdec when not set by user.
947 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
949         * decl.c (attr_seen): New static variable.
950         * decl.c (variable_decl): Match %FILL in STRUCTURE body.
951         * gfortran.texi: Update documentation.
953 2017-08-08  Martin Liska  <mliska@suse.cz>
955         * trans-types.c: Include header files.
957 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
959         PR fortran/68829
960         PR fortran/81701
961         * options.c: Make -Ofast honor -fmax-stack-var-size.
962         * invoke.texi: Document change.
964 2017-08-01  Thomas König  <tkoenig@gcc.gnu.org>
966         PR fortran/79312
967         * intrisic.c (gfc_convert_type_warn):  Only set typespec for
968         empty array constructors which don't have it already.
970 2017-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
972         PR fortran/45435
973         * lang.opt (fc-prototypes): Add option.
974         * gfortran.h (gfc_typespec): Add interop_kind to struct.
975         (gfc_dump_c_prototypes): Add prototype.
976         * decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
977         * parse.c (gfc_parse_file): Call gfc_dump_prototypes.
978         * dump-parse-tree.c (gfc_dump_c_prototypes): New function.
979         (type_return): New enum.
980         (get_c_type_name): New function.
981         (write_decl): New function.
982         (write_type): New function.
983         (write_variable): New function.
984         (write_proc): New function.
985         (write_interop_decl): New function.
986         * invoke.texi: Document -fc-prototypes.
988 2017-08-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
990         PR fortran/53542
991         * expr.c (gfc_check_init_expr): Use the renamed name.
993 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
995         * check.c (gfc_check_num_images): Fix a pasto.
997 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
999         * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
1000         the imported_module_or_decl debug hook.
1002 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1004         * resolve.c (find_reachable_labels): Adjust.
1006 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
1008         * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
1010 2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1012         * dump-parse-tree.c (show_symbol):  Show binding label if present.
1014 2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1015             Mikael Morin  <mikael@gcc.gnu.org>
1017         PR fortran/66102
1018         * fortran/trans-array.c (gfc_conv_resolve_dependencies):
1019         Break if dependency has been found.
1021 2017-07-23  Alexander Monakov  <amonakov@ispras.ru>
1023         * interface.c (pair_cmp): Fix gfc_symbol comparison.  Adjust comment.
1025 2017-07-18  Nathan Sidwell  <nathan@acm.org>
1027         * trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.
1029 2017-07-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
1031         PR fortran/81341
1032         * class.c (class_array_ref_detected): Remove a redundant
1033         condition.
1035 2017-07-06  Harald Anlauf  <anlauf@gmx.de>
1037         PR fortran/70071
1038         * array.c (gfc_ref_dimen_size): Handle bad subscript triplets.
1040 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
1042         PR fortran/79866
1043         * resolve.c (resolve_symbol): Fix typo.
1045 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
1047         PR fortran/79843
1048         * symbol.c (check_conflict): Add missing "conflicts".
1050 2017-06-29  Cesar Philippidis  <cesar@codesourcery.com>
1052         PR fortran/77765
1053         * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
1054         comparing the routine name against it.
1056 2017-06-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1058         PR fortran/80164
1059         * trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
1060         as warning/error locus.
1062 2017-06-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1064         PR fortran/81160
1065         * arith.c (wprecision_int_real): Set return value before
1066         mpz_clear and then return after it.
1068 2017-06-15  Janus Weil  <janus@gcc.gnu.org>
1070         PR fortran/80983
1071         * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
1072         scalar allocatable procedure-pointer components.
1074 2017-06-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1076         PR fortran/80988
1077         * frontend-passes.c (traverse_io_block):  Also
1078         check for variables occurring as indices multiple
1079         time in a single implied DO loop.
1081 2017-06-05  Janus Weil  <janus@gcc.gnu.org>
1083         PR fortran/70601
1084         * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
1085         function results.
1087 2017-06-05  Nicolas Koenig  <koenigni@student.ethz.ch>
1089         PR fortran/35339
1090         * frontend-passes.c (traverse_io_block): New function.
1091         (simplify_io_impl_do): New function.
1092         (optimize_namespace): Invoke gfc_code_walker with
1093         simplify_io_impl_do.
1095 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
1097         PR fortran/80918
1098         * openmp.c (resolve_omp_clauses): Fix a typo.
1100 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
1102         * error.c (gfc_format_decoder): Update for new bool and
1103         const char ** params.
1105 2017-05-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1107         PR fortran/37131
1108         * frontend-passes.c (check_conjg_transpose_variable):
1109         Add prototype.
1110         (has_dimen_vector_ref):  Likewise
1111         (matmul_temp_args):  New function. Add prototype.
1112         (optimize_namespace):  Call matmul_temp_args.
1114 2017-05-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1116         * frontend-passes.c (matmul_lhs_realloc):  Correct
1117         allocation size for case A1B2.
1119 2017-05-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
1121         * dump-parse-tree.c (show_expr):  Also replace
1122         with dumpfile for showing values for forgotten
1123         case.
1125 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1127         * dump-parse-tree.c (show_expr):  Replace stdout
1128         with dumpfile for showing values.
1130 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1132         PR fortran/66094
1133         * frontend-passes.c (matrix_case):  Add A2TB2.
1134         (inline_limit_check):  Handle MATMUL(TRANSPOSE(A),B)
1135         (inline_matmul_assign):  Likewise.
1137 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1139         * openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
1140         "OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
1142 2017-05-22  Janus Weil  <janus@gcc.gnu.org>
1144         PR fortran/80766
1145         * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
1146         properly resolved.
1148 2017-05-19  Paul Thomas  <pault@gcc.gnu.org>
1150         PR fortran/80333
1151         * trans-io.c (nml_get_addr_expr): If we are dealing with class
1152         type data set tmp tree to get that address.
1153         (transfer_namelist_element): Set the array spec to point to the
1154         the class data.
1156 2017-05-19  David Malcolm  <dmalcolm@redhat.com>
1158         PR fortran/79852
1159         * bbt.c (insert): Remove trailing exclamation mark from message.
1160         * decl.c (gfc_match_final_decl): Likewise.
1161         * dump-parse-tree.c (show_expr): Likewise.
1162         * module.c (gfc_use_module): Likewise.
1163         * primary.c (build_actual_constructor): Likewise.
1164         (gfc_convert_to_structure_constructor): Likewise.
1166 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
1168         * gfortran.h (enum gfc_omp_default_sharing): Add
1169         "OMP_DEFAULT_PRESENT".
1170         * dump-parse-tree.c (show_omp_clauses): Handle it.
1171         * openmp.c (gfc_match_omp_clauses): Likewise.
1172         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1174 2017-05-18  Fritz Reese <fritzoreese@gmail.com>
1176         PR fortran/79968
1177         * decl.c (match_attr_spec, gfc_match_automatic,
1178         gfc_match_static, gfc_match_structure_decl): Unify diagnostic
1179         errors regarding -fdec options.
1180         * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
1182 2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1184         PR fortran/80741
1185         * trans-io.c (transfer_namelist_element): Change check from
1186         NULL_TREE to null_pointer_node.
1188 2017-05-17  Fritz Reese <fritzoreese@gmail.com>
1190         PR fortran/80668
1191         * expr.c (component_initializer): Don't generate initializers for
1192         pointer components.
1193         * invoke.texi (-finit-derived): Document.
1195 2017-05-16  Paul Thomas  <pault@gcc.gnu.org>
1197         PR fortran/80554
1198         * decl.c (build_sym): In a submodule allow overriding of host
1199         associated symbols from the ancestor module with a new
1200         declaration.
1202 2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1204         PR fortran/80674
1205         * trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.
1207 2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1209         PR fortran/80752
1210         * expr.c (gfc_generate_initializer):  If type conversion fails,
1211         check for error and return NULL.
1213 2017-05-14  Nicolas Koenig  <koenigni@student.ethz.ch>
1215         PR fortran/80442
1216         * array.c (gfc_ref_dimen_size): Simplify stride
1217         expression
1218         * data.c (gfc_advance_section): Simplify start,
1219         end and stride expressions
1220         (gfc_advance_section): Simplify start and end
1221         expressions
1222         (gfc_get_section_index): Simplify start expression
1224 2017-05-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1226         * io.c (gfc_resolve_dt): Fix returns to bool type.
1228 2017-05-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1230         PR fortran/78659
1231         * io.c (dtio_procs_present): Add new function to check for DTIO
1232         procedures relative to I/O statement READ or WRITE.
1233         (gfc_resolve_dt): Add namelist checks using the new function.
1234         * resolve.c (dtio_procs_present): Remove function and related
1235         namelist checks. (resolve_fl_namelist): Add check specific to
1236         Fortran 95 restriction on namelist objects.
1238 2017-05-11  Nathan Sidwell  <nathan@acm.org>
1240         * trans-decl.c: Include dumpfile.h not tree-dump.h,
1242 2017-05-09  Janus Weil  <janus@gcc.gnu.org>
1244         PR fortran/79311
1245         * resolve.c (gfc_resolve_finalizers): Ensure that derived-type
1246         components have a their finalizers resolved, also if the superordinate
1247         type itself has a finalizer.
1249 2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1251         PR fortran/79930
1252         * frontend-passes.c (matmul_to_var_expr): New function,
1253         add prototype.
1254         (matmul_to_var_code):  Likewise.
1255         (optimize_namespace):  Use them from gfc_code_walker.
1257 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
1259         * cpp.c (cb_cpp_error): Replace report_diagnostic
1260         with diagnostic_report_diagnostic.
1261         * error.c (gfc_warning): Likewise.
1262         (gfc_warning_now_at): Likewise.
1263         (gfc_warning_now): Likewise.
1264         (gfc_warning_internal): Likewise.
1265         (gfc_error_now): Likewise.
1266         (gfc_fatal_error): Likewise.
1267         (gfc_error_opt): Likewise.
1268         (gfc_internal_error): Likewise.
1270 2017-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1272         PR fortran/37131
1273         * frontend-passes.c (inline_matmul_assign): Also check bounds
1274         for allocatable lhs and matrix-vector-multiplication.
1276 2017-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1278         PR fortran/80484
1279         * io.c (format_lex): Check for '/' and set token to FMT_SLASH.
1280         (check_format): Move FMT_DT checking code to data_desc section.
1281         * module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
1283 2017-04-22  Janus Weil  <janus@gcc.gnu.org>
1285         PR fortran/80121
1286         * trans-types.c (gfc_conv_procedure_call): Deallocate the components
1287         of allocatable intent(out) arguments.
1289 2017-04-21  Janus Weil  <janus@gcc.gnu.org>
1291         PR fortran/80392
1292         * trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
1293         building a derived type that includes a procedure pointer component
1294         with a polymorphic result.
1296 2017-04-17  Paul Thomas  <pault@gcc.gnu.org>
1298         PR fortran/80440
1299         * module.c (find_symtree_for_symbol): Delete.
1300         (read_module): Remove the call to the above.
1302 2017-04-14  Janus Weil  <janus@gcc.gnu.org>
1304         PR fortran/80361
1305         * class.c (generate_finalization_wrapper): Give the finalization wrapper
1306         the recursive attribute.
1308 2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>
1309             Paul Thomas  <pault@gcc.gnu.org>
1311         PR fortran/69498
1312         * module.c (gfc_match_submodule): Add error
1313         if function is called in the wrong state.
1315 2017-04-10  Janus Weil  <janus@gcc.gnu.org>
1317         PR fortran/80046
1318         * expr.c (gfc_check_pointer_assign): Check if procedure pointer
1319         components in a pointer assignment need an explicit interface.
1321 2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
1323         PR fortran/69498
1324         * symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
1325         everything before it.
1327 2017-03-28  Janus Weil  <janus@gcc.gnu.org>
1329         PR fortran/78661
1330         * trans-io.c (transfer_namelist_element): Perform a polymorphic call
1331         to a DTIO procedure if necessary.
1333 2017-03-25  Paul Thomas  <pault@gcc.gnu.org>
1335         PR fortran/80156
1336         PR fortran/79382
1337         * decl.c (access_attr_decl): Remove the error for an absent
1338         generic DTIO interface and ensure that symbol has the flavor
1339         FL_PROCEDURE.
1341 2017-03-22  Dominique d'Humieres  <dominiq@lps.ens.fr>
1343         PR fortran/79838
1344         * module.c: Remove trailing period.
1346 2017-03-22  Dominique d'Humieres  <dominiq@lps.ens.fr>
1348         PR fortran/79602
1349         * decl.c: Replace '%s' with %qs.
1350         * expr.c: Likewise.
1351         * interface.c: Likewise.
1352         * match.c: Likewise.
1353         * primary.c: Likewise.
1354         * resolve.c: Likewise.
1356         PR fortran/79844
1357         PR fortran/80011
1358         * io.c: Remove trailing spaces.
1359         * match.c: Likewise.
1360         * openmp.c: Likewise.
1361         * resolve.c: Likewise.
1362         * trans-intrinsic.c: Likewise.
1364         PR fortran/79853
1365         * expr.c: Remove a double spaces.
1367         PR fortran/79859
1368         * primary.c: Remove spurious quotes around %qs.
1370 2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1372         PR fortran/80142
1373         * frontend-passes.c (combine_array_constructor): Take
1374         location of new expression from constructor expression instead
1375         of constructor.
1377 2017-03-20  Nicolas Koenig  <koenigni@student.ethz.ch>
1379         PR fortran/39239
1380         * symbol.c (check_conflict): Report an error if an EQUIVALENCE
1381         object is BIND(C)
1383 2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
1385         PR fortran/69498
1386         * decl.c (add_hidden_procptr_result): Fixed Refs count of the
1387         created "ppr@" symbol.
1389 2017-03-18  Paul Thomas  <pault@gcc.gnu.org>
1391         PR fortran/79676
1392         * module.c (mio_symbol_attribute): Remove reset of the flag
1393         'no_module_procedures'.
1394         (check_for_module_procedures): New function. Move declaration
1395         of 'no_module_procedures' to above it.
1396         (gfc_dump_module): Traverse namespace calling new function.
1398 2017-03-18  Paul Thomas  <pault@gcc.gnu.org>
1400         PR fortran/71838
1401         * symbol.c (check_conflict): A dummy procedure in a submodule,
1402         module procedure is not an error.
1403         (gfc_add_flavor): Ditto.
1405 2017-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1407         PR fortran/79841
1408         * openmp.c (check_symbol_not_pointer): Adjust diagnostics.
1410 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
1412         PR fortran/80010
1413         * parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
1414         and ST_OACC_END_ATOMIC, instead of !ACC.
1415         * trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
1416         * openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
1417         gfc_resolve_oacc_declare): Likewise.
1419         PR fortran/79886
1420         * error.c (gfc_format_decoder): Rename plus argument to set_locus,
1421         remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
1422         if not a Fortran specific spec.
1423         * trans-io.c: Include options.h.
1424         (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
1425         of artificial IO data structures.
1427 2017-03-15  David Malcolm  <dmalcolm@redhat.com>
1429         PR fortran/79860
1430         * resolve.c (resolve_contained_fntype): Make error messages more
1431         amenable to translation.
1433 2017-03-06  Richard Biener  <rguenther@suse.de>
1435         PR fortran/79894
1436         * trans.c (gfc_add_modify_loc): Weaken assert.
1438 2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>,
1439             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1441         * check.c (positive_check): Add new function checking constant for
1442         being greater then zero.
1443         (gfc_check_image_status): Add checking of image_status arguments.
1444         (gfc_check_failed_or_stopped_images): Same but for failed_- and
1445         stopped_images function.
1446         * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
1447         * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
1448         (enum gfc_isym_id): Added new intrinsic symbols.
1449         (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
1450         * gfortran.texi: Added description for the new API functions. Updated
1451         coverage of gfortran of TS18508.
1452         * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
1453         functions.
1454         * intrinsic.h: Added prototypes.
1455         * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
1456         intrinsic.
1457         (gfc_resolve_image_status): Same for image_status.
1458         (gfc_resolve_stopped_images): Same for stopped_images.
1459         * libgfortran.h: Added prototypes.
1460         * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
1461         (gfc_match_fail_image): Match a FAIL IMAGE statement.
1462         * match.h: Added prototype.
1463         * parse.c (decode_statement): Added matching for FAIL IMAGE.
1464         (next_statement): Same.
1465         (gfc_ascii_statement): Same.
1466         * resolve.c: Same.
1467         * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
1468         single a constant result can be returne.d
1469         (gfc_simplify_image_status): For COARRAY=single the result is constant.
1470         * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
1471         * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
1472         new intrinsics.
1473         * trans-expr.c (gfc_conv_procedure_call): This is first time all
1474         arguments of a function are optional, which is now handled here
1475         correctly.
1476         * trans-intrinsic.c (conv_intrinsic_image_status): Translate
1477         image_status.
1478         (gfc_conv_intrinsic_function): Add support for image_status.
1479         (gfc_is_intrinsic_libcall): Add support for the remaining new
1480         intrinsics.
1481         * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
1482         * trans-stmt.h: Add the prototype for the above.
1483         * trans.c (trans_code): Dispatch for fail_image.
1484         * trans.h: Add the trees for the new intrinsics.
1486 2017-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1488         PR fortran/79841
1489         * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
1491 2017-02-28  Paul Thomas  <pault@gcc.gnu.org>
1493         PR fortran/79739
1494         * resolve.c (resolve_fl_procedure): Deal with the case where
1495         'submodule_name' is NULL so that gfc_error does not ICE.
1496         Reformat the error message to make it more consistent.
1498 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
1500         * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
1501         instead of just cond ? "..." : "...".
1502         * scanner.c (gfc_next_char_literal): Likewise.
1503         * match.c (match_exit_cycle): Likewise.
1505 2017-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1507         PR fortran/51119
1508         * options.c (gfc_post_options): Set default limit for matmul
1509         inlining to 30.
1510         * invoke.texi: Document change.
1512 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
1514         PR fortran/79601
1515         * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
1516         to 'INTENT'.
1518 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
1520         PR fortran/79597
1521         * interface.c (gfc_match_end_interface): Remove spurious comma
1522         and space, replace 'got %s' with 'got %qs'.
1524 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
1526         PR fortran/79599
1527         * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
1528         missing from error message.
1530 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
1532         PR fortran/79523
1533         * interface.c (gfc_find_typebound_dtio_proc): Guard test for
1534         flavor attribute by checking that symbol is resolved.
1536 2017-02-16  Paul Thomas  <pault@gcc.gnu.org>
1538         PR fortran/79382
1539         * decl.c (access_attr_decl): Test for presence of generic DTIO
1540         interface and emit error if not present.
1542 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
1544         PR fortran/79434
1545         * parse.c (check_component, parse_union): Whitespace.
1546         (set_syms_host_assoc): For a derived type, check if the module
1547         in which it was declared is one of the submodule ancestors. If
1548         it is, make the components public. Otherwise, reset attribute
1549         'host_assoc' and set 'use-assoc' so that encapsulation is
1550         preserved.
1552 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
1554         PR fortran/79447
1555         * decl.c (gfc_set_constant_character_len): Whitespace.
1556         (gfc_match_end): Catch case where a procedure is contained in
1557         a module procedure and ensure that 'end procedure' is the
1558         correct termination.
1560 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
1562         PR fortran/79402
1563         * resolve.c (fixup_unique_dummy): New function.
1564         (gfc_resolve_expr): Call it for dummy variables with a unique
1565         symtree name.
1567 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1569         PR fortran/79229
1570         * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
1571         compiling with -fcheck=mem to check the pointer and not the data.
1573 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1575         PR fortran/79335
1576         * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
1577         passed are properly initialized.
1578         (structure_alloc_comps): Same.
1579         * trans-expr.c (gfc_trans_structure_assign): Same.
1581 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1583         * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
1585 2017-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1587         PR fortran/65542
1588         * intrinsic.c (gfc_intrinsic_func_interface):  Return an error
1589         for -std=f95 for disallowed transformational functions in
1590         initialization expressions.
1592 2017-02-09  Cesar Philippidis  <cesar@codesourcery.com>
1593             Joseph Myers  <joseph@codesourcery.com>
1595         * openmp.c (resolve_omp_clauses): Error on directives
1596         containing both tile and collapse clauses.
1597         (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
1598         * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
1599         collapsed loops.
1601 2017-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1603         * trans-types.c (gfc_get_int_kind_from_width_isofortranen):  Choose
1604         REAL type with the widest precision if two (or more) have the same
1605         storage size.
1607 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1609         PR fortran/79344
1610         * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
1611         the temporary, when a new object was created for the temporary.  Not
1612         when it is just an alias to an existing object.
1614 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1616         PR fortran/79335
1617         * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
1618         attributes before using them.
1620 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1622         PR fortran/78958
1623         * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
1624         component of unlimited polymorphic objects when source-allocating.
1626 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
1628         PR fortran/79230
1629         * trans-array.c (structure_alloc_comps): Ignore pointer components when
1630         freeing structures.
1632 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1634         PR lto/79061
1635         * f95-lang.c (gfc_create_decls): Include stringpool.h.
1636         Pass main_input_filename to build_translation_unit_decl.
1638 2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>
1640         * arith.c (arith_power):  If simplifying integer power expression
1641         to zero, warn if -Winteger-division is given.
1643 2017-01-22  Jakub Jelinek  <jakub@redhat.com>
1645         PR fortran/79154
1646         * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
1647         with { ret = st; goto finish; }.
1648         (decode_omp_directive): Allow declare simd, declare target and
1649         simd directives in PURE/ELEMENTAL procedures.  Only call
1650         gfc_unset_implicit_pure on successful match of other procedures.
1652 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
1654         * gfc-internals.texi (Symbol Versioning): Change references
1655         to www.akkadia.org to https.
1657 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
1659         * gfortran.h (gfc_extract_int): Change return type to bool.  Add
1660         int argument with = 0.
1661         * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1662         1 as new last argument to it, don't emit gfc_error.
1663         (match_char_kind): Likewise.
1664         (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
1665         gfc_get_string (x).
1666         (gfc_match_derived_decl, match_binding_attributes): Likewise.
1667         (gfc_match_structure_decl): Don't sprintf back to name, call
1668         get_struct_decl directly with gfc_dt_upper_string (name) result.
1669         * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
1670         instead of gfc_get_string (x).
1671         * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
1672         gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
1673         mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
1674         load_omp_udrs, load_needed, read_module, dump_module,
1675         create_intrinsic_function, import_iso_c_binding_module,
1676         create_int_parameter, create_int_parameter_array, create_derived_type,
1677         use_iso_fortran_env_module): Likewise.
1678         * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
1679         pp_verbatim (context->printer, "%s", x) instead of
1680         pp_verbatim (context->printer, x).
1681         * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1682         1 as new last argument to it, don't emit gfc_error.
1683         (gfc_match_small_int_expr): Likewise.
1684         * iresolve.c (gfc_get_string): Optimize format "%s" case.
1685         (resolve_bound): Use gfc_get_string ("%s", x) instead of
1686         gfc_get_string (x).
1687         (resolve_transformational): Formatting fix.
1688         (gfc_resolve_char_achar): Change name argument to bool is_achar,
1689         use a single format string and if is_achar add "a" before "char".
1690         (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
1691         * expr.c (gfc_extract_int): Change return type to bool, return true
1692         if some error occurred.  Add REPORT_ERROR argument, if non-zero
1693         call either gfc_error or gfc_error_now depending on its sign.
1694         * arith.c (arith_power): Adjust gfc_extract_int caller.
1695         * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
1696         of gfc_get_string (x).
1697         (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
1698         gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
1699         * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
1700         -1 as new last argument to it, don't emit gfc_error_now.
1701         (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
1702         instead of gfc_get_string (x).
1703         * check.c (kind_check): Adjust gfc_extract_int caller.
1704         * intrinsic.c (add_sym, find_sym, make_alias): Use
1705         gfc_get_string ("%s", x) instead of gfc_get_string (x).
1706         * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
1707         gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
1708         gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
1709         Adjust gfc_extract_int callers.
1710         * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
1711         instead of gfc_get_string (x).
1712         * matchexp.c (expression_syntax): Add const.
1713         * primary.c (match_kind_param, match_hollerith_constant,
1714         match_string_constant): Adjust gfc_extract_int callers.
1715         (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
1716         gfc_get_string (x).
1717         * frontend-passes.c (optimize_minmaxloc): Likewise.
1719 2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1721         PR fortran/70696
1722         * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
1723         function only, when the decl-context is not the translation unit.
1725 2017-01-18  Louis Krupp  <louis.krupp@zoho.com>
1727         PR fortran/50069
1728         PR fortran/55086
1729         * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
1730         as function arguments.
1731         * trans-stmt.c (forall_make_variable_temp,
1732         generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
1733         gfc_trans_forall_1): Don't adjust offset of forall temporary
1734         for array sections, make forall temporaries work for substring
1735         expressions, improve test coverage by adding -ftest-forall-temp
1736         option to request usage of temporary array in forall code.
1737         * lang.opt: Add -ftest-forall-temp option.
1738         * invoke.texi: Add -ftest-forall-temp option.
1740 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1742         * primary.c (caf_variable_attr): Improve figuring whether the current
1743         component is the last one refed.
1744         * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
1745         when allocating pointer or allocatable components.
1747 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1749         * gfortran.texi: Add missing parameters to caf-API functions.  Correct
1750         typos and clarify some descriptions.
1752 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
1754         PR fortran/70696
1755         Missed some cases, here they are:
1756         * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
1757         parent function's scope.
1758         * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code.  Remove
1759         unnecessary assert.
1761 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1763         PR fortran/70697
1764         * resolve.c (resolve_lock_unlock_event): Resolve the expression for
1765         event's until_count.
1767 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1769         PR fortran/70696
1770         * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
1771         is valid before accessing it.
1773 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
1775         PR translation/79019
1776         PR translation/79020
1777         * decl.c (attr_decl1): Fix spelling in translatable string.
1778         * intrinsic.texi: Fix spelling - invokation -> invocation.
1779         * lang.opt (faggressive-function-elimination, gfc_convert): Fix
1780         typos in descriptions.
1781         * openmp.c (resolve_omp_clauses): Add missing whitespace to
1782         translatable strings.
1784 2017-01-08  Martin Sebor  <msebor@redhat.com>
1786         PR tree-optimization/78913
1787         PR middle-end/77708
1788         * trans-common.c (build_equiv_decl): Increase buffer size to avoid
1789         truncation for any argument.
1790         * trans-types.c (gfc_build_logical_type): Same.
1792 2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>
1794         PR fortran/78781
1795         PR fortran/78935
1796         * expr.c (gfc_check_pointer_assign): Return the same error message for
1797         rewritten coarray pointer assignments like for plain ones.
1798         * gfortran.h: Change prototype.
1799         * primary.c (caf_variable_attr): Set attributes used ones only only
1800         ones.  Add setting of pointer_comp attribute.
1801         (gfc_caf_attr): Add setting of pointer_comp attribute.
1802         * trans-array.c (gfc_array_allocate): Add flag that the component to
1803         allocate is not an ultimate coarray component.  Add allocation of
1804         pointer arrays.
1805         (structure_alloc_comps): Extend nullify to treat pointer components in
1806         coarrays correctly.  Restructure nullify to remove redundant code.
1807         (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
1808         * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
1809         * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
1810         derived type coarrays with pointer components.
1811         * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
1812         components.
1813         (trans_caf_token_assign): Handle assignment of token of scalar pointer
1814         components.
1815         (gfc_trans_pointer_assignment): Call above routine.
1816         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
1817         components.
1818         (gfc_conv_intrinsic_caf_get): Likewise.
1819         (conv_caf_send): Likewise.
1820         * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
1821         a coarray pre-register the tokens.
1822         (gfc_trans_deallocate): Simply determining the coarray type (scalar or
1823         array) and deregistering it correctly.
1824         * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
1825         actual codim to allow lookup of array types in the cache.
1826         (gfc_build_array_type): Likewise.
1827         (gfc_get_array_descriptor_base): Likewise.
1828         (gfc_get_array_type_bounds): Likewise.
1829         (gfc_get_derived_type): Likewise.
1830         * trans-types.h: Likewise.
1831         * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
1832         of coarray components.
1833         (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
1834         instead of caf_deregister.
1836 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
1838         * simplify.c (simplify_transformation_to_array): Use
1839         GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
1840         #pragma GCC diagnostic {push,ignored,pop}.
1842 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
1844         * simplify.c (simplify_transformation_to_array): Silence
1845         array bounds warning.  Fix whitespace.
1847 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1849         * module.c (load_omp_udrs): Initialize name.
1851 2017-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
1853         PR fortran/78534
1854         * trans-expr.c (gfc_trans_string_copy): Rework string copy
1855         algorithm to avoid -Wstringop-overflow warning.
1857 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1859         Update copyright years.
1861         * gfortranspec.c (lang_specific_driver): Update copyright notice
1862         dates.
1863         * gfc-internals.texi: Bump @copying's copyright year.
1864         * gfortran.texi: Ditto.
1865         * intrinsic.texi: Ditto.
1866         * invoke.texi: Ditto.
1868 Copyright (C) 2017 Free Software Foundation, Inc.
1870 Copying and distribution of this file, with or without modification,
1871 are permitted in any medium without royalty provided the copyright
1872 notice and this notice are preserved.