1 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
4 * f95-lang.c (gfc_attribute_table): Set min_len to -1 for "omp
6 * trans-decl.c (add_attributes_to_decl): Refer to OpenACC
7 'routine' clauses from "omp declare target" attribute.
9 2019-05-16 Martin Sebor <msebor@redhat.com>
11 * gfortranspec.c (append_arg): Spell out the word "argument."
13 2019-05-16 Jakub Jelinek <jakub@redhat.com>
16 * trans-decl.c (create_function_arglist): Set
17 DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
20 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
22 * parse.c (gfc_parse_file): Remove translation string markers.
24 2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
26 * dump-parse-tree.c (get_c_type_name): Use macros for complex type
28 * parse.c (gfc_parse_file): Define complex macros, add CPP support
29 when printing C prototypes.
31 2019-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
34 * interface.c (compare_actual_formal): Do not create a vtab if
35 the actual argument is assumed type.
37 2019-05-10 Paul Thomas <pault@gcc.gnu.org>
40 * trans-decl.c (convert_CFI_desc): Test that the dummy is
41 present before doing any of the conversions.
44 * decl.c (gfc_verify_c_interop_param): Restore the error for
45 charlen > 1 actual arguments passed to bind(C) procs.
46 Clean up trailing white space.
49 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
50 field to the element length for all types.
51 (gfc_conv_expr_descriptor): The force_no_tmp flag is used to
52 prevent temporary creation, especially for substrings.
53 * trans-decl.c (gfc_trans_deferred_vars): Rather than assert
54 that the backend decl for the string length is non-null, use it
55 as a condition before calling gfc_trans_vla_type_sizes.
56 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
57 is set before calling gfc_conv_expr_descriptor.
58 * trans.c (get_array_span): Move the code for extracting 'span'
59 from gfc_build_array_ref to this function. This is specific to
60 descriptors that are component and indirect references.
61 * trans.h : Add the force_no_tmp flag bitfield to gfc_se.
63 2019-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
67 * dump-parse-tree.c: Include version.h.
68 (gfc_dump_external_c_prototypes): New function.
69 (get_c_type_name): Select "char" as a name for a simple char.
70 Adjust to handling external functions. Also handle complex.
71 (write_decl): Add argument bind_c. Adjust for dumping of external
73 (write_proc): Likewise.
74 (write_interop_decl): Add bind_c argument to call of write_proc.
75 * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
76 * lang.opt: Add -fc-prototypes-external flag.
77 * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
78 Call gfc_dump_external_c_prototypes if option is set.
79 * invoke.texi: Document -fc-prototypes-external.
81 2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
84 * match.c (gfc_match_stopcode): Check F2008 condition on stop code.
86 2019-05-01 Andrew Benson <abensonca@gmail.com>
88 * module.c (write_module): Initialize module_column before writing
89 module to ensure line break occurs at correct column.
91 2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
94 * match.c (gfc_match_parens): Change the location for missing ')'.
95 (gfc_match_if): Detect a missing '('. Remove the spurious named
96 constant error. Change the wording of some errors.
97 (gfc_match_else): Change the wording of an error.
98 (gfc_match_elseif): Detect a missing '('. Improve the matching
99 process to get a better syntax analysis.
101 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
104 * decl.c (in_module_or_interface): New function to check that the
105 current state is in a module, submodule, or interface.
106 (gfc_match_prefix): Use it.
108 2019-04-22 Paul Thomas <pault@gcc.gnu.org>
111 * resolve.c (find_array_spec): If this is a class expression
112 and the symbol and component array specs are the same, this is
114 *trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
115 argument, has no namespace, it has come from the interface
116 mapping and the _data component must be accessed directly.
118 2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
121 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
123 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
126 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
129 * trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
130 rank dummies of bind C procs require deferred initialization.
131 (convert_CFI_desc): New procedure to convert incoming CFI
132 descriptors to gfc types and back again.
133 (gfc_trans_deferred_vars): Call it.
134 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
135 descriptor pointer. Free the descriptor in all cases.
138 * expr.c (is_CFI_desc): New function.
139 (is_subref_array): Tidy up by referencing the symbol directly.
140 * gfortran.h : Prototype for is_CFI_desc.
141 * trans_array.c (get_CFI_desc): New function.
142 (gfc_get_array_span, gfc_conv_scalarized_array_ref,
143 gfc_conv_array_ref): Use it.
144 * trans.c (get_array_span): Extract the span from descriptors
145 that are indirect references.
148 * trans-decl.c (gfc_get_symbol_decl): Make sure that the se
149 expression is a pointer type before converting it to the symbol
151 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
152 temporary creation for intent(in).
154 2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
157 * module.c (gfc_use_module): use complete sentences.
159 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
162 * frontend-passes.c (B_ERROR): Delete macro.
163 (C_ERROR): Delete macro.
164 (B_ERROR_1): New macro.
165 (C_ERROR_1): New macro.
166 (C_ERROR_2): New macro.
167 (inline_matmul_assign): Use new macros.
168 (call_external_blas): Likewise.
170 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
173 * gfortran.h (gfc_component): Add finalized field.
174 * class.c (finalize_component): If the component is already
175 finalized, return early. Set component->finalized on exit.
177 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
180 * resolve.c (resolve_global_procedure): If the global symbol is an
181 ENTRY, also look up its name among the entries.
183 2019-04-04 Harald Anlauf <anlauf@gmx.de>
186 * check.c (gfc_check_transfer): Reject procedures as actual
187 arguments for SOURCE and MOLD of TRANSFER intrinsic.
189 2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
192 * expr.c (gfc_reduce_init_expr): Add extra check to avoid
193 dereferencing a null pointer.
195 2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
198 * expr.c (comp_pointer): Remove redundant condition.
200 2019-03-31 Harald Anlauf <anlauf@gmx.de>
204 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
206 * target-memory.c (gfc_element_size): Handle size determination
207 for procedure pointers.
209 2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
211 * dump-parse-tree.c (debug): Add for symbol_attribute *,
212 symbol_attribute and gfc_ref * arguments.
214 2019-03-30 Paul Thomas <pault@gcc.gnu.org>
217 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
218 argument attributes rather than those of the actual argument.
221 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
222 'set_dtype_for_unallocated' for any type of arrayspec.
224 2019-03-27 Janus Weil <janus@gcc.gnu.org>
227 * expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
228 in procedure pointer initialization.
230 2019-03-27 Paul Thomas <pault@gcc.gnu.org>
233 * expr.c (is_subref_array): Permit substrings to be detected
235 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
236 of deferred length strings. Handle substrings with a NULL end
238 (trans_array_constructor): Remove an unnecessary blank line.
239 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
241 (get_array_charlen): If the expression is an array, convert the
242 first element of the constructor and use its string length. Get
243 a new charlen if necessary.
244 (gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
245 constructor expressions. If the ss_info string length is
246 available, use that to set the span of character arrays.
247 * trans-expr.c (gfc_get_expr_charlen): Handle substrings
248 * trans-stmt.c (trans_associate_var): Set the pointer array
249 flag for variable targets and constant array constructors. Take
250 care not to reset the string length or the span in the case of
251 expressions that are not converted as direct by reference.
253 2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
255 * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
258 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
261 * interface.c (compare_actual_formal): Change errors about
262 missing or extra to gfc_error_now to make sure they are issued.
263 Change "spec" to "specifier" in message.
264 * resolve.c (resolve_global_procedure): Also check for mismatching
265 interface with global symbols if the namespace has already been
268 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
271 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
273 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
276 * gfortran.h (gfc_oacc_routine_name): Add loc member.
277 (gfc_resolve_oacc_routines): Declare.
278 * openmp.c (gfc_match_oacc_routine): Move some error checking
280 (gfc_resolve_oacc_routines): ... this new function.
281 * resolve.c (resolve_codes): Call it.
284 * openmp.c (gfc_match_oacc_routine): Clarify.
287 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
288 (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
289 AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
290 AB_OACC_ROUTINE_LOP_SEQ.
291 (attr_bits): Add these.
292 (mio_symbol_attribute): Handle these.
294 2019-03-20 Janus Weil <janus@gcc.gnu.org>
297 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
300 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
303 * iresolve.c: Include trans.h.
304 (gfc_resolve_fe_runtine_error): Set backend_decl on
307 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
310 * gfortran.h (expr_t): Add EXPR_UNKNOWN.
311 * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
312 (gfc_simplify_expr): Likewise.
313 * module.c (mio_expr): Likewise.
314 * resovle.c (extract_compcall_passed_object): Issue error on
316 (check_typebound_baseobject): Issue error on wrong type.
317 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
318 EXPR_UNKNOWN to switch statement.
320 2019-03-16 Jakub Jelinek <jakub@redhat.com>
323 * scanner.c (load_line): Remove linenum and current_line static
324 variables, add warned_tabs automatic variable. Use current_file->line
325 instead of current_line and warned_tabs boolean to avoid diagnosing
326 tabs multiple times on the same line.
328 2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
331 * symbol.c (gfc_add_subroutine): If we are encountering a
332 subrtoutine within a BLOCK DATA and the name starts with an
333 underscore, do not check.
335 2019-03-15 Harald Anlauf <anlauf@gmx.de>
338 * expr.c (gfc_check_pointer_assign): Correct and improve error
339 messages for invalid pointer assignments.
341 2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
343 * gfortran.texi: Document Q edit descriptor under
344 "Extensions not implemented in GNU Fortran".
346 2019-03-13 Harald Anlauf <anlauf@gmx.de>
349 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same
350 string length so that we do not get false errors for deferred
353 2019-03-13 Janus Weil <janus@gcc.gnu.org>
356 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
357 (gfc_match_derived_decl): Mark as PDT only if type parameter list was
358 matched successfully.
360 2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
365 * gfortran.h (gfc_symbol): Add bind_c component.
366 (gfc_get_gsymbol): Add argument bind_c.
367 * decl.c (add_global_entry): Add bind_c argument to
369 * parse.c (parse_block_data): Likewise.
370 (parse_module): Likewise.
371 (add_global_procedure): Likewise.
372 (add_global_program): Likewise.
373 * resolve.c (resolve_common_blocks): Likewise.
374 (resolve_global_procedure): Likewise.
375 (gfc_verify_binding_labels): Likewise.
376 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
378 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
380 (gfc_get_extern_function_decl): If the sym has a binding label
381 and it cannot be found in the global symbol tabel, it is the wrong
384 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
387 * match.c (gfc_match_type_spec): Remove call to
388 gfc_resolve_expr for character length.
390 2019-03-12 Martin Liska <mliska@suse.cz>
392 * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
394 (variable_decl): Likewise.
395 (cray_pointer_decl): Likewise.
396 (match_binding_attributes): Likewise.
397 * f95-lang.c (gfc_init): Likewise.
398 * interface.c (gfc_check_typebound_override): Likewise.
399 * intrinsic.c (make_generic): Likewise.
400 * module.c (dump_module): Likewise.
401 (gfc_use_module): Likewise.
402 * primary.c (gfc_convert_to_structure_constructor): Likewise.
403 * resolve.c (resolve_entries): Likewise.
404 (check_generic_tbp_ambiguity): Likewise.
405 (get_checked_tb_operator_target): Likewise.
406 * scanner.c (load_file): Likewise.
407 * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
409 2019-03-12 Paul Thomas <pault@gcc.gnu.org>
413 * trans-expr.c (set_dtype_for_unallocated): New function.
414 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
416 (gfc_conv_procedure_call): Likewise. Also, set the ubound of
417 the final dimension to -1 for assumed rank formal args that are
418 associated with assumed size arrays.
419 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
420 the final dimension of assumed rank entities that are argument
421 associated with assumed size arrays.
422 (gfc_conv_intrinsic_shape): Likewise return -1 for the final
423 dimension of the shape intrinsic.
425 2019-03-11 Jakub Jelinek <jakub@redhat.com>
428 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
429 on decl if adding COND_EXPR for allocatable.
430 (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
432 2019-03-11 Martin Liska <mliska@suse.cz>
434 * decl.c (match_record_decl): Wrap an option name
435 in a string format message and fix GNU coding style.
436 (gfc_match_pointer): Likewise.
437 * expr.c (find_array_section): Likewise.
438 * intrinsic.c (gfc_is_intrinsic): Likewise.
439 * options.c (gfc_post_options): Likewise.
440 * primary.c (match_integer_constant): Likewise.
441 * trans-common.c (translate_common): Likewise.
443 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
446 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
447 Return false if a scalar tempoary is needed.
448 (gfc_walk_variable_expr): Fix up class refs.
450 2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
453 * symbol.c (gfc_add_procedure): Only throw an error if the
454 procedure has not been declared either PUBLIC or PRIVATE.
456 2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
459 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
461 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
463 2019-03-09 Janus Weil <janus@gcc.gnu.org>
466 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
467 pointer-valued functions.
469 2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
472 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add
473 asserts that it has to be an EXPR_ARRAY in this case.
475 2019-03-08 Jakub Jelinek <jakub@redhat.com>
478 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
480 * resolve.c (resolve_allocate_expr): Likewise.
482 2019-03-06 Harald Anlauf <anlauf@gmx.de>
485 * expr.c (simplify_const_ref): Avoid null pointer dereference.
487 2019-03-03 Harald Anlauf <anlauf@gmx.de>
488 Steven G. Kargl <kargl@gcc.gnu.org>
491 * symbol.c (check_conflict): Check for valid procedure name
492 passed to error reporting routine.
494 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
497 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
499 2019-03-02 Harald Anlauf <anlauf@gmx.de>
502 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
503 where storage size of elements of MOLD is 0.
505 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
506 Cesar Philippidis <cesar@codesourcery.com>
510 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
511 Fortran OpenACC 'routine' directive.
514 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
515 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
516 * trans-decl.c (add_attributes_to_decl): Likewise.
520 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
522 2019-02-26 Harald Anlauf <anlauf@gmx.de>
525 * check.c (gfc_calculate_transfer_sizes): Handle cases where
526 storage size of elements of MOLD is 0.
528 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
531 * trans-types.c (get_formal_from_actual_arglist): If
532 the actual arglist has no expression, the corresponding
533 formal arglist is an alternate return.
535 2019-02-26 Jakub Jelinek <jakub@redhat.com>
538 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
539 of duplicating the initializer possibly many times.
541 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
544 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
545 to arguments. If we are dealing with a MOLD, call
546 gfc_expr_to_initialize().
547 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
548 to gfc_find_and_cut_at_last_class_ref.
549 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
550 argument is_mold with default false.
552 2019-02-24 Harald Anlauf <anlauf@gmx.de>
556 * target-memory.c (gfc_element_size): Return false if element size
557 cannot be determined; element size is returned separately.
558 (gfc_target_expr_size): Return false if expression size cannot be
559 determined; expression size is returned separately.
560 * target-memory.h: Adjust prototypes.
561 * check.c (gfc_calculate_transfer_sizes): Adjust references to
562 gfc_target_expr_size, gfc_element_size.
563 * arith.c (hollerith2representation): Likewise.
564 * class.c (find_intrinsic_vtab): Likewise.
565 * simplify.c (gfc_simplify_sizeof): Likewise.
567 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
570 * trans-io.c (transfer_expr): Do not return if there are no
571 components to the derived type or class.
573 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
576 * resolve.c (deferred_op_assign): Return if the lhs expression
577 has the pointer attribute.
578 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
579 length if the lhs expression has the pointer attribute.
581 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
585 * decl.c (gfc_verify_c_interop_param): Restriction on string
586 length being one is lifted for F2018.
587 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
588 characters with intent in, make a temporary and copy the result
589 of the expression evaluation into it.
590 (gfc_conv_procedure_call): Set a flag for character formal args
591 having a character length that is not unity. If the procedure
592 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
593 Also, extend bind C calls to unconditionally convert both
594 pointers and allocatable expressions.
596 2019-02-23 David Malcolm <dmalcolm@redhat.com>
597 Jakub Jelinek <jakub@redhat.com>
600 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
601 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
602 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
604 2019-02-22 Harald Anlauf <anlauf@gmx.de>
607 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
608 when NEWUNIT= is specified.
610 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
613 * gfortran.texi: Fix documentation to match the implementation.
615 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
616 Cesar Philippidis <cesar@codesourcery.com>
619 * gfortran.h (oacc_routine_lop): New enum.
620 (symbol_attribute): Use it.
621 * openmp.c (gfc_oacc_routine_dims): Replace with...
622 (gfc_oacc_routine_lop): ... this new function.
623 (gfc_match_oacc_routine): Adjust.
624 * trans-decl.c (add_attributes_to_decl): Likewise.
626 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
628 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
630 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
632 * dump-parse-tree.c (debug): Implement for gfc_expr *,
633 gfc_typespec *, gfc_typespec and gfc_symbol *.
635 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
638 * class.c (gfc_get_len_component): Add argument k for kind.
639 If the kind of the resulting expression is not equal to k,
641 * gfortran.h (gfc_len_component): Adjust prototype.
642 * simplify.c (gfc_simplify_len): Pass kind to
643 gfc_get_len_component.
645 2019-02-20 Martin Liska <mliska@suse.cz>
647 * gfortran.texi: Change singular to plural.
649 2019-02-20 Martin Liska <mliska@suse.cz>
651 * gfortran.texi: Document Fortran header directive.
653 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
656 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
657 argument is contiguous and the actual argument may not be,
658 use gfc_conv_subref_array_arg.
660 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
663 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
664 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
666 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
669 * trans-decl.c (gfc_get_extern_function_decl): Add argument
670 actual_args and pass it through to gfc_get_function_type.
671 * trans-expr.c (conv_function_val): Add argument actual_args
672 and pass it on to gfc_get_extern_function_decl.
673 (conv_procedure_call): Pass actual arguments to conv_function_val.
674 * trans-types.c (get_formal_from_actual_arglist): New function.
675 (gfc_get_function_type): Add argument actual_args. Generate
676 formal args from actual args if necessary.
677 * trans-types.h (gfc_get_function_type): Add optional argument.
678 * trans.h (gfc_get_extern_function_decl): Add optional argument.
680 2019-02-18 Martin Liska <mliska@suse.cz>
682 * decl.c (gfc_match_gcc_builtin): Add support for filtering
683 of builtin directive based on multilib ABI name.
685 2019-02-17 Harald Anlauf <anlauf@gmx.de>
688 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
689 check for obsolent COMMON feature in F2018 to better place.
691 2019-02-17 Harald Anlauf <anlauf@gmx.de>
694 * decl.c (gfc_set_constant_character_len): Clear original string
695 representation after padding has been performed to target length.
697 2019-02-16 Jakub Jelinek <jakub@redhat.com>
700 * simplify.c (simplify_transformation_to_array): Run post_op
701 immediately after processing corresponding row, rather than at the
703 (norm2_scale): New variable.
704 (add_squared): Rename to ...
705 (norm2_add_squared): ... this. Scale down operand and/or result
707 (do_sqrt): Rename to ...
708 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
709 result and clear norm2_scale.
710 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
711 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
712 and clear norm2_scale again.
714 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
717 * trans-decl.c (generate_coarray_sym_init): For an array
718 constructor in a DATA statement of a coarray variable, set the
719 rank to 1 to avoid confusion later on. If the constructor
720 contains only one value, use that for initiailizig.
722 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
725 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
726 * options.c (gfc_handle_option): Use strtol instead of atoi.
727 * invoke.texi: Document -finit-integer behavior in more detail.
729 2019-02-14 Harald Anlauf <anlauf@gmx.de>
732 * symbol.c: Move check for labeled DO statement from
733 gfc_define_st_label to gfc_reference_st_label.
735 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
738 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
741 2019-02-13 Martin Liska <mliska@suse.cz>
744 * resolve.c (resolve_operator): Initialize 't' right
745 after function entry. Skip switch (e->value.op.op)
746 for -fdec operands that become function calls.
748 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
751 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
752 looking at an init expression, issue error if the target is not a
753 TARGET and we are not looking at a procedure pointer.
754 * gfortran.h (gfc_check_assign): Add optional argument
757 2019-02-09 Harald Anlauf <anlauf@gmx.de>
760 * resolve.c (gfc_resolve_substring_charlen): Check substring
761 length for constantness prior to general calculation of length.
763 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
766 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
767 field for derived types.
769 2019-02-04 Harald Anlauf <anlauf@gmx.de>
772 * decl.c (add_init_expr_to_sym): Copy length of string initializer
775 2019-02-04 Martin Liska <mliska@suse.cz>
778 * resolve.c (resolve_ref): Remove breakout variable as
779 we need to prevent prev = &(*prev)->next to happen
782 2019-02-04 Martin Liska <mliska@suse.cz>
785 * scanner.c (load_file): Report error for -fpre-include
788 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
791 * invoke.texi: Document the behavior of repeated -ffpe-trap
794 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
797 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
798 * gfortran.h (gfc_expr): Add flag do_not_warn.
799 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
800 no warning is desired.
802 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
805 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
806 passed in parentheses to class formals, invert the order of
807 copying allocatable components to taking the _data of the
810 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
813 * trans-array.c (gfc_array_init_size): Add element_size to the
815 (gfc_array_allocate): Remove the recalculation of the size of
816 the element and use element_size from the call to the above.
817 Unconditionally set the span field of the descriptor.
819 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
822 * expr.c (is_subref_array): Move the check for class pointer
823 dummy arrays to after the reference check. If we haven't seen
824 an array reference other than an element and a component is not
825 class or derived, return false.
827 2019-02-01 Jakub Jelinek <jakub@redhat.com>
831 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
832 if sym->ns->construct_entities rather than if
833 sym->ns->parent->code->op == EXEC_BLOCK.
835 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
838 * resolve.c (resolve_component): If the reference is a BT_CLASS,
839 copy the contiguous attribute from the reference and use the
842 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
845 * io.c (match_io): Add check for comma after '*' without subsequent
848 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
851 * invoke.texi: Document the promotion of double precision
854 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
857 * interface.c (gfc_compare_types): If a derived type and an
858 integer both have a derived type, and they are identical,
859 this is a C binding type and compares equal.
861 2019-01-26 Harald Anlauf <anlauf@gmx.de>
864 * expr.c (check_inquiry): Add list of inquiry functions allowed in
865 constant expressions for F2008+.
867 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
870 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
871 and alternative return.
873 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
876 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
877 * trans-array.h : Add prototype for above.
878 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
879 assumed rank arrays being flagged by rank = -1 in expressions.
880 Intent in arrays need a pointer to a copy of the data to be
881 assigned to the descriptor passed for conversion. This should
882 then be freed, together with the CFI descriptor on return from
885 2019-01-22 Harald Anlauf <anlauf@gmx.de>
888 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
889 and (- 2**e) ** integer.
891 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
894 * resolve.c (resolve_types): Add !flag_automatic.
895 * symbol.c (gfc_add_save): Silence warnings.
897 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
900 * io.c (match_io_element): input-item cannot be an external function.
902 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
903 Paul Thomas <pault@gcc.gnu.org>
906 * trans-expr.c (gfc_conv_procedure_call): Call
907 gfc_conv_subref_array_arg if the formal arg is contiguous
908 and the actual arg may not be.
910 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * resolve.c (resolve_ref): Fix logic for removal of
916 2019-01-19 Jakub Jelinek <jakub@redhat.com>
919 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
920 or parent function if it has been added there already.
922 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
925 * resolve.c (resolve_array_ref): Add equal_length argument; set it
926 if the length of the substring equals that of the orignal
928 (resolve_ref): Remove the substring if it is equal in length to
929 the original variable, unless it is an EXPR_SUBSTRING).
931 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
934 * resolve.c (resolve_symbol): Host associated varaibles can appear
935 in the specification statement of a RESULT array.
937 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
939 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
940 that are indirect references; ie. dummy arguments.
942 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
945 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
947 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
950 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
951 functions with contiguous results.
953 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
956 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
957 pack/unpack results of functions which return an explicit-shaped
958 or allocatable array.
960 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
963 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
964 structure into independent if's with a return to simplify logic.
965 Avoid a check for ENTRY name with bind(c).
967 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
969 * gfortran.texi: Add description in sections on TS 29113 and
970 further interoperability with C.
971 * trans-array.c (gfc_conv_descriptor_attribute): New function.
972 (gfc_get_dataptr_offset): Remove static function attribute.
973 * trans-array.h: Add prototypes for above functions.
974 * trans-decl.c: Add declarations for the library functions
975 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
976 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
977 (gfc_conv_procedure_call): Call it for scalar and array actual
978 arguments, when the formal arguments are bind_c with assumed
979 shape or assumed rank.
980 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
981 and gfor_fndecl_gfc_to_cfi.
983 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
986 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
989 2019-01-11 Jakub Jelinek <jakub@redhat.com>
993 * trans-openmp.c: Include attribs.h.
994 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
995 VAR_DECL max bound with "omp dummy var" attribute like NULL or
996 error_mark_node - recompute number of elts independently.
998 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1001 * trans-array.c (gfc_conv_parameter_array): Temporary
1002 arrays generated for expressions do not need to be repacked.
1004 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1007 * decl.c (top_var_list): Set locus of expr.
1008 (gfc_match_data): Detect pointer on non-rightmost part-refs.
1010 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1013 * resolve.c (is_illegal_recursion): Remove an assert().
1015 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1018 * expr.c: Change "can not" to "cannot".
1020 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1023 * class.c: Mechanically replace "can not" with "cannot".
1026 * gfc-internals.texi: Likewise.
1027 * intrinsic.texi: Likewise.
1028 * invoke.texi: Likewise.
1030 * match.c: Likewise.
1031 * parse.c: Likewise.
1032 * primary.c: Likewise.
1033 * resolve.c: Likewise.
1034 * symbol.c: Likewise.
1035 * trans-array.c: Likewise.
1036 * trans-decl.c: Likewise.
1037 * trans-intrinsic.c: Likewise.
1038 * trans-stmt.c: Likewise.
1040 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1043 * simplify.c (gfc_simplify_spread): Also simplify if the
1044 type of source is an EXPR_STRUCTURE.
1046 2019-01-08 Janus Weil <janus@gcc.gnu.org>
1049 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
1050 the class container may not be available (in case of invalid code).
1052 2019-01-08 Richard Biener <rguenther@suse.de>
1055 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
1056 directly build the expected GENERIC tree.
1058 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1059 Harald Anlauf <anlauf@gmx.de>
1060 Tobias Burnus <burnus@gcc.gnu.org>
1063 * check.c (gfc_check_is_contiguous): New function.
1064 * expr.c (gfc_is_not_contiguous): New function.
1065 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
1066 Add prototype for gfc_is_not_contiguous.
1067 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
1068 (add_function): Add is_contiguous.
1069 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
1070 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
1071 * intrinsic.texi: Add IS_CONTIGUOUS.
1072 * iresolve.c (gfc_resolve_is_contiguous): New function.
1073 * simplify.c (gfc_simplify_is_contiguous): New function.
1074 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
1075 (gfc_build_intrinsic_function_decl): Add it.
1076 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
1078 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
1080 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1083 * gfortran.h: Add macro gfc_real_4_kind
1084 * simplify.c (simplify_min_max): Special case for the types of
1085 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
1088 2019-01-05 Janus Weil <janus@gcc.gnu.org>
1091 * class.c (gfc_find_derived_vtab): Mark the _final component as
1093 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
1094 dereferencing a null pointer and adjust indentation.
1095 * resolve.c (resolve_fl_variable): Add extra check to avoid
1096 dereferencing a null pointer. Move variable declarations to local scope.
1097 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
1099 * symbol.c (check_conflict): Suppress errors for artificial symbols.
1101 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
1103 * parse.c (decode_statement): Suppress "Unclassifiable statement"
1104 error if previous error messages were emittes.
1106 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1109 * primary.c (gfc_convert_to_structure_constructor): If a character
1110 in a constructor is too long, add a warning with
1111 -Wcharacter-truncation.
1113 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1115 Update copyright years.
1117 * gfortranspec.c (lang_specific_driver): Update copyright notice
1119 * gfc-internals.texi: Bump @copying's copyright year.
1120 * gfortran.texi: Ditto.
1121 * intrinsic.texi: Ditto.
1122 * invoke.texi: Ditto.
1124 Copyright (C) 2019 Free Software Foundation, Inc.
1126 Copying and distribution of this file, with or without modification,
1127 are permitted in any medium without royalty provided the copyright
1128 notice and this notice are preserved.