re PR fortran/90290 (-std=f2008 should reject non-constant stop and error stop codes)
[official-gcc.git] / gcc / fortran / ChangeLog
blob5aaa52eb302a787c2c52b45457f45f7c1a749710
1 2019-05-06  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/90290
4         * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
6 2019-05-01  Andrew Benson  <abensonca@gmail.com>
8         * module.c (write_module): Initialize module_column before writing
9         module to ensure line break occurs at correct column.
11 2019-05-01 Dominique d'Humieres  <dominiq@gcc.gnu.org>
13         PR fortran/60144
14         * match.c (gfc_match_parens): Change the location for missing ')'.
15         (gfc_match_if): Detect a missing '('. Remove the spurious named
16         constant error. Change the wording of some errors.
17         (gfc_match_else): Change the wording of an error.
18         (gfc_match_elseif): Detect a missing '('. Improve the matching
19         process to get a better syntax analysis.
21 2019-04-19  Steven G. Kargl  <kargl@gcc.gnu.org>
23         PR fortran/90166
24         * decl.c (in_module_or_interface): New function to check that the
25         current state is in a module, submodule, or interface.
26         (gfc_match_prefix): Use it.
28 2019-04-22  Paul Thomas  <pault@gcc.gnu.org>
30         PR fortran/57284
31         * resolve.c (find_array_spec): If this is a class expression
32         and the symbol and component array specs are the same, this is
33         not an error.
34         *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
35         argument, has no namespace, it has come from the interface
36         mapping and the _data component must be accessed directly.
38 2019-04-17  Thomas Schwinge  <thomas@codesourcery.com>
40         PR fortran/90048
41         * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
42         OpenACC, too.
43         (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
44         clauses.
46 2019-04-14  Paul Thomas  <pault@gcc.gnu.org>
48         PR fortran/89843
49         * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
50         rank dummies of bind C procs require deferred initialization.
51         (convert_CFI_desc): New procedure to convert incoming CFI
52         descriptors to gfc types and back again.
53         (gfc_trans_deferred_vars): Call it.
54         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
55         descriptor pointer. Free the descriptor in all cases.
57         PR fortran/89846
58         * expr.c (is_CFI_desc): New function.
59         (is_subref_array): Tidy up by referencing the symbol directly.
60         * gfortran.h : Prototype for is_CFI_desc.
61         * trans_array.c (get_CFI_desc): New function.
62         (gfc_get_array_span, gfc_conv_scalarized_array_ref,
63         gfc_conv_array_ref): Use it.
64         * trans.c (get_array_span): Extract the span from descriptors
65         that are indirect references.
67         PR fortran/90022
68         * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
69         expression is a pointer type before converting it to the symbol
70         backend_decl type.
71         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
72         temporary creation for intent(in).
74 2019-04-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
76         PR fortran/79842
77         * module.c (gfc_use_module): use complete sentences.
79 2019-04-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
81         PR translation/89939
82         * frontend-passes.c (B_ERROR): Delete macro.
83         (C_ERROR): Delete macro.
84         (B_ERROR_1): New macro.
85         (C_ERROR_1): New macro.
86         (C_ERROR_2): New macro.
87         (inline_matmul_assign): Use new macros.
88         (call_external_blas): Likewise.
90 2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
92         PR fortran/87352
93         * gfortran.h (gfc_component): Add finalized field.
94         * class.c (finalize_component): If the component is already
95         finalized, return early.  Set component->finalized on exit.
97 2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
99         PR fortran/89981
100         * resolve.c (resolve_global_procedure): If the global symbol is an
101         ENTRY, also look up its name among the entries.
103 2019-04-04  Harald Anlauf  <anlauf@gmx.de>
105         PR fortran/89904
106         * check.c (gfc_check_transfer): Reject procedures as actual
107         arguments for SOURCE and MOLD of TRANSFER intrinsic.
109 2019-04-03  Steven G. Kargl  <kargl@gcc.gnu.org>
111         PR fortran/68567
112         * expr.c (gfc_reduce_init_expr): Add extra check to avoid
113         dereferencing a null pointer.
115 2019-04-03  Dominique d'Humieres  <dominiq@gcc.gnu.org>
117         PR fortran/89375
118         * expr.c (comp_pointer): Remove redundant condition.
120 2019-03-31  Harald Anlauf  <anlauf@gmx.de>
122         PR fortran/83515
123         PR fortran/85797
124         * trans-types.c (gfc_typenode_for_spec): Handle conversion for
125         procedure pointers.
126         * target-memory.c (gfc_element_size): Handle size determination
127         for procedure pointers.
129 2019-03-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
131         * dump-parse-tree.c (debug):  Add for symbol_attribute *,
132         symbol_attribute and gfc_ref * arguments.
134 2019-03-30  Paul Thomas  <pault@gcc.gnu.org>
136         PR fortran/89841
137         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
138         argument attributes rather than those of the actual argument.
140         PR fortran/89842
141         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
142         'set_dtype_for_unallocated' for any type of arrayspec.
144 2019-03-27  Janus Weil  <janus@gcc.gnu.org>
146         PR fortran/85537
147         * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
148         in procedure pointer initialization.
150 2019-03-27  Paul Thomas  <pault@gcc.gnu.org>
152         PR fortran/88247
153         * expr.c (is_subref_array): Permit substrings to be detected
154         as subref arrays.
155         * trans-array.c (get_array_ctor_var_strlen): Obtain the length
156         of deferred length strings. Handle substrings with a NULL end
157         expression.
158         (trans_array_constructor): Remove an unnecessary blank line.
159         (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
160         is a pointer array.
161         (get_array_charlen): If the expression is an array, convert the
162         first element of the constructor and use its string length. Get
163         a new charlen if necessary.
164         (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
165         constructor expressions. If the ss_info string length is
166         available, use that to set the span of character arrays.
167         * trans-expr.c (gfc_get_expr_charlen): Handle substrings
168         * trans-stmt.c (trans_associate_var): Set the pointer array
169         flag for variable targets and constant array constructors. Take
170         care not to reset the string length or the span in the case of
171         expressions that are not converted as direct by reference.
173 2019-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
175         * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
176         (MAXLOC): Likewise.
178 2019-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
180         PR fortran/78865
181         * interface.c (compare_actual_formal): Change errors about
182         missing or extra to gfc_error_now to make sure they are issued.
183         Change "spec" to "specifier" in message.
184         * resolve.c (resolve_global_procedure): Also check for mismatching
185         interface with global symbols if the namespace has already been
186         resolved.
188 2019-03-21  Thomas Schwinge  <thomas@codesourcery.com>
190         PR fortran/72741
191         * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
192         for all variants.
193         (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
195         PR fortran/89773
196         * gfortran.h (gfc_oacc_routine_name): Add loc member.
197         (gfc_resolve_oacc_routines): Declare.
198         * openmp.c (gfc_match_oacc_routine): Move some error checking
199         into...
200         (gfc_resolve_oacc_routines): ... this new function.
201         * resolve.c (resolve_codes): Call it.
203         PR fortran/72741
204         * openmp.c (gfc_match_oacc_routine): Clarify.
206         PR fortran/72741
207         * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
208         (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
209         AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
210         AB_OACC_ROUTINE_LOP_SEQ.
211         (attr_bits): Add these.
212         (mio_symbol_attribute): Handle these.
214 2019-03-20  Janus Weil  <janus@gcc.gnu.org>
216         PR fortran/71861
217         * symbol.c (check_conflict): ABSTRACT attribute conflicts with
218         INTRINSIC attribute.
220 2019-03-18  Thomas Koenig  <tkoeng@gcc.gnu.org>
222         PR fortran/68009
223         * iresolve.c: Include trans.h.
224         (gfc_resolve_fe_runtine_error): Set backend_decl on
225         resolved_sym.
227 2019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
229         PR fortran/88008
230         * gfortran.h (expr_t): Add EXPR_UNKNOWN.
231         * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
232         (gfc_simplify_expr): Likewise.
233         * module.c (mio_expr): Likewise.
234         * resovle.c (extract_compcall_passed_object): Issue error on
235         unknown type.
236         (check_typebound_baseobject): Issue error on wrong type.
237         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
238         EXPR_UNKNOWN to switch statement.
240 2019-03-16  Jakub Jelinek  <jakub@redhat.com>
242         PR fortran/89724
243         * scanner.c (load_line): Remove linenum and current_line static
244         variables, add warned_tabs automatic variable.  Use current_file->line
245         instead of current_line and warned_tabs boolean to avoid diagnosing
246         tabs multiple times on the same line.
248 2019-03-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
250         PR fortran/84394
251         * symbol.c (gfc_add_subroutine): If we are encountering a
252         subrtoutine within a BLOCK DATA and the name starts with an
253         underscore, do not check.
255 2019-03-15  Harald Anlauf  <anlauf@gmx.de>
257         PR fortran/60091
258         * expr.c (gfc_check_pointer_assign): Correct and improve error
259         messages for invalid pointer assignments.
261 2019-03-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
263         * gfortran.texi: Document Q edit descriptor under
264         "Extensions not implemented in GNU Fortran".
266 2019-03-13  Harald Anlauf  <anlauf@gmx.de>
268         PR fortran/87045
269         * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
270         string length so that we do not get false errors for deferred
271         length.
273 2019-03-13  Janus Weil  <janus@gcc.gnu.org>
275         PR fortran/89601
276         * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
277         (gfc_match_derived_decl): Mark as PDT only if type parameter list was
278         matched successfully.
280 2019-03-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
282         PR fortran/66695
283         PR fortran/77746
284         PR fortran/79485
285         * gfortran.h (gfc_symbol): Add bind_c component.
286         (gfc_get_gsymbol): Add argument bind_c.
287         * decl.c (add_global_entry): Add bind_c argument to
288         gfc_get_symbol.
289         * parse.c (parse_block_data): Likewise.
290         (parse_module): Likewise.
291         (add_global_procedure): Likewise.
292         (add_global_program): Likewise.
293         * resolve.c (resolve_common_blocks): Likewise.
294         (resolve_global_procedure): Likewise.
295         (gfc_verify_binding_labels): Likewise.
296         * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
297         in gsym.
298         * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
299         to gfc_get_symbol.
300         (gfc_get_extern_function_decl): If the sym has a binding label
301         and it cannot be found in the global symbol tabel, it is the wrong
302         one and vice versa.
304 2019-03-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
306         PR fortran/87673
307         * match.c (gfc_match_type_spec): Remove call to
308         gfc_resolve_expr for character length.
310 2019-03-12  Martin Liska  <mliska@suse.cz>
312         * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
313         with 'cannot'.
314         (variable_decl): Likewise.
315         (cray_pointer_decl): Likewise.
316         (match_binding_attributes): Likewise.
317         * f95-lang.c (gfc_init): Likewise.
318         * interface.c (gfc_check_typebound_override): Likewise.
319         * intrinsic.c (make_generic): Likewise.
320         * module.c (dump_module): Likewise.
321         (gfc_use_module): Likewise.
322         * primary.c (gfc_convert_to_structure_constructor): Likewise.
323         * resolve.c (resolve_entries): Likewise.
324         (check_generic_tbp_ambiguity): Likewise.
325         (get_checked_tb_operator_target): Likewise.
326         * scanner.c (load_file): Likewise.
327         * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
329 2019-03-12  Paul Thomas  <pault@gcc.gnu.org>
331         PR fortran/89363
332         PR fortran/89364
333         * trans-expr.c (set_dtype_for_unallocated): New function.
334         (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
335         pointer arguments.
336         (gfc_conv_procedure_call): Likewise. Also, set the ubound of
337         the final dimension to -1 for assumed rank formal args that are
338         associated with assumed size arrays.
339         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
340         the final dimension of assumed rank entities that are argument
341         associated with assumed size arrays.
342         (gfc_conv_intrinsic_shape): Likewise return -1 for the final
343         dimension of the shape intrinsic.
345 2019-03-11  Jakub Jelinek  <jakub@redhat.com>
347         PR fortran/89651
348         * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
349         on decl if adding COND_EXPR for allocatable.
350         (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
352 2019-03-11  Martin Liska  <mliska@suse.cz>
354         * decl.c (match_record_decl): Wrap an option name
355         in a string format message and fix GNU coding style.
356         (gfc_match_pointer): Likewise.
357         * expr.c (find_array_section): Likewise.
358         * intrinsic.c (gfc_is_intrinsic): Likewise.
359         * options.c (gfc_post_options): Likewise.
360         * primary.c (match_integer_constant): Likewise.
361         * trans-common.c (translate_common): Likewise.
363 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
365         PR fortran/66089
366         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
367         Return false if a scalar tempoary is needed.
368         (gfc_walk_variable_expr): Fix up class refs.
370 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
372         PR fortran/87734
373         * symbol.c (gfc_add_procedure): Only throw an error if the
374         procedure has not been declared either PUBLIC or PRIVATE.
376 2019-03-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
378         PR fortran/71544
379         * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
380         C_PTR and C_FUNPTR.
381         (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
383 2019-03-09  Janus Weil  <janus@gcc.gnu.org>
385         PR fortran/84504
386         * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
387         pointer-valued functions.
389 2019-03-09  Thomas König  <tkoenig@gcc.gnu.org>
391         PR fortran/71203
392         * decl.c (add_init_expr_to_sym):  Add shape if init has none.  Add
393         asserts that it has to be an EXPR_ARRAY in this case.
395 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
397         PR other/80058
398         * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
399         diagnostics.
400         * resolve.c (resolve_allocate_expr): Likewise.
402 2019-03-06  Harald Anlauf  <anlauf@gmx.de>
404         PR fortran/71203
405         * expr.c (simplify_const_ref): Avoid null pointer dereference.
407 2019-03-03  Harald Anlauf  <anlauf@gmx.de>
408             Steven G. Kargl  <kargl@gcc.gnu.org>
410         PR fortran/77583
411         * symbol.c (check_conflict): Check for valid procedure name
412         passed to error reporting routine.
414 2019-03-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
416         PR fortran/72714
417         * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
419 2019-03-02  Harald Anlauf  <anlauf@gmx.de>
421         PR fortran/89516
422         * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
423         where storage size of elements of MOLD is 0.
425 2019-02-28  Thomas Schwinge  <thomas@codesourcery.com>
426             Cesar Philippidis  <cesar@codesourcery.com>
428         PR fortran/72741
429         PR fortran/89433
430         * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
431         Fortran OpenACC 'routine' directive.
433         PR fortran/72741
434         * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
435         * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
436         * trans-decl.c (add_attributes_to_decl): Likewise.
438         PR fortran/72741
439         PR fortran/89433
440         * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
442 2019-02-26  Harald Anlauf  <anlauf@gmx.de>
444         PR fortran/89492
445         * check.c (gfc_calculate_transfer_sizes): Handle cases where
446         storage size of elements of MOLD is 0.
448 2019-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
450         PR fortran/89496
451         * trans-types.c (get_formal_from_actual_arglist): If
452         the actual arglist has no expression, the corresponding
453         formal arglist is an alternate return.
455 2019-02-26  Jakub Jelinek  <jakub@redhat.com>
457         PR fortran/43210
458         * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
459         of duplicating the initializer possibly many times.
461 2019-02-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
463         PR fortran/89174
464         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
465         to arguments. If we are dealing with a MOLD, call
466         gfc_expr_to_initialize().
467         * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
468         to gfc_find_and_cut_at_last_class_ref.
469         * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
470         argument is_mold with default false.
472 2019-02-24  Harald Anlauf  <anlauf@gmx.de>
474         PR fortran/89266
475         PR fortran/88326
476         * target-memory.c (gfc_element_size): Return false if element size
477         cannot be determined; element size is returned separately.
478         (gfc_target_expr_size): Return false if expression size cannot be
479         determined; expression size is returned separately.
480         * target-memory.h: Adjust prototypes.
481         * check.c (gfc_calculate_transfer_sizes): Adjust references to
482         gfc_target_expr_size, gfc_element_size.
483         * arith.c (hollerith2representation): Likewise.
484         * class.c (find_intrinsic_vtab): Likewise.
485         * simplify.c (gfc_simplify_sizeof): Likewise.
487 2019-02-23  Jerry DeLisle <jvdelisle@gcc.gnu.org>
489         PR fortran/84387
490         * trans-io.c (transfer_expr): Do not return if there are no
491         components to the derived type or class.
493 2019-02-23  Paul Thomas  <pault@gcc.gnu.org>
495         PR fortran/88117
496         * resolve.c (deferred_op_assign): Return if the lhs expression
497         has the pointer attribute.
498         * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
499         length if the lhs expression has the pointer attribute.
501 2019-02-23  Paul Thomas  <pault@gcc.gnu.org>
503         PR fortran/89385
504         PR fortran/89366
505         * decl.c (gfc_verify_c_interop_param): Restriction on string
506         length being one is lifted for F2018.
507         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
508         characters with intent in, make a temporary and copy the result
509         of the expression evaluation into it.
510         (gfc_conv_procedure_call): Set a flag for character formal args
511         having a character length that is not unity. If the procedure
512         is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
513         Also, extend bind C calls to unconditionally convert both
514         pointers and allocatable expressions.
516 2019-02-23  David Malcolm  <dmalcolm@redhat.com>
517             Jakub Jelinek  <jakub@redhat.com>
519         PR middle-end/88074
520         * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
521         mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
522         (norm2_add_squared): Likewise.  Use mp_exp_t rather than mpfr_exp_t.
524 2019-02-22  Harald Anlauf  <anlauf@gmx.de>
526         PR fortran/83057
527         * io.c (gfc_match_open): Fix logic in checks of OPEN statement
528         when NEWUNIT= is specified.
530 2019-02-22  Steven G. Kargl  <kargl@gcc.gnu.org>
532         PR fortran/89431
533         * gfortran.texi: Fix documentation to match the implementation.
535 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
536             Cesar Philippidis  <cesar@codesourcery.com>
538         PR fortran/72741
539         * gfortran.h (oacc_routine_lop): New enum.
540         (symbol_attribute): Use it.
541         * openmp.c (gfc_oacc_routine_dims): Replace with...
542         (gfc_oacc_routine_lop): ... this new function.
543         (gfc_match_oacc_routine): Adjust.
544         * trans-decl.c (add_attributes_to_decl): Likewise.
546 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
548         * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
550 2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
552         * dump-parse-tree.c (debug): Implement for gfc_expr *,
553         gfc_typespec *, gfc_typespec and gfc_symbol *.
555 2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
557         PR fortran/86119
558         * class.c (gfc_get_len_component): Add argument k for kind.
559         If the kind of the resulting expression is not equal to k,
560         convert it.
561         * gfortran.h (gfc_len_component): Adjust prototype.
562         * simplify.c (gfc_simplify_len): Pass kind to
563         gfc_get_len_component.
565 2019-02-20  Martin Liska  <mliska@suse.cz>
567         * gfortran.texi: Change singular to plural.
569 2019-02-20  Martin Liska  <mliska@suse.cz>
571         * gfortran.texi: Document Fortran header directive.
573 2019-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
575         PR fortran/89384
576         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
577         argument is contiguous and the actual argument may not be,
578         use gfc_conv_subref_array_arg.
580 2019-02-19  Thomas Schwinge  <thomas@codesourcery.com>
582         PR c/87924
583         * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
584         without argument as 'wait (GOMP_ASYNC_NOVAL)'.
586 2019-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
588         PR fortran/87689
589         * trans-decl.c (gfc_get_extern_function_decl): Add argument
590         actual_args and pass it through to gfc_get_function_type.
591         * trans-expr.c (conv_function_val): Add argument actual_args
592         and pass it on to gfc_get_extern_function_decl.
593         (conv_procedure_call): Pass actual arguments to conv_function_val.
594         * trans-types.c (get_formal_from_actual_arglist): New function.
595         (gfc_get_function_type): Add argument actual_args.  Generate
596         formal args from actual args if necessary.
597         * trans-types.h (gfc_get_function_type): Add optional argument.
598         * trans.h (gfc_get_extern_function_decl): Add optional argument.
600 2019-02-18  Martin Liska  <mliska@suse.cz>
602         * decl.c (gfc_match_gcc_builtin): Add support for filtering
603         of builtin directive based on multilib ABI name.
605 2019-02-17  Harald Anlauf  <anlauf@gmx.de>
607         PR fortran/88299
608         * resolve.c (resolve_common_blocks,resolve_common_vars): Move
609         check for obsolent COMMON feature in F2018 to better place.
611 2019-02-17  Harald Anlauf  <anlauf@gmx.de>
613         PR fortran/89077
614         * decl.c (gfc_set_constant_character_len): Clear original string
615         representation after padding has been performed to target length.
617 2019-02-16  Jakub Jelinek  <jakub@redhat.com>
619         PR middle-end/88074
620         * simplify.c (simplify_transformation_to_array): Run post_op
621         immediately after processing corresponding row, rather than at the
622         end.
623         (norm2_scale): New variable.
624         (add_squared): Rename to ...
625         (norm2_add_squared): ... this.  Scale down operand and/or result
626         if needed.
627         (do_sqrt): Rename to ...
628         (norm2_do_sqrt): ... this.  Handle the result == e case.  Scale up
629         result and clear norm2_scale.
630         (gfc_simplify_norm2): Clear norm2_scale.  Change add_squared to
631         norm2_add_squared and &do_sqrt to norm2_do_sqrt.  Scale up result
632         and clear norm2_scale again.
634 2019-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
636         PR fortran/71066
637         * trans-decl.c (generate_coarray_sym_init):  For an array
638         constructor in a DATA statement of a coarray variable, set the
639         rank to 1 to avoid confusion later on.  If the constructor
640         contains only one value, use that for initiailizig.
642 2019-02-14  Janne Blomqvist  <jb@gcc.gnu.org>
644         PR fortran/81552
645         * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
646         * options.c (gfc_handle_option): Use strtol instead of atoi.
647         * invoke.texi: Document -finit-integer behavior in more detail.
649 2019-02-14  Harald Anlauf  <anlauf@gmx.de>
651         PR fortran/88248
652         * symbol.c: Move check for labeled DO statement from
653         gfc_define_st_label to gfc_reference_st_label.
655 2019-02-14  Cesar Philippidis  <cesar@codesourcery.com>
657         PR fortran/72715
658         * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
659         loops.
661 2019-02-13  Martin Liska  <mliska@suse.cz>
663         PR fortran/88649
664         * resolve.c (resolve_operator): Initialize 't' right
665         after function entry.  Skip switch (e->value.op.op)
666         for -fdec operands that become function calls.
668 2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
670         PR fortran/71723
671         * expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
672         looking at an init expression, issue error if the target is not a
673         TARGET and we are not looking at a procedure pointer.
674         * gfortran.h (gfc_check_assign): Add optional argument
675         is_init_expr.
677 2019-02-09  Harald Anlauf  <anlauf@gmx.de>
679         PR fortran/89077
680         * resolve.c (gfc_resolve_substring_charlen): Check substring
681         length for constantness prior to general calculation of length.
683 2019-02-09  Paul Thomas  <pault@gcc.gnu.org>
685         PR fortran/89200
686         * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
687         field for derived types.
689 2019-02-04  Harald Anlauf  <anlauf@gmx.de>
691         PR fortran/89077
692         * decl.c (add_init_expr_to_sym): Copy length of string initializer
693         to declared symbol.
695 2019-02-04  Martin Liska  <mliska@suse.cz>
697         PR fortran/89185
698         * resolve.c (resolve_ref): Remove breakout variable as
699         we need to prevent prev = &(*prev)->next to happen
700         with *prev == NULL.
702 2019-02-04  Martin Liska  <mliska@suse.cz>
704         PR fortran/88912
705         * scanner.c (load_file): Report error for -fpre-include
706         file and do not ICE.
708 2019-02-02  Dominique d'Humieres  <dominiq@gcc.gnu.org>
710         PR fortran/81344
711         * invoke.texi: Document the behavior of repeated -ffpe-trap
712         and -ffpe-summary.
714 2019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
716         PR fortran/88298
717         * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
718         * gfortran.h (gfc_expr): Add flag do_not_warn.
719         * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
720         no warning is desired.
722 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
724         PR fortran/88393
725         * trans-expr.c (gfc_conv_procedure_call): For derived entities,
726         passed in parentheses to class formals, invert the order of
727         copying allocatable components to taking the _data of the
728         class expression.
730 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
732         PR fortran/88980
733         * trans-array.c (gfc_array_init_size): Add element_size to the
734         arguments.
735         (gfc_array_allocate): Remove the recalculation of the size of
736         the element and use element_size from the call to the above.
737         Unconditionally set the span field of the descriptor.
739 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
741         PR fortran/88685
742         * expr.c (is_subref_array): Move the check for class pointer
743         dummy arrays to after the reference check. If we haven't seen
744         an array reference other than an element and a component is not
745         class or derived, return false.
747 2019-02-01  Jakub Jelinek  <jakub@redhat.com>
749         PR fortran/83246
750         PR fortran/89084
751         * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
752         if sym->ns->construct_entities rather than if
753         sym->ns->parent->code->op == EXEC_BLOCK.
755 2019-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
757         PR fortran/88669
758         * resolve.c (resolve_component): If the reference is a BT_CLASS,
759         copy the contiguous attribute from the reference and use the
760         correct attributes.
762 2019-01-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
764         PR fortran/52564
765         * io.c (match_io): Add check for comma after '*' without subsequent
766         IO list.
768 2019-01-30  Dominique d'Humieres  <dominiq@gcc.gnu.org>
770         PR fortran/52884
771         * invoke.texi: Document the promotion of double precision
772         constants.
774 2019-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
776         PR fortran/57048
777         * interface.c (gfc_compare_types): If a derived type and an
778         integer both have a derived type, and they are identical,
779         this is a C binding type and compares equal.
781 2019-01-26  Harald Anlauf  <anlauf@gmx.de>
783         PR fortran/57553
784         * expr.c (check_inquiry): Add list of inquiry functions allowed in
785         constant expressions for F2008+.
787 2019-01-25  Steven G. Kargl  <kargl@gcc.gnu.org>
789         PR fortran/85780
790         * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
791         and alternative return.
793 2019-01-24  Paul Thomas  <pault@gcc.gnu.org>
795         PR fortran/88929
796         * trans-array.c (gfc_conv_descriptor_elem_len): New function.
797         * trans-array.h : Add prototype for above.
798         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
799         assumed rank arrays being flagged by rank = -1 in expressions.
800         Intent in arrays need a pointer to a copy of the data to be
801         assigned to the descriptor passed for conversion. This should
802         then be freed, together with the CFI descriptor on return from
803         the C call.
805 2019-01-22  Harald Anlauf  <anlauf@gmx.de>
807         PR fortran/88579
808         * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
809         and (- 2**e) ** integer.
811 2019-01-19  Dominique d'Humieres  <dominiq@gcc.gnu.org>
813         PR fortran/37835
814         * resolve.c (resolve_types): Add !flag_automatic.
815         * symbol.c (gfc_add_save): Silence warnings.
817 2019-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
819         PR fortran/77960
820         * io.c (match_io_element): input-item cannot be an external function.
822 2018-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
823         Paul Thomas  <pault@gcc.gnu.org>
825         PR fortran/56789
826         * trans-expr.c (gfc_conv_procedure_call): Call
827         gfc_conv_subref_array_arg if the formal arg is contiguous
828         and the actual arg may not be.
830 2019-01-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
832         PR fortran/88871
833         * resolve.c (resolve_ref): Fix logic for removal of
834         reference.
836 2019-01-19  Jakub Jelinek  <jakub@redhat.com>
838         PR fortran/88902
839         * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
840         or parent function if it has been added there already.
842 2019-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
844         PR fortran/43136
845         * resolve.c (resolve_array_ref): Add equal_length argument; set it
846         if the length of the substring equals that of the orignal
847         variable.
848         (resolve_ref): Remove the substring if it is equal in length to
849         the original variable, unless it is an EXPR_SUBSTRING).
851 2019-01-15  Steven G. Kargl  <kargl@gcc.gnu.org>
853         PR fortran/81849
854         * resolve.c (resolve_symbol): Host associated varaibles can appear
855         in the specification statement of a RESULT array.
857 2019-01-15  Paul Thomas  <pault@gcc.gnu.org>
859         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
860         that are indirect references; ie. dummy arguments.
862 2019-01-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
864         PR fortran/88803
865         * gfortran.texi: Replace @xref with @ref and adjust the sentence.
867 2019-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
869         PR fortran/57992
870         * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
871         functions with contiguous results.
873 2019-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
875         PR fortran/59345
876         * trans-array.c (gfc_conv_array_parameter): Remove TODO.  Do not
877         pack/unpack results of functions which return an explicit-shaped
878         or allocatable array.
880 2019-01-12  Steven G. Kargl  <kargl@gcc.gnu.org>
882         PR fortran/61765
883         * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
884         structure into independent if's with a return to simplify logic.
885         Avoid a check for ENTRY name with bind(c).
887 2019-01-12  Paul Thomas  <pault@gcc.gnu.org>
889         * gfortran.texi: Add description in sections on TS 29113 and
890         further interoperability with C.
891         * trans-array.c (gfc_conv_descriptor_attribute): New function.
892         (gfc_get_dataptr_offset): Remove static function attribute.
893         * trans-array.h: Add prototypes for above functions.
894         * trans-decl.c: Add declarations for the library functions
895         cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
896         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
897         (gfc_conv_procedure_call): Call it for scalar and array actual
898         arguments, when the formal arguments are bind_c with assumed
899         shape or assumed rank.
900         * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
901         and gfor_fndecl_gfc_to_cfi.
903 2019-01-11  Steven G. Kargl  <kargl@gcc.gnu.org>
905         PR fortran/35031
906         * decl.c (gfc_match_entry): Check for F2018:C1546.  Fix nearby
907         mis-indentation.
909 2019-01-11  Jakub Jelinek  <jakub@redhat.com>
911         PR middle-end/85956
912         PR lto/88733
913         * trans-openmp.c: Include attribs.h.
914         (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
915         VAR_DECL max bound with "omp dummy var" attribute like NULL or
916         error_mark_node - recompute number of elts independently.
918 2019-01-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
920         PR fortran/59345
921         * trans-array.c (gfc_conv_parameter_array): Temporary
922         arrays generated for expressions do not need to be repacked.
924 2019-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
926         PR fortran/86322
927         * decl.c (top_var_list): Set locus of expr.
928         (gfc_match_data): Detect pointer on non-rightmost part-refs.
930 2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
932         PR fortran/88376
933         * resolve.c (is_illegal_recursion): Remove an assert().
935 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
937         PR other/16615
938         * expr.c: Change "can not" to "cannot".
940 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
942         PR other/16615
943         * class.c: Mechanically replace "can not" with "cannot".
944         * decl.c: Likewise.
945         * expr.c: Likewise.
946         * gfc-internals.texi: Likewise.
947         * intrinsic.texi: Likewise.
948         * invoke.texi: Likewise.
949         * io.c: Likewise.
950         * match.c: Likewise.
951         * parse.c: Likewise.
952         * primary.c: Likewise.
953         * resolve.c: Likewise.
954         * symbol.c: Likewise.
955         * trans-array.c: Likewise.
956         * trans-decl.c: Likewise.
957         * trans-intrinsic.c: Likewise.
958         * trans-stmt.c: Likewise.
960 2019-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
962         PR fortran/68426
963         * simplify.c (gfc_simplify_spread): Also simplify if the
964         type of source is an EXPR_STRUCTURE.
966 2019-01-08  Janus Weil  <janus@gcc.gnu.org>
968         PR fortran/88047
969         * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
970         the class container may not be available (in case of invalid code).
972 2019-01-08  Richard Biener  <rguenther@suse.de>
974         PR fortran/88611
975         * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
976         directly build the expected GENERIC tree.
978 2019-01-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
979         Harald Anlauf <anlauf@gmx.de>
980         Tobias Burnus <burnus@gcc.gnu.org>
982         PR fortran/45424
983         * check.c (gfc_check_is_contiguous): New function.
984         * expr.c (gfc_is_not_contiguous): New function.
985         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
986         Add prototype for gfc_is_not_contiguous.
987         * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
988         (add_function): Add is_contiguous.
989         * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
990         gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
991         * intrinsic.texi: Add IS_CONTIGUOUS.
992         * iresolve.c (gfc_resolve_is_contiguous): New function.
993         * simplify.c (gfc_simplify_is_contiguous): New function.
994         * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
995         (gfc_build_intrinsic_function_decl): Add it.
996         * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
997         function.
998         (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
1000 2019-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1002         PR fortran/88658
1003         * gfortran.h: Add macro gfc_real_4_kind
1004         * simplify.c (simplify_min_max): Special case for the types of
1005         AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
1006         their arguments.
1008 2019-01-05  Janus Weil  <janus@gcc.gnu.org>
1010         PR fortran/88009
1011         * class.c (gfc_find_derived_vtab): Mark the _final component as
1012         artificial.
1013         (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
1014         dereferencing a null pointer and adjust indentation.
1015         * resolve.c (resolve_fl_variable): Add extra check to avoid
1016         dereferencing a null pointer. Move variable declarations to local scope.
1017         (resolve_fl_procedure): Add extra check to avoid dereferencing a null
1018         pointer.
1019         * symbol.c (check_conflict): Suppress errors for artificial symbols.
1021 2019-01-01  Steven G. Kargl  <kargl@gcc.gnu.org>
1023         * parse.c (decode_statement): Suppress "Unclassifiable statement"
1024         error if previous error messages were emittes.
1026 2019-01-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1028         PR fortran/82743
1029         * primary.c (gfc_convert_to_structure_constructor): If a character
1030         in a constructor is too long, add a  warning with
1031         -Wcharacter-truncation.
1033 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
1035         Update copyright years.
1037         * gfortranspec.c (lang_specific_driver): Update copyright notice
1038         dates.
1039         * gfc-internals.texi: Bump @copying's copyright year.
1040         * gfortran.texi: Ditto.
1041         * intrinsic.texi: Ditto.
1042         * invoke.texi: Ditto.
1044 Copyright (C) 2019 Free Software Foundation, Inc.
1046 Copying and distribution of this file, with or without modification,
1047 are permitted in any medium without royalty provided the copyright
1048 notice and this notice are preserved.