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