1 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
3 * lang.opt (Wopenmp): Add, enabled by dafault and documented in C.
4 * openmp.cc (gfc_match_omp_declare_target, resolve_positive_int_expr,
5 resolve_nonnegative_int_expr, resolve_omp_clauses,
6 gfc_resolve_omp_do_blocks): Use OPT_Wopenmp with gfc_warning{,_now}.
8 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
10 * openmp.cc (gfc_match_omp_depobj): Accept optionally an argument
11 to the destroy clause.
13 2023-11-23 Harald Anlauf <anlauf@gmx.de>
16 * check.cc (gfc_check_system_clock): Add checks on integer arguments
17 to SYSTEM_CLOCK specific to F2023.
18 * error.cc (notify_std_msg): Adjust to handle new features added
20 * gfortran.texi (_gfortran_set_options): Document GFC_STD_F2023_DEL,
21 remove obsolete option GFC_STD_F2008_TS and fix enumeration values.
22 * libgfortran.h (GFC_STD_F2023_DEL): Add and use in GFC_STD_OPT_F23.
23 * options.cc (set_default_std_flags): Add GFC_STD_F2023_DEL.
25 2023-11-17 Tobias Burnus <tobias@codesourcery.com>
27 * gfortran.texi (_gfortran_set_options): Document GFC_STD_F2023.
28 * invoke.texi (std,pedantic,Wampersand,Wtabs): Add -std=2023.
29 * lang.opt (std=f2023): Add.
30 * libgfortran.h (GFC_STD_F2023, GFC_STD_OPT_F23): Add.
31 * options.cc (set_default_std_flags): Add GFC_STD_F2023.
32 (gfc_init_options): Set max_continue_free to 1,000,000.
33 (gfc_post_options): Set flag_free_line_length if unset.
34 (gfc_handle_option): Add OPT_std_f2023, set max_continue_free = 255
35 for -std=f2003, f2008 and f2018.
37 2023-11-14 David Malcolm <dmalcolm@redhat.com>
39 * error.cc (gfc_diagnostics_init): Use diagnostic_start_span.
41 2023-11-07 Joseph Myers <joseph@codesourcery.com>
43 * gfortran.h (gfc_real_info): Refer to C23 instead of C2X in
46 2023-11-06 Martin Jambor <mjambor@suse.cz>
48 * trans-decl.cc (gfc_build_builtin_function_decls): Fix fnspec of
51 2023-11-04 David Malcolm <dmalcolm@redhat.com>
53 * cpp.cc: Update for changes to diagnostic_context.
55 * options.cc: Likewise.
57 2023-11-03 Harald Anlauf <anlauf@gmx.de>
60 * match.cc (gfc_match_call): If a procedure pointer has already been
61 resolved, do not create a new symbol in a procedure reference of
62 the same name shadowing the first one if it is host-associated.
64 2023-11-03 Harald Anlauf <anlauf@gmx.de>
67 * trans-expr.cc (conv_cond_temp): Helper function for creation of a
68 conditional temporary.
69 (gfc_conv_procedure_call): Handle passing of allocatable or pointer
70 actual argument to dummy with OPTIONAL + VALUE attribute. Actual
71 arguments that are not allocated or associated are treated as not
74 2023-11-03 Paul Thomas <pault@gcc.gnu.org>
77 * interface.cc (upoly_ok): Defined operators using unlimited
78 polymorphic formal arguments must not override the intrinsic
81 2023-11-02 Paul Thomas <pault@gcc.gnu.org>
84 * parse.cc (parse_associate): Remove condition that caused this
87 2023-10-30 Paul Thomas <pault@gcc.gnu.org>
90 * resolve.cc (resolve_select_type): If the selector expression
91 has no class component references and the expression is a
92 derived type, copy the typespec of the symbol to that of the
95 2023-10-27 Harald Anlauf <anlauf@gmx.de>
96 Steven G. Kargl <kargl@gcc.gnu.org>
99 * decl.cc (gfc_match_formal_arglist): Handle conflicting declarations
100 of a MODULE PROCEDURE when one of the declarations is an alternate
103 2023-10-27 Paul Thomas <pault@gcc.gnu.org>
106 * expr.cc (gfc_check_vardef_context): Check that the target
107 does have a vector index before emitting the specific error.
108 * match.cc (copy_ts_from_selector_to_associate): Ensure that
109 class valued operator expressions set the selector rank and
110 use the rank to provide the associate variable with an
111 appropriate array spec.
112 * resolve.cc (resolve_operator): Reduce stacked parentheses to
114 (fixup_array_ref): Extract selector symbol from parentheses.
116 2023-10-26 Paul-Antoine Arras <pa@codesourcery.com>
117 Tobias Burnus <tobias@codesourcery.com>
119 * interface.cc (gfc_compare_types): Return true if one type is C_PTR
120 and the other is a compatible INTEGER(8).
121 * misc.cc (gfc_typename): Handle the case where an INTEGER(8) actually
124 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
126 * openmp.cc (omp_mask2): Split 'OMP_CLAUSE_HOST_SELF' into
127 'OMP_CLAUSE_SELF', 'OMP_CLAUSE_HOST'.
128 (gfc_match_omp_clauses, OACC_UPDATE_CLAUSES): Adjust.
130 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
132 * gfortran.h (typedef struct gfc_omp_clauses): Add self_expr field.
133 * openmp.cc (enum omp_mask2): Add OMP_CLAUSE_SELF.
134 (gfc_match_omp_clauses): Add handling for OMP_CLAUSE_SELF.
135 (OACC_PARALLEL_CLAUSES): Add OMP_CLAUSE_SELF.
136 (OACC_KERNELS_CLAUSES): Likewise.
137 (OACC_SERIAL_CLAUSES): Likewise.
138 (resolve_omp_clauses): Add handling for omp_clauses->self_expr.
139 * trans-openmp.cc (gfc_trans_omp_clauses): Add handling of
140 clauses->self_expr and building of OMP_CLAUSE_SELF tree clause.
141 (gfc_split_omp_clauses): Add handling of self_expr field copy.
143 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
145 * dump-parse-tree.cc (show_omp_clauses): Group handling of 'if'
146 clause without and with modifier.
147 * frontend-passes.cc (gfc_code_walker): Likewise.
148 * gfortran.h (gfc_omp_clauses): Likewise.
149 * openmp.cc (gfc_free_omp_clauses): Likewise.
151 2023-10-18 Tobias Burnus <tobias@codesourcery.com>
153 * intrinsic.texi (signal): Add 'intrinsic :: signal, sleep' to
154 the example to make it safer.
156 2023-10-17 Harald Anlauf <anlauf@gmx.de>
159 * frontend-passes.cc (traverse_io_block): Dependency check of loop
160 nest shall be triangular, not banded.
162 2023-10-17 Tobias Burnus <tobias@codesourcery.com>
164 * intrinsic.texi (signal): Mention that the argument
165 passed to the signal handler procedure is passed by reference.
168 2023-10-15 Tobias Burnus <tobias@codesourcery.com>
170 * scanner.cc (skip_free_comments, skip_fixed_comments): Remove
171 leftover 'OpenACC' from comments about OpenMP's conditional
172 compilation sentinel.
174 2023-10-14 Tobias Burnus <tobias@codesourcery.com>
176 * gfortran.h (ext_attr_t): Add omp_allocate flag.
177 * match.cc (gfc_free_omp_namelist): Void deleting same
178 u2.allocator multiple times now that a sequence can use
180 * openmp.cc (gfc_match_omp_clauses, gfc_match_omp_allocate): Use
181 same allocator expr multiple times.
182 (is_predefined_allocator): Make static.
183 (gfc_resolve_omp_allocate): Update/extend restriction checks;
184 remove sorry message.
185 (resolve_omp_clauses): Reject corarrays in allocate/allocators
187 * parse.cc (check_omp_allocate_stmt): Permit procedure pointers
188 here (rejected later) for less misleading diagnostic.
189 * trans-array.cc (gfc_trans_auto_array_allocation): Propagate
190 size for GOMP_alloc and location to which it should be added to.
191 * trans-decl.cc (gfc_trans_deferred_vars): Handle 'omp allocate'
192 for stack variables; sorry for static variables/common blocks.
193 * trans-openmp.cc (gfc_trans_omp_clauses): Evaluate 'allocate'
194 clause's allocator only once; fix adding expressions to the
196 (gfc_trans_omp_single): Pass a block to gfc_trans_omp_clauses.
198 2023-10-13 Harald Anlauf <anlauf@gmx.de>
201 * decl.cc (get_proc_name): Extend name conflict detection between
202 internal procedure and previous declaration also to derived type.
204 2023-10-13 Harald Anlauf <anlauf@gmx.de>
207 * invoke.texi: Update documentation to reflect '-ffpe-trap=none'.
208 * options.cc (gfc_handle_fpe_option): Fix mixup up of error messages
209 for options -ffpe-trap and -ffpe-summary. Accept '-ffpe-trap=none'
210 to clear FPU traps previously set on command line.
212 2023-10-13 Richard Biener <rguenther@suse.de>
214 PR tree-optimization/111779
215 * trans-expr.cc (gfc_trans_assignment_1): Initialize
216 lhs_caf_attr and rhs_caf_attr codimension flag to avoid
217 false positive -Wuninitialized.
219 2023-10-12 Paul Thomas <pault@gcc.gnu.org>
222 * trans-expr.cc (gfc_trans_pointer_assignment): Set the hidden
223 string length component for pointer assignment to character
226 2023-10-08 Tobias Burnus <tobias@codesourcery.com>
228 * parse.cc (parse_omp_structured_block): Make the user code end
229 up inside of BLOCK construct for strictly structured blocks;
230 fix fallout for 'section' and 'teams'.
231 * openmp.cc (resolve_omp_target): Fix changed BLOCK handling
232 for teams in target checking.
234 2023-10-04 Paul Thomas <pault@gcc.gnu.org>
238 * trans-expr.cc (gfc_trans_scalar_assign): Finalize components
239 on deallocation if derived type is not finalizable.
241 2023-10-03 David Malcolm <dmalcolm@redhat.com>
243 * error.cc (gfc_format_decoder): Update for "m_" prefixes to
246 2023-10-02 David Malcolm <dmalcolm@redhat.com>
248 * error.cc (gfc_diagnostics_init): Update for change to start_span.
250 2023-10-02 David Malcolm <dmalcolm@redhat.com>
252 * error.cc (gfc_diagnostic_starter): Update for reorganization of
253 source-printing fields of diagnostic_context.
254 (gfc_diagnostics_init): Likewise.
255 (gfc_diagnostics_finish): Likewise.
257 2023-09-29 Andre Vehreschild <vehre@gcc.gnu.org>
260 * trans-array.cc (structure_alloc_comps): Deref coarray.
261 (gfc_trans_deferred_array): Add freeing of components after
262 check for allocated coarray.
264 2023-09-24 Paul Thomas <pault@gcc.gnu.org>
268 * decl.cc (fix_initializer_charlen): New function broken out of
269 add_init_expr_to_sym.
270 (add_init_expr_to_sym, build_struct): Call the new function.
271 * trans-expr.cc (gfc_conv_intrinsic_to_class): Remove repeated
274 2023-09-23 Harald Anlauf <anlauf@gmx.de>
277 * class.cc (gfc_build_class_symbol): Do not try to build class
278 container for invalid typespec.
279 * resolve.cc (resolve_fl_var_and_proc): Prevent NULL pointer
281 (resolve_symbol): Likewise.
283 2023-09-19 Harald Anlauf <anlauf@gmx.de>
286 * trans-array.cc (trans_array_constructor): In absence of a typespec,
287 use string length determined by get_array_ctor_strlen() to reasonably
288 initialize auxiliary variable for bounds-checking.
290 2023-09-15 Harald Anlauf <anlauf@gmx.de>
293 * trans-array.cc (trans_array_bound_check): Add optional argument
294 COMPNAME for explicit specification of array component name.
295 (array_bound_check_elemental): Helper function for generating
296 bounds-checking code for elemental dimensions.
297 (gfc_conv_expr_descriptor): Use bounds-checking also for elemental
298 dimensions, i.e. those not handled by the scalarizer.
300 2023-09-15 Mikael Morin <mikael@gcc.gnu.org>
303 * gfortran.h (gfc_symbol): Add comment documenting reference counting.
304 * parse.cc (parse_interface): Remove reference count incrementation.
306 2023-09-12 Mikael Morin <mikael@gcc.gnu.org>
309 * gfortran.h (gfc_release_symbol): Set return type to bool.
310 * symbol.cc (gfc_release_symbol): Ditto. Return whether symbol was
312 (delete_symbol_from_ns): New, outline code from...
313 (gfc_restore_last_undo_checkpoint): ... here. Delete new symbols
314 from two more namespaces.
316 2023-09-09 Mikael Morin <mikael@gcc.gnu.org>
318 * bbt.cc (delete_treap): Add argument REMOVED, set it to the removed
319 element from the tree. Change NULL to nullptr.
320 (gfc_delete_bbt): Return the removed element from the tree.
321 * gfortran.h (gfc_delete_symtree): Remove prototype.
322 (gfc_delete_bbt): Set return type to pointer.
323 * symbol.cc (gfc_delete_symtree): Make static. Get the element to be
324 freed from the result of gfc_delete_bbt. Remove the preliminary walk to
327 2023-09-01 Harald Anlauf <anlauf@gmx.de>
330 * trans-array.cc (gfc_conv_ss_startstride): For array bounds checking,
331 consider also array constructors in expressions, and use their shape.
333 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
335 * gfortran.texi: Likewise.
337 2023-08-30 Mikael Morin <mikael@gcc.gnu.org>
340 * gfortran.h (gfc_drop_interface_elements_before): New prototype.
341 (gfc_current_interface_head): Return a reference to the pointer.
342 * interface.cc (gfc_current_interface_head): Ditto.
343 (free_interface_elements_until): New function, generalizing
345 (gfc_free_interface): Use free_interface_elements_until.
346 (gfc_drop_interface_elements_before): New function.
348 (current_interface_ptr, previous_interface_head): New static variables.
349 (current_interface_valid_p, get_current_interface_ptr): New functions.
350 (decode_statement): Initialize previous_interface_head.
351 (reject_statement): Restore current interface pointer to point to
352 previous_interface_head.
354 2023-08-26 Paul Thomas <pault@gcc.gnu.org>
357 * trans-expr.cc (gfc_trans_arrayfunc_assign): Supply a missing
358 dereference for the call to gfc_deallocate_alloc_comp_no_caf.
360 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
362 * gfortran.h (struct gfc_namespace): Add omp_structured_block bit.
363 * openmp.cc: Include omp-api.h.
364 (resolve_omp_clauses): Consolidate inscan reduction clause conflict
366 (find_nested_loop_in_chain): New.
367 (find_nested_loop_in_block): New.
368 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse properly.
369 Handle imperfectly-nested loops when looking for nested omp scan.
370 Refactor to move inscan reduction clause conflict checking to
372 (gfc_resolve_do_iterator): Handle imperfectly-nested loops.
373 (struct icode_error_state): New.
374 (icode_code_error_callback): New.
375 (icode_expr_error_callback): New.
376 (diagnose_intervening_code_errors_1): New.
377 (diagnose_intervening_code_errors): New.
378 (make_structured_block): New.
379 (restructure_intervening_code): New.
380 (is_outer_iteration_variable): Do not assume loops are perfectly
382 (check_nested_loop_in_chain): New.
383 (check_nested_loop_in_block_state): New.
384 (check_nested_loop_in_block_symbol): New.
385 (check_nested_loop_in_block): New.
386 (expr_uses_intervening_var): New.
387 (is_intervening_var): New.
388 (expr_is_invariant): Do not assume loops are perfectly nested.
389 (resolve_omp_do): Handle imperfectly-nested loops.
390 * trans-stmt.cc (gfc_trans_block_construct): Generate
391 OMP_STRUCTURED_BLOCK if magic bit is set on block namespace.
393 2023-08-25 Harald Anlauf <anlauf@gmx.de>
396 * data.cc (get_array_index): Add bounds-checking code and return error
397 status. Overindexing will be allowed as an extension for -std=legacy
398 and generate an error in standard-conforming mode.
399 (gfc_assign_data_value): Use error status from get_array_index for
400 graceful error recovery.
402 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
404 * match.cc (gfc_match_equivalence): Rename TRUE/FALSE to true/false.
405 * module.cc (check_access): Ditto.
406 * primary.cc (match_real_constant): Ditto.
407 * trans-array.cc (gfc_trans_allocate_array_storage): Ditto.
408 (get_array_ctor_strlen): Ditto.
409 * trans-common.cc (find_equivalence): Ditto.
410 (add_equivalences): Ditto.
412 2023-08-23 Harald Anlauf <anlauf@gmx.de>
415 * resolve.cc (is_non_constant_shape_array): Add forward declaration.
416 (resolve_common_vars): Diagnose automatic array object in COMMON.
417 (resolve_symbol): Prevent confusing follow-on error.
419 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
421 * gfortran.h (enum gfc_omp_defaultmap_category):
422 Add OMP_DEFAULTMAP_CAT_ALL.
423 * openmp.cc (gfc_match_omp_clauses): Parse
425 * trans-openmp.cc (gfc_trans_omp_clauses): Handle it.
427 2023-08-22 Harald Anlauf <anlauf@gmx.de>
430 * data.cc (gfc_advance_section): Derive next index set and next offset
431 into DATA variable also for array references using vector sections.
432 Use auxiliary array to keep track of offsets into indexing vectors.
433 (gfc_get_section_index): Set up initial indices also for DATA variables
434 with array references using vector sections.
435 * data.h (gfc_get_section_index): Adjust prototype.
436 (gfc_advance_section): Likewise.
437 * resolve.cc (check_data_variable): Pass vector offsets.
439 2023-08-16 Harald Anlauf <anlauf@gmx.de>
442 * trans-expr.cc (conv_scalar_char_value): Use gfc_replace_expr to
443 avoid leaking replaced gfc_expr.
445 2023-08-15 Martin Jambor <mjambor@suse.cz>
446 Harald Anlauf <anlauf@gmx.de>
449 * resolve.cc (resolve_structure_cons): Check comp->ts is character
450 type before accessing stuff through comp->ts.u.cl.
452 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
453 Thomas Schwinge <thomas@codesourcery.com>
455 * openmp.cc (OACC_DATA_CLAUSES): Add OMP_CLAUSE_DEFAULT.
457 2023-08-14 Mikael Morin <mikael@gcc.gnu.org>
461 * trans-types.cc (gfc_sym_type): Use a bare character type for length
462 one value character dummy arguments.
463 * trans-expr.cc (gfc_conv_string_parameter): Handle single character
465 (gfc_conv_procedure_call): Don't exclude interoperable kinds
466 from single character handling. For single character dummy arguments,
467 extend the existing handling of non-constant expressions to constant
470 2023-08-14 Mikael Morin <mikael@gcc.gnu.org>
472 * gfortran.h (gfc_length_one_character_type_p): New inline
474 * check.cc (is_c_interoperable): Use
475 gfc_length_one_character_type_p.
476 * decl.cc (verify_bind_c_sym): Same.
477 * trans-expr.cc (gfc_conv_procedure_call): Same.
479 2023-08-09 Steve Kargl <sgk@troutmask.apl.washington.edu>
482 * resolve.cc (resolve_types): Exclude contained procedures with
483 the artificial attribute from test for pureness.
485 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
487 * openmp.cc (resolve_omp_clauses): Add checking requiring
488 OpenACC host_data construct to have an use_device clause.
490 2023-07-28 Harald Anlauf <anlauf@gmx.de>
493 * gfortran.texi: Clarify argument passing convention.
494 * trans-expr.cc (gfc_conv_procedure_call): Do not pass the character
495 length as hidden argument when the declared dummy argument is
498 2023-07-27 Tobias Burnus <tobias@codesourcery.com>
500 * openmp.cc (resolve_omp_target): Minor cleanup.
501 * parse.cc (decode_omp_directive): Find TARGET statement
502 also higher in the stack.
504 2023-07-26 Harald Anlauf <anlauf@gmx.de>
507 * resolve.cc (check_data_variable): Do not accept strings with
508 deferred length or non-constant length in a DATA statement.
509 Reject also substrings of string variables of non-constant length.
511 2023-07-25 Tobias Burnus <tobias@codesourcery.com>
515 * gfortran.h (gfc_omp_clauses): Add target_first_st_is_teams.
516 * parse.cc (parse_omp_structured_block): Set it if the first
517 statement in the structured block of a TARGET is TEAMS or
518 a combined/composite starting with TEAMS.
519 * openmp.cc (resolve_omp_target): Also show an error for
520 contains_teams_construct without target_first_st_is_teams.
522 2023-07-24 Tobias Burnus <tobias@codesourcery.com>
526 * gfortran.h (gfc_omp_clauses): Add contains_teams_construct.
527 * openmp.cc (resolve_omp_target): New; check for teams nesting.
528 (gfc_resolve_omp_directive): Call it.
529 * parse.cc (decode_omp_directive): Set contains_teams_construct
530 on enclosing ST_OMP_TARGET.
532 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
534 * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): Only
537 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
539 * f95-lang.cc (gfc_init_builtin_functions): Add __builtin_iseqsig.
540 * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): New
542 (gfc_conv_ieee_arithmetic_function): Handle IEEE comparisons.
544 2023-07-19 Tobias Burnus <tobias@codesourcery.com>
547 * trans-openmp.cc (gfc_nonrect_loop_expr): Accept all
549 (gfc_trans_omp_do): Likewise; use sign to determine
552 2023-07-17 Harald Anlauf <anlauf@gmx.de>
556 * trans-expr.cc (gfc_conv_procedure_call): For intrinsic procedures
557 whose result characteristics depends on the first argument and which
558 can be of type character, the character length will not be deferred.
560 2023-07-17 Tobias Burnus <tobias@codesoucery.com>
561 Chung-Lin Tang <cltang@codesourcery.com>
563 * dump-parse-tree.cc (show_omp_namelist, show_omp_clauses): Dump
564 uses_allocators clause.
565 * gfortran.h (gfc_free_omp_namelist): Add memspace_sym to u union
566 and traits_sym to u2 union.
567 (OMP_LIST_USES_ALLOCATORS): New enum value.
568 (gfc_free_omp_namelist): Add 'bool free_mem_traits_space' arg.
569 * match.cc (gfc_free_omp_namelist): Likewise.
570 * openmp.cc (gfc_free_omp_clauses, gfc_match_omp_variable_list,
571 gfc_match_omp_to_link, gfc_match_omp_doacross_sink,
572 gfc_match_omp_clause_reduction, gfc_match_omp_allocate,
573 gfc_match_omp_flush): Update call.
574 (gfc_match_omp_clauses): Likewise. Parse uses_allocators clause.
575 (gfc_match_omp_clause_uses_allocators): New.
576 (enum omp_mask2): Add new OMP_CLAUSE_USES_ALLOCATORS.
577 (OMP_TARGET_CLAUSES): Accept it.
578 (resolve_omp_clauses): Resolve uses_allocators clause
579 * st.cc (gfc_free_statement): Update gfc_free_omp_namelist call.
580 * trans-openmp.cc (gfc_trans_omp_clauses): Handle
581 OMP_LIST_USES_ALLOCATORS; fail with sorry unless predefined allocator.
582 (gfc_split_omp_clauses): Handle uses_allocators.
584 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
587 * trans.h (gfc_deallocate_with_status): Add class container
589 (gfc_deallocate_scalar_with_status): Ditto.
590 * trans.cc (gfc_deallocate_with_status): Add class container
591 argument and pass it down to gfc_add_finalize_call.
592 (gfc_deallocate_scalar_with_status): Same.
593 * trans-array.cc (structure_alloc_comps): Update caller.
594 * trans-stmt.cc (gfc_trans_deallocate): Ditto.
595 * trans-expr.cc (gfc_conv_procedure_call): Ditto. Pass
596 pre-evaluated class container argument if it's available.
598 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
601 * trans.h (gfc_add_finalizer_call): Add class container argument.
602 * trans.cc (gfc_add_finalizer_call): Ditto. Pass down new
603 argument to get_final_proc_ref, get_elem_size, get_var_desc,
605 (get_elem_size): Add class container argument.
606 Use provided class container if it's available.
607 (get_var_descr): Same.
609 (get_final_proc_ref): Same. Add boolean telling the class
610 container argument is used. Set it. Don't try to use
611 final_wrapper if class container argument was used.
613 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
615 * trans.cc (get_var_descr): Factor scalar descriptor generation.
617 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
619 * trans.cc (get_vptr): New function.
620 (gfc_add_finalizer_call): Move virtual table pointer evaluation
623 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
625 * trans.cc (get_var_descr): Remove argument ts. Use var->ts
627 (gfc_add_finalizer_call): Update caller.
629 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
631 * trans.cc (gfc_add_finalizer_call): Inline definition of
632 variable has_finalizer. Merge nested conditions.
634 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
636 * trans.cc (gfc_add_finalizer_call): Remove local variable
637 final_expr. Pass down expr to get_final_proc_ref and move
638 final procedure expression generation down to its one usage
639 in get_final_proc_ref.
640 (get_final_proc_ref): Add argument expr. Remove argument
641 final_wrapper. Recreate final_wrapper from expr.
643 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
645 * trans.cc (gfc_add_finalizer_call): Remove local variable
646 elem_size. Pass expression to get_elem_size and move the
647 element size expression generation close to its usage there.
648 (get_elem_size): Add argument expr, remove class_size argument
649 and rebuild it from expr. Remove ts argument and use the
650 type of expr instead.
652 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
654 * trans.cc (gfc_add_finalizer_call): Move pre and post code for
655 the final procedure pointer expression to the outer block.
656 Reuse the previously evaluated final procedure pointer
659 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
661 * trans.cc (gfc_add_finalizer_call): Add post code for desc_se
662 after the finalizer call. Add post code for final_se and
665 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
667 * trans.cc (gfc_build_final_call): Inline...
668 (gfc_add_finalizer_call): ... to its one caller.
670 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
672 * trans.cc (get_var_descr): New function.
673 (gfc_build_final_call): Outline the data reference descriptor
674 evaluation code to get_var_descr.
676 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
678 * trans.cc (get_elem_size): New function.
679 (gfc_build_final_call): Outline the element size evaluation
682 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
684 * trans.cc (get_final_proc_ref): New function.
685 (gfc_build_final_call): Outline the pointer evaluation code
686 to get_final_proc_ref.
688 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
690 * trans.cc (gfc_build_final_call): Remove commented assertion.
692 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
695 * trans.h (gfc_reset_vptr): Add class_container argument.
696 * trans-expr.cc (gfc_reset_vptr): Ditto. If a valid vptr can
697 be obtained through class_container argument, bypass evaluation
699 (gfc_conv_procedure_call): Wrap the argument evaluation code
700 in a conditional if the associated dummy is optional. Evaluate
701 the data reference to a pointer now, and replace later
702 references with usage of the pointer.
704 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
707 * trans.h (struct gfc_se): New field class_container.
708 (struct gfc_ss_info): Ditto.
709 (gfc_evaluate_data_ref_now): New prototype.
710 * trans.cc (gfc_evaluate_data_ref_now): Implement it.
711 * trans-array.cc (gfc_conv_ss_descriptor): Copy class_container
712 field from gfc_se struct to gfc_ss_info struct.
713 (gfc_conv_expr_descriptor): Copy class_container field from
714 gfc_ss_info struct to gfc_se struct.
715 * trans-expr.cc (gfc_conv_class_to_class): Use class container
716 set in class_container field if available.
717 (gfc_conv_variable): Set class_container field on encountering
718 class variables or components, clear it on encountering
719 non-class components.
720 (gfc_conv_procedure_call): Evaluate data ref to a pointer now,
721 and replace later references by usage of the pointer.
723 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
726 * trans-expr.cc (gfc_conv_procedure_call): Use a separate gfc_se
727 struct, initalized from parmse, to generate the class wrapper.
728 After the class wrapper code has been generated, copy it back
729 depending on whether parameter deallocation code has been
732 2023-07-13 Mikael Morin <mikael@gcc.gnu.org>
735 * symbol.cc (gfc_restore_last_undo_checkpoint): Release symbols
738 2023-07-12 Andre Vehreschild <vehre@gcc.gnu.org>
741 * expr.cc (find_inquiry_ref): Replace len of pdt_string by
743 (simplify_ref_chain): Ensure input to find_inquiry_ref is
745 (gfc_match_init_expr): Prevent PDT analysis for function calls.
746 (gfc_pdt_find_component_copy_initializer): Get the initializer
747 value for given component.
748 * gfortran.h (gfc_pdt_find_component_copy_initializer): New
750 * simplify.cc (gfc_simplify_len): Replace len() of PDT with pdt
751 component ref or constant.
753 2023-07-11 Harald Anlauf <anlauf@gmx.de>
756 * symbol.cc (gfc_copy_formal_args_intr): When deriving the formal
757 argument attributes from the actual ones for intrinsic procedure
758 calls, take special care of CHARACTER arguments that we do not
759 wrongly treat them formally as deferred-length.
761 2023-07-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
765 * match.cc (gfc_match_namelist): Check for host associated or
766 defined types before applying default type.
767 (gfc_match_select_rank): Apply default type to selector of
768 unknown type if possible.
769 * resolve.cc (resolve_fl_variable): Do not apply local default
770 initialization to assumed rank entities.
772 2023-07-08 Harald Anlauf <anlauf@gmx.de>
773 Steven G. Kargl <kargl@gcc.gnu.org>
776 * trans-expr.cc (gfc_conv_procedure_call): Check procedures for
777 allocatable dummy arguments with INTENT(OUT) and move deallocation
778 of actual arguments after evaluation of argument expressions before
779 the procedure is executed.
781 2023-07-08 Harald Anlauf <anlauf@gmx.de>
784 * arith.cc (gfc_compare_expr): Handle equality comparison of constant
785 complex gfc_expr arguments.
787 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
788 Juzhe-Zhong <juzhe.zhong@rivai.ai>
790 * trans-types.cc (gfc_type_for_mode): Ditto.
792 2023-06-28 Harald Anlauf <anlauf@gmx.de>
795 * trans-expr.cc (gfc_conv_procedure_call): For non-constant string
796 argument passed to CHARACTER(LEN=1),VALUE dummy, ensure proper
797 dereferencing and truncation of string to length 1.
799 2023-06-28 Paul Thomas <pault@gcc.gnu.org>
802 * expr.cc (gfc_is_ptr_fcn): Remove reference to class_pointer.
803 * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow
804 associate names with pointer function targets to be used in
805 variable definition context.
806 * trans-decl.cc (get_symbol_decl): Remove extraneous line.
807 * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Obtain
808 size of intrinsic and character expressions.
809 (gfc_trans_subcomponent_assign): Expand assignment to class
810 components to include intrinsic and character expressions.
812 2023-06-24 Harald Anlauf <anlauf@gmx.de>
815 * trans-expr.cc (gfc_conv_procedure_call): Truncate constant string
816 argument of length > 1 passed to scalar CHARACTER(1),VALUE dummy.
818 2023-06-23 Harald Anlauf <anlauf@gmx.de>
821 * trans-expr.cc (gfc_conv_procedure_call): Pass actual argument
822 to scalar CHARACTER(1),VALUE dummy argument by value.
824 2023-06-21 Paul Thomas <pault@gcc.gnu.org>
831 * decl.cc (char_len_param_value): Fix memory leak.
832 (resolve_block_construct): Remove unnecessary static decls.
833 * expr.cc (gfc_is_ptr_fcn): New function.
834 (gfc_check_vardef_context): Use it to permit pointer function
835 result selectors to be used for associate names in variable
837 * gfortran.h: Prototype for gfc_is_ptr_fcn.
838 * match.cc (build_associate_name): New function.
839 (gfc_match_select_type): Use the new function to replace inline
840 version and to build a new associate name for the case where
841 the supplied associate name is already used for that purpose.
842 * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow
843 associate names with pointer function targets to be used in
844 variable definition context.
845 * trans-decl.cc (gfc_get_symbol_decl): Unlimited polymorphic
846 variables need deferred initialisation of the vptr.
847 (gfc_trans_deferred_vars): Do the vptr initialisation.
848 * trans-stmt.cc (trans_associate_var): Ensure that a pointer
849 associate name points to the target of the selector and not
852 2023-06-21 Paul Thomas <pault@gcc.gnu.org>
855 * trans-expr.cc (gfc_conv_procedure_call): The hidden string
856 length must not be passed to a formal arg of type(cptr).
858 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
860 * dump-parse-tree.cc (show_omp_namelist): Fix dump of the allocator
861 modifier of OMP_LIST_ALLOCATE.
863 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
865 * match.cc (gfc_match_char): Match with '%S' a symbol
868 2023-06-19 Tobias Burnus <tobias@codesourcery.com>
870 * intrinsic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS): Also
871 add references to the OpenMP 5.1 and 5.2 spec; add omp_initial_device
872 and omp_invalid_device named constants.
874 2023-06-13 Harald Anlauf <anlauf@gmx.de>
875 Mikael Morin <mikael@gcc.gnu.org>
878 * trans-array.cc (gfc_trans_allocate_array_storage): When passing a
879 zero-sized array with fixed (= non-dynamic) size, allocate temporary
880 by the caller, not by the callee.
882 2023-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
884 * f95-lang.cc (gfc_init_builtin_functions): Add fmax() and
885 fmin() built-ins, and their variants.
886 * mathbuiltins.def: Add FMAX and FMIN built-ins.
887 * trans-intrinsic.cc (conv_intrinsic_ieee_minmax): New function.
888 (gfc_conv_ieee_arithmetic_function): Handle IEEE_MIN_NUM and
889 IEEE_MAX_NUM functions.
891 2023-06-09 Jakub Jelinek <jakub@redhat.com>
894 * primary.cc (gfc_convert_to_structure_constructor): Only do
895 constant string ctor length verification and truncation/padding
896 if constant length has INTEGER type.
898 2023-06-08 Paul Thomas <pault@gcc.gnu.org>
904 * decl.cc (char_len_param_value): Simplify a copy of the expr
905 and replace the original if there is no error.
906 * gfortran.h : Remove the redundant field 'rankguessed' from
907 'gfc_association_list'.
908 * resolve.cc (resolve_assoc_var): Remove refs to 'rankguessed'.
909 (resolve_variable): Associate names with constant or structure
910 constructor targets cannot have array refs.
911 * trans-array.cc (gfc_conv_expr_descriptor): Guard expression
912 character length backend decl before using it. Suppress the
913 assignment if lhs equals rhs.
914 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
915 associate variables pointing to a variable. Add comment.
916 * trans-stmt.cc (trans_associate_var): Remove requirement that
917 the character length be deferred before assigning the value
918 returned by gfc_conv_expr_descriptor. Also, guard the backend
919 decl before testing with VAR_P.
921 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
922 Tobias Burnus <tobias@codesourcery.com>
924 * dump-parse-tree.cc (show_omp_namelist): Display 'present' map
926 (show_omp_clauses): Display 'present' motion modifier for 'to'
928 * gfortran.h (enum gfc_omp_map_op): Add entries with 'present'
930 (struct gfc_omp_namelist): Add 'present_modifer'.
931 * openmp.cc (gfc_match_motion_var_list): New, handles optional
932 'present' modifier for to/from clauses.
933 (gfc_match_omp_clauses): Call it for to/from clauses; parse 'present'
934 in defaultmap and map clauses.
935 (resolve_omp_clauses): Allow 'present' modifiers on 'target',
936 'target data', 'target enter' and 'target exit' directives.
937 * trans-openmp.cc (gfc_trans_omp_clauses): Apply 'present' modifiers
938 to tree node for 'map', 'to' and 'from' clauses. Apply 'present' for
941 2023-06-02 Steve Kargl <kargl@gcc.gnu.org>
944 * resolve.cc (resolve_select_rank): Remove duplicate error.
945 (resolve_fl_var_and_proc): Prevent NULL pointer dereference and
946 suppress error message for temporary.
948 2023-06-02 Paul Thomas <pault@gcc.gnu.org>
951 * parse.cc (parse_associate): Replace the existing evaluation
952 of the target rank with calls to gfc_resolve_ref and
953 gfc_expression_rank. Identify untyped target function results
954 with structure constructors by finding the appropriate derived
956 * resolve.cc (resolve_symbol): Allow associate variables to be
959 2023-06-01 Harald Anlauf <anlauf@gmx.de>
962 * decl.cc (gfc_match_kind_spec): Use error path on missing right
964 (gfc_match_decl_type_spec): Use error return when an error occurred
965 during matching a KIND specifier.
967 2023-06-01 Tobias Burnus <tobias@codesourcery.com>
969 * parse.cc (decode_omp_directive): Accept all pure directives
970 inside a PURE procedures; handle 'error at(execution).
972 2023-05-26 Tobias Burnus <tobias@codesourcery.com>
974 * dump-parse-tree.cc (show_omp_namelist): Update allocator, fix
976 (show_omp_node, show_code_node): Handle EXEC_OMP_ALLOCATE.
977 * gfortran.h (enum gfc_statement): Add ST_OMP_ALLOCATE and ..._EXEC.
978 (enum gfc_exec_op): Add EXEC_OMP_ALLOCATE.
979 (struct gfc_omp_namelist): Add 'allocator' to 'u2' union.
980 (struct gfc_namespace): Add omp_allocate.
981 (gfc_resolve_omp_allocate): New.
982 * match.cc (gfc_free_omp_namelist): Free 'u2.allocator'.
983 * match.h (gfc_match_omp_allocate, gfc_match_omp_allocators): New.
984 * openmp.cc (gfc_omp_directives): Uncomment allocate/allocators.
985 (gfc_match_omp_variable_list): Add bool arg for
986 rejecting listening common-block vars separately.
987 (gfc_match_omp_clauses): Update for u2.allocators.
988 (OMP_ALLOCATORS_CLAUSES, gfc_match_omp_allocate,
989 gfc_match_omp_allocators, is_predefined_allocator,
990 gfc_resolve_omp_allocate): New.
991 (resolve_omp_clauses): Update 'allocate' clause checks.
992 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
993 OMP ALLOCATE/ALLOCATORS.
994 * parse.cc (in_exec_part): New global var.
995 (check_omp_allocate_stmt, parse_openmp_allocate_block): New.
996 (decode_omp_directive, case_exec_markers, case_omp_decl,
997 gfc_ascii_statement, parse_omp_structured_block): Handle
998 OMP allocate/allocators.
999 (verify_st_order, parse_executable): Set in_exec_part.
1000 * resolve.cc (gfc_resolve_blocks, resolve_codes): Handle
1001 allocate/allocators.
1002 * st.cc (gfc_free_statement): Likewise.
1003 * trans.cc (trans_code): Likewise.
1004 * trans-openmp.cc (gfc_trans_omp_directive): Likewise.
1005 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1006 u2.allocator, fix for u.align.
1008 2023-05-24 Harald Anlauf <anlauf@gmx.de>
1011 * simplify.cc (simplify_size): Reject DIM argument of intrinsic SIZE
1012 with error when out of valid range.
1014 2023-05-24 Harald Anlauf <anlauf@gmx.de>
1017 * check.cc (gfc_check_reshape): Expand constant arguments SHAPE and
1018 ORDER before checking.
1019 * gfortran.h (gfc_is_constant_array_expr): Add prototype.
1020 * iresolve.cc (gfc_resolve_reshape): Expand constant argument SHAPE.
1021 * simplify.cc (is_constant_array_expr): If array is determined to be
1022 constant, expand small array constructors if needed.
1023 (gfc_is_constant_array_expr): Wrapper for is_constant_array_expr.
1024 (gfc_simplify_reshape): Fix check for insufficient elements in SOURCE
1025 when no padding specified.
1027 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
1030 * resolve.cc (gfc_resolve_ref): Conversion of array_ref into an
1031 element should be done for all characters without a len expr,
1032 not just deferred lens, and for integer expressions.
1033 * trans-expr.cc (conv_inquiry): For len and kind inquiry refs,
1034 set the se string_length to NULL_TREE.
1036 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
1037 Steven G. Kargl <kargl@gcc.gnu.org>
1040 * decl.cc (variable_decl): Clean up white space issues.
1041 (gfc_match_final_decl): Declaration of finalizable derived type
1042 is allowed in a submodule.
1044 2023-05-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1046 * expr.cc (gfc_get_corank): Use CLASS_DATA from gfortran.h.
1047 * resolve.cc (resolve_component): Same.
1048 (resolve_fl_derived0): Same.
1049 * simplify.cc (gfc_simplify_extends_type_of): Same.
1050 (simplify_cobound): Same.
1052 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1054 * trans-array.cc (is_pointer_array): Use _P() defines from tree.h.
1055 (gfc_conv_scalarized_array_ref): Ditto.
1056 (gfc_conv_array_ref): Ditto.
1057 * trans-decl.cc (gfc_finish_decl): Ditto.
1058 (gfc_get_symbol_decl): Ditto.
1059 * trans-expr.cc (gfc_trans_pointer_assignment): Ditto.
1060 (gfc_trans_arrayfunc_assign): Ditto.
1061 (gfc_trans_assignment_1): Ditto.
1062 * trans-intrinsic.cc (gfc_conv_intrinsic_minmax): Ditto.
1063 (conv_intrinsic_ieee_value): Ditto.
1064 * trans-io.cc (gfc_convert_array_to_string): Ditto.
1065 * trans-openmp.cc (gfc_omp_is_optional_argument): Ditto.
1066 (gfc_trans_omp_clauses): Ditto.
1067 * trans-stmt.cc (gfc_conv_label_variable): Ditto.
1068 * trans.cc (gfc_build_addr_expr): Ditto.
1069 (get_array_span): Ditto.
1071 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1074 * array.cc (compare_bounds): Use narrower return type.
1075 (gfc_compare_array_spec): Likewise.
1076 (is_constant_element): Likewise.
1077 (gfc_constant_ac): Likewise.
1078 * check.cc (dim_rank_check): Likewise.
1079 * cpp.cc (gfc_cpp_init_options): Likewise.
1080 (dump_macro): Likewise.
1081 * cpp.h (gfc_cpp_handle_option): Likewise.
1082 * dependency.cc (gfc_ref_needs_temporary_p): Likewise.
1083 (gfc_check_argument_dependency): Likewise.
1084 (gfc_check_fncall_dependency): Likewise.
1085 (ref_same_as_full_array): Likewise.
1086 * dependency.h (gfc_check_fncall_dependency): Likewise.
1087 (gfc_dep_resolver): Likewise.
1088 (gfc_are_equivalenced_arrays): Likewise.
1089 * expr.cc (gfc_copy_ref): Likewise.
1090 (gfc_kind_max): Likewise.
1091 (numeric_type): Likewise.
1092 * gfortran.h (gfc_at_end): Likewise.
1093 (gfc_at_eof): Likewise.
1094 (gfc_at_bol): Likewise.
1095 (gfc_at_eol): Likewise.
1096 (gfc_define_undef_line): Likewise.
1097 (gfc_wide_is_printable): Likewise.
1098 (gfc_wide_is_digit): Likewise.
1099 (gfc_wide_fits_in_byte): Likewise.
1100 (gfc_find_sym_tree): Likewise.
1101 (gfc_generic_intrinsic): Likewise.
1102 (gfc_specific_intrinsic): Likewise.
1103 (gfc_intrinsic_actual_ok): Likewise.
1104 (gfc_has_vector_index): Likewise.
1105 (gfc_numeric_ts): Likewise.
1106 (gfc_impure_variable): Likewise.
1107 (gfc_pure): Likewise.
1108 (gfc_implicit_pure): Likewise.
1109 (gfc_elemental): Likewise.
1110 (gfc_pure_function): Likewise.
1111 (gfc_implicit_pure_function): Likewise.
1112 (gfc_compare_array_spec): Likewise.
1113 (gfc_constant_ac): Likewise.
1114 (gfc_expanded_ac): Likewise.
1115 (gfc_check_digit): Likewise.
1116 * intrinsic.cc (gfc_find_subroutine): Likewise.
1117 (gfc_generic_intrinsic): Likewise.
1118 (gfc_specific_intrinsic): Likewise.
1119 * io.cc (compare_to_allowed_values): Likewise. And remove
1120 unneeded forward declaration.
1121 * parse.cc: Likewise.
1122 * parse.h (gfc_check_do_variable): Likewise.
1123 * primary.cc (gfc_check_digit): Likewise.
1124 * resolve.cc (resolve_structure_cons): Likewise.
1125 (pure_stmt_function): Likewise.
1126 (gfc_pure_function): Likewise.
1127 (impure_stmt_fcn): Likewise.
1128 (resolve_forall_iterators): Likewise.
1129 (resolve_data): Likewise.
1130 (gfc_impure_variable): Likewise.
1131 (gfc_pure): Likewise.
1132 (gfc_unset_implicit_pure): Likewise.
1133 * scanner.cc (wide_is_ascii): Likewise.
1134 (gfc_wide_toupper): Likewise.
1135 (gfc_open_included_file): Likewise.
1136 (gfc_at_end): Likewise.
1137 (gfc_at_eof): Likewise.
1138 (gfc_at_bol): Likewise.
1139 (skip_comment_line): Likewise.
1140 (gfc_gobble_whitespace): Likewise.
1141 * symbol.cc (gfc_find_symtree_in_proc): Likewise.
1142 * trans-array.cc: Likewise.
1143 * trans-decl.cc (gfc_set_decl_assembler_name): Likewise.
1144 * trans-types.cc (gfc_get_element_type): Likewise.
1145 (gfc_add_field_to_struct): Likewise.
1146 * trans-types.h (gfc_copy_dt_decls_ifequal): Likewise.
1147 (gfc_return_by_reference): Likewise.
1148 (gfc_is_nodesc_array): Likewise.
1149 * trans.h (gfc_can_put_var_on_stack): Likewise.
1151 2023-05-17 Harald Anlauf <anlauf@gmx.de>
1155 * decl.cc (add_init_expr_to_sym): Set shape of initializer also for
1156 zero-sized arrays, so that bounds violations can be detected later.
1158 2023-05-17 Tobias Burnus <tobias@codesourcery.com>
1160 * trans-decl.cc (gfc_get_symbol_decl): Add attributes
1161 such as 'declare target' also to hidden artificial
1162 variable for deferred-length character variables.
1163 * trans-openmp.cc (gfc_trans_omp_array_section,
1164 gfc_trans_omp_clauses, gfc_trans_omp_target_exit_data):
1165 Improve mapping of array descriptors and deferred-length
1168 2023-05-16 Paul Thomas <pault@gcc.gnu.org>
1176 * interface.cc (gfc_compare_actual_formal): Emit an error if an
1177 unlimited polymorphic actual is not matched either to an
1178 unlimited or assumed type formal argument.
1179 * resolve.cc (resolve_ordinary_assign): Emit an error if the
1180 var expression of an ordinary assignment is a proc pointer
1182 * trans-array.cc (gfc_walk_array_ref): Provide assumed shape
1183 arrays coming from interface mapping with a viable arrayspec.
1184 * trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
1185 of unlimited polymorphic 'class_ts'.
1186 (gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
1187 polymorphic and should accept any actual type.
1188 (gfc_conv_procedure_call): Replace dreadful kludge with a call
1189 to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
1190 by giving it the pointer type of the actual argument.
1191 (alloc_scalar_allocatable_subcomponent): Shorten the function
1192 name and replace the symbol argument with the se string length.
1193 If a deferred length character length is either not present or
1194 is not a variable, give the typespec a variable and assign the
1195 string length to that. Use gfc_deferred_strlen to find the
1196 hidden string length component.
1197 (gfc_trans_subcomponent_assign): Convert the expression before
1198 the call to alloc_scalar_allocatable_subcomponent so that a
1199 good string length is provided.
1200 (gfc_trans_structure_assign): Remove the unneeded derived type
1201 symbol from calls to gfc_trans_subcomponent_assign.
1203 2023-05-15 Harald Anlauf <anlauf@gmx.de>
1206 * expr.cc (gfc_check_vardef_context): Check appropriate pointer
1207 attribute for CLASS vs. non-CLASS function result in variable
1210 2023-05-11 Xi Ruoyao <xry111@xry111.site>
1212 * Make-lang.in: Use grep instead of fgrep.
1214 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1216 * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration.
1217 (debug): Add DEBUG_FUNCTION.
1218 (show_code_node): Remove erroneous whitespace.
1220 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1223 * dump-parse-tree.cc (debug): New function for gfc_namespace.
1224 (gfc_debug_code): Delete forward declaration.
1225 (show_attr): Make sure to print balanced braces.
1227 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1229 * resolve.cc (resolve_select_type): Fix coding style.
1231 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1233 * resolve.cc (resolve_select_type): Call free() unconditionally.
1235 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1238 * expr.cc (find_array_section): Fix mpz memory leak.
1239 * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in
1242 2023-05-05 Harald Anlauf <anlauf@gmx.de>
1245 * arith.cc (eval_intrinsic): Check conformability of ranks of operands
1246 for intrinsic binary operators before performing type conversions.
1247 * gfortran.h (gfc_op_rank_conformable): Add prototype.
1248 * resolve.cc (resolve_operator): Check conformability of ranks of
1249 operands for intrinsic binary operators before performing type
1251 (gfc_op_rank_conformable): New helper function to compare ranks of
1252 operands of binary operator.
1254 2023-05-04 Julian Brown <julian@codesourcery.com>
1257 * openmp.cc (resolve_omp_clauses): Add diagnostic for
1258 non-pointer/non-allocatable attach/detach.
1259 * trans-openmp.cc (gfc_trans_omp_clauses): Remove dereference for
1260 pointer-to-scalar derived type component attach/detach. Fix
1261 attach/detach handling for descriptors.
1263 2023-04-28 Julian Brown <julian@codesourcery.com>
1266 * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fixes.
1268 2023-04-28 Tobias Burnus <tobias@codesourcery.com>
1270 * gfortran.texi: Fix typos.
1271 * decl.cc: Fix typos in comments and in a variable name.
1272 * arith.cc: Fix comment typos.
1273 * check.cc: Likewise.
1274 * class.cc: Likewise.
1275 * dependency.cc: Likewise.
1276 * expr.cc: Likewise.
1277 * frontend-passes.cc: Likewise.
1278 * gfortran.h: Likewise.
1279 * intrinsic.cc: Likewise.
1280 * iresolve.cc: Likewise.
1281 * match.cc: Likewise.
1282 * module.cc: Likewise.
1283 * primary.cc: Likewise.
1284 * resolve.cc: Likewise.
1285 * simplify.cc: Likewise.
1286 * trans-array.cc: Likewise.
1287 * trans-decl.cc: Likewise.
1288 * trans-expr.cc: Likewise.
1289 * trans-intrinsic.cc: Likewise.
1290 * trans-openmp.cc: Likewise.
1291 * trans-stmt.cc: Likewise.
1293 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
1295 * openmp.cc (gfc_resolve_omp_do_blocks): Handle zero
1296 or more than one exec statements before/after 'omp scan'.
1297 * trans-openmp.cc (gfc_trans_omp_do): Likewise.
1299 2023-04-22 Harald Anlauf <anlauf@gmx.de>
1300 Steven G. Kargl <kargl@gcc.gnu.org>
1303 * interface.cc (gfc_compare_actual_formal): Reject allocatable
1304 functions being used as actual argument for allocable dummy.
1306 2023-04-14 Harald Anlauf <anlauf@gmx.de>
1309 * simplify.cc (gfc_simplify_set_exponent): Fix implementation of
1310 compile-time simplification of intrinsic SET_EXPONENT for argument
1311 X < 1 and for I < 0.
1313 2023-04-14 Paul Thomas <pault@gcc.gnu.org>
1316 * gfortran.h : Add expr3_not_explicit bit field to gfc_code.
1317 * resolve.cc (resolve_allocate_expr): Set bit field when the
1318 default initializer is applied to expr3.
1319 * trans-stmt.cc (gfc_trans_allocate): If expr3_not_explicit is
1320 set, do not deallocate expr3.
1322 2023-04-13 Harald Anlauf <anlauf@gmx.de>
1325 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and
1326 unsigned HOST_WIDE_INT for portability.
1328 2023-04-12 Harald Anlauf <anlauf@gmx.de>
1331 * resolve.cc (resolve_entries): Handle functions with ENTRY and
1332 ALLOCATABLE results.
1333 * trans-expr.cc (gfc_conv_procedure_call): Functions with a result
1334 with the POINTER or ALLOCATABLE attribute shall not get any special
1335 treatment with -ff2c, as they cannot be written in Fortran 77.
1336 * trans-types.cc (gfc_return_by_reference): Likewise.
1337 (gfc_get_function_type): Likewise.
1339 2023-04-12 Harald Anlauf <anlauf@gmx.de>
1343 * interface.cc (compare_parameter): Enable type and rank checks for
1344 arguments of derived type from the intrinsic module ISO_C_BINDING.
1346 2023-04-08 Paul Thomas <pault@gcc.gnu.org>
1349 * iresolve.cc (gfc_resolve_adjustl, gfc_resolve_adjustr): if
1350 string length is deferred use the string typespec for result.
1351 * resolve.cc (resolve_assoc_var): Handle parentheses around the
1353 (resolve_block_construct): Remove unnecessary static decls.
1354 * trans-array.cc (gfc_conv_expr_descriptor): Guard string len
1355 expression in condition. Improve handling of string length and
1356 span, especially for substrings of the descriptor.
1357 (duplicate_allocatable): Make element type more explicit with
1359 * trans-decl.cc (gfc_get_symbol_decl): Emit a fatal error with
1360 appropriate message instead of ICE if symbol type is unknown.
1361 (gfc_generate_function_code): Set current locus to proc_sym
1363 * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in
1364 'previous' and use if end expression in substring reference is
1366 (gfc_conv_string_length): Use gfc_conv_expr_descriptor if
1367 'expr_flat' is an array. Add post block to catch deallocation
1369 (gfc_conv_procedure_call): Assign the parmse string length to
1370 the expression string length, if it is deferred.
1371 (gfc_trans_alloc_subarray_assign): If this is a deferred string
1372 length component, store the string length in the hidden comp.
1373 Update the typespec length accordingly. Generate a new type
1374 spec for the call to gfc_duplicate-allocatable in this case.
1375 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
1376 deferred character array components.
1378 2023-04-04 Harald Anlauf <anlauf@gmx.de>
1381 * expr.cc (check_restricted): Adjust check for valid variables in
1382 restricted expressions: make no exception for module variables.
1384 2023-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1386 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
1387 type name to be "long long".
1389 2023-03-30 Andrew Pinski <apinski@marvell.com>
1391 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
1392 type name to be "long long". Add a comment on why adding
1395 2023-03-28 Jakub Jelinek <jakub@redhat.com>
1398 * openmp.cc (gfc_omp_absent_contains_clause): Fix typo in diagnostics
1399 - composit -> composite.
1401 2023-03-25 Harald Anlauf <anlauf@gmx.de>
1404 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
1406 2023-03-24 Harald Anlauf <anlauf@gmx.de>
1408 * expr.cc (free_expr0): Free also BOZ strings as part of an expression.
1410 2023-03-24 Haochen Gui <guihaoc@gcc.gnu.org>
1411 Tobias Burnus <tobias@codesourcery.com>
1414 * target-memory.cc (gfc_interpret_float): Return FAIL when
1415 native_interpret_expr gets a NULL tree.
1416 * arith.cc (gfc_hollerith2real): Return NULL when
1417 gfc_interpret_float fails.
1418 * error.cc (gfc_buffered_p): Define.
1419 * gfortran.h (gfc_buffered_p): Declare.
1420 * intrinsic.cc: Add diagnostic.h to include list.
1421 (do_simplify): Save errorcount and check it at finish. Report a
1422 "Cannot simplify expression" error on a bad result if error count
1423 doesn't change and no other errors buffered.
1425 2023-03-22 Harald Anlauf <anlauf@gmx.de>
1426 Steven G. Kargl <kargl@gcc.gnu.org>
1429 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
1430 cannot be an alternate return.
1432 2023-03-21 Harald Anlauf <anlauf@gmx.de>
1435 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
1436 generic module interface.
1438 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
1440 * invoke.texi: Remove usages of @gol.
1441 * intrinsic.texi: Ditto.
1443 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
1446 * trans-array.cc (gfc_trans_array_constructor_value): Correct
1447 incorrect setting of typespec.
1449 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
1452 * resolve.cc (generate_component_assignments): Restore the
1453 exclusion of allocatable components from the loop.
1455 2023-03-20 Harald Anlauf <anlauf@gmx.de>
1458 * invoke.texi: Correct documentation of how underscores are appended
1461 2023-03-20 Harald Anlauf <anlauf@gmx.de>
1464 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
1465 up real kind-specific maximum exponent for mpfr.
1467 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
1470 * resolve.cc (check_host_association): If an external function
1471 is typed but not declared explicitly to be external, change the
1472 old symbol from a variable to an external function.
1474 2023-03-19 Harald Anlauf <anlauf@gmx.de>
1477 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
1478 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
1480 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1482 * gfortran.texi: Mention behavior on overflow.
1484 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
1489 * class.cc (finalize_component): Include the missing arguments
1490 in the call to the component's finalizer wrapper.
1491 (has_finalizer_component): Do not return true for procedure
1493 (finalizer_insert_packed_call): Remove the redundant argument
1494 in the call to the final subroutine.
1495 (generate_finalization_wrapper): Add support for assumed rank
1497 (gfc_may_be_finalized): New helper function.
1498 * dump-parse-tree.cc (write_proc): Whitespace.
1499 * gfortran.h : Add prototype for gfc_may_be_finalized.
1500 * resolve.cc (resolve_function): Correct derived types that
1501 have an incomplete namespace.
1502 (resolve_where, gfc_resolve_where_code_in_forall,
1503 gfc_resolve_forall_body, gfc_resolve_code): Check that the op
1504 code is still EXEC_ASSIGN. If it is set lhs to must finalize.
1505 (is_finalizable_type): New function.
1506 (generate_component_assignments): Set must_finalize if needed.
1507 (gfc_resolve_finalizers): Error if assumed rank finalizer is
1508 not the only one. Warning on lack of scalar finalizer modified
1509 to account for assumed rank finalizers.
1510 (generate_final_call): New function.
1511 (generate_component_assignments): Enclose the outermost call in
1512 a block to capture automatic deallocation and final calls.
1513 Set must_finalize as required to satisfy the standards. Use an
1514 explicit pointer assignment for pointer components to capture
1515 finalization of the target. Likewise use explicit assignment
1516 for allocatable components. Do not use the temporary copy of
1517 the lhs in defined assignment if the component is allocatable.
1518 Put the temporary in the same namespace as the lhs symbol if
1519 the component may be finalized. Remove the leading assignment
1520 from the expansion of assignment of components that have their
1521 own defined assignment components. Suppress finalization of
1522 assignment of temporary components to the lhs. Make an explicit
1523 final call for the rhs function temporary if it exists.
1524 (gfc_resolve_code): Set must_finalize for assignments with an
1525 array constructor on the rhs.
1526 (gfc_resolve_finalizers): Ensure that an assumed rank finalizer
1527 is the only finalizer for that type and correct the surprising
1528 warning for the lack of a scalar finalizer.
1529 (check_defined_assignments): Handle allocatable components.
1530 (resolve_fl_derived): Set referenced the vtab for use
1532 (resolve_symbol): Set referenced an unreferenced symbol that
1534 * trans-array.cc (gfc_trans_array_constructor_value): Add code
1535 to finalize the constructor result. Warn that this feature was
1536 removed in F2018 and that it is suppressed by -std=2018.
1537 (trans_array_constructor): Add finalblock, pass to previous
1538 and apply to loop->post if filled.
1539 (gfc_add_loop_ss_code): Add se finalblock to outer loop post.
1540 (gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
1541 generated finalization code to the main block.
1542 (structure_alloc_comps): Add boolean argument to suppress
1543 finalization and use it for calls from
1544 gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
1546 (gfc_copy_alloc_comp_no_fini): New wrapper for
1547 structure_alloc_comps.
1548 (gfc_alloc_allocatable_for_assignment): Suppress finalization
1549 by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
1550 (gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
1551 deallocate the components of entities with a leading '_' in the
1552 name that are also marked as artificial.
1553 * trans-array.h : Add the new boolean argument to the prototype
1554 of gfc_deallocate_alloc_comp_no_caf with a default of false.
1555 Add prototype for gfc_copy_alloc_comp_no_fini.
1556 * trans-decl.cc(init_intent_out_dt): Tidy up the code.
1557 * trans-expr.cc (gfc_init_se): Initialize finalblock.
1558 (gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
1559 finalize function results. Replace in-line block for class
1560 results with call to new function.
1561 (gfc_conv_expr): Finalize structure constructors for F2003 and
1562 F2008. Warn that this feature was deleted in F2018 and, unlike
1563 array constructors, is not default. Add array constructor
1564 finalblock to the post block.
1565 (gfc_trans_scalar_assign): Suppress finalization by setting new
1566 argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
1567 finalization blocks to the main block.
1568 (gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
1569 and ensure that finalization occurs after the evaluation of the
1570 rhs but using the initial value for the lhs. Finalize rhs
1571 function results using gfc_finalize_tree_expr.
1572 (trans_class_assignment, gfc_trans_assignment_1): As previous
1573 function, taking care to order evaluation, assignment and
1574 finalization correctly.
1575 * trans-io.cc (gfc_trans_transfer): Add the final block.
1576 * trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
1577 (trans_associate_var): Nullify derived allocatable components
1578 and finalize function targets with defined assignment
1579 components on leaving the block scope.
1580 (trans_allocate): Finalize source expressions, if required,
1581 and set init_expr artificial temporarily to suppress the
1582 finalization in gfc_trans_assignment.
1583 * trans.cc (gfc_add_finalizer_call): Do not finalize the
1584 temporaries generated in type assignment with defined
1585 assignment components.
1586 (gfc_assignment_finalizer_call): New function.
1587 (gfc_finalize_tree_expr): New function.
1588 * trans.h: Add finalblock to gfc_se. Add the prototypes for
1589 gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
1591 2023-03-15 Harald Anlauf <anlauf@gmx.de>
1592 Tobias Burnus <tobias@codesourcery.com>
1595 * interface.cc (compare_parameter): Adjust check of array dummy
1596 arguments to handle the case of CLASS variables.
1598 2023-03-11 Harald Anlauf <anlauf@gmx.de>
1601 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
1602 bounds check to common type for comparison.
1604 2023-03-10 Harald Anlauf <anlauf@gmx.de>
1607 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
1608 checking a symbol with the BIND(C) attribute.
1610 2023-03-05 Harald Anlauf <anlauf@gmx.de>
1611 Tobias Burnus <tobias@codesourcery.com>
1614 * class.cc (gfc_build_class_symbol): Handle update of attributes of
1615 existing class container.
1616 (gfc_find_derived_vtab): Fix several memory leaks.
1617 (find_intrinsic_vtab): Ditto.
1618 * decl.cc (attr_decl1): Manage update of symbol attributes from
1620 * primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
1621 updated from the class container.
1622 * symbol.cc (free_old_symbol): Adjust management of symbol versions
1623 to not prematurely free array specs while working on the declation
1626 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
1628 PR middle-end/108546
1629 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
1630 type(C_ptr) variables.
1632 2023-02-27 Harald Anlauf <anlauf@gmx.de>
1635 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
1636 LEN argument of IBITS equal to BITSIZE(I).
1638 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
1641 * intrinsic.cc (get_intrinsic_dummy_arg,
1642 set_intrinsic_dummy_arg): Rename the former to the latter.
1643 Remove the return value, add a reference to the lhs as argument,
1644 and do the pointer assignment inside the function. Don't do
1645 it if the pointer is already non-NULL.
1646 (sort_actual): Update caller.
1648 2023-02-25 Harald Anlauf <anlauf@gmx.de>
1650 * arith.cc (gfc_real2int): Clear mpfr variable after use.
1652 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
1655 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
1656 bounds of CFI desc for 'pointer,intent(out)'.
1658 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
1660 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
1661 (generate_local_decl): Add diagnostic for dummy and local variables.
1663 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
1666 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
1668 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
1669 field if it is set in the original element.
1671 2023-02-24 Harald Anlauf <anlauf@gmx.de>
1674 * frontend-passes.cc (do_subscript): Clear used gmp variable.
1676 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
1678 * invoke.texi: Reorder index entries around @items.
1680 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
1682 * invoke.texi: Reorder @opindex commands to precede @items they
1685 2023-02-22 Harald Anlauf <anlauf@gmx.de>
1688 * resolve.cc (resolve_component): The type of a CHARACTER length
1689 expression must be INTEGER.
1691 2023-02-21 Harald Anlauf <anlauf@gmx.de>
1694 * parse.cc (check_function_result_typed): Improve type check of
1695 specification expression for character length and return status.
1696 (parse_spec): Use status from above.
1697 * resolve.cc (resolve_fntype): Prevent use of invalid specification
1698 expression for character length.
1700 2023-02-16 Patrick Palka <ppalka@redhat.com>
1702 * gfortran.h: Mechanically drop static from static inline
1703 functions via s/^static inline/inline/g.
1705 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
1708 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
1709 reference to invalid formal argument.
1711 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
1714 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
1717 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
1720 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
1722 (gfc_resolve_do_iterator): Set a source location for added
1723 'private'-clause arguments.
1724 * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
1725 also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
1726 combined directives with loop + '{masked,master} taskloop (simd)'.
1728 2023-02-13 Harald Anlauf <anlauf@gmx.de>
1731 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
1732 invalid use of CLASS variable.
1734 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
1736 * decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
1737 * gfortran.h (ext_attr_id_t): Ditto.
1738 * gfortran.texi (GCC$ ATTRIBUTES): Document them.
1739 * trans-decl.cc (build_function_decl): Apply them.
1741 2023-02-09 Harald Anlauf <anlauf@gmx.de>
1742 Steven G. Kargl <kargl@gcc.gnu.org>
1746 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
1747 kind in conversion instead of generating an internal error.
1749 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1752 * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
1753 'non_unit_incr' members.
1754 (gfc_nonrect_loop_expr): New.
1755 (gfc_trans_omp_do): Call it; use normal loop bounds
1756 for unit stride - and only create local loop var.
1758 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1760 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
1763 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
1766 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
1767 when a symbol's location is not set.
1769 2023-02-07 Harald Anlauf <anlauf@gmx.de>
1772 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
1773 make ASSOCIATE variables TREE_STATIC.
1775 2023-02-05 Harald Anlauf <anlauf@gmx.de>
1778 * arith.cc (gfc_arith_divide): Emit integer division truncation
1779 warnings using gfc_warning instead of gfc_warning_now to prevent
1782 2023-02-03 Jakub Jelinek <jakub@redhat.com>
1785 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
1788 2023-02-01 Harald Anlauf <anlauf@gmx.de>
1791 * expr.cc (find_array_section): Add check to prevent interpreting an
1792 mpz non-integer constant as an integer.
1794 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
1796 * openmp.cc (resolve_omp_clauses): Check also for
1799 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
1802 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
1803 (gfc_check_findloc): Ditto.
1805 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1808 * parse.cc (parse_module): Remove use of a bool error value
1809 that prevented proper setting of the namespace pointer.
1811 2023-01-28 Harald Anlauf <anlauf@gmx.de>
1812 Steven G. Kargl <kargl@gcc.gnu.org>
1815 * resolve.cc (compare_bound_int): Expression to compare must be of
1817 (compare_bound_mpz_t): Likewise.
1818 (check_dimension): Fix comment on checks applied to array section
1819 and clean up associated logic.
1821 2023-01-28 Harald Anlauf <anlauf@gmx.de>
1824 * match.cc (gfc_match_common): A USE associated name shall not appear
1825 in a COMMON block (F2018:C8121).
1827 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
1830 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
1832 2023-01-26 Harald Anlauf <anlauf@gmx.de>
1835 * resolve.cc (check_host_association): Extend host association check
1836 so that it is not restricted to functions. Also prevent NULL pointer
1839 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
1842 * array.cc (compare_bounds): Return false instead of generating an
1843 internal error on an invalid argument type.
1845 2023-01-24 Harald Anlauf <anlauf@gmx.de>
1848 * simplify.cc (simplify_transformation): Do not try to simplify
1849 transformational intrinsic when the ARRAY argument has a NULL shape.
1851 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1854 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
1855 dereference while recursively checking expressions.
1857 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1860 * interface.cc (get_expr_storage_size): Check array subscript triplets
1861 that we actually have integer values before trying to extract with
1864 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1867 * iresolve.cc (check_charlen_present): Preserve character length if
1868 there is no array constructor.
1870 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1873 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
1874 * primary.cc (match_variable): Add check for PARAMETER in DATA.
1876 2023-01-19 Harald Anlauf <anlauf@gmx.de>
1879 * expr.cc (class_allocatable): Prevent NULL pointer dereference
1881 (class_pointer): Likewise.
1883 2023-01-17 Harald Anlauf <anlauf@gmx.de>
1886 * interface.cc (get_expr_storage_size): Check that we actually have
1887 an integer value before trying to extract it with mpz_get_si.
1889 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
1892 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
1894 2023-01-11 Jakub Jelinek <jakub@redhat.com>
1897 * f95-lang.cc (gfc_init_builtin_function): Fix up function types
1898 for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
1900 2023-01-10 Harald Anlauf <anlauf@gmx.de>
1903 * frontend-passes.cc (do_subscript): Clear used gmp variables.
1905 2023-01-02 Jakub Jelinek <jakub@redhat.com>
1907 * gfortranspec.cc (lang_specific_driver): Update copyright notice
1909 * gfc-internals.texi: Bump @copying's copyright year.
1910 * gfortran.texi: Ditto.
1911 * intrinsic.texi: Ditto.
1912 * invoke.texi: Ditto.
1915 Copyright (C) 2023 Free Software Foundation, Inc.
1917 Copying and distribution of this file, with or without modification,
1918 are permitted in any medium without royalty provided the copyright
1919 notice and this notice are preserved.