1 2023-11-04 David Malcolm <dmalcolm@redhat.com>
3 * cpp.cc: Update for changes to diagnostic_context.
5 * options.cc: Likewise.
7 2023-11-03 Harald Anlauf <anlauf@gmx.de>
10 * match.cc (gfc_match_call): If a procedure pointer has already been
11 resolved, do not create a new symbol in a procedure reference of
12 the same name shadowing the first one if it is host-associated.
14 2023-11-03 Harald Anlauf <anlauf@gmx.de>
17 * trans-expr.cc (conv_cond_temp): Helper function for creation of a
18 conditional temporary.
19 (gfc_conv_procedure_call): Handle passing of allocatable or pointer
20 actual argument to dummy with OPTIONAL + VALUE attribute. Actual
21 arguments that are not allocated or associated are treated as not
24 2023-11-03 Paul Thomas <pault@gcc.gnu.org>
27 * interface.cc (upoly_ok): Defined operators using unlimited
28 polymorphic formal arguments must not override the intrinsic
31 2023-11-02 Paul Thomas <pault@gcc.gnu.org>
34 * parse.cc (parse_associate): Remove condition that caused this
37 2023-10-30 Paul Thomas <pault@gcc.gnu.org>
40 * resolve.cc (resolve_select_type): If the selector expression
41 has no class component references and the expression is a
42 derived type, copy the typespec of the symbol to that of the
45 2023-10-27 Harald Anlauf <anlauf@gmx.de>
46 Steven G. Kargl <kargl@gcc.gnu.org>
49 * decl.cc (gfc_match_formal_arglist): Handle conflicting declarations
50 of a MODULE PROCEDURE when one of the declarations is an alternate
53 2023-10-27 Paul Thomas <pault@gcc.gnu.org>
56 * expr.cc (gfc_check_vardef_context): Check that the target
57 does have a vector index before emitting the specific error.
58 * match.cc (copy_ts_from_selector_to_associate): Ensure that
59 class valued operator expressions set the selector rank and
60 use the rank to provide the associate variable with an
61 appropriate array spec.
62 * resolve.cc (resolve_operator): Reduce stacked parentheses to
64 (fixup_array_ref): Extract selector symbol from parentheses.
66 2023-10-26 Paul-Antoine Arras <pa@codesourcery.com>
67 Tobias Burnus <tobias@codesourcery.com>
69 * interface.cc (gfc_compare_types): Return true if one type is C_PTR
70 and the other is a compatible INTEGER(8).
71 * misc.cc (gfc_typename): Handle the case where an INTEGER(8) actually
74 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
76 * openmp.cc (omp_mask2): Split 'OMP_CLAUSE_HOST_SELF' into
77 'OMP_CLAUSE_SELF', 'OMP_CLAUSE_HOST'.
78 (gfc_match_omp_clauses, OACC_UPDATE_CLAUSES): Adjust.
80 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
82 * gfortran.h (typedef struct gfc_omp_clauses): Add self_expr field.
83 * openmp.cc (enum omp_mask2): Add OMP_CLAUSE_SELF.
84 (gfc_match_omp_clauses): Add handling for OMP_CLAUSE_SELF.
85 (OACC_PARALLEL_CLAUSES): Add OMP_CLAUSE_SELF.
86 (OACC_KERNELS_CLAUSES): Likewise.
87 (OACC_SERIAL_CLAUSES): Likewise.
88 (resolve_omp_clauses): Add handling for omp_clauses->self_expr.
89 * trans-openmp.cc (gfc_trans_omp_clauses): Add handling of
90 clauses->self_expr and building of OMP_CLAUSE_SELF tree clause.
91 (gfc_split_omp_clauses): Add handling of self_expr field copy.
93 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
95 * dump-parse-tree.cc (show_omp_clauses): Group handling of 'if'
96 clause without and with modifier.
97 * frontend-passes.cc (gfc_code_walker): Likewise.
98 * gfortran.h (gfc_omp_clauses): Likewise.
99 * openmp.cc (gfc_free_omp_clauses): Likewise.
101 2023-10-18 Tobias Burnus <tobias@codesourcery.com>
103 * intrinsic.texi (signal): Add 'intrinsic :: signal, sleep' to
104 the example to make it safer.
106 2023-10-17 Harald Anlauf <anlauf@gmx.de>
109 * frontend-passes.cc (traverse_io_block): Dependency check of loop
110 nest shall be triangular, not banded.
112 2023-10-17 Tobias Burnus <tobias@codesourcery.com>
114 * intrinsic.texi (signal): Mention that the argument
115 passed to the signal handler procedure is passed by reference.
118 2023-10-15 Tobias Burnus <tobias@codesourcery.com>
120 * scanner.cc (skip_free_comments, skip_fixed_comments): Remove
121 leftover 'OpenACC' from comments about OpenMP's conditional
122 compilation sentinel.
124 2023-10-14 Tobias Burnus <tobias@codesourcery.com>
126 * gfortran.h (ext_attr_t): Add omp_allocate flag.
127 * match.cc (gfc_free_omp_namelist): Void deleting same
128 u2.allocator multiple times now that a sequence can use
130 * openmp.cc (gfc_match_omp_clauses, gfc_match_omp_allocate): Use
131 same allocator expr multiple times.
132 (is_predefined_allocator): Make static.
133 (gfc_resolve_omp_allocate): Update/extend restriction checks;
134 remove sorry message.
135 (resolve_omp_clauses): Reject corarrays in allocate/allocators
137 * parse.cc (check_omp_allocate_stmt): Permit procedure pointers
138 here (rejected later) for less misleading diagnostic.
139 * trans-array.cc (gfc_trans_auto_array_allocation): Propagate
140 size for GOMP_alloc and location to which it should be added to.
141 * trans-decl.cc (gfc_trans_deferred_vars): Handle 'omp allocate'
142 for stack variables; sorry for static variables/common blocks.
143 * trans-openmp.cc (gfc_trans_omp_clauses): Evaluate 'allocate'
144 clause's allocator only once; fix adding expressions to the
146 (gfc_trans_omp_single): Pass a block to gfc_trans_omp_clauses.
148 2023-10-13 Harald Anlauf <anlauf@gmx.de>
151 * decl.cc (get_proc_name): Extend name conflict detection between
152 internal procedure and previous declaration also to derived type.
154 2023-10-13 Harald Anlauf <anlauf@gmx.de>
157 * invoke.texi: Update documentation to reflect '-ffpe-trap=none'.
158 * options.cc (gfc_handle_fpe_option): Fix mixup up of error messages
159 for options -ffpe-trap and -ffpe-summary. Accept '-ffpe-trap=none'
160 to clear FPU traps previously set on command line.
162 2023-10-13 Richard Biener <rguenther@suse.de>
164 PR tree-optimization/111779
165 * trans-expr.cc (gfc_trans_assignment_1): Initialize
166 lhs_caf_attr and rhs_caf_attr codimension flag to avoid
167 false positive -Wuninitialized.
169 2023-10-12 Paul Thomas <pault@gcc.gnu.org>
172 * trans-expr.cc (gfc_trans_pointer_assignment): Set the hidden
173 string length component for pointer assignment to character
176 2023-10-08 Tobias Burnus <tobias@codesourcery.com>
178 * parse.cc (parse_omp_structured_block): Make the user code end
179 up inside of BLOCK construct for strictly structured blocks;
180 fix fallout for 'section' and 'teams'.
181 * openmp.cc (resolve_omp_target): Fix changed BLOCK handling
182 for teams in target checking.
184 2023-10-04 Paul Thomas <pault@gcc.gnu.org>
188 * trans-expr.cc (gfc_trans_scalar_assign): Finalize components
189 on deallocation if derived type is not finalizable.
191 2023-10-03 David Malcolm <dmalcolm@redhat.com>
193 * error.cc (gfc_format_decoder): Update for "m_" prefixes to
196 2023-10-02 David Malcolm <dmalcolm@redhat.com>
198 * error.cc (gfc_diagnostics_init): Update for change to start_span.
200 2023-10-02 David Malcolm <dmalcolm@redhat.com>
202 * error.cc (gfc_diagnostic_starter): Update for reorganization of
203 source-printing fields of diagnostic_context.
204 (gfc_diagnostics_init): Likewise.
205 (gfc_diagnostics_finish): Likewise.
207 2023-09-29 Andre Vehreschild <vehre@gcc.gnu.org>
210 * trans-array.cc (structure_alloc_comps): Deref coarray.
211 (gfc_trans_deferred_array): Add freeing of components after
212 check for allocated coarray.
214 2023-09-24 Paul Thomas <pault@gcc.gnu.org>
218 * decl.cc (fix_initializer_charlen): New function broken out of
219 add_init_expr_to_sym.
220 (add_init_expr_to_sym, build_struct): Call the new function.
221 * trans-expr.cc (gfc_conv_intrinsic_to_class): Remove repeated
224 2023-09-23 Harald Anlauf <anlauf@gmx.de>
227 * class.cc (gfc_build_class_symbol): Do not try to build class
228 container for invalid typespec.
229 * resolve.cc (resolve_fl_var_and_proc): Prevent NULL pointer
231 (resolve_symbol): Likewise.
233 2023-09-19 Harald Anlauf <anlauf@gmx.de>
236 * trans-array.cc (trans_array_constructor): In absence of a typespec,
237 use string length determined by get_array_ctor_strlen() to reasonably
238 initialize auxiliary variable for bounds-checking.
240 2023-09-15 Harald Anlauf <anlauf@gmx.de>
243 * trans-array.cc (trans_array_bound_check): Add optional argument
244 COMPNAME for explicit specification of array component name.
245 (array_bound_check_elemental): Helper function for generating
246 bounds-checking code for elemental dimensions.
247 (gfc_conv_expr_descriptor): Use bounds-checking also for elemental
248 dimensions, i.e. those not handled by the scalarizer.
250 2023-09-15 Mikael Morin <mikael@gcc.gnu.org>
253 * gfortran.h (gfc_symbol): Add comment documenting reference counting.
254 * parse.cc (parse_interface): Remove reference count incrementation.
256 2023-09-12 Mikael Morin <mikael@gcc.gnu.org>
259 * gfortran.h (gfc_release_symbol): Set return type to bool.
260 * symbol.cc (gfc_release_symbol): Ditto. Return whether symbol was
262 (delete_symbol_from_ns): New, outline code from...
263 (gfc_restore_last_undo_checkpoint): ... here. Delete new symbols
264 from two more namespaces.
266 2023-09-09 Mikael Morin <mikael@gcc.gnu.org>
268 * bbt.cc (delete_treap): Add argument REMOVED, set it to the removed
269 element from the tree. Change NULL to nullptr.
270 (gfc_delete_bbt): Return the removed element from the tree.
271 * gfortran.h (gfc_delete_symtree): Remove prototype.
272 (gfc_delete_bbt): Set return type to pointer.
273 * symbol.cc (gfc_delete_symtree): Make static. Get the element to be
274 freed from the result of gfc_delete_bbt. Remove the preliminary walk to
277 2023-09-01 Harald Anlauf <anlauf@gmx.de>
280 * trans-array.cc (gfc_conv_ss_startstride): For array bounds checking,
281 consider also array constructors in expressions, and use their shape.
283 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
285 * gfortran.texi: Likewise.
287 2023-08-30 Mikael Morin <mikael@gcc.gnu.org>
290 * gfortran.h (gfc_drop_interface_elements_before): New prototype.
291 (gfc_current_interface_head): Return a reference to the pointer.
292 * interface.cc (gfc_current_interface_head): Ditto.
293 (free_interface_elements_until): New function, generalizing
295 (gfc_free_interface): Use free_interface_elements_until.
296 (gfc_drop_interface_elements_before): New function.
298 (current_interface_ptr, previous_interface_head): New static variables.
299 (current_interface_valid_p, get_current_interface_ptr): New functions.
300 (decode_statement): Initialize previous_interface_head.
301 (reject_statement): Restore current interface pointer to point to
302 previous_interface_head.
304 2023-08-26 Paul Thomas <pault@gcc.gnu.org>
307 * trans-expr.cc (gfc_trans_arrayfunc_assign): Supply a missing
308 dereference for the call to gfc_deallocate_alloc_comp_no_caf.
310 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
312 * gfortran.h (struct gfc_namespace): Add omp_structured_block bit.
313 * openmp.cc: Include omp-api.h.
314 (resolve_omp_clauses): Consolidate inscan reduction clause conflict
316 (find_nested_loop_in_chain): New.
317 (find_nested_loop_in_block): New.
318 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse properly.
319 Handle imperfectly-nested loops when looking for nested omp scan.
320 Refactor to move inscan reduction clause conflict checking to
322 (gfc_resolve_do_iterator): Handle imperfectly-nested loops.
323 (struct icode_error_state): New.
324 (icode_code_error_callback): New.
325 (icode_expr_error_callback): New.
326 (diagnose_intervening_code_errors_1): New.
327 (diagnose_intervening_code_errors): New.
328 (make_structured_block): New.
329 (restructure_intervening_code): New.
330 (is_outer_iteration_variable): Do not assume loops are perfectly
332 (check_nested_loop_in_chain): New.
333 (check_nested_loop_in_block_state): New.
334 (check_nested_loop_in_block_symbol): New.
335 (check_nested_loop_in_block): New.
336 (expr_uses_intervening_var): New.
337 (is_intervening_var): New.
338 (expr_is_invariant): Do not assume loops are perfectly nested.
339 (resolve_omp_do): Handle imperfectly-nested loops.
340 * trans-stmt.cc (gfc_trans_block_construct): Generate
341 OMP_STRUCTURED_BLOCK if magic bit is set on block namespace.
343 2023-08-25 Harald Anlauf <anlauf@gmx.de>
346 * data.cc (get_array_index): Add bounds-checking code and return error
347 status. Overindexing will be allowed as an extension for -std=legacy
348 and generate an error in standard-conforming mode.
349 (gfc_assign_data_value): Use error status from get_array_index for
350 graceful error recovery.
352 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
354 * match.cc (gfc_match_equivalence): Rename TRUE/FALSE to true/false.
355 * module.cc (check_access): Ditto.
356 * primary.cc (match_real_constant): Ditto.
357 * trans-array.cc (gfc_trans_allocate_array_storage): Ditto.
358 (get_array_ctor_strlen): Ditto.
359 * trans-common.cc (find_equivalence): Ditto.
360 (add_equivalences): Ditto.
362 2023-08-23 Harald Anlauf <anlauf@gmx.de>
365 * resolve.cc (is_non_constant_shape_array): Add forward declaration.
366 (resolve_common_vars): Diagnose automatic array object in COMMON.
367 (resolve_symbol): Prevent confusing follow-on error.
369 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
371 * gfortran.h (enum gfc_omp_defaultmap_category):
372 Add OMP_DEFAULTMAP_CAT_ALL.
373 * openmp.cc (gfc_match_omp_clauses): Parse
375 * trans-openmp.cc (gfc_trans_omp_clauses): Handle it.
377 2023-08-22 Harald Anlauf <anlauf@gmx.de>
380 * data.cc (gfc_advance_section): Derive next index set and next offset
381 into DATA variable also for array references using vector sections.
382 Use auxiliary array to keep track of offsets into indexing vectors.
383 (gfc_get_section_index): Set up initial indices also for DATA variables
384 with array references using vector sections.
385 * data.h (gfc_get_section_index): Adjust prototype.
386 (gfc_advance_section): Likewise.
387 * resolve.cc (check_data_variable): Pass vector offsets.
389 2023-08-16 Harald Anlauf <anlauf@gmx.de>
392 * trans-expr.cc (conv_scalar_char_value): Use gfc_replace_expr to
393 avoid leaking replaced gfc_expr.
395 2023-08-15 Martin Jambor <mjambor@suse.cz>
396 Harald Anlauf <anlauf@gmx.de>
399 * resolve.cc (resolve_structure_cons): Check comp->ts is character
400 type before accessing stuff through comp->ts.u.cl.
402 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
403 Thomas Schwinge <thomas@codesourcery.com>
405 * openmp.cc (OACC_DATA_CLAUSES): Add OMP_CLAUSE_DEFAULT.
407 2023-08-14 Mikael Morin <mikael@gcc.gnu.org>
411 * trans-types.cc (gfc_sym_type): Use a bare character type for length
412 one value character dummy arguments.
413 * trans-expr.cc (gfc_conv_string_parameter): Handle single character
415 (gfc_conv_procedure_call): Don't exclude interoperable kinds
416 from single character handling. For single character dummy arguments,
417 extend the existing handling of non-constant expressions to constant
420 2023-08-14 Mikael Morin <mikael@gcc.gnu.org>
422 * gfortran.h (gfc_length_one_character_type_p): New inline
424 * check.cc (is_c_interoperable): Use
425 gfc_length_one_character_type_p.
426 * decl.cc (verify_bind_c_sym): Same.
427 * trans-expr.cc (gfc_conv_procedure_call): Same.
429 2023-08-09 Steve Kargl <sgk@troutmask.apl.washington.edu>
432 * resolve.cc (resolve_types): Exclude contained procedures with
433 the artificial attribute from test for pureness.
435 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
437 * openmp.cc (resolve_omp_clauses): Add checking requiring
438 OpenACC host_data construct to have an use_device clause.
440 2023-07-28 Harald Anlauf <anlauf@gmx.de>
443 * gfortran.texi: Clarify argument passing convention.
444 * trans-expr.cc (gfc_conv_procedure_call): Do not pass the character
445 length as hidden argument when the declared dummy argument is
448 2023-07-27 Tobias Burnus <tobias@codesourcery.com>
450 * openmp.cc (resolve_omp_target): Minor cleanup.
451 * parse.cc (decode_omp_directive): Find TARGET statement
452 also higher in the stack.
454 2023-07-26 Harald Anlauf <anlauf@gmx.de>
457 * resolve.cc (check_data_variable): Do not accept strings with
458 deferred length or non-constant length in a DATA statement.
459 Reject also substrings of string variables of non-constant length.
461 2023-07-25 Tobias Burnus <tobias@codesourcery.com>
465 * gfortran.h (gfc_omp_clauses): Add target_first_st_is_teams.
466 * parse.cc (parse_omp_structured_block): Set it if the first
467 statement in the structured block of a TARGET is TEAMS or
468 a combined/composite starting with TEAMS.
469 * openmp.cc (resolve_omp_target): Also show an error for
470 contains_teams_construct without target_first_st_is_teams.
472 2023-07-24 Tobias Burnus <tobias@codesourcery.com>
476 * gfortran.h (gfc_omp_clauses): Add contains_teams_construct.
477 * openmp.cc (resolve_omp_target): New; check for teams nesting.
478 (gfc_resolve_omp_directive): Call it.
479 * parse.cc (decode_omp_directive): Set contains_teams_construct
480 on enclosing ST_OMP_TARGET.
482 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
484 * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): Only
487 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
489 * f95-lang.cc (gfc_init_builtin_functions): Add __builtin_iseqsig.
490 * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): New
492 (gfc_conv_ieee_arithmetic_function): Handle IEEE comparisons.
494 2023-07-19 Tobias Burnus <tobias@codesourcery.com>
497 * trans-openmp.cc (gfc_nonrect_loop_expr): Accept all
499 (gfc_trans_omp_do): Likewise; use sign to determine
502 2023-07-17 Harald Anlauf <anlauf@gmx.de>
506 * trans-expr.cc (gfc_conv_procedure_call): For intrinsic procedures
507 whose result characteristics depends on the first argument and which
508 can be of type character, the character length will not be deferred.
510 2023-07-17 Tobias Burnus <tobias@codesoucery.com>
511 Chung-Lin Tang <cltang@codesourcery.com>
513 * dump-parse-tree.cc (show_omp_namelist, show_omp_clauses): Dump
514 uses_allocators clause.
515 * gfortran.h (gfc_free_omp_namelist): Add memspace_sym to u union
516 and traits_sym to u2 union.
517 (OMP_LIST_USES_ALLOCATORS): New enum value.
518 (gfc_free_omp_namelist): Add 'bool free_mem_traits_space' arg.
519 * match.cc (gfc_free_omp_namelist): Likewise.
520 * openmp.cc (gfc_free_omp_clauses, gfc_match_omp_variable_list,
521 gfc_match_omp_to_link, gfc_match_omp_doacross_sink,
522 gfc_match_omp_clause_reduction, gfc_match_omp_allocate,
523 gfc_match_omp_flush): Update call.
524 (gfc_match_omp_clauses): Likewise. Parse uses_allocators clause.
525 (gfc_match_omp_clause_uses_allocators): New.
526 (enum omp_mask2): Add new OMP_CLAUSE_USES_ALLOCATORS.
527 (OMP_TARGET_CLAUSES): Accept it.
528 (resolve_omp_clauses): Resolve uses_allocators clause
529 * st.cc (gfc_free_statement): Update gfc_free_omp_namelist call.
530 * trans-openmp.cc (gfc_trans_omp_clauses): Handle
531 OMP_LIST_USES_ALLOCATORS; fail with sorry unless predefined allocator.
532 (gfc_split_omp_clauses): Handle uses_allocators.
534 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
537 * trans.h (gfc_deallocate_with_status): Add class container
539 (gfc_deallocate_scalar_with_status): Ditto.
540 * trans.cc (gfc_deallocate_with_status): Add class container
541 argument and pass it down to gfc_add_finalize_call.
542 (gfc_deallocate_scalar_with_status): Same.
543 * trans-array.cc (structure_alloc_comps): Update caller.
544 * trans-stmt.cc (gfc_trans_deallocate): Ditto.
545 * trans-expr.cc (gfc_conv_procedure_call): Ditto. Pass
546 pre-evaluated class container argument if it's available.
548 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
551 * trans.h (gfc_add_finalizer_call): Add class container argument.
552 * trans.cc (gfc_add_finalizer_call): Ditto. Pass down new
553 argument to get_final_proc_ref, get_elem_size, get_var_desc,
555 (get_elem_size): Add class container argument.
556 Use provided class container if it's available.
557 (get_var_descr): Same.
559 (get_final_proc_ref): Same. Add boolean telling the class
560 container argument is used. Set it. Don't try to use
561 final_wrapper if class container argument was used.
563 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
565 * trans.cc (get_var_descr): Factor scalar descriptor generation.
567 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
569 * trans.cc (get_vptr): New function.
570 (gfc_add_finalizer_call): Move virtual table pointer evaluation
573 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
575 * trans.cc (get_var_descr): Remove argument ts. Use var->ts
577 (gfc_add_finalizer_call): Update caller.
579 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
581 * trans.cc (gfc_add_finalizer_call): Inline definition of
582 variable has_finalizer. Merge nested conditions.
584 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
586 * trans.cc (gfc_add_finalizer_call): Remove local variable
587 final_expr. Pass down expr to get_final_proc_ref and move
588 final procedure expression generation down to its one usage
589 in get_final_proc_ref.
590 (get_final_proc_ref): Add argument expr. Remove argument
591 final_wrapper. Recreate final_wrapper from expr.
593 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
595 * trans.cc (gfc_add_finalizer_call): Remove local variable
596 elem_size. Pass expression to get_elem_size and move the
597 element size expression generation close to its usage there.
598 (get_elem_size): Add argument expr, remove class_size argument
599 and rebuild it from expr. Remove ts argument and use the
600 type of expr instead.
602 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
604 * trans.cc (gfc_add_finalizer_call): Move pre and post code for
605 the final procedure pointer expression to the outer block.
606 Reuse the previously evaluated final procedure pointer
609 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
611 * trans.cc (gfc_add_finalizer_call): Add post code for desc_se
612 after the finalizer call. Add post code for final_se and
615 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
617 * trans.cc (gfc_build_final_call): Inline...
618 (gfc_add_finalizer_call): ... to its one caller.
620 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
622 * trans.cc (get_var_descr): New function.
623 (gfc_build_final_call): Outline the data reference descriptor
624 evaluation code to get_var_descr.
626 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
628 * trans.cc (get_elem_size): New function.
629 (gfc_build_final_call): Outline the element size evaluation
632 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
634 * trans.cc (get_final_proc_ref): New function.
635 (gfc_build_final_call): Outline the pointer evaluation code
636 to get_final_proc_ref.
638 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
640 * trans.cc (gfc_build_final_call): Remove commented assertion.
642 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
645 * trans.h (gfc_reset_vptr): Add class_container argument.
646 * trans-expr.cc (gfc_reset_vptr): Ditto. If a valid vptr can
647 be obtained through class_container argument, bypass evaluation
649 (gfc_conv_procedure_call): Wrap the argument evaluation code
650 in a conditional if the associated dummy is optional. Evaluate
651 the data reference to a pointer now, and replace later
652 references with usage of the pointer.
654 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
657 * trans.h (struct gfc_se): New field class_container.
658 (struct gfc_ss_info): Ditto.
659 (gfc_evaluate_data_ref_now): New prototype.
660 * trans.cc (gfc_evaluate_data_ref_now): Implement it.
661 * trans-array.cc (gfc_conv_ss_descriptor): Copy class_container
662 field from gfc_se struct to gfc_ss_info struct.
663 (gfc_conv_expr_descriptor): Copy class_container field from
664 gfc_ss_info struct to gfc_se struct.
665 * trans-expr.cc (gfc_conv_class_to_class): Use class container
666 set in class_container field if available.
667 (gfc_conv_variable): Set class_container field on encountering
668 class variables or components, clear it on encountering
669 non-class components.
670 (gfc_conv_procedure_call): Evaluate data ref to a pointer now,
671 and replace later references by usage of the pointer.
673 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
676 * trans-expr.cc (gfc_conv_procedure_call): Use a separate gfc_se
677 struct, initalized from parmse, to generate the class wrapper.
678 After the class wrapper code has been generated, copy it back
679 depending on whether parameter deallocation code has been
682 2023-07-13 Mikael Morin <mikael@gcc.gnu.org>
685 * symbol.cc (gfc_restore_last_undo_checkpoint): Release symbols
688 2023-07-12 Andre Vehreschild <vehre@gcc.gnu.org>
691 * expr.cc (find_inquiry_ref): Replace len of pdt_string by
693 (simplify_ref_chain): Ensure input to find_inquiry_ref is
695 (gfc_match_init_expr): Prevent PDT analysis for function calls.
696 (gfc_pdt_find_component_copy_initializer): Get the initializer
697 value for given component.
698 * gfortran.h (gfc_pdt_find_component_copy_initializer): New
700 * simplify.cc (gfc_simplify_len): Replace len() of PDT with pdt
701 component ref or constant.
703 2023-07-11 Harald Anlauf <anlauf@gmx.de>
706 * symbol.cc (gfc_copy_formal_args_intr): When deriving the formal
707 argument attributes from the actual ones for intrinsic procedure
708 calls, take special care of CHARACTER arguments that we do not
709 wrongly treat them formally as deferred-length.
711 2023-07-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
715 * match.cc (gfc_match_namelist): Check for host associated or
716 defined types before applying default type.
717 (gfc_match_select_rank): Apply default type to selector of
718 unknown type if possible.
719 * resolve.cc (resolve_fl_variable): Do not apply local default
720 initialization to assumed rank entities.
722 2023-07-08 Harald Anlauf <anlauf@gmx.de>
723 Steven G. Kargl <kargl@gcc.gnu.org>
726 * trans-expr.cc (gfc_conv_procedure_call): Check procedures for
727 allocatable dummy arguments with INTENT(OUT) and move deallocation
728 of actual arguments after evaluation of argument expressions before
729 the procedure is executed.
731 2023-07-08 Harald Anlauf <anlauf@gmx.de>
734 * arith.cc (gfc_compare_expr): Handle equality comparison of constant
735 complex gfc_expr arguments.
737 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
738 Juzhe-Zhong <juzhe.zhong@rivai.ai>
740 * trans-types.cc (gfc_type_for_mode): Ditto.
742 2023-06-28 Harald Anlauf <anlauf@gmx.de>
745 * trans-expr.cc (gfc_conv_procedure_call): For non-constant string
746 argument passed to CHARACTER(LEN=1),VALUE dummy, ensure proper
747 dereferencing and truncation of string to length 1.
749 2023-06-28 Paul Thomas <pault@gcc.gnu.org>
752 * expr.cc (gfc_is_ptr_fcn): Remove reference to class_pointer.
753 * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow
754 associate names with pointer function targets to be used in
755 variable definition context.
756 * trans-decl.cc (get_symbol_decl): Remove extraneous line.
757 * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Obtain
758 size of intrinsic and character expressions.
759 (gfc_trans_subcomponent_assign): Expand assignment to class
760 components to include intrinsic and character expressions.
762 2023-06-24 Harald Anlauf <anlauf@gmx.de>
765 * trans-expr.cc (gfc_conv_procedure_call): Truncate constant string
766 argument of length > 1 passed to scalar CHARACTER(1),VALUE dummy.
768 2023-06-23 Harald Anlauf <anlauf@gmx.de>
771 * trans-expr.cc (gfc_conv_procedure_call): Pass actual argument
772 to scalar CHARACTER(1),VALUE dummy argument by value.
774 2023-06-21 Paul Thomas <pault@gcc.gnu.org>
781 * decl.cc (char_len_param_value): Fix memory leak.
782 (resolve_block_construct): Remove unnecessary static decls.
783 * expr.cc (gfc_is_ptr_fcn): New function.
784 (gfc_check_vardef_context): Use it to permit pointer function
785 result selectors to be used for associate names in variable
787 * gfortran.h: Prototype for gfc_is_ptr_fcn.
788 * match.cc (build_associate_name): New function.
789 (gfc_match_select_type): Use the new function to replace inline
790 version and to build a new associate name for the case where
791 the supplied associate name is already used for that purpose.
792 * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow
793 associate names with pointer function targets to be used in
794 variable definition context.
795 * trans-decl.cc (gfc_get_symbol_decl): Unlimited polymorphic
796 variables need deferred initialisation of the vptr.
797 (gfc_trans_deferred_vars): Do the vptr initialisation.
798 * trans-stmt.cc (trans_associate_var): Ensure that a pointer
799 associate name points to the target of the selector and not
802 2023-06-21 Paul Thomas <pault@gcc.gnu.org>
805 * trans-expr.cc (gfc_conv_procedure_call): The hidden string
806 length must not be passed to a formal arg of type(cptr).
808 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
810 * dump-parse-tree.cc (show_omp_namelist): Fix dump of the allocator
811 modifier of OMP_LIST_ALLOCATE.
813 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
815 * match.cc (gfc_match_char): Match with '%S' a symbol
818 2023-06-19 Tobias Burnus <tobias@codesourcery.com>
820 * intrinsic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS): Also
821 add references to the OpenMP 5.1 and 5.2 spec; add omp_initial_device
822 and omp_invalid_device named constants.
824 2023-06-13 Harald Anlauf <anlauf@gmx.de>
825 Mikael Morin <mikael@gcc.gnu.org>
828 * trans-array.cc (gfc_trans_allocate_array_storage): When passing a
829 zero-sized array with fixed (= non-dynamic) size, allocate temporary
830 by the caller, not by the callee.
832 2023-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
834 * f95-lang.cc (gfc_init_builtin_functions): Add fmax() and
835 fmin() built-ins, and their variants.
836 * mathbuiltins.def: Add FMAX and FMIN built-ins.
837 * trans-intrinsic.cc (conv_intrinsic_ieee_minmax): New function.
838 (gfc_conv_ieee_arithmetic_function): Handle IEEE_MIN_NUM and
839 IEEE_MAX_NUM functions.
841 2023-06-09 Jakub Jelinek <jakub@redhat.com>
844 * primary.cc (gfc_convert_to_structure_constructor): Only do
845 constant string ctor length verification and truncation/padding
846 if constant length has INTEGER type.
848 2023-06-08 Paul Thomas <pault@gcc.gnu.org>
854 * decl.cc (char_len_param_value): Simplify a copy of the expr
855 and replace the original if there is no error.
856 * gfortran.h : Remove the redundant field 'rankguessed' from
857 'gfc_association_list'.
858 * resolve.cc (resolve_assoc_var): Remove refs to 'rankguessed'.
859 (resolve_variable): Associate names with constant or structure
860 constructor targets cannot have array refs.
861 * trans-array.cc (gfc_conv_expr_descriptor): Guard expression
862 character length backend decl before using it. Suppress the
863 assignment if lhs equals rhs.
864 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
865 associate variables pointing to a variable. Add comment.
866 * trans-stmt.cc (trans_associate_var): Remove requirement that
867 the character length be deferred before assigning the value
868 returned by gfc_conv_expr_descriptor. Also, guard the backend
869 decl before testing with VAR_P.
871 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
872 Tobias Burnus <tobias@codesourcery.com>
874 * dump-parse-tree.cc (show_omp_namelist): Display 'present' map
876 (show_omp_clauses): Display 'present' motion modifier for 'to'
878 * gfortran.h (enum gfc_omp_map_op): Add entries with 'present'
880 (struct gfc_omp_namelist): Add 'present_modifer'.
881 * openmp.cc (gfc_match_motion_var_list): New, handles optional
882 'present' modifier for to/from clauses.
883 (gfc_match_omp_clauses): Call it for to/from clauses; parse 'present'
884 in defaultmap and map clauses.
885 (resolve_omp_clauses): Allow 'present' modifiers on 'target',
886 'target data', 'target enter' and 'target exit' directives.
887 * trans-openmp.cc (gfc_trans_omp_clauses): Apply 'present' modifiers
888 to tree node for 'map', 'to' and 'from' clauses. Apply 'present' for
891 2023-06-02 Steve Kargl <kargl@gcc.gnu.org>
894 * resolve.cc (resolve_select_rank): Remove duplicate error.
895 (resolve_fl_var_and_proc): Prevent NULL pointer dereference and
896 suppress error message for temporary.
898 2023-06-02 Paul Thomas <pault@gcc.gnu.org>
901 * parse.cc (parse_associate): Replace the existing evaluation
902 of the target rank with calls to gfc_resolve_ref and
903 gfc_expression_rank. Identify untyped target function results
904 with structure constructors by finding the appropriate derived
906 * resolve.cc (resolve_symbol): Allow associate variables to be
909 2023-06-01 Harald Anlauf <anlauf@gmx.de>
912 * decl.cc (gfc_match_kind_spec): Use error path on missing right
914 (gfc_match_decl_type_spec): Use error return when an error occurred
915 during matching a KIND specifier.
917 2023-06-01 Tobias Burnus <tobias@codesourcery.com>
919 * parse.cc (decode_omp_directive): Accept all pure directives
920 inside a PURE procedures; handle 'error at(execution).
922 2023-05-26 Tobias Burnus <tobias@codesourcery.com>
924 * dump-parse-tree.cc (show_omp_namelist): Update allocator, fix
926 (show_omp_node, show_code_node): Handle EXEC_OMP_ALLOCATE.
927 * gfortran.h (enum gfc_statement): Add ST_OMP_ALLOCATE and ..._EXEC.
928 (enum gfc_exec_op): Add EXEC_OMP_ALLOCATE.
929 (struct gfc_omp_namelist): Add 'allocator' to 'u2' union.
930 (struct gfc_namespace): Add omp_allocate.
931 (gfc_resolve_omp_allocate): New.
932 * match.cc (gfc_free_omp_namelist): Free 'u2.allocator'.
933 * match.h (gfc_match_omp_allocate, gfc_match_omp_allocators): New.
934 * openmp.cc (gfc_omp_directives): Uncomment allocate/allocators.
935 (gfc_match_omp_variable_list): Add bool arg for
936 rejecting listening common-block vars separately.
937 (gfc_match_omp_clauses): Update for u2.allocators.
938 (OMP_ALLOCATORS_CLAUSES, gfc_match_omp_allocate,
939 gfc_match_omp_allocators, is_predefined_allocator,
940 gfc_resolve_omp_allocate): New.
941 (resolve_omp_clauses): Update 'allocate' clause checks.
942 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
943 OMP ALLOCATE/ALLOCATORS.
944 * parse.cc (in_exec_part): New global var.
945 (check_omp_allocate_stmt, parse_openmp_allocate_block): New.
946 (decode_omp_directive, case_exec_markers, case_omp_decl,
947 gfc_ascii_statement, parse_omp_structured_block): Handle
948 OMP allocate/allocators.
949 (verify_st_order, parse_executable): Set in_exec_part.
950 * resolve.cc (gfc_resolve_blocks, resolve_codes): Handle
952 * st.cc (gfc_free_statement): Likewise.
953 * trans.cc (trans_code): Likewise.
954 * trans-openmp.cc (gfc_trans_omp_directive): Likewise.
955 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
956 u2.allocator, fix for u.align.
958 2023-05-24 Harald Anlauf <anlauf@gmx.de>
961 * simplify.cc (simplify_size): Reject DIM argument of intrinsic SIZE
962 with error when out of valid range.
964 2023-05-24 Harald Anlauf <anlauf@gmx.de>
967 * check.cc (gfc_check_reshape): Expand constant arguments SHAPE and
968 ORDER before checking.
969 * gfortran.h (gfc_is_constant_array_expr): Add prototype.
970 * iresolve.cc (gfc_resolve_reshape): Expand constant argument SHAPE.
971 * simplify.cc (is_constant_array_expr): If array is determined to be
972 constant, expand small array constructors if needed.
973 (gfc_is_constant_array_expr): Wrapper for is_constant_array_expr.
974 (gfc_simplify_reshape): Fix check for insufficient elements in SOURCE
975 when no padding specified.
977 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
980 * resolve.cc (gfc_resolve_ref): Conversion of array_ref into an
981 element should be done for all characters without a len expr,
982 not just deferred lens, and for integer expressions.
983 * trans-expr.cc (conv_inquiry): For len and kind inquiry refs,
984 set the se string_length to NULL_TREE.
986 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
987 Steven G. Kargl <kargl@gcc.gnu.org>
990 * decl.cc (variable_decl): Clean up white space issues.
991 (gfc_match_final_decl): Declaration of finalizable derived type
992 is allowed in a submodule.
994 2023-05-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
996 * expr.cc (gfc_get_corank): Use CLASS_DATA from gfortran.h.
997 * resolve.cc (resolve_component): Same.
998 (resolve_fl_derived0): Same.
999 * simplify.cc (gfc_simplify_extends_type_of): Same.
1000 (simplify_cobound): Same.
1002 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1004 * trans-array.cc (is_pointer_array): Use _P() defines from tree.h.
1005 (gfc_conv_scalarized_array_ref): Ditto.
1006 (gfc_conv_array_ref): Ditto.
1007 * trans-decl.cc (gfc_finish_decl): Ditto.
1008 (gfc_get_symbol_decl): Ditto.
1009 * trans-expr.cc (gfc_trans_pointer_assignment): Ditto.
1010 (gfc_trans_arrayfunc_assign): Ditto.
1011 (gfc_trans_assignment_1): Ditto.
1012 * trans-intrinsic.cc (gfc_conv_intrinsic_minmax): Ditto.
1013 (conv_intrinsic_ieee_value): Ditto.
1014 * trans-io.cc (gfc_convert_array_to_string): Ditto.
1015 * trans-openmp.cc (gfc_omp_is_optional_argument): Ditto.
1016 (gfc_trans_omp_clauses): Ditto.
1017 * trans-stmt.cc (gfc_conv_label_variable): Ditto.
1018 * trans.cc (gfc_build_addr_expr): Ditto.
1019 (get_array_span): Ditto.
1021 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1024 * array.cc (compare_bounds): Use narrower return type.
1025 (gfc_compare_array_spec): Likewise.
1026 (is_constant_element): Likewise.
1027 (gfc_constant_ac): Likewise.
1028 * check.cc (dim_rank_check): Likewise.
1029 * cpp.cc (gfc_cpp_init_options): Likewise.
1030 (dump_macro): Likewise.
1031 * cpp.h (gfc_cpp_handle_option): Likewise.
1032 * dependency.cc (gfc_ref_needs_temporary_p): Likewise.
1033 (gfc_check_argument_dependency): Likewise.
1034 (gfc_check_fncall_dependency): Likewise.
1035 (ref_same_as_full_array): Likewise.
1036 * dependency.h (gfc_check_fncall_dependency): Likewise.
1037 (gfc_dep_resolver): Likewise.
1038 (gfc_are_equivalenced_arrays): Likewise.
1039 * expr.cc (gfc_copy_ref): Likewise.
1040 (gfc_kind_max): Likewise.
1041 (numeric_type): Likewise.
1042 * gfortran.h (gfc_at_end): Likewise.
1043 (gfc_at_eof): Likewise.
1044 (gfc_at_bol): Likewise.
1045 (gfc_at_eol): Likewise.
1046 (gfc_define_undef_line): Likewise.
1047 (gfc_wide_is_printable): Likewise.
1048 (gfc_wide_is_digit): Likewise.
1049 (gfc_wide_fits_in_byte): Likewise.
1050 (gfc_find_sym_tree): Likewise.
1051 (gfc_generic_intrinsic): Likewise.
1052 (gfc_specific_intrinsic): Likewise.
1053 (gfc_intrinsic_actual_ok): Likewise.
1054 (gfc_has_vector_index): Likewise.
1055 (gfc_numeric_ts): Likewise.
1056 (gfc_impure_variable): Likewise.
1057 (gfc_pure): Likewise.
1058 (gfc_implicit_pure): Likewise.
1059 (gfc_elemental): Likewise.
1060 (gfc_pure_function): Likewise.
1061 (gfc_implicit_pure_function): Likewise.
1062 (gfc_compare_array_spec): Likewise.
1063 (gfc_constant_ac): Likewise.
1064 (gfc_expanded_ac): Likewise.
1065 (gfc_check_digit): Likewise.
1066 * intrinsic.cc (gfc_find_subroutine): Likewise.
1067 (gfc_generic_intrinsic): Likewise.
1068 (gfc_specific_intrinsic): Likewise.
1069 * io.cc (compare_to_allowed_values): Likewise. And remove
1070 unneeded forward declaration.
1071 * parse.cc: Likewise.
1072 * parse.h (gfc_check_do_variable): Likewise.
1073 * primary.cc (gfc_check_digit): Likewise.
1074 * resolve.cc (resolve_structure_cons): Likewise.
1075 (pure_stmt_function): Likewise.
1076 (gfc_pure_function): Likewise.
1077 (impure_stmt_fcn): Likewise.
1078 (resolve_forall_iterators): Likewise.
1079 (resolve_data): Likewise.
1080 (gfc_impure_variable): Likewise.
1081 (gfc_pure): Likewise.
1082 (gfc_unset_implicit_pure): Likewise.
1083 * scanner.cc (wide_is_ascii): Likewise.
1084 (gfc_wide_toupper): Likewise.
1085 (gfc_open_included_file): Likewise.
1086 (gfc_at_end): Likewise.
1087 (gfc_at_eof): Likewise.
1088 (gfc_at_bol): Likewise.
1089 (skip_comment_line): Likewise.
1090 (gfc_gobble_whitespace): Likewise.
1091 * symbol.cc (gfc_find_symtree_in_proc): Likewise.
1092 * trans-array.cc: Likewise.
1093 * trans-decl.cc (gfc_set_decl_assembler_name): Likewise.
1094 * trans-types.cc (gfc_get_element_type): Likewise.
1095 (gfc_add_field_to_struct): Likewise.
1096 * trans-types.h (gfc_copy_dt_decls_ifequal): Likewise.
1097 (gfc_return_by_reference): Likewise.
1098 (gfc_is_nodesc_array): Likewise.
1099 * trans.h (gfc_can_put_var_on_stack): Likewise.
1101 2023-05-17 Harald Anlauf <anlauf@gmx.de>
1105 * decl.cc (add_init_expr_to_sym): Set shape of initializer also for
1106 zero-sized arrays, so that bounds violations can be detected later.
1108 2023-05-17 Tobias Burnus <tobias@codesourcery.com>
1110 * trans-decl.cc (gfc_get_symbol_decl): Add attributes
1111 such as 'declare target' also to hidden artificial
1112 variable for deferred-length character variables.
1113 * trans-openmp.cc (gfc_trans_omp_array_section,
1114 gfc_trans_omp_clauses, gfc_trans_omp_target_exit_data):
1115 Improve mapping of array descriptors and deferred-length
1118 2023-05-16 Paul Thomas <pault@gcc.gnu.org>
1126 * interface.cc (gfc_compare_actual_formal): Emit an error if an
1127 unlimited polymorphic actual is not matched either to an
1128 unlimited or assumed type formal argument.
1129 * resolve.cc (resolve_ordinary_assign): Emit an error if the
1130 var expression of an ordinary assignment is a proc pointer
1132 * trans-array.cc (gfc_walk_array_ref): Provide assumed shape
1133 arrays coming from interface mapping with a viable arrayspec.
1134 * trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
1135 of unlimited polymorphic 'class_ts'.
1136 (gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
1137 polymorphic and should accept any actual type.
1138 (gfc_conv_procedure_call): Replace dreadful kludge with a call
1139 to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
1140 by giving it the pointer type of the actual argument.
1141 (alloc_scalar_allocatable_subcomponent): Shorten the function
1142 name and replace the symbol argument with the se string length.
1143 If a deferred length character length is either not present or
1144 is not a variable, give the typespec a variable and assign the
1145 string length to that. Use gfc_deferred_strlen to find the
1146 hidden string length component.
1147 (gfc_trans_subcomponent_assign): Convert the expression before
1148 the call to alloc_scalar_allocatable_subcomponent so that a
1149 good string length is provided.
1150 (gfc_trans_structure_assign): Remove the unneeded derived type
1151 symbol from calls to gfc_trans_subcomponent_assign.
1153 2023-05-15 Harald Anlauf <anlauf@gmx.de>
1156 * expr.cc (gfc_check_vardef_context): Check appropriate pointer
1157 attribute for CLASS vs. non-CLASS function result in variable
1160 2023-05-11 Xi Ruoyao <xry111@xry111.site>
1162 * Make-lang.in: Use grep instead of fgrep.
1164 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1166 * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration.
1167 (debug): Add DEBUG_FUNCTION.
1168 (show_code_node): Remove erroneous whitespace.
1170 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1173 * dump-parse-tree.cc (debug): New function for gfc_namespace.
1174 (gfc_debug_code): Delete forward declaration.
1175 (show_attr): Make sure to print balanced braces.
1177 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1179 * resolve.cc (resolve_select_type): Fix coding style.
1181 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1183 * resolve.cc (resolve_select_type): Call free() unconditionally.
1185 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1188 * expr.cc (find_array_section): Fix mpz memory leak.
1189 * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in
1192 2023-05-05 Harald Anlauf <anlauf@gmx.de>
1195 * arith.cc (eval_intrinsic): Check conformability of ranks of operands
1196 for intrinsic binary operators before performing type conversions.
1197 * gfortran.h (gfc_op_rank_conformable): Add prototype.
1198 * resolve.cc (resolve_operator): Check conformability of ranks of
1199 operands for intrinsic binary operators before performing type
1201 (gfc_op_rank_conformable): New helper function to compare ranks of
1202 operands of binary operator.
1204 2023-05-04 Julian Brown <julian@codesourcery.com>
1207 * openmp.cc (resolve_omp_clauses): Add diagnostic for
1208 non-pointer/non-allocatable attach/detach.
1209 * trans-openmp.cc (gfc_trans_omp_clauses): Remove dereference for
1210 pointer-to-scalar derived type component attach/detach. Fix
1211 attach/detach handling for descriptors.
1213 2023-04-28 Julian Brown <julian@codesourcery.com>
1216 * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fixes.
1218 2023-04-28 Tobias Burnus <tobias@codesourcery.com>
1220 * gfortran.texi: Fix typos.
1221 * decl.cc: Fix typos in comments and in a variable name.
1222 * arith.cc: Fix comment typos.
1223 * check.cc: Likewise.
1224 * class.cc: Likewise.
1225 * dependency.cc: Likewise.
1226 * expr.cc: Likewise.
1227 * frontend-passes.cc: Likewise.
1228 * gfortran.h: Likewise.
1229 * intrinsic.cc: Likewise.
1230 * iresolve.cc: Likewise.
1231 * match.cc: Likewise.
1232 * module.cc: Likewise.
1233 * primary.cc: Likewise.
1234 * resolve.cc: Likewise.
1235 * simplify.cc: Likewise.
1236 * trans-array.cc: Likewise.
1237 * trans-decl.cc: Likewise.
1238 * trans-expr.cc: Likewise.
1239 * trans-intrinsic.cc: Likewise.
1240 * trans-openmp.cc: Likewise.
1241 * trans-stmt.cc: Likewise.
1243 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
1245 * openmp.cc (gfc_resolve_omp_do_blocks): Handle zero
1246 or more than one exec statements before/after 'omp scan'.
1247 * trans-openmp.cc (gfc_trans_omp_do): Likewise.
1249 2023-04-22 Harald Anlauf <anlauf@gmx.de>
1250 Steven G. Kargl <kargl@gcc.gnu.org>
1253 * interface.cc (gfc_compare_actual_formal): Reject allocatable
1254 functions being used as actual argument for allocable dummy.
1256 2023-04-14 Harald Anlauf <anlauf@gmx.de>
1259 * simplify.cc (gfc_simplify_set_exponent): Fix implementation of
1260 compile-time simplification of intrinsic SET_EXPONENT for argument
1261 X < 1 and for I < 0.
1263 2023-04-14 Paul Thomas <pault@gcc.gnu.org>
1266 * gfortran.h : Add expr3_not_explicit bit field to gfc_code.
1267 * resolve.cc (resolve_allocate_expr): Set bit field when the
1268 default initializer is applied to expr3.
1269 * trans-stmt.cc (gfc_trans_allocate): If expr3_not_explicit is
1270 set, do not deallocate expr3.
1272 2023-04-13 Harald Anlauf <anlauf@gmx.de>
1275 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and
1276 unsigned HOST_WIDE_INT for portability.
1278 2023-04-12 Harald Anlauf <anlauf@gmx.de>
1281 * resolve.cc (resolve_entries): Handle functions with ENTRY and
1282 ALLOCATABLE results.
1283 * trans-expr.cc (gfc_conv_procedure_call): Functions with a result
1284 with the POINTER or ALLOCATABLE attribute shall not get any special
1285 treatment with -ff2c, as they cannot be written in Fortran 77.
1286 * trans-types.cc (gfc_return_by_reference): Likewise.
1287 (gfc_get_function_type): Likewise.
1289 2023-04-12 Harald Anlauf <anlauf@gmx.de>
1293 * interface.cc (compare_parameter): Enable type and rank checks for
1294 arguments of derived type from the intrinsic module ISO_C_BINDING.
1296 2023-04-08 Paul Thomas <pault@gcc.gnu.org>
1299 * iresolve.cc (gfc_resolve_adjustl, gfc_resolve_adjustr): if
1300 string length is deferred use the string typespec for result.
1301 * resolve.cc (resolve_assoc_var): Handle parentheses around the
1303 (resolve_block_construct): Remove unnecessary static decls.
1304 * trans-array.cc (gfc_conv_expr_descriptor): Guard string len
1305 expression in condition. Improve handling of string length and
1306 span, especially for substrings of the descriptor.
1307 (duplicate_allocatable): Make element type more explicit with
1309 * trans-decl.cc (gfc_get_symbol_decl): Emit a fatal error with
1310 appropriate message instead of ICE if symbol type is unknown.
1311 (gfc_generate_function_code): Set current locus to proc_sym
1313 * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in
1314 'previous' and use if end expression in substring reference is
1316 (gfc_conv_string_length): Use gfc_conv_expr_descriptor if
1317 'expr_flat' is an array. Add post block to catch deallocation
1319 (gfc_conv_procedure_call): Assign the parmse string length to
1320 the expression string length, if it is deferred.
1321 (gfc_trans_alloc_subarray_assign): If this is a deferred string
1322 length component, store the string length in the hidden comp.
1323 Update the typespec length accordingly. Generate a new type
1324 spec for the call to gfc_duplicate-allocatable in this case.
1325 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
1326 deferred character array components.
1328 2023-04-04 Harald Anlauf <anlauf@gmx.de>
1331 * expr.cc (check_restricted): Adjust check for valid variables in
1332 restricted expressions: make no exception for module variables.
1334 2023-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1336 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
1337 type name to be "long long".
1339 2023-03-30 Andrew Pinski <apinski@marvell.com>
1341 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
1342 type name to be "long long". Add a comment on why adding
1345 2023-03-28 Jakub Jelinek <jakub@redhat.com>
1348 * openmp.cc (gfc_omp_absent_contains_clause): Fix typo in diagnostics
1349 - composit -> composite.
1351 2023-03-25 Harald Anlauf <anlauf@gmx.de>
1354 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
1356 2023-03-24 Harald Anlauf <anlauf@gmx.de>
1358 * expr.cc (free_expr0): Free also BOZ strings as part of an expression.
1360 2023-03-24 Haochen Gui <guihaoc@gcc.gnu.org>
1361 Tobias Burnus <tobias@codesourcery.com>
1364 * target-memory.cc (gfc_interpret_float): Return FAIL when
1365 native_interpret_expr gets a NULL tree.
1366 * arith.cc (gfc_hollerith2real): Return NULL when
1367 gfc_interpret_float fails.
1368 * error.cc (gfc_buffered_p): Define.
1369 * gfortran.h (gfc_buffered_p): Declare.
1370 * intrinsic.cc: Add diagnostic.h to include list.
1371 (do_simplify): Save errorcount and check it at finish. Report a
1372 "Cannot simplify expression" error on a bad result if error count
1373 doesn't change and no other errors buffered.
1375 2023-03-22 Harald Anlauf <anlauf@gmx.de>
1376 Steven G. Kargl <kargl@gcc.gnu.org>
1379 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
1380 cannot be an alternate return.
1382 2023-03-21 Harald Anlauf <anlauf@gmx.de>
1385 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
1386 generic module interface.
1388 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
1390 * invoke.texi: Remove usages of @gol.
1391 * intrinsic.texi: Ditto.
1393 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
1396 * trans-array.cc (gfc_trans_array_constructor_value): Correct
1397 incorrect setting of typespec.
1399 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
1402 * resolve.cc (generate_component_assignments): Restore the
1403 exclusion of allocatable components from the loop.
1405 2023-03-20 Harald Anlauf <anlauf@gmx.de>
1408 * invoke.texi: Correct documentation of how underscores are appended
1411 2023-03-20 Harald Anlauf <anlauf@gmx.de>
1414 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
1415 up real kind-specific maximum exponent for mpfr.
1417 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
1420 * resolve.cc (check_host_association): If an external function
1421 is typed but not declared explicitly to be external, change the
1422 old symbol from a variable to an external function.
1424 2023-03-19 Harald Anlauf <anlauf@gmx.de>
1427 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
1428 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
1430 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1432 * gfortran.texi: Mention behavior on overflow.
1434 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
1439 * class.cc (finalize_component): Include the missing arguments
1440 in the call to the component's finalizer wrapper.
1441 (has_finalizer_component): Do not return true for procedure
1443 (finalizer_insert_packed_call): Remove the redundant argument
1444 in the call to the final subroutine.
1445 (generate_finalization_wrapper): Add support for assumed rank
1447 (gfc_may_be_finalized): New helper function.
1448 * dump-parse-tree.cc (write_proc): Whitespace.
1449 * gfortran.h : Add prototype for gfc_may_be_finalized.
1450 * resolve.cc (resolve_function): Correct derived types that
1451 have an incomplete namespace.
1452 (resolve_where, gfc_resolve_where_code_in_forall,
1453 gfc_resolve_forall_body, gfc_resolve_code): Check that the op
1454 code is still EXEC_ASSIGN. If it is set lhs to must finalize.
1455 (is_finalizable_type): New function.
1456 (generate_component_assignments): Set must_finalize if needed.
1457 (gfc_resolve_finalizers): Error if assumed rank finalizer is
1458 not the only one. Warning on lack of scalar finalizer modified
1459 to account for assumed rank finalizers.
1460 (generate_final_call): New function.
1461 (generate_component_assignments): Enclose the outermost call in
1462 a block to capture automatic deallocation and final calls.
1463 Set must_finalize as required to satisfy the standards. Use an
1464 explicit pointer assignment for pointer components to capture
1465 finalization of the target. Likewise use explicit assignment
1466 for allocatable components. Do not use the temporary copy of
1467 the lhs in defined assignment if the component is allocatable.
1468 Put the temporary in the same namespace as the lhs symbol if
1469 the component may be finalized. Remove the leading assignment
1470 from the expansion of assignment of components that have their
1471 own defined assignment components. Suppress finalization of
1472 assignment of temporary components to the lhs. Make an explicit
1473 final call for the rhs function temporary if it exists.
1474 (gfc_resolve_code): Set must_finalize for assignments with an
1475 array constructor on the rhs.
1476 (gfc_resolve_finalizers): Ensure that an assumed rank finalizer
1477 is the only finalizer for that type and correct the surprising
1478 warning for the lack of a scalar finalizer.
1479 (check_defined_assignments): Handle allocatable components.
1480 (resolve_fl_derived): Set referenced the vtab for use
1482 (resolve_symbol): Set referenced an unreferenced symbol that
1484 * trans-array.cc (gfc_trans_array_constructor_value): Add code
1485 to finalize the constructor result. Warn that this feature was
1486 removed in F2018 and that it is suppressed by -std=2018.
1487 (trans_array_constructor): Add finalblock, pass to previous
1488 and apply to loop->post if filled.
1489 (gfc_add_loop_ss_code): Add se finalblock to outer loop post.
1490 (gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
1491 generated finalization code to the main block.
1492 (structure_alloc_comps): Add boolean argument to suppress
1493 finalization and use it for calls from
1494 gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
1496 (gfc_copy_alloc_comp_no_fini): New wrapper for
1497 structure_alloc_comps.
1498 (gfc_alloc_allocatable_for_assignment): Suppress finalization
1499 by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
1500 (gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
1501 deallocate the components of entities with a leading '_' in the
1502 name that are also marked as artificial.
1503 * trans-array.h : Add the new boolean argument to the prototype
1504 of gfc_deallocate_alloc_comp_no_caf with a default of false.
1505 Add prototype for gfc_copy_alloc_comp_no_fini.
1506 * trans-decl.cc(init_intent_out_dt): Tidy up the code.
1507 * trans-expr.cc (gfc_init_se): Initialize finalblock.
1508 (gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
1509 finalize function results. Replace in-line block for class
1510 results with call to new function.
1511 (gfc_conv_expr): Finalize structure constructors for F2003 and
1512 F2008. Warn that this feature was deleted in F2018 and, unlike
1513 array constructors, is not default. Add array constructor
1514 finalblock to the post block.
1515 (gfc_trans_scalar_assign): Suppress finalization by setting new
1516 argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
1517 finalization blocks to the main block.
1518 (gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
1519 and ensure that finalization occurs after the evaluation of the
1520 rhs but using the initial value for the lhs. Finalize rhs
1521 function results using gfc_finalize_tree_expr.
1522 (trans_class_assignment, gfc_trans_assignment_1): As previous
1523 function, taking care to order evaluation, assignment and
1524 finalization correctly.
1525 * trans-io.cc (gfc_trans_transfer): Add the final block.
1526 * trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
1527 (trans_associate_var): Nullify derived allocatable components
1528 and finalize function targets with defined assignment
1529 components on leaving the block scope.
1530 (trans_allocate): Finalize source expressions, if required,
1531 and set init_expr artificial temporarily to suppress the
1532 finalization in gfc_trans_assignment.
1533 * trans.cc (gfc_add_finalizer_call): Do not finalize the
1534 temporaries generated in type assignment with defined
1535 assignment components.
1536 (gfc_assignment_finalizer_call): New function.
1537 (gfc_finalize_tree_expr): New function.
1538 * trans.h: Add finalblock to gfc_se. Add the prototypes for
1539 gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
1541 2023-03-15 Harald Anlauf <anlauf@gmx.de>
1542 Tobias Burnus <tobias@codesourcery.com>
1545 * interface.cc (compare_parameter): Adjust check of array dummy
1546 arguments to handle the case of CLASS variables.
1548 2023-03-11 Harald Anlauf <anlauf@gmx.de>
1551 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
1552 bounds check to common type for comparison.
1554 2023-03-10 Harald Anlauf <anlauf@gmx.de>
1557 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
1558 checking a symbol with the BIND(C) attribute.
1560 2023-03-05 Harald Anlauf <anlauf@gmx.de>
1561 Tobias Burnus <tobias@codesourcery.com>
1564 * class.cc (gfc_build_class_symbol): Handle update of attributes of
1565 existing class container.
1566 (gfc_find_derived_vtab): Fix several memory leaks.
1567 (find_intrinsic_vtab): Ditto.
1568 * decl.cc (attr_decl1): Manage update of symbol attributes from
1570 * primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
1571 updated from the class container.
1572 * symbol.cc (free_old_symbol): Adjust management of symbol versions
1573 to not prematurely free array specs while working on the declation
1576 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
1578 PR middle-end/108546
1579 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
1580 type(C_ptr) variables.
1582 2023-02-27 Harald Anlauf <anlauf@gmx.de>
1585 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
1586 LEN argument of IBITS equal to BITSIZE(I).
1588 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
1591 * intrinsic.cc (get_intrinsic_dummy_arg,
1592 set_intrinsic_dummy_arg): Rename the former to the latter.
1593 Remove the return value, add a reference to the lhs as argument,
1594 and do the pointer assignment inside the function. Don't do
1595 it if the pointer is already non-NULL.
1596 (sort_actual): Update caller.
1598 2023-02-25 Harald Anlauf <anlauf@gmx.de>
1600 * arith.cc (gfc_real2int): Clear mpfr variable after use.
1602 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
1605 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
1606 bounds of CFI desc for 'pointer,intent(out)'.
1608 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
1610 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
1611 (generate_local_decl): Add diagnostic for dummy and local variables.
1613 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
1616 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
1618 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
1619 field if it is set in the original element.
1621 2023-02-24 Harald Anlauf <anlauf@gmx.de>
1624 * frontend-passes.cc (do_subscript): Clear used gmp variable.
1626 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
1628 * invoke.texi: Reorder index entries around @items.
1630 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
1632 * invoke.texi: Reorder @opindex commands to precede @items they
1635 2023-02-22 Harald Anlauf <anlauf@gmx.de>
1638 * resolve.cc (resolve_component): The type of a CHARACTER length
1639 expression must be INTEGER.
1641 2023-02-21 Harald Anlauf <anlauf@gmx.de>
1644 * parse.cc (check_function_result_typed): Improve type check of
1645 specification expression for character length and return status.
1646 (parse_spec): Use status from above.
1647 * resolve.cc (resolve_fntype): Prevent use of invalid specification
1648 expression for character length.
1650 2023-02-16 Patrick Palka <ppalka@redhat.com>
1652 * gfortran.h: Mechanically drop static from static inline
1653 functions via s/^static inline/inline/g.
1655 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
1658 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
1659 reference to invalid formal argument.
1661 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
1664 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
1667 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
1670 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
1672 (gfc_resolve_do_iterator): Set a source location for added
1673 'private'-clause arguments.
1674 * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
1675 also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
1676 combined directives with loop + '{masked,master} taskloop (simd)'.
1678 2023-02-13 Harald Anlauf <anlauf@gmx.de>
1681 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
1682 invalid use of CLASS variable.
1684 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
1686 * decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
1687 * gfortran.h (ext_attr_id_t): Ditto.
1688 * gfortran.texi (GCC$ ATTRIBUTES): Document them.
1689 * trans-decl.cc (build_function_decl): Apply them.
1691 2023-02-09 Harald Anlauf <anlauf@gmx.de>
1692 Steven G. Kargl <kargl@gcc.gnu.org>
1696 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
1697 kind in conversion instead of generating an internal error.
1699 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1702 * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
1703 'non_unit_incr' members.
1704 (gfc_nonrect_loop_expr): New.
1705 (gfc_trans_omp_do): Call it; use normal loop bounds
1706 for unit stride - and only create local loop var.
1708 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1710 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
1713 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
1716 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
1717 when a symbol's location is not set.
1719 2023-02-07 Harald Anlauf <anlauf@gmx.de>
1722 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
1723 make ASSOCIATE variables TREE_STATIC.
1725 2023-02-05 Harald Anlauf <anlauf@gmx.de>
1728 * arith.cc (gfc_arith_divide): Emit integer division truncation
1729 warnings using gfc_warning instead of gfc_warning_now to prevent
1732 2023-02-03 Jakub Jelinek <jakub@redhat.com>
1735 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
1738 2023-02-01 Harald Anlauf <anlauf@gmx.de>
1741 * expr.cc (find_array_section): Add check to prevent interpreting an
1742 mpz non-integer constant as an integer.
1744 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
1746 * openmp.cc (resolve_omp_clauses): Check also for
1749 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
1752 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
1753 (gfc_check_findloc): Ditto.
1755 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1758 * parse.cc (parse_module): Remove use of a bool error value
1759 that prevented proper setting of the namespace pointer.
1761 2023-01-28 Harald Anlauf <anlauf@gmx.de>
1762 Steven G. Kargl <kargl@gcc.gnu.org>
1765 * resolve.cc (compare_bound_int): Expression to compare must be of
1767 (compare_bound_mpz_t): Likewise.
1768 (check_dimension): Fix comment on checks applied to array section
1769 and clean up associated logic.
1771 2023-01-28 Harald Anlauf <anlauf@gmx.de>
1774 * match.cc (gfc_match_common): A USE associated name shall not appear
1775 in a COMMON block (F2018:C8121).
1777 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
1780 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
1782 2023-01-26 Harald Anlauf <anlauf@gmx.de>
1785 * resolve.cc (check_host_association): Extend host association check
1786 so that it is not restricted to functions. Also prevent NULL pointer
1789 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
1792 * array.cc (compare_bounds): Return false instead of generating an
1793 internal error on an invalid argument type.
1795 2023-01-24 Harald Anlauf <anlauf@gmx.de>
1798 * simplify.cc (simplify_transformation): Do not try to simplify
1799 transformational intrinsic when the ARRAY argument has a NULL shape.
1801 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1804 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
1805 dereference while recursively checking expressions.
1807 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1810 * interface.cc (get_expr_storage_size): Check array subscript triplets
1811 that we actually have integer values before trying to extract with
1814 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1817 * iresolve.cc (check_charlen_present): Preserve character length if
1818 there is no array constructor.
1820 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1823 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
1824 * primary.cc (match_variable): Add check for PARAMETER in DATA.
1826 2023-01-19 Harald Anlauf <anlauf@gmx.de>
1829 * expr.cc (class_allocatable): Prevent NULL pointer dereference
1831 (class_pointer): Likewise.
1833 2023-01-17 Harald Anlauf <anlauf@gmx.de>
1836 * interface.cc (get_expr_storage_size): Check that we actually have
1837 an integer value before trying to extract it with mpz_get_si.
1839 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
1842 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
1844 2023-01-11 Jakub Jelinek <jakub@redhat.com>
1847 * f95-lang.cc (gfc_init_builtin_function): Fix up function types
1848 for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
1850 2023-01-10 Harald Anlauf <anlauf@gmx.de>
1853 * frontend-passes.cc (do_subscript): Clear used gmp variables.
1855 2023-01-02 Jakub Jelinek <jakub@redhat.com>
1857 * gfortranspec.cc (lang_specific_driver): Update copyright notice
1859 * gfc-internals.texi: Bump @copying's copyright year.
1860 * gfortran.texi: Ditto.
1861 * intrinsic.texi: Ditto.
1862 * invoke.texi: Ditto.
1865 Copyright (C) 2023 Free Software Foundation, Inc.
1867 Copying and distribution of this file, with or without modification,
1868 are permitted in any medium without royalty provided the copyright
1869 notice and this notice are preserved.