1 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
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>
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
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>
21 * openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
23 (gfc_resolve_oacc_blocks): Populate sharing_clauses with private
26 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
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.
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.
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
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>
57 * module.c (gfc_use_module): use complete sentences.
59 2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
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>
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>
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>
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>
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>
98 * expr.c (comp_pointer): Remove redundant condition.
100 2019-03-31 Harald Anlauf <anlauf@gmx.de>
104 * trans-types.c (gfc_typenode_for_spec): Handle conversion for
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>
117 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
118 argument attributes rather than those of the actual argument.
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>
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>
133 * expr.c (is_subref_array): Permit substrings to be detected
135 * trans-array.c (get_array_ctor_var_strlen): Obtain the length
136 of deferred length strings. Handle substrings with a NULL end
138 (trans_array_constructor): Remove an unnecessary blank line.
139 (gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
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.
158 2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
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
168 2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
171 * openmp.c (gfc_match_oacc_routine): Set the level of parallelism
173 (gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
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
180 (gfc_resolve_oacc_routines): ... this new function.
181 * resolve.c (resolve_codes): Call it.
184 * openmp.c (gfc_match_oacc_routine): Clarify.
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>
197 * symbol.c (check_conflict): ABSTRACT attribute conflicts with
200 2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
203 * iresolve.c: Include trans.h.
204 (gfc_resolve_fe_runtine_error): Set backend_decl on
207 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
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
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>
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>
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>
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>
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
253 2019-03-13 Janus Weil <janus@gcc.gnu.org>
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>
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
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
278 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
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
284 2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
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'
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>
313 * trans-expr.c (set_dtype_for_unallocated): New function.
314 (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
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>
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>
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>
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>
359 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
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>
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>
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>
378 * arith.c (gfc_complex2complex): Avoid two spaces in the middle of
380 * resolve.c (resolve_allocate_expr): Likewise.
382 2019-03-06 Harald Anlauf <anlauf@gmx.de>
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>
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>
397 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
399 2019-03-02 Harald Anlauf <anlauf@gmx.de>
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>
410 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
411 Fortran OpenACC 'routine' directive.
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.
420 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
422 2019-02-26 Harald Anlauf <anlauf@gmx.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
513 * gfortran.texi: Fix documentation to match the implementation.
515 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
516 Cesar Philippidis <cesar@codesourcery.com>
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>
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,
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>
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>
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>
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>
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>
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>
600 * simplify.c (simplify_transformation_to_array): Run post_op
601 immediately after processing corresponding row, rather than at the
603 (norm2_scale): New variable.
604 (add_squared): Rename to ...
605 (norm2_add_squared): ... this. Scale down operand and/or result
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>
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>
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>
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>
638 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
641 2019-02-13 Martin Liska <mliska@suse.cz>
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>
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
657 2019-02-09 Harald Anlauf <anlauf@gmx.de>
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>
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>
672 * decl.c (add_init_expr_to_sym): Copy length of string initializer
675 2019-02-04 Martin Liska <mliska@suse.cz>
678 * resolve.c (resolve_ref): Remove breakout variable as
679 we need to prevent prev = &(*prev)->next to happen
682 2019-02-04 Martin Liska <mliska@suse.cz>
685 * scanner.c (load_file): Report error for -fpre-include
688 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
691 * invoke.texi: Document the behavior of repeated -ffpe-trap
694 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
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>
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
710 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
713 * trans-array.c (gfc_array_init_size): Add element_size to the
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>
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>
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>
738 * resolve.c (resolve_component): If the reference is a BT_CLASS,
739 copy the contiguous attribute from the reference and use the
742 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
745 * io.c (match_io): Add check for comma after '*' without subsequent
748 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
751 * invoke.texi: Document the promotion of double precision
754 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
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>
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>
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>
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
785 2019-01-22 Harald Anlauf <anlauf@gmx.de>
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>
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>
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>
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>
813 * resolve.c (resolve_ref): Fix logic for removal of
816 2019-01-19 Jakub Jelinek <jakub@redhat.com>
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>
825 * resolve.c (resolve_array_ref): Add equal_length argument; set it
826 if the length of the substring equals that of the orignal
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>
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>
845 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
847 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
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>
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>
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>
886 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
889 2019-01-11 Jakub Jelinek <jakub@redhat.com>
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>
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>
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>
913 * resolve.c (is_illegal_recursion): Remove an assert().
915 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
918 * expr.c: Change "can not" to "cannot".
920 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
923 * class.c: Mechanically replace "can not" with "cannot".
926 * gfc-internals.texi: Likewise.
927 * intrinsic.texi: Likewise.
928 * invoke.texi: 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>
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>
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>
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>
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
978 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
980 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
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
988 2019-01-05 Janus Weil <janus@gcc.gnu.org>
991 * class.c (gfc_find_derived_vtab): Mark the _final component as
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
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>
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
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.