1 2023-05-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3 * expr.cc (gfc_get_corank): Use CLASS_DATA from gfortran.h.
4 * resolve.cc (resolve_component): Same.
5 (resolve_fl_derived0): Same.
6 * simplify.cc (gfc_simplify_extends_type_of): Same.
7 (simplify_cobound): Same.
9 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
11 * trans-array.cc (is_pointer_array): Use _P() defines from tree.h.
12 (gfc_conv_scalarized_array_ref): Ditto.
13 (gfc_conv_array_ref): Ditto.
14 * trans-decl.cc (gfc_finish_decl): Ditto.
15 (gfc_get_symbol_decl): Ditto.
16 * trans-expr.cc (gfc_trans_pointer_assignment): Ditto.
17 (gfc_trans_arrayfunc_assign): Ditto.
18 (gfc_trans_assignment_1): Ditto.
19 * trans-intrinsic.cc (gfc_conv_intrinsic_minmax): Ditto.
20 (conv_intrinsic_ieee_value): Ditto.
21 * trans-io.cc (gfc_convert_array_to_string): Ditto.
22 * trans-openmp.cc (gfc_omp_is_optional_argument): Ditto.
23 (gfc_trans_omp_clauses): Ditto.
24 * trans-stmt.cc (gfc_conv_label_variable): Ditto.
25 * trans.cc (gfc_build_addr_expr): Ditto.
26 (get_array_span): Ditto.
28 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
31 * array.cc (compare_bounds): Use narrower return type.
32 (gfc_compare_array_spec): Likewise.
33 (is_constant_element): Likewise.
34 (gfc_constant_ac): Likewise.
35 * check.cc (dim_rank_check): Likewise.
36 * cpp.cc (gfc_cpp_init_options): Likewise.
37 (dump_macro): Likewise.
38 * cpp.h (gfc_cpp_handle_option): Likewise.
39 * dependency.cc (gfc_ref_needs_temporary_p): Likewise.
40 (gfc_check_argument_dependency): Likewise.
41 (gfc_check_fncall_dependency): Likewise.
42 (ref_same_as_full_array): Likewise.
43 * dependency.h (gfc_check_fncall_dependency): Likewise.
44 (gfc_dep_resolver): Likewise.
45 (gfc_are_equivalenced_arrays): Likewise.
46 * expr.cc (gfc_copy_ref): Likewise.
47 (gfc_kind_max): Likewise.
48 (numeric_type): Likewise.
49 * gfortran.h (gfc_at_end): Likewise.
50 (gfc_at_eof): Likewise.
51 (gfc_at_bol): Likewise.
52 (gfc_at_eol): Likewise.
53 (gfc_define_undef_line): Likewise.
54 (gfc_wide_is_printable): Likewise.
55 (gfc_wide_is_digit): Likewise.
56 (gfc_wide_fits_in_byte): Likewise.
57 (gfc_find_sym_tree): Likewise.
58 (gfc_generic_intrinsic): Likewise.
59 (gfc_specific_intrinsic): Likewise.
60 (gfc_intrinsic_actual_ok): Likewise.
61 (gfc_has_vector_index): Likewise.
62 (gfc_numeric_ts): Likewise.
63 (gfc_impure_variable): Likewise.
65 (gfc_implicit_pure): Likewise.
66 (gfc_elemental): Likewise.
67 (gfc_pure_function): Likewise.
68 (gfc_implicit_pure_function): Likewise.
69 (gfc_compare_array_spec): Likewise.
70 (gfc_constant_ac): Likewise.
71 (gfc_expanded_ac): Likewise.
72 (gfc_check_digit): Likewise.
73 * intrinsic.cc (gfc_find_subroutine): Likewise.
74 (gfc_generic_intrinsic): Likewise.
75 (gfc_specific_intrinsic): Likewise.
76 * io.cc (compare_to_allowed_values): Likewise. And remove
77 unneeded forward declaration.
79 * parse.h (gfc_check_do_variable): Likewise.
80 * primary.cc (gfc_check_digit): Likewise.
81 * resolve.cc (resolve_structure_cons): Likewise.
82 (pure_stmt_function): Likewise.
83 (gfc_pure_function): Likewise.
84 (impure_stmt_fcn): Likewise.
85 (resolve_forall_iterators): Likewise.
86 (resolve_data): Likewise.
87 (gfc_impure_variable): Likewise.
89 (gfc_unset_implicit_pure): Likewise.
90 * scanner.cc (wide_is_ascii): Likewise.
91 (gfc_wide_toupper): Likewise.
92 (gfc_open_included_file): Likewise.
93 (gfc_at_end): Likewise.
94 (gfc_at_eof): Likewise.
95 (gfc_at_bol): Likewise.
96 (skip_comment_line): Likewise.
97 (gfc_gobble_whitespace): Likewise.
98 * symbol.cc (gfc_find_symtree_in_proc): Likewise.
99 * trans-array.cc: Likewise.
100 * trans-decl.cc (gfc_set_decl_assembler_name): Likewise.
101 * trans-types.cc (gfc_get_element_type): Likewise.
102 (gfc_add_field_to_struct): Likewise.
103 * trans-types.h (gfc_copy_dt_decls_ifequal): Likewise.
104 (gfc_return_by_reference): Likewise.
105 (gfc_is_nodesc_array): Likewise.
106 * trans.h (gfc_can_put_var_on_stack): Likewise.
108 2023-05-17 Harald Anlauf <anlauf@gmx.de>
112 * decl.cc (add_init_expr_to_sym): Set shape of initializer also for
113 zero-sized arrays, so that bounds violations can be detected later.
115 2023-05-17 Tobias Burnus <tobias@codesourcery.com>
117 * trans-decl.cc (gfc_get_symbol_decl): Add attributes
118 such as 'declare target' also to hidden artificial
119 variable for deferred-length character variables.
120 * trans-openmp.cc (gfc_trans_omp_array_section,
121 gfc_trans_omp_clauses, gfc_trans_omp_target_exit_data):
122 Improve mapping of array descriptors and deferred-length
125 2023-05-16 Paul Thomas <pault@gcc.gnu.org>
133 * interface.cc (gfc_compare_actual_formal): Emit an error if an
134 unlimited polymorphic actual is not matched either to an
135 unlimited or assumed type formal argument.
136 * resolve.cc (resolve_ordinary_assign): Emit an error if the
137 var expression of an ordinary assignment is a proc pointer
139 * trans-array.cc (gfc_walk_array_ref): Provide assumed shape
140 arrays coming from interface mapping with a viable arrayspec.
141 * trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
142 of unlimited polymorphic 'class_ts'.
143 (gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
144 polymorphic and should accept any actual type.
145 (gfc_conv_procedure_call): Replace dreadful kludge with a call
146 to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
147 by giving it the pointer type of the actual argument.
148 (alloc_scalar_allocatable_subcomponent): Shorten the function
149 name and replace the symbol argument with the se string length.
150 If a deferred length character length is either not present or
151 is not a variable, give the typespec a variable and assign the
152 string length to that. Use gfc_deferred_strlen to find the
153 hidden string length component.
154 (gfc_trans_subcomponent_assign): Convert the expression before
155 the call to alloc_scalar_allocatable_subcomponent so that a
156 good string length is provided.
157 (gfc_trans_structure_assign): Remove the unneeded derived type
158 symbol from calls to gfc_trans_subcomponent_assign.
160 2023-05-15 Harald Anlauf <anlauf@gmx.de>
163 * expr.cc (gfc_check_vardef_context): Check appropriate pointer
164 attribute for CLASS vs. non-CLASS function result in variable
167 2023-05-11 Xi Ruoyao <xry111@xry111.site>
169 * Make-lang.in: Use grep instead of fgrep.
171 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
173 * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration.
174 (debug): Add DEBUG_FUNCTION.
175 (show_code_node): Remove erroneous whitespace.
177 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
180 * dump-parse-tree.cc (debug): New function for gfc_namespace.
181 (gfc_debug_code): Delete forward declaration.
182 (show_attr): Make sure to print balanced braces.
184 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
186 * resolve.cc (resolve_select_type): Fix coding style.
188 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
190 * resolve.cc (resolve_select_type): Call free() unconditionally.
192 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
195 * expr.cc (find_array_section): Fix mpz memory leak.
196 * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in
199 2023-05-05 Harald Anlauf <anlauf@gmx.de>
202 * arith.cc (eval_intrinsic): Check conformability of ranks of operands
203 for intrinsic binary operators before performing type conversions.
204 * gfortran.h (gfc_op_rank_conformable): Add prototype.
205 * resolve.cc (resolve_operator): Check conformability of ranks of
206 operands for intrinsic binary operators before performing type
208 (gfc_op_rank_conformable): New helper function to compare ranks of
209 operands of binary operator.
211 2023-05-04 Julian Brown <julian@codesourcery.com>
214 * openmp.cc (resolve_omp_clauses): Add diagnostic for
215 non-pointer/non-allocatable attach/detach.
216 * trans-openmp.cc (gfc_trans_omp_clauses): Remove dereference for
217 pointer-to-scalar derived type component attach/detach. Fix
218 attach/detach handling for descriptors.
220 2023-04-28 Julian Brown <julian@codesourcery.com>
223 * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fixes.
225 2023-04-28 Tobias Burnus <tobias@codesourcery.com>
227 * gfortran.texi: Fix typos.
228 * decl.cc: Fix typos in comments and in a variable name.
229 * arith.cc: Fix comment typos.
230 * check.cc: Likewise.
231 * class.cc: Likewise.
232 * dependency.cc: Likewise.
234 * frontend-passes.cc: Likewise.
235 * gfortran.h: Likewise.
236 * intrinsic.cc: Likewise.
237 * iresolve.cc: Likewise.
238 * match.cc: Likewise.
239 * module.cc: Likewise.
240 * primary.cc: Likewise.
241 * resolve.cc: Likewise.
242 * simplify.cc: Likewise.
243 * trans-array.cc: Likewise.
244 * trans-decl.cc: Likewise.
245 * trans-expr.cc: Likewise.
246 * trans-intrinsic.cc: Likewise.
247 * trans-openmp.cc: Likewise.
248 * trans-stmt.cc: Likewise.
250 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
252 * openmp.cc (gfc_resolve_omp_do_blocks): Handle zero
253 or more than one exec statements before/after 'omp scan'.
254 * trans-openmp.cc (gfc_trans_omp_do): Likewise.
256 2023-04-22 Harald Anlauf <anlauf@gmx.de>
257 Steven G. Kargl <kargl@gcc.gnu.org>
260 * interface.cc (gfc_compare_actual_formal): Reject allocatable
261 functions being used as actual argument for allocable dummy.
263 2023-04-14 Harald Anlauf <anlauf@gmx.de>
266 * simplify.cc (gfc_simplify_set_exponent): Fix implementation of
267 compile-time simplification of intrinsic SET_EXPONENT for argument
270 2023-04-14 Paul Thomas <pault@gcc.gnu.org>
273 * gfortran.h : Add expr3_not_explicit bit field to gfc_code.
274 * resolve.cc (resolve_allocate_expr): Set bit field when the
275 default initializer is applied to expr3.
276 * trans-stmt.cc (gfc_trans_allocate): If expr3_not_explicit is
277 set, do not deallocate expr3.
279 2023-04-13 Harald Anlauf <anlauf@gmx.de>
282 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and
283 unsigned HOST_WIDE_INT for portability.
285 2023-04-12 Harald Anlauf <anlauf@gmx.de>
288 * resolve.cc (resolve_entries): Handle functions with ENTRY and
290 * trans-expr.cc (gfc_conv_procedure_call): Functions with a result
291 with the POINTER or ALLOCATABLE attribute shall not get any special
292 treatment with -ff2c, as they cannot be written in Fortran 77.
293 * trans-types.cc (gfc_return_by_reference): Likewise.
294 (gfc_get_function_type): Likewise.
296 2023-04-12 Harald Anlauf <anlauf@gmx.de>
300 * interface.cc (compare_parameter): Enable type and rank checks for
301 arguments of derived type from the intrinsic module ISO_C_BINDING.
303 2023-04-08 Paul Thomas <pault@gcc.gnu.org>
306 * iresolve.cc (gfc_resolve_adjustl, gfc_resolve_adjustr): if
307 string length is deferred use the string typespec for result.
308 * resolve.cc (resolve_assoc_var): Handle parentheses around the
310 (resolve_block_construct): Remove unnecessary static decls.
311 * trans-array.cc (gfc_conv_expr_descriptor): Guard string len
312 expression in condition. Improve handling of string length and
313 span, especially for substrings of the descriptor.
314 (duplicate_allocatable): Make element type more explicit with
316 * trans-decl.cc (gfc_get_symbol_decl): Emit a fatal error with
317 appropriate message instead of ICE if symbol type is unknown.
318 (gfc_generate_function_code): Set current locus to proc_sym
320 * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in
321 'previous' and use if end expression in substring reference is
323 (gfc_conv_string_length): Use gfc_conv_expr_descriptor if
324 'expr_flat' is an array. Add post block to catch deallocation
326 (gfc_conv_procedure_call): Assign the parmse string length to
327 the expression string length, if it is deferred.
328 (gfc_trans_alloc_subarray_assign): If this is a deferred string
329 length component, store the string length in the hidden comp.
330 Update the typespec length accordingly. Generate a new type
331 spec for the call to gfc_duplicate-allocatable in this case.
332 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
333 deferred character array components.
335 2023-04-04 Harald Anlauf <anlauf@gmx.de>
338 * expr.cc (check_restricted): Adjust check for valid variables in
339 restricted expressions: make no exception for module variables.
341 2023-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
343 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
344 type name to be "long long".
346 2023-03-30 Andrew Pinski <apinski@marvell.com>
348 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
349 type name to be "long long". Add a comment on why adding
352 2023-03-28 Jakub Jelinek <jakub@redhat.com>
355 * openmp.cc (gfc_omp_absent_contains_clause): Fix typo in diagnostics
356 - composit -> composite.
358 2023-03-25 Harald Anlauf <anlauf@gmx.de>
361 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
363 2023-03-24 Harald Anlauf <anlauf@gmx.de>
365 * expr.cc (free_expr0): Free also BOZ strings as part of an expression.
367 2023-03-24 Haochen Gui <guihaoc@gcc.gnu.org>
368 Tobias Burnus <tobias@codesourcery.com>
371 * target-memory.cc (gfc_interpret_float): Return FAIL when
372 native_interpret_expr gets a NULL tree.
373 * arith.cc (gfc_hollerith2real): Return NULL when
374 gfc_interpret_float fails.
375 * error.cc (gfc_buffered_p): Define.
376 * gfortran.h (gfc_buffered_p): Declare.
377 * intrinsic.cc: Add diagnostic.h to include list.
378 (do_simplify): Save errorcount and check it at finish. Report a
379 "Cannot simplify expression" error on a bad result if error count
380 doesn't change and no other errors buffered.
382 2023-03-22 Harald Anlauf <anlauf@gmx.de>
383 Steven G. Kargl <kargl@gcc.gnu.org>
386 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
387 cannot be an alternate return.
389 2023-03-21 Harald Anlauf <anlauf@gmx.de>
392 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
393 generic module interface.
395 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
397 * invoke.texi: Remove usages of @gol.
398 * intrinsic.texi: Ditto.
400 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
403 * trans-array.cc (gfc_trans_array_constructor_value): Correct
404 incorrect setting of typespec.
406 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
409 * resolve.cc (generate_component_assignments): Restore the
410 exclusion of allocatable components from the loop.
412 2023-03-20 Harald Anlauf <anlauf@gmx.de>
415 * invoke.texi: Correct documentation of how underscores are appended
418 2023-03-20 Harald Anlauf <anlauf@gmx.de>
421 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
422 up real kind-specific maximum exponent for mpfr.
424 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
427 * resolve.cc (check_host_association): If an external function
428 is typed but not declared explicitly to be external, change the
429 old symbol from a variable to an external function.
431 2023-03-19 Harald Anlauf <anlauf@gmx.de>
434 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
435 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
437 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
439 * gfortran.texi: Mention behavior on overflow.
441 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
446 * class.cc (finalize_component): Include the missing arguments
447 in the call to the component's finalizer wrapper.
448 (has_finalizer_component): Do not return true for procedure
450 (finalizer_insert_packed_call): Remove the redundant argument
451 in the call to the final subroutine.
452 (generate_finalization_wrapper): Add support for assumed rank
454 (gfc_may_be_finalized): New helper function.
455 * dump-parse-tree.cc (write_proc): Whitespace.
456 * gfortran.h : Add prototype for gfc_may_be_finalized.
457 * resolve.cc (resolve_function): Correct derived types that
458 have an incomplete namespace.
459 (resolve_where, gfc_resolve_where_code_in_forall,
460 gfc_resolve_forall_body, gfc_resolve_code): Check that the op
461 code is still EXEC_ASSIGN. If it is set lhs to must finalize.
462 (is_finalizable_type): New function.
463 (generate_component_assignments): Set must_finalize if needed.
464 (gfc_resolve_finalizers): Error if assumed rank finalizer is
465 not the only one. Warning on lack of scalar finalizer modified
466 to account for assumed rank finalizers.
467 (generate_final_call): New function.
468 (generate_component_assignments): Enclose the outermost call in
469 a block to capture automatic deallocation and final calls.
470 Set must_finalize as required to satisfy the standards. Use an
471 explicit pointer assignment for pointer components to capture
472 finalization of the target. Likewise use explicit assignment
473 for allocatable components. Do not use the temporary copy of
474 the lhs in defined assignment if the component is allocatable.
475 Put the temporary in the same namespace as the lhs symbol if
476 the component may be finalized. Remove the leading assignment
477 from the expansion of assignment of components that have their
478 own defined assignment components. Suppress finalization of
479 assignment of temporary components to the lhs. Make an explicit
480 final call for the rhs function temporary if it exists.
481 (gfc_resolve_code): Set must_finalize for assignments with an
482 array constructor on the rhs.
483 (gfc_resolve_finalizers): Ensure that an assumed rank finalizer
484 is the only finalizer for that type and correct the surprising
485 warning for the lack of a scalar finalizer.
486 (check_defined_assignments): Handle allocatable components.
487 (resolve_fl_derived): Set referenced the vtab for use
489 (resolve_symbol): Set referenced an unreferenced symbol that
491 * trans-array.cc (gfc_trans_array_constructor_value): Add code
492 to finalize the constructor result. Warn that this feature was
493 removed in F2018 and that it is suppressed by -std=2018.
494 (trans_array_constructor): Add finalblock, pass to previous
495 and apply to loop->post if filled.
496 (gfc_add_loop_ss_code): Add se finalblock to outer loop post.
497 (gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
498 generated finalization code to the main block.
499 (structure_alloc_comps): Add boolean argument to suppress
500 finalization and use it for calls from
501 gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
503 (gfc_copy_alloc_comp_no_fini): New wrapper for
504 structure_alloc_comps.
505 (gfc_alloc_allocatable_for_assignment): Suppress finalization
506 by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
507 (gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
508 deallocate the components of entities with a leading '_' in the
509 name that are also marked as artificial.
510 * trans-array.h : Add the new boolean argument to the prototype
511 of gfc_deallocate_alloc_comp_no_caf with a default of false.
512 Add prototype for gfc_copy_alloc_comp_no_fini.
513 * trans-decl.cc(init_intent_out_dt): Tidy up the code.
514 * trans-expr.cc (gfc_init_se): Initialize finalblock.
515 (gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
516 finalize function results. Replace in-line block for class
517 results with call to new function.
518 (gfc_conv_expr): Finalize structure constructors for F2003 and
519 F2008. Warn that this feature was deleted in F2018 and, unlike
520 array constructors, is not default. Add array constructor
521 finalblock to the post block.
522 (gfc_trans_scalar_assign): Suppress finalization by setting new
523 argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
524 finalization blocks to the main block.
525 (gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
526 and ensure that finalization occurs after the evaluation of the
527 rhs but using the initial value for the lhs. Finalize rhs
528 function results using gfc_finalize_tree_expr.
529 (trans_class_assignment, gfc_trans_assignment_1): As previous
530 function, taking care to order evaluation, assignment and
531 finalization correctly.
532 * trans-io.cc (gfc_trans_transfer): Add the final block.
533 * trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
534 (trans_associate_var): Nullify derived allocatable components
535 and finalize function targets with defined assignment
536 components on leaving the block scope.
537 (trans_allocate): Finalize source expressions, if required,
538 and set init_expr artificial temporarily to suppress the
539 finalization in gfc_trans_assignment.
540 * trans.cc (gfc_add_finalizer_call): Do not finalize the
541 temporaries generated in type assignment with defined
542 assignment components.
543 (gfc_assignment_finalizer_call): New function.
544 (gfc_finalize_tree_expr): New function.
545 * trans.h: Add finalblock to gfc_se. Add the prototypes for
546 gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
548 2023-03-15 Harald Anlauf <anlauf@gmx.de>
549 Tobias Burnus <tobias@codesourcery.com>
552 * interface.cc (compare_parameter): Adjust check of array dummy
553 arguments to handle the case of CLASS variables.
555 2023-03-11 Harald Anlauf <anlauf@gmx.de>
558 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
559 bounds check to common type for comparison.
561 2023-03-10 Harald Anlauf <anlauf@gmx.de>
564 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
565 checking a symbol with the BIND(C) attribute.
567 2023-03-05 Harald Anlauf <anlauf@gmx.de>
568 Tobias Burnus <tobias@codesourcery.com>
571 * class.cc (gfc_build_class_symbol): Handle update of attributes of
572 existing class container.
573 (gfc_find_derived_vtab): Fix several memory leaks.
574 (find_intrinsic_vtab): Ditto.
575 * decl.cc (attr_decl1): Manage update of symbol attributes from
577 * primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
578 updated from the class container.
579 * symbol.cc (free_old_symbol): Adjust management of symbol versions
580 to not prematurely free array specs while working on the declation
583 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
586 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
587 type(C_ptr) variables.
589 2023-02-27 Harald Anlauf <anlauf@gmx.de>
592 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
593 LEN argument of IBITS equal to BITSIZE(I).
595 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
598 * intrinsic.cc (get_intrinsic_dummy_arg,
599 set_intrinsic_dummy_arg): Rename the former to the latter.
600 Remove the return value, add a reference to the lhs as argument,
601 and do the pointer assignment inside the function. Don't do
602 it if the pointer is already non-NULL.
603 (sort_actual): Update caller.
605 2023-02-25 Harald Anlauf <anlauf@gmx.de>
607 * arith.cc (gfc_real2int): Clear mpfr variable after use.
609 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
612 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
613 bounds of CFI desc for 'pointer,intent(out)'.
615 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
617 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
618 (generate_local_decl): Add diagnostic for dummy and local variables.
620 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
623 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
625 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
626 field if it is set in the original element.
628 2023-02-24 Harald Anlauf <anlauf@gmx.de>
631 * frontend-passes.cc (do_subscript): Clear used gmp variable.
633 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
635 * invoke.texi: Reorder index entries around @items.
637 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
639 * invoke.texi: Reorder @opindex commands to precede @items they
642 2023-02-22 Harald Anlauf <anlauf@gmx.de>
645 * resolve.cc (resolve_component): The type of a CHARACTER length
646 expression must be INTEGER.
648 2023-02-21 Harald Anlauf <anlauf@gmx.de>
651 * parse.cc (check_function_result_typed): Improve type check of
652 specification expression for character length and return status.
653 (parse_spec): Use status from above.
654 * resolve.cc (resolve_fntype): Prevent use of invalid specification
655 expression for character length.
657 2023-02-16 Patrick Palka <ppalka@redhat.com>
659 * gfortran.h: Mechanically drop static from static inline
660 functions via s/^static inline/inline/g.
662 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
665 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
666 reference to invalid formal argument.
668 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
671 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
674 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
677 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
679 (gfc_resolve_do_iterator): Set a source location for added
680 'private'-clause arguments.
681 * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
682 also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
683 combined directives with loop + '{masked,master} taskloop (simd)'.
685 2023-02-13 Harald Anlauf <anlauf@gmx.de>
688 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
689 invalid use of CLASS variable.
691 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
693 * decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
694 * gfortran.h (ext_attr_id_t): Ditto.
695 * gfortran.texi (GCC$ ATTRIBUTES): Document them.
696 * trans-decl.cc (build_function_decl): Apply them.
698 2023-02-09 Harald Anlauf <anlauf@gmx.de>
699 Steven G. Kargl <kargl@gcc.gnu.org>
703 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
704 kind in conversion instead of generating an internal error.
706 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
709 * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
710 'non_unit_incr' members.
711 (gfc_nonrect_loop_expr): New.
712 (gfc_trans_omp_do): Call it; use normal loop bounds
713 for unit stride - and only create local loop var.
715 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
717 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
720 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
723 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
724 when a symbol's location is not set.
726 2023-02-07 Harald Anlauf <anlauf@gmx.de>
729 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
730 make ASSOCIATE variables TREE_STATIC.
732 2023-02-05 Harald Anlauf <anlauf@gmx.de>
735 * arith.cc (gfc_arith_divide): Emit integer division truncation
736 warnings using gfc_warning instead of gfc_warning_now to prevent
739 2023-02-03 Jakub Jelinek <jakub@redhat.com>
742 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
745 2023-02-01 Harald Anlauf <anlauf@gmx.de>
748 * expr.cc (find_array_section): Add check to prevent interpreting an
749 mpz non-integer constant as an integer.
751 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
753 * openmp.cc (resolve_omp_clauses): Check also for
756 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
759 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
760 (gfc_check_findloc): Ditto.
762 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
765 * parse.cc (parse_module): Remove use of a bool error value
766 that prevented proper setting of the namespace pointer.
768 2023-01-28 Harald Anlauf <anlauf@gmx.de>
769 Steven G. Kargl <kargl@gcc.gnu.org>
772 * resolve.cc (compare_bound_int): Expression to compare must be of
774 (compare_bound_mpz_t): Likewise.
775 (check_dimension): Fix comment on checks applied to array section
776 and clean up associated logic.
778 2023-01-28 Harald Anlauf <anlauf@gmx.de>
781 * match.cc (gfc_match_common): A USE associated name shall not appear
782 in a COMMON block (F2018:C8121).
784 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
787 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
789 2023-01-26 Harald Anlauf <anlauf@gmx.de>
792 * resolve.cc (check_host_association): Extend host association check
793 so that it is not restricted to functions. Also prevent NULL pointer
796 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
799 * array.cc (compare_bounds): Return false instead of generating an
800 internal error on an invalid argument type.
802 2023-01-24 Harald Anlauf <anlauf@gmx.de>
805 * simplify.cc (simplify_transformation): Do not try to simplify
806 transformational intrinsic when the ARRAY argument has a NULL shape.
808 2023-01-23 Harald Anlauf <anlauf@gmx.de>
811 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
812 dereference while recursively checking expressions.
814 2023-01-23 Harald Anlauf <anlauf@gmx.de>
817 * interface.cc (get_expr_storage_size): Check array subscript triplets
818 that we actually have integer values before trying to extract with
821 2023-01-23 Harald Anlauf <anlauf@gmx.de>
824 * iresolve.cc (check_charlen_present): Preserve character length if
825 there is no array constructor.
827 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
830 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
831 * primary.cc (match_variable): Add check for PARAMETER in DATA.
833 2023-01-19 Harald Anlauf <anlauf@gmx.de>
836 * expr.cc (class_allocatable): Prevent NULL pointer dereference
838 (class_pointer): Likewise.
840 2023-01-17 Harald Anlauf <anlauf@gmx.de>
843 * interface.cc (get_expr_storage_size): Check that we actually have
844 an integer value before trying to extract it with mpz_get_si.
846 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
849 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
851 2023-01-11 Jakub Jelinek <jakub@redhat.com>
854 * f95-lang.cc (gfc_init_builtin_function): Fix up function types
855 for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
857 2023-01-10 Harald Anlauf <anlauf@gmx.de>
860 * frontend-passes.cc (do_subscript): Clear used gmp variables.
862 2023-01-02 Jakub Jelinek <jakub@redhat.com>
864 * gfortranspec.cc (lang_specific_driver): Update copyright notice
866 * gfc-internals.texi: Bump @copying's copyright year.
867 * gfortran.texi: Ditto.
868 * intrinsic.texi: Ditto.
869 * invoke.texi: Ditto.
872 Copyright (C) 2023 Free Software Foundation, Inc.
874 Copying and distribution of this file, with or without modification,
875 are permitted in any medium without royalty provided the copyright
876 notice and this notice are preserved.