re PR fortran/90166 (Compiler Fails at Assembler)
[official-gcc.git] / gcc / fortran / ChangeLog
blob12cb55c2dcb9d9e18f69d6b106f0211152f04021
1 2019-04-19  Steven G. Kargl  <kargl@gcc.gnu.org>
3         PR fortran/90166
4         * decl.c (in_module_or_interface): New function to check that the
5         current state is in a module, submodule, or interface.
6         (gfc_match_prefix): Use it.
8 2019-04-22  Paul Thomas  <pault@gcc.gnu.org>
10         PR fortran/57284
11         * resolve.c (find_array_spec): If this is a class expression
12         and the symbol and component array specs are the same, this is
13         not an error.
14         *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
15         argument, has no namespace, it has come from the interface
16         mapping and the _data component must be accessed directly.
18 2019-04-17  Thomas Schwinge  <thomas@codesourcery.com>
20         PR fortran/90048
21         * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
22         OpenACC, too.
23         (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
24         clauses.
26 2019-04-14  Paul Thomas  <pault@gcc.gnu.org>
28         PR fortran/89843
29         * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
30         rank dummies of bind C procs require deferred initialization.
31         (convert_CFI_desc): New procedure to convert incoming CFI
32         descriptors to gfc types and back again.
33         (gfc_trans_deferred_vars): Call it.
34         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
35         descriptor pointer. Free the descriptor in all cases.
37         PR fortran/89846
38         * expr.c (is_CFI_desc): New function.
39         (is_subref_array): Tidy up by referencing the symbol directly.
40         * gfortran.h : Prototype for is_CFI_desc.
41         * trans_array.c (get_CFI_desc): New function.
42         (gfc_get_array_span, gfc_conv_scalarized_array_ref,
43         gfc_conv_array_ref): Use it.
44         * trans.c (get_array_span): Extract the span from descriptors
45         that are indirect references.
47         PR fortran/90022
48         * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
49         expression is a pointer type before converting it to the symbol
50         backend_decl type.
51         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
52         temporary creation for intent(in).
54 2019-04-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
56         PR fortran/79842
57         * module.c (gfc_use_module): use complete sentences.
59 2019-04-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
61         PR translation/89939
62         * frontend-passes.c (B_ERROR): Delete macro.
63         (C_ERROR): Delete macro.
64         (B_ERROR_1): New macro.
65         (C_ERROR_1): New macro.
66         (C_ERROR_2): New macro.
67         (inline_matmul_assign): Use new macros.
68         (call_external_blas): Likewise.
70 2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
72         PR fortran/87352
73         * gfortran.h (gfc_component): Add finalized field.
74         * class.c (finalize_component): If the component is already
75         finalized, return early.  Set component->finalized on exit.
77 2019-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
79         PR fortran/89981
80         * resolve.c (resolve_global_procedure): If the global symbol is an
81         ENTRY, also look up its name among the entries.
83 2019-04-04  Harald Anlauf  <anlauf@gmx.de>
85         PR fortran/89904
86         * check.c (gfc_check_transfer): Reject procedures as actual
87         arguments for SOURCE and MOLD of TRANSFER intrinsic.
89 2019-04-03  Steven G. Kargl  <kargl@gcc.gnu.org>
91         PR fortran/68567
92         * expr.c (gfc_reduce_init_expr): Add extra check to avoid
93         dereferencing a null pointer.
95 2019-04-03  Dominique d'Humieres  <dominiq@gcc.gnu.org>
97         PR fortran/89375
98         * expr.c (comp_pointer): Remove redundant condition.
100 2019-03-31  Harald Anlauf  <anlauf@gmx.de>
102         PR fortran/83515
103         PR fortran/85797
104         * trans-types.c (gfc_typenode_for_spec): Handle conversion for
105         procedure pointers.
106         * target-memory.c (gfc_element_size): Handle size determination
107         for procedure pointers.
109 2019-03-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
111         * dump-parse-tree.c (debug):  Add for symbol_attribute *,
112         symbol_attribute and gfc_ref * arguments.
114 2019-03-30  Paul Thomas  <pault@gcc.gnu.org>
116         PR fortran/89841
117         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
118         argument attributes rather than those of the actual argument.
120         PR fortran/89842
121         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
122         'set_dtype_for_unallocated' for any type of arrayspec.
124 2019-03-27  Janus Weil  <janus@gcc.gnu.org>
126         PR fortran/85537
127         * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
128         in procedure pointer initialization.
130 2019-03-27  Paul Thomas  <pault@gcc.gnu.org>
132         PR fortran/88247
133         * expr.c (is_subref_array): Permit substrings to be detected
134         as subref arrays.
135         * trans-array.c (get_array_ctor_var_strlen): Obtain the length
136         of deferred length strings. Handle substrings with a NULL end
137         expression.
138         (trans_array_constructor): Remove an unnecessary blank line.
139         (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
140         is a pointer array.
141         (get_array_charlen): If the expression is an array, convert the
142         first element of the constructor and use its string length. Get
143         a new charlen if necessary.
144         (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
145         constructor expressions. If the ss_info string length is
146         available, use that to set the span of character arrays.
147         * trans-expr.c (gfc_get_expr_charlen): Handle substrings
148         * trans-stmt.c (trans_associate_var): Set the pointer array
149         flag for variable targets and constant array constructors. Take
150         care not to reset the string length or the span in the case of
151         expressions that are not converted as direct by reference.
153 2019-03-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
155         * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
156         (MAXLOC): Likewise.
158 2019-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
160         PR fortran/78865
161         * interface.c (compare_actual_formal): Change errors about
162         missing or extra to gfc_error_now to make sure they are issued.
163         Change "spec" to "specifier" in message.
164         * resolve.c (resolve_global_procedure): Also check for mismatching
165         interface with global symbols if the namespace has already been
166         resolved.
168 2019-03-21  Thomas Schwinge  <thomas@codesourcery.com>
170         PR fortran/72741
171         * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
172         for all variants.
173         (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
175         PR fortran/89773
176         * gfortran.h (gfc_oacc_routine_name): Add loc member.
177         (gfc_resolve_oacc_routines): Declare.
178         * openmp.c (gfc_match_oacc_routine): Move some error checking
179         into...
180         (gfc_resolve_oacc_routines): ... this new function.
181         * resolve.c (resolve_codes): Call it.
183         PR fortran/72741
184         * openmp.c (gfc_match_oacc_routine): Clarify.
186         PR fortran/72741
187         * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
188         (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
189         AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
190         AB_OACC_ROUTINE_LOP_SEQ.
191         (attr_bits): Add these.
192         (mio_symbol_attribute): Handle these.
194 2019-03-20  Janus Weil  <janus@gcc.gnu.org>
196         PR fortran/71861
197         * symbol.c (check_conflict): ABSTRACT attribute conflicts with
198         INTRINSIC attribute.
200 2019-03-18  Thomas Koenig  <tkoeng@gcc.gnu.org>
202         PR fortran/68009
203         * iresolve.c: Include trans.h.
204         (gfc_resolve_fe_runtine_error): Set backend_decl on
205         resolved_sym.
207 2019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
209         PR fortran/88008
210         * gfortran.h (expr_t): Add EXPR_UNKNOWN.
211         * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
212         (gfc_simplify_expr): Likewise.
213         * module.c (mio_expr): Likewise.
214         * resovle.c (extract_compcall_passed_object): Issue error on
215         unknown type.
216         (check_typebound_baseobject): Issue error on wrong type.
217         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
218         EXPR_UNKNOWN to switch statement.
220 2019-03-16  Jakub Jelinek  <jakub@redhat.com>
222         PR fortran/89724
223         * scanner.c (load_line): Remove linenum and current_line static
224         variables, add warned_tabs automatic variable.  Use current_file->line
225         instead of current_line and warned_tabs boolean to avoid diagnosing
226         tabs multiple times on the same line.
228 2019-03-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
230         PR fortran/84394
231         * symbol.c (gfc_add_subroutine): If we are encountering a
232         subrtoutine within a BLOCK DATA and the name starts with an
233         underscore, do not check.
235 2019-03-15  Harald Anlauf  <anlauf@gmx.de>
237         PR fortran/60091
238         * expr.c (gfc_check_pointer_assign): Correct and improve error
239         messages for invalid pointer assignments.
241 2019-03-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
243         * gfortran.texi: Document Q edit descriptor under
244         "Extensions not implemented in GNU Fortran".
246 2019-03-13  Harald Anlauf  <anlauf@gmx.de>
248         PR fortran/87045
249         * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
250         string length so that we do not get false errors for deferred
251         length.
253 2019-03-13  Janus Weil  <janus@gcc.gnu.org>
255         PR fortran/89601
256         * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
257         (gfc_match_derived_decl): Mark as PDT only if type parameter list was
258         matched successfully.
260 2019-03-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
262         PR fortran/66695
263         PR fortran/77746
264         PR fortran/79485
265         * gfortran.h (gfc_symbol): Add bind_c component.
266         (gfc_get_gsymbol): Add argument bind_c.
267         * decl.c (add_global_entry): Add bind_c argument to
268         gfc_get_symbol.
269         * parse.c (parse_block_data): Likewise.
270         (parse_module): Likewise.
271         (add_global_procedure): Likewise.
272         (add_global_program): Likewise.
273         * resolve.c (resolve_common_blocks): Likewise.
274         (resolve_global_procedure): Likewise.
275         (gfc_verify_binding_labels): Likewise.
276         * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
277         in gsym.
278         * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
279         to gfc_get_symbol.
280         (gfc_get_extern_function_decl): If the sym has a binding label
281         and it cannot be found in the global symbol tabel, it is the wrong
282         one and vice versa.
284 2019-03-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
286         PR fortran/87673
287         * match.c (gfc_match_type_spec): Remove call to
288         gfc_resolve_expr for character length.
290 2019-03-12  Martin Liska  <mliska@suse.cz>
292         * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
293         with 'cannot'.
294         (variable_decl): Likewise.
295         (cray_pointer_decl): Likewise.
296         (match_binding_attributes): Likewise.
297         * f95-lang.c (gfc_init): Likewise.
298         * interface.c (gfc_check_typebound_override): Likewise.
299         * intrinsic.c (make_generic): Likewise.
300         * module.c (dump_module): Likewise.
301         (gfc_use_module): Likewise.
302         * primary.c (gfc_convert_to_structure_constructor): Likewise.
303         * resolve.c (resolve_entries): Likewise.
304         (check_generic_tbp_ambiguity): Likewise.
305         (get_checked_tb_operator_target): Likewise.
306         * scanner.c (load_file): Likewise.
307         * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
309 2019-03-12  Paul Thomas  <pault@gcc.gnu.org>
311         PR fortran/89363
312         PR fortran/89364
313         * trans-expr.c (set_dtype_for_unallocated): New function.
314         (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
315         pointer arguments.
316         (gfc_conv_procedure_call): Likewise. Also, set the ubound of
317         the final dimension to -1 for assumed rank formal args that are
318         associated with assumed size arrays.
319         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
320         the final dimension of assumed rank entities that are argument
321         associated with assumed size arrays.
322         (gfc_conv_intrinsic_shape): Likewise return -1 for the final
323         dimension of the shape intrinsic.
325 2019-03-11  Jakub Jelinek  <jakub@redhat.com>
327         PR fortran/89651
328         * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
329         on decl if adding COND_EXPR for allocatable.
330         (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
332 2019-03-11  Martin Liska  <mliska@suse.cz>
334         * decl.c (match_record_decl): Wrap an option name
335         in a string format message and fix GNU coding style.
336         (gfc_match_pointer): Likewise.
337         * expr.c (find_array_section): Likewise.
338         * intrinsic.c (gfc_is_intrinsic): Likewise.
339         * options.c (gfc_post_options): Likewise.
340         * primary.c (match_integer_constant): Likewise.
341         * trans-common.c (translate_common): Likewise.
343 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
345         PR fortran/66089
346         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
347         Return false if a scalar tempoary is needed.
348         (gfc_walk_variable_expr): Fix up class refs.
350 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
352         PR fortran/87734
353         * symbol.c (gfc_add_procedure): Only throw an error if the
354         procedure has not been declared either PUBLIC or PRIVATE.
356 2019-03-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
358         PR fortran/71544
359         * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
360         C_PTR and C_FUNPTR.
361         (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
363 2019-03-09  Janus Weil  <janus@gcc.gnu.org>
365         PR fortran/84504
366         * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
367         pointer-valued functions.
369 2019-03-09  Thomas König  <tkoenig@gcc.gnu.org>
371         PR fortran/71203
372         * decl.c (add_init_expr_to_sym):  Add shape if init has none.  Add
373         asserts that it has to be an EXPR_ARRAY in this case.
375 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
377         PR other/80058
378         * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
379         diagnostics.
380         * resolve.c (resolve_allocate_expr): Likewise.
382 2019-03-06  Harald Anlauf  <anlauf@gmx.de>
384         PR fortran/71203
385         * expr.c (simplify_const_ref): Avoid null pointer dereference.
387 2019-03-03  Harald Anlauf  <anlauf@gmx.de>
388             Steven G. Kargl  <kargl@gcc.gnu.org>
390         PR fortran/77583
391         * symbol.c (check_conflict): Check for valid procedure name
392         passed to error reporting routine.
394 2019-03-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
396         PR fortran/72714
397         * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
399 2019-03-02  Harald Anlauf  <anlauf@gmx.de>
401         PR fortran/89516
402         * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
403         where storage size of elements of MOLD is 0.
405 2019-02-28  Thomas Schwinge  <thomas@codesourcery.com>
406             Cesar Philippidis  <cesar@codesourcery.com>
408         PR fortran/72741
409         PR fortran/89433
410         * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
411         Fortran OpenACC 'routine' directive.
413         PR fortran/72741
414         * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
415         * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
416         * trans-decl.c (add_attributes_to_decl): Likewise.
418         PR fortran/72741
419         PR fortran/89433
420         * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
422 2019-02-26  Harald Anlauf  <anlauf@gmx.de>
424         PR fortran/89492
425         * check.c (gfc_calculate_transfer_sizes): Handle cases where
426         storage size of elements of MOLD is 0.
428 2019-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
430         PR fortran/89496
431         * trans-types.c (get_formal_from_actual_arglist): If
432         the actual arglist has no expression, the corresponding
433         formal arglist is an alternate return.
435 2019-02-26  Jakub Jelinek  <jakub@redhat.com>
437         PR fortran/43210
438         * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
439         of duplicating the initializer possibly many times.
441 2019-02-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
443         PR fortran/89174
444         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
445         to arguments. If we are dealing with a MOLD, call
446         gfc_expr_to_initialize().
447         * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
448         to gfc_find_and_cut_at_last_class_ref.
449         * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
450         argument is_mold with default false.
452 2019-02-24  Harald Anlauf  <anlauf@gmx.de>
454         PR fortran/89266
455         PR fortran/88326
456         * target-memory.c (gfc_element_size): Return false if element size
457         cannot be determined; element size is returned separately.
458         (gfc_target_expr_size): Return false if expression size cannot be
459         determined; expression size is returned separately.
460         * target-memory.h: Adjust prototypes.
461         * check.c (gfc_calculate_transfer_sizes): Adjust references to
462         gfc_target_expr_size, gfc_element_size.
463         * arith.c (hollerith2representation): Likewise.
464         * class.c (find_intrinsic_vtab): Likewise.
465         * simplify.c (gfc_simplify_sizeof): Likewise.
467 2019-02-23  Jerry DeLisle <jvdelisle@gcc.gnu.org>
469         PR fortran/84387
470         * trans-io.c (transfer_expr): Do not return if there are no
471         components to the derived type or class.
473 2019-02-23  Paul Thomas  <pault@gcc.gnu.org>
475         PR fortran/88117
476         * resolve.c (deferred_op_assign): Return if the lhs expression
477         has the pointer attribute.
478         * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
479         length if the lhs expression has the pointer attribute.
481 2019-02-23  Paul Thomas  <pault@gcc.gnu.org>
483         PR fortran/89385
484         PR fortran/89366
485         * decl.c (gfc_verify_c_interop_param): Restriction on string
486         length being one is lifted for F2018.
487         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
488         characters with intent in, make a temporary and copy the result
489         of the expression evaluation into it.
490         (gfc_conv_procedure_call): Set a flag for character formal args
491         having a character length that is not unity. If the procedure
492         is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
493         Also, extend bind C calls to unconditionally convert both
494         pointers and allocatable expressions.
496 2019-02-23  David Malcolm  <dmalcolm@redhat.com>
497             Jakub Jelinek  <jakub@redhat.com>
499         PR middle-end/88074
500         * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
501         mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
502         (norm2_add_squared): Likewise.  Use mp_exp_t rather than mpfr_exp_t.
504 2019-02-22  Harald Anlauf  <anlauf@gmx.de>
506         PR fortran/83057
507         * io.c (gfc_match_open): Fix logic in checks of OPEN statement
508         when NEWUNIT= is specified.
510 2019-02-22  Steven G. Kargl  <kargl@gcc.gnu.org>
512         PR fortran/89431
513         * gfortran.texi: Fix documentation to match the implementation.
515 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
516             Cesar Philippidis  <cesar@codesourcery.com>
518         PR fortran/72741
519         * gfortran.h (oacc_routine_lop): New enum.
520         (symbol_attribute): Use it.
521         * openmp.c (gfc_oacc_routine_dims): Replace with...
522         (gfc_oacc_routine_lop): ... this new function.
523         (gfc_match_oacc_routine): Adjust.
524         * trans-decl.c (add_attributes_to_decl): Likewise.
526 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
528         * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
530 2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
532         * dump-parse-tree.c (debug): Implement for gfc_expr *,
533         gfc_typespec *, gfc_typespec and gfc_symbol *.
535 2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
537         PR fortran/86119
538         * class.c (gfc_get_len_component): Add argument k for kind.
539         If the kind of the resulting expression is not equal to k,
540         convert it.
541         * gfortran.h (gfc_len_component): Adjust prototype.
542         * simplify.c (gfc_simplify_len): Pass kind to
543         gfc_get_len_component.
545 2019-02-20  Martin Liska  <mliska@suse.cz>
547         * gfortran.texi: Change singular to plural.
549 2019-02-20  Martin Liska  <mliska@suse.cz>
551         * gfortran.texi: Document Fortran header directive.
553 2019-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
555         PR fortran/89384
556         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
557         argument is contiguous and the actual argument may not be,
558         use gfc_conv_subref_array_arg.
560 2019-02-19  Thomas Schwinge  <thomas@codesourcery.com>
562         PR c/87924
563         * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
564         without argument as 'wait (GOMP_ASYNC_NOVAL)'.
566 2019-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
568         PR fortran/87689
569         * trans-decl.c (gfc_get_extern_function_decl): Add argument
570         actual_args and pass it through to gfc_get_function_type.
571         * trans-expr.c (conv_function_val): Add argument actual_args
572         and pass it on to gfc_get_extern_function_decl.
573         (conv_procedure_call): Pass actual arguments to conv_function_val.
574         * trans-types.c (get_formal_from_actual_arglist): New function.
575         (gfc_get_function_type): Add argument actual_args.  Generate
576         formal args from actual args if necessary.
577         * trans-types.h (gfc_get_function_type): Add optional argument.
578         * trans.h (gfc_get_extern_function_decl): Add optional argument.
580 2019-02-18  Martin Liska  <mliska@suse.cz>
582         * decl.c (gfc_match_gcc_builtin): Add support for filtering
583         of builtin directive based on multilib ABI name.
585 2019-02-17  Harald Anlauf  <anlauf@gmx.de>
587         PR fortran/88299
588         * resolve.c (resolve_common_blocks,resolve_common_vars): Move
589         check for obsolent COMMON feature in F2018 to better place.
591 2019-02-17  Harald Anlauf  <anlauf@gmx.de>
593         PR fortran/89077
594         * decl.c (gfc_set_constant_character_len): Clear original string
595         representation after padding has been performed to target length.
597 2019-02-16  Jakub Jelinek  <jakub@redhat.com>
599         PR middle-end/88074
600         * simplify.c (simplify_transformation_to_array): Run post_op
601         immediately after processing corresponding row, rather than at the
602         end.
603         (norm2_scale): New variable.
604         (add_squared): Rename to ...
605         (norm2_add_squared): ... this.  Scale down operand and/or result
606         if needed.
607         (do_sqrt): Rename to ...
608         (norm2_do_sqrt): ... this.  Handle the result == e case.  Scale up
609         result and clear norm2_scale.
610         (gfc_simplify_norm2): Clear norm2_scale.  Change add_squared to
611         norm2_add_squared and &do_sqrt to norm2_do_sqrt.  Scale up result
612         and clear norm2_scale again.
614 2019-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
616         PR fortran/71066
617         * trans-decl.c (generate_coarray_sym_init):  For an array
618         constructor in a DATA statement of a coarray variable, set the
619         rank to 1 to avoid confusion later on.  If the constructor
620         contains only one value, use that for initiailizig.
622 2019-02-14  Janne Blomqvist  <jb@gcc.gnu.org>
624         PR fortran/81552
625         * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
626         * options.c (gfc_handle_option): Use strtol instead of atoi.
627         * invoke.texi: Document -finit-integer behavior in more detail.
629 2019-02-14  Harald Anlauf  <anlauf@gmx.de>
631         PR fortran/88248
632         * symbol.c: Move check for labeled DO statement from
633         gfc_define_st_label to gfc_reference_st_label.
635 2019-02-14  Cesar Philippidis  <cesar@codesourcery.com>
637         PR fortran/72715
638         * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
639         loops.
641 2019-02-13  Martin Liska  <mliska@suse.cz>
643         PR fortran/88649
644         * resolve.c (resolve_operator): Initialize 't' right
645         after function entry.  Skip switch (e->value.op.op)
646         for -fdec operands that become function calls.
648 2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
650         PR fortran/71723
651         * expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
652         looking at an init expression, issue error if the target is not a
653         TARGET and we are not looking at a procedure pointer.
654         * gfortran.h (gfc_check_assign): Add optional argument
655         is_init_expr.
657 2019-02-09  Harald Anlauf  <anlauf@gmx.de>
659         PR fortran/89077
660         * resolve.c (gfc_resolve_substring_charlen): Check substring
661         length for constantness prior to general calculation of length.
663 2019-02-09  Paul Thomas  <pault@gcc.gnu.org>
665         PR fortran/89200
666         * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
667         field for derived types.
669 2019-02-04  Harald Anlauf  <anlauf@gmx.de>
671         PR fortran/89077
672         * decl.c (add_init_expr_to_sym): Copy length of string initializer
673         to declared symbol.
675 2019-02-04  Martin Liska  <mliska@suse.cz>
677         PR fortran/89185
678         * resolve.c (resolve_ref): Remove breakout variable as
679         we need to prevent prev = &(*prev)->next to happen
680         with *prev == NULL.
682 2019-02-04  Martin Liska  <mliska@suse.cz>
684         PR fortran/88912
685         * scanner.c (load_file): Report error for -fpre-include
686         file and do not ICE.
688 2019-02-02  Dominique d'Humieres  <dominiq@gcc.gnu.org>
690         PR fortran/81344
691         * invoke.texi: Document the behavior of repeated -ffpe-trap
692         and -ffpe-summary.
694 2019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
696         PR fortran/88298
697         * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
698         * gfortran.h (gfc_expr): Add flag do_not_warn.
699         * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
700         no warning is desired.
702 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
704         PR fortran/88393
705         * trans-expr.c (gfc_conv_procedure_call): For derived entities,
706         passed in parentheses to class formals, invert the order of
707         copying allocatable components to taking the _data of the
708         class expression.
710 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
712         PR fortran/88980
713         * trans-array.c (gfc_array_init_size): Add element_size to the
714         arguments.
715         (gfc_array_allocate): Remove the recalculation of the size of
716         the element and use element_size from the call to the above.
717         Unconditionally set the span field of the descriptor.
719 2019-02-02  Paul Thomas  <pault@gcc.gnu.org>
721         PR fortran/88685
722         * expr.c (is_subref_array): Move the check for class pointer
723         dummy arrays to after the reference check. If we haven't seen
724         an array reference other than an element and a component is not
725         class or derived, return false.
727 2019-02-01  Jakub Jelinek  <jakub@redhat.com>
729         PR fortran/83246
730         PR fortran/89084
731         * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
732         if sym->ns->construct_entities rather than if
733         sym->ns->parent->code->op == EXEC_BLOCK.
735 2019-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
737         PR fortran/88669
738         * resolve.c (resolve_component): If the reference is a BT_CLASS,
739         copy the contiguous attribute from the reference and use the
740         correct attributes.
742 2019-01-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
744         PR fortran/52564
745         * io.c (match_io): Add check for comma after '*' without subsequent
746         IO list.
748 2019-01-30  Dominique d'Humieres  <dominiq@gcc.gnu.org>
750         PR fortran/52884
751         * invoke.texi: Document the promotion of double precision
752         constants.
754 2019-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
756         PR fortran/57048
757         * interface.c (gfc_compare_types): If a derived type and an
758         integer both have a derived type, and they are identical,
759         this is a C binding type and compares equal.
761 2019-01-26  Harald Anlauf  <anlauf@gmx.de>
763         PR fortran/57553
764         * expr.c (check_inquiry): Add list of inquiry functions allowed in
765         constant expressions for F2008+.
767 2019-01-25  Steven G. Kargl  <kargl@gcc.gnu.org>
769         PR fortran/85780
770         * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
771         and alternative return.
773 2019-01-24  Paul Thomas  <pault@gcc.gnu.org>
775         PR fortran/88929
776         * trans-array.c (gfc_conv_descriptor_elem_len): New function.
777         * trans-array.h : Add prototype for above.
778         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
779         assumed rank arrays being flagged by rank = -1 in expressions.
780         Intent in arrays need a pointer to a copy of the data to be
781         assigned to the descriptor passed for conversion. This should
782         then be freed, together with the CFI descriptor on return from
783         the C call.
785 2019-01-22  Harald Anlauf  <anlauf@gmx.de>
787         PR fortran/88579
788         * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
789         and (- 2**e) ** integer.
791 2019-01-19  Dominique d'Humieres  <dominiq@gcc.gnu.org>
793         PR fortran/37835
794         * resolve.c (resolve_types): Add !flag_automatic.
795         * symbol.c (gfc_add_save): Silence warnings.
797 2019-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
799         PR fortran/77960
800         * io.c (match_io_element): input-item cannot be an external function.
802 2018-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
803         Paul Thomas  <pault@gcc.gnu.org>
805         PR fortran/56789
806         * trans-expr.c (gfc_conv_procedure_call): Call
807         gfc_conv_subref_array_arg if the formal arg is contiguous
808         and the actual arg may not be.
810 2019-01-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
812         PR fortran/88871
813         * resolve.c (resolve_ref): Fix logic for removal of
814         reference.
816 2019-01-19  Jakub Jelinek  <jakub@redhat.com>
818         PR fortran/88902
819         * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
820         or parent function if it has been added there already.
822 2019-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
824         PR fortran/43136
825         * resolve.c (resolve_array_ref): Add equal_length argument; set it
826         if the length of the substring equals that of the orignal
827         variable.
828         (resolve_ref): Remove the substring if it is equal in length to
829         the original variable, unless it is an EXPR_SUBSTRING).
831 2019-01-15  Steven G. Kargl  <kargl@gcc.gnu.org>
833         PR fortran/81849
834         * resolve.c (resolve_symbol): Host associated varaibles can appear
835         in the specification statement of a RESULT array.
837 2019-01-15  Paul Thomas  <pault@gcc.gnu.org>
839         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
840         that are indirect references; ie. dummy arguments.
842 2019-01-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
844         PR fortran/88803
845         * gfortran.texi: Replace @xref with @ref and adjust the sentence.
847 2019-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
849         PR fortran/57992
850         * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
851         functions with contiguous results.
853 2019-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
855         PR fortran/59345
856         * trans-array.c (gfc_conv_array_parameter): Remove TODO.  Do not
857         pack/unpack results of functions which return an explicit-shaped
858         or allocatable array.
860 2019-01-12  Steven G. Kargl  <kargl@gcc.gnu.org>
862         PR fortran/61765
863         * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
864         structure into independent if's with a return to simplify logic.
865         Avoid a check for ENTRY name with bind(c).
867 2019-01-12  Paul Thomas  <pault@gcc.gnu.org>
869         * gfortran.texi: Add description in sections on TS 29113 and
870         further interoperability with C.
871         * trans-array.c (gfc_conv_descriptor_attribute): New function.
872         (gfc_get_dataptr_offset): Remove static function attribute.
873         * trans-array.h: Add prototypes for above functions.
874         * trans-decl.c: Add declarations for the library functions
875         cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
876         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
877         (gfc_conv_procedure_call): Call it for scalar and array actual
878         arguments, when the formal arguments are bind_c with assumed
879         shape or assumed rank.
880         * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
881         and gfor_fndecl_gfc_to_cfi.
883 2019-01-11  Steven G. Kargl  <kargl@gcc.gnu.org>
885         PR fortran/35031
886         * decl.c (gfc_match_entry): Check for F2018:C1546.  Fix nearby
887         mis-indentation.
889 2019-01-11  Jakub Jelinek  <jakub@redhat.com>
891         PR middle-end/85956
892         PR lto/88733
893         * trans-openmp.c: Include attribs.h.
894         (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
895         VAR_DECL max bound with "omp dummy var" attribute like NULL or
896         error_mark_node - recompute number of elts independently.
898 2019-01-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
900         PR fortran/59345
901         * trans-array.c (gfc_conv_parameter_array): Temporary
902         arrays generated for expressions do not need to be repacked.
904 2019-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
906         PR fortran/86322
907         * decl.c (top_var_list): Set locus of expr.
908         (gfc_match_data): Detect pointer on non-rightmost part-refs.
910 2019-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
912         PR fortran/88376
913         * resolve.c (is_illegal_recursion): Remove an assert().
915 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
917         PR other/16615
918         * expr.c: Change "can not" to "cannot".
920 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
922         PR other/16615
923         * class.c: Mechanically replace "can not" with "cannot".
924         * decl.c: Likewise.
925         * expr.c: Likewise.
926         * gfc-internals.texi: Likewise.
927         * intrinsic.texi: Likewise.
928         * invoke.texi: Likewise.
929         * io.c: Likewise.
930         * match.c: Likewise.
931         * parse.c: Likewise.
932         * primary.c: Likewise.
933         * resolve.c: Likewise.
934         * symbol.c: Likewise.
935         * trans-array.c: Likewise.
936         * trans-decl.c: Likewise.
937         * trans-intrinsic.c: Likewise.
938         * trans-stmt.c: Likewise.
940 2019-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
942         PR fortran/68426
943         * simplify.c (gfc_simplify_spread): Also simplify if the
944         type of source is an EXPR_STRUCTURE.
946 2019-01-08  Janus Weil  <janus@gcc.gnu.org>
948         PR fortran/88047
949         * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
950         the class container may not be available (in case of invalid code).
952 2019-01-08  Richard Biener  <rguenther@suse.de>
954         PR fortran/88611
955         * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
956         directly build the expected GENERIC tree.
958 2019-01-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
959         Harald Anlauf <anlauf@gmx.de>
960         Tobias Burnus <burnus@gcc.gnu.org>
962         PR fortran/45424
963         * check.c (gfc_check_is_contiguous): New function.
964         * expr.c (gfc_is_not_contiguous): New function.
965         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
966         Add prototype for gfc_is_not_contiguous.
967         * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
968         (add_function): Add is_contiguous.
969         * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
970         gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
971         * intrinsic.texi: Add IS_CONTIGUOUS.
972         * iresolve.c (gfc_resolve_is_contiguous): New function.
973         * simplify.c (gfc_simplify_is_contiguous): New function.
974         * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
975         (gfc_build_intrinsic_function_decl): Add it.
976         * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
977         function.
978         (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
980 2019-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
982         PR fortran/88658
983         * gfortran.h: Add macro gfc_real_4_kind
984         * simplify.c (simplify_min_max): Special case for the types of
985         AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
986         their arguments.
988 2019-01-05  Janus Weil  <janus@gcc.gnu.org>
990         PR fortran/88009
991         * class.c (gfc_find_derived_vtab): Mark the _final component as
992         artificial.
993         (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
994         dereferencing a null pointer and adjust indentation.
995         * resolve.c (resolve_fl_variable): Add extra check to avoid
996         dereferencing a null pointer. Move variable declarations to local scope.
997         (resolve_fl_procedure): Add extra check to avoid dereferencing a null
998         pointer.
999         * symbol.c (check_conflict): Suppress errors for artificial symbols.
1001 2019-01-01  Steven G. Kargl  <kargl@gcc.gnu.org>
1003         * parse.c (decode_statement): Suppress "Unclassifiable statement"
1004         error if previous error messages were emittes.
1006 2019-01-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1008         PR fortran/82743
1009         * primary.c (gfc_convert_to_structure_constructor): If a character
1010         in a constructor is too long, add a  warning with
1011         -Wcharacter-truncation.
1013 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
1015         Update copyright years.
1017         * gfortranspec.c (lang_specific_driver): Update copyright notice
1018         dates.
1019         * gfc-internals.texi: Bump @copying's copyright year.
1020         * gfortran.texi: Ditto.
1021         * intrinsic.texi: Ditto.
1022         * invoke.texi: Ditto.
1024 Copyright (C) 2019 Free Software Foundation, Inc.
1026 Copying and distribution of this file, with or without modification,
1027 are permitted in any medium without royalty provided the copyright
1028 notice and this notice are preserved.