1 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
4 * resolve.cc (gfc_resolve_ref): Conversion of array_ref into an
5 element should be done for all characters without a len expr,
6 not just deferred lens, and for integer expressions.
7 * trans-expr.cc (conv_inquiry): For len and kind inquiry refs,
8 set the se string_length to NULL_TREE.
10 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
11 Steven G. Kargl <kargl@gcc.gnu.org>
14 * decl.cc (variable_decl): Clean up white space issues.
15 (gfc_match_final_decl): Declaration of finalizable derived type
16 is allowed in a submodule.
18 2023-05-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
20 * expr.cc (gfc_get_corank): Use CLASS_DATA from gfortran.h.
21 * resolve.cc (resolve_component): Same.
22 (resolve_fl_derived0): Same.
23 * simplify.cc (gfc_simplify_extends_type_of): Same.
24 (simplify_cobound): Same.
26 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
28 * trans-array.cc (is_pointer_array): Use _P() defines from tree.h.
29 (gfc_conv_scalarized_array_ref): Ditto.
30 (gfc_conv_array_ref): Ditto.
31 * trans-decl.cc (gfc_finish_decl): Ditto.
32 (gfc_get_symbol_decl): Ditto.
33 * trans-expr.cc (gfc_trans_pointer_assignment): Ditto.
34 (gfc_trans_arrayfunc_assign): Ditto.
35 (gfc_trans_assignment_1): Ditto.
36 * trans-intrinsic.cc (gfc_conv_intrinsic_minmax): Ditto.
37 (conv_intrinsic_ieee_value): Ditto.
38 * trans-io.cc (gfc_convert_array_to_string): Ditto.
39 * trans-openmp.cc (gfc_omp_is_optional_argument): Ditto.
40 (gfc_trans_omp_clauses): Ditto.
41 * trans-stmt.cc (gfc_conv_label_variable): Ditto.
42 * trans.cc (gfc_build_addr_expr): Ditto.
43 (get_array_span): Ditto.
45 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
48 * array.cc (compare_bounds): Use narrower return type.
49 (gfc_compare_array_spec): Likewise.
50 (is_constant_element): Likewise.
51 (gfc_constant_ac): Likewise.
52 * check.cc (dim_rank_check): Likewise.
53 * cpp.cc (gfc_cpp_init_options): Likewise.
54 (dump_macro): Likewise.
55 * cpp.h (gfc_cpp_handle_option): Likewise.
56 * dependency.cc (gfc_ref_needs_temporary_p): Likewise.
57 (gfc_check_argument_dependency): Likewise.
58 (gfc_check_fncall_dependency): Likewise.
59 (ref_same_as_full_array): Likewise.
60 * dependency.h (gfc_check_fncall_dependency): Likewise.
61 (gfc_dep_resolver): Likewise.
62 (gfc_are_equivalenced_arrays): Likewise.
63 * expr.cc (gfc_copy_ref): Likewise.
64 (gfc_kind_max): Likewise.
65 (numeric_type): Likewise.
66 * gfortran.h (gfc_at_end): Likewise.
67 (gfc_at_eof): Likewise.
68 (gfc_at_bol): Likewise.
69 (gfc_at_eol): Likewise.
70 (gfc_define_undef_line): Likewise.
71 (gfc_wide_is_printable): Likewise.
72 (gfc_wide_is_digit): Likewise.
73 (gfc_wide_fits_in_byte): Likewise.
74 (gfc_find_sym_tree): Likewise.
75 (gfc_generic_intrinsic): Likewise.
76 (gfc_specific_intrinsic): Likewise.
77 (gfc_intrinsic_actual_ok): Likewise.
78 (gfc_has_vector_index): Likewise.
79 (gfc_numeric_ts): Likewise.
80 (gfc_impure_variable): Likewise.
82 (gfc_implicit_pure): Likewise.
83 (gfc_elemental): Likewise.
84 (gfc_pure_function): Likewise.
85 (gfc_implicit_pure_function): Likewise.
86 (gfc_compare_array_spec): Likewise.
87 (gfc_constant_ac): Likewise.
88 (gfc_expanded_ac): Likewise.
89 (gfc_check_digit): Likewise.
90 * intrinsic.cc (gfc_find_subroutine): Likewise.
91 (gfc_generic_intrinsic): Likewise.
92 (gfc_specific_intrinsic): Likewise.
93 * io.cc (compare_to_allowed_values): Likewise. And remove
94 unneeded forward declaration.
96 * parse.h (gfc_check_do_variable): Likewise.
97 * primary.cc (gfc_check_digit): Likewise.
98 * resolve.cc (resolve_structure_cons): Likewise.
99 (pure_stmt_function): Likewise.
100 (gfc_pure_function): Likewise.
101 (impure_stmt_fcn): Likewise.
102 (resolve_forall_iterators): Likewise.
103 (resolve_data): Likewise.
104 (gfc_impure_variable): Likewise.
105 (gfc_pure): Likewise.
106 (gfc_unset_implicit_pure): Likewise.
107 * scanner.cc (wide_is_ascii): Likewise.
108 (gfc_wide_toupper): Likewise.
109 (gfc_open_included_file): Likewise.
110 (gfc_at_end): Likewise.
111 (gfc_at_eof): Likewise.
112 (gfc_at_bol): Likewise.
113 (skip_comment_line): Likewise.
114 (gfc_gobble_whitespace): Likewise.
115 * symbol.cc (gfc_find_symtree_in_proc): Likewise.
116 * trans-array.cc: Likewise.
117 * trans-decl.cc (gfc_set_decl_assembler_name): Likewise.
118 * trans-types.cc (gfc_get_element_type): Likewise.
119 (gfc_add_field_to_struct): Likewise.
120 * trans-types.h (gfc_copy_dt_decls_ifequal): Likewise.
121 (gfc_return_by_reference): Likewise.
122 (gfc_is_nodesc_array): Likewise.
123 * trans.h (gfc_can_put_var_on_stack): Likewise.
125 2023-05-17 Harald Anlauf <anlauf@gmx.de>
129 * decl.cc (add_init_expr_to_sym): Set shape of initializer also for
130 zero-sized arrays, so that bounds violations can be detected later.
132 2023-05-17 Tobias Burnus <tobias@codesourcery.com>
134 * trans-decl.cc (gfc_get_symbol_decl): Add attributes
135 such as 'declare target' also to hidden artificial
136 variable for deferred-length character variables.
137 * trans-openmp.cc (gfc_trans_omp_array_section,
138 gfc_trans_omp_clauses, gfc_trans_omp_target_exit_data):
139 Improve mapping of array descriptors and deferred-length
142 2023-05-16 Paul Thomas <pault@gcc.gnu.org>
150 * interface.cc (gfc_compare_actual_formal): Emit an error if an
151 unlimited polymorphic actual is not matched either to an
152 unlimited or assumed type formal argument.
153 * resolve.cc (resolve_ordinary_assign): Emit an error if the
154 var expression of an ordinary assignment is a proc pointer
156 * trans-array.cc (gfc_walk_array_ref): Provide assumed shape
157 arrays coming from interface mapping with a viable arrayspec.
158 * trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
159 of unlimited polymorphic 'class_ts'.
160 (gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
161 polymorphic and should accept any actual type.
162 (gfc_conv_procedure_call): Replace dreadful kludge with a call
163 to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
164 by giving it the pointer type of the actual argument.
165 (alloc_scalar_allocatable_subcomponent): Shorten the function
166 name and replace the symbol argument with the se string length.
167 If a deferred length character length is either not present or
168 is not a variable, give the typespec a variable and assign the
169 string length to that. Use gfc_deferred_strlen to find the
170 hidden string length component.
171 (gfc_trans_subcomponent_assign): Convert the expression before
172 the call to alloc_scalar_allocatable_subcomponent so that a
173 good string length is provided.
174 (gfc_trans_structure_assign): Remove the unneeded derived type
175 symbol from calls to gfc_trans_subcomponent_assign.
177 2023-05-15 Harald Anlauf <anlauf@gmx.de>
180 * expr.cc (gfc_check_vardef_context): Check appropriate pointer
181 attribute for CLASS vs. non-CLASS function result in variable
184 2023-05-11 Xi Ruoyao <xry111@xry111.site>
186 * Make-lang.in: Use grep instead of fgrep.
188 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
190 * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration.
191 (debug): Add DEBUG_FUNCTION.
192 (show_code_node): Remove erroneous whitespace.
194 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
197 * dump-parse-tree.cc (debug): New function for gfc_namespace.
198 (gfc_debug_code): Delete forward declaration.
199 (show_attr): Make sure to print balanced braces.
201 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
203 * resolve.cc (resolve_select_type): Fix coding style.
205 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
207 * resolve.cc (resolve_select_type): Call free() unconditionally.
209 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
212 * expr.cc (find_array_section): Fix mpz memory leak.
213 * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in
216 2023-05-05 Harald Anlauf <anlauf@gmx.de>
219 * arith.cc (eval_intrinsic): Check conformability of ranks of operands
220 for intrinsic binary operators before performing type conversions.
221 * gfortran.h (gfc_op_rank_conformable): Add prototype.
222 * resolve.cc (resolve_operator): Check conformability of ranks of
223 operands for intrinsic binary operators before performing type
225 (gfc_op_rank_conformable): New helper function to compare ranks of
226 operands of binary operator.
228 2023-05-04 Julian Brown <julian@codesourcery.com>
231 * openmp.cc (resolve_omp_clauses): Add diagnostic for
232 non-pointer/non-allocatable attach/detach.
233 * trans-openmp.cc (gfc_trans_omp_clauses): Remove dereference for
234 pointer-to-scalar derived type component attach/detach. Fix
235 attach/detach handling for descriptors.
237 2023-04-28 Julian Brown <julian@codesourcery.com>
240 * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fixes.
242 2023-04-28 Tobias Burnus <tobias@codesourcery.com>
244 * gfortran.texi: Fix typos.
245 * decl.cc: Fix typos in comments and in a variable name.
246 * arith.cc: Fix comment typos.
247 * check.cc: Likewise.
248 * class.cc: Likewise.
249 * dependency.cc: Likewise.
251 * frontend-passes.cc: Likewise.
252 * gfortran.h: Likewise.
253 * intrinsic.cc: Likewise.
254 * iresolve.cc: Likewise.
255 * match.cc: Likewise.
256 * module.cc: Likewise.
257 * primary.cc: Likewise.
258 * resolve.cc: Likewise.
259 * simplify.cc: Likewise.
260 * trans-array.cc: Likewise.
261 * trans-decl.cc: Likewise.
262 * trans-expr.cc: Likewise.
263 * trans-intrinsic.cc: Likewise.
264 * trans-openmp.cc: Likewise.
265 * trans-stmt.cc: Likewise.
267 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
269 * openmp.cc (gfc_resolve_omp_do_blocks): Handle zero
270 or more than one exec statements before/after 'omp scan'.
271 * trans-openmp.cc (gfc_trans_omp_do): Likewise.
273 2023-04-22 Harald Anlauf <anlauf@gmx.de>
274 Steven G. Kargl <kargl@gcc.gnu.org>
277 * interface.cc (gfc_compare_actual_formal): Reject allocatable
278 functions being used as actual argument for allocable dummy.
280 2023-04-14 Harald Anlauf <anlauf@gmx.de>
283 * simplify.cc (gfc_simplify_set_exponent): Fix implementation of
284 compile-time simplification of intrinsic SET_EXPONENT for argument
287 2023-04-14 Paul Thomas <pault@gcc.gnu.org>
290 * gfortran.h : Add expr3_not_explicit bit field to gfc_code.
291 * resolve.cc (resolve_allocate_expr): Set bit field when the
292 default initializer is applied to expr3.
293 * trans-stmt.cc (gfc_trans_allocate): If expr3_not_explicit is
294 set, do not deallocate expr3.
296 2023-04-13 Harald Anlauf <anlauf@gmx.de>
299 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and
300 unsigned HOST_WIDE_INT for portability.
302 2023-04-12 Harald Anlauf <anlauf@gmx.de>
305 * resolve.cc (resolve_entries): Handle functions with ENTRY and
307 * trans-expr.cc (gfc_conv_procedure_call): Functions with a result
308 with the POINTER or ALLOCATABLE attribute shall not get any special
309 treatment with -ff2c, as they cannot be written in Fortran 77.
310 * trans-types.cc (gfc_return_by_reference): Likewise.
311 (gfc_get_function_type): Likewise.
313 2023-04-12 Harald Anlauf <anlauf@gmx.de>
317 * interface.cc (compare_parameter): Enable type and rank checks for
318 arguments of derived type from the intrinsic module ISO_C_BINDING.
320 2023-04-08 Paul Thomas <pault@gcc.gnu.org>
323 * iresolve.cc (gfc_resolve_adjustl, gfc_resolve_adjustr): if
324 string length is deferred use the string typespec for result.
325 * resolve.cc (resolve_assoc_var): Handle parentheses around the
327 (resolve_block_construct): Remove unnecessary static decls.
328 * trans-array.cc (gfc_conv_expr_descriptor): Guard string len
329 expression in condition. Improve handling of string length and
330 span, especially for substrings of the descriptor.
331 (duplicate_allocatable): Make element type more explicit with
333 * trans-decl.cc (gfc_get_symbol_decl): Emit a fatal error with
334 appropriate message instead of ICE if symbol type is unknown.
335 (gfc_generate_function_code): Set current locus to proc_sym
337 * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in
338 'previous' and use if end expression in substring reference is
340 (gfc_conv_string_length): Use gfc_conv_expr_descriptor if
341 'expr_flat' is an array. Add post block to catch deallocation
343 (gfc_conv_procedure_call): Assign the parmse string length to
344 the expression string length, if it is deferred.
345 (gfc_trans_alloc_subarray_assign): If this is a deferred string
346 length component, store the string length in the hidden comp.
347 Update the typespec length accordingly. Generate a new type
348 spec for the call to gfc_duplicate-allocatable in this case.
349 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
350 deferred character array components.
352 2023-04-04 Harald Anlauf <anlauf@gmx.de>
355 * expr.cc (check_restricted): Adjust check for valid variables in
356 restricted expressions: make no exception for module variables.
358 2023-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
360 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
361 type name to be "long long".
363 2023-03-30 Andrew Pinski <apinski@marvell.com>
365 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
366 type name to be "long long". Add a comment on why adding
369 2023-03-28 Jakub Jelinek <jakub@redhat.com>
372 * openmp.cc (gfc_omp_absent_contains_clause): Fix typo in diagnostics
373 - composit -> composite.
375 2023-03-25 Harald Anlauf <anlauf@gmx.de>
378 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
380 2023-03-24 Harald Anlauf <anlauf@gmx.de>
382 * expr.cc (free_expr0): Free also BOZ strings as part of an expression.
384 2023-03-24 Haochen Gui <guihaoc@gcc.gnu.org>
385 Tobias Burnus <tobias@codesourcery.com>
388 * target-memory.cc (gfc_interpret_float): Return FAIL when
389 native_interpret_expr gets a NULL tree.
390 * arith.cc (gfc_hollerith2real): Return NULL when
391 gfc_interpret_float fails.
392 * error.cc (gfc_buffered_p): Define.
393 * gfortran.h (gfc_buffered_p): Declare.
394 * intrinsic.cc: Add diagnostic.h to include list.
395 (do_simplify): Save errorcount and check it at finish. Report a
396 "Cannot simplify expression" error on a bad result if error count
397 doesn't change and no other errors buffered.
399 2023-03-22 Harald Anlauf <anlauf@gmx.de>
400 Steven G. Kargl <kargl@gcc.gnu.org>
403 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
404 cannot be an alternate return.
406 2023-03-21 Harald Anlauf <anlauf@gmx.de>
409 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
410 generic module interface.
412 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
414 * invoke.texi: Remove usages of @gol.
415 * intrinsic.texi: Ditto.
417 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
420 * trans-array.cc (gfc_trans_array_constructor_value): Correct
421 incorrect setting of typespec.
423 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
426 * resolve.cc (generate_component_assignments): Restore the
427 exclusion of allocatable components from the loop.
429 2023-03-20 Harald Anlauf <anlauf@gmx.de>
432 * invoke.texi: Correct documentation of how underscores are appended
435 2023-03-20 Harald Anlauf <anlauf@gmx.de>
438 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
439 up real kind-specific maximum exponent for mpfr.
441 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
444 * resolve.cc (check_host_association): If an external function
445 is typed but not declared explicitly to be external, change the
446 old symbol from a variable to an external function.
448 2023-03-19 Harald Anlauf <anlauf@gmx.de>
451 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
452 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
454 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
456 * gfortran.texi: Mention behavior on overflow.
458 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
463 * class.cc (finalize_component): Include the missing arguments
464 in the call to the component's finalizer wrapper.
465 (has_finalizer_component): Do not return true for procedure
467 (finalizer_insert_packed_call): Remove the redundant argument
468 in the call to the final subroutine.
469 (generate_finalization_wrapper): Add support for assumed rank
471 (gfc_may_be_finalized): New helper function.
472 * dump-parse-tree.cc (write_proc): Whitespace.
473 * gfortran.h : Add prototype for gfc_may_be_finalized.
474 * resolve.cc (resolve_function): Correct derived types that
475 have an incomplete namespace.
476 (resolve_where, gfc_resolve_where_code_in_forall,
477 gfc_resolve_forall_body, gfc_resolve_code): Check that the op
478 code is still EXEC_ASSIGN. If it is set lhs to must finalize.
479 (is_finalizable_type): New function.
480 (generate_component_assignments): Set must_finalize if needed.
481 (gfc_resolve_finalizers): Error if assumed rank finalizer is
482 not the only one. Warning on lack of scalar finalizer modified
483 to account for assumed rank finalizers.
484 (generate_final_call): New function.
485 (generate_component_assignments): Enclose the outermost call in
486 a block to capture automatic deallocation and final calls.
487 Set must_finalize as required to satisfy the standards. Use an
488 explicit pointer assignment for pointer components to capture
489 finalization of the target. Likewise use explicit assignment
490 for allocatable components. Do not use the temporary copy of
491 the lhs in defined assignment if the component is allocatable.
492 Put the temporary in the same namespace as the lhs symbol if
493 the component may be finalized. Remove the leading assignment
494 from the expansion of assignment of components that have their
495 own defined assignment components. Suppress finalization of
496 assignment of temporary components to the lhs. Make an explicit
497 final call for the rhs function temporary if it exists.
498 (gfc_resolve_code): Set must_finalize for assignments with an
499 array constructor on the rhs.
500 (gfc_resolve_finalizers): Ensure that an assumed rank finalizer
501 is the only finalizer for that type and correct the surprising
502 warning for the lack of a scalar finalizer.
503 (check_defined_assignments): Handle allocatable components.
504 (resolve_fl_derived): Set referenced the vtab for use
506 (resolve_symbol): Set referenced an unreferenced symbol that
508 * trans-array.cc (gfc_trans_array_constructor_value): Add code
509 to finalize the constructor result. Warn that this feature was
510 removed in F2018 and that it is suppressed by -std=2018.
511 (trans_array_constructor): Add finalblock, pass to previous
512 and apply to loop->post if filled.
513 (gfc_add_loop_ss_code): Add se finalblock to outer loop post.
514 (gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
515 generated finalization code to the main block.
516 (structure_alloc_comps): Add boolean argument to suppress
517 finalization and use it for calls from
518 gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
520 (gfc_copy_alloc_comp_no_fini): New wrapper for
521 structure_alloc_comps.
522 (gfc_alloc_allocatable_for_assignment): Suppress finalization
523 by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
524 (gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
525 deallocate the components of entities with a leading '_' in the
526 name that are also marked as artificial.
527 * trans-array.h : Add the new boolean argument to the prototype
528 of gfc_deallocate_alloc_comp_no_caf with a default of false.
529 Add prototype for gfc_copy_alloc_comp_no_fini.
530 * trans-decl.cc(init_intent_out_dt): Tidy up the code.
531 * trans-expr.cc (gfc_init_se): Initialize finalblock.
532 (gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
533 finalize function results. Replace in-line block for class
534 results with call to new function.
535 (gfc_conv_expr): Finalize structure constructors for F2003 and
536 F2008. Warn that this feature was deleted in F2018 and, unlike
537 array constructors, is not default. Add array constructor
538 finalblock to the post block.
539 (gfc_trans_scalar_assign): Suppress finalization by setting new
540 argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
541 finalization blocks to the main block.
542 (gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
543 and ensure that finalization occurs after the evaluation of the
544 rhs but using the initial value for the lhs. Finalize rhs
545 function results using gfc_finalize_tree_expr.
546 (trans_class_assignment, gfc_trans_assignment_1): As previous
547 function, taking care to order evaluation, assignment and
548 finalization correctly.
549 * trans-io.cc (gfc_trans_transfer): Add the final block.
550 * trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
551 (trans_associate_var): Nullify derived allocatable components
552 and finalize function targets with defined assignment
553 components on leaving the block scope.
554 (trans_allocate): Finalize source expressions, if required,
555 and set init_expr artificial temporarily to suppress the
556 finalization in gfc_trans_assignment.
557 * trans.cc (gfc_add_finalizer_call): Do not finalize the
558 temporaries generated in type assignment with defined
559 assignment components.
560 (gfc_assignment_finalizer_call): New function.
561 (gfc_finalize_tree_expr): New function.
562 * trans.h: Add finalblock to gfc_se. Add the prototypes for
563 gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
565 2023-03-15 Harald Anlauf <anlauf@gmx.de>
566 Tobias Burnus <tobias@codesourcery.com>
569 * interface.cc (compare_parameter): Adjust check of array dummy
570 arguments to handle the case of CLASS variables.
572 2023-03-11 Harald Anlauf <anlauf@gmx.de>
575 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
576 bounds check to common type for comparison.
578 2023-03-10 Harald Anlauf <anlauf@gmx.de>
581 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
582 checking a symbol with the BIND(C) attribute.
584 2023-03-05 Harald Anlauf <anlauf@gmx.de>
585 Tobias Burnus <tobias@codesourcery.com>
588 * class.cc (gfc_build_class_symbol): Handle update of attributes of
589 existing class container.
590 (gfc_find_derived_vtab): Fix several memory leaks.
591 (find_intrinsic_vtab): Ditto.
592 * decl.cc (attr_decl1): Manage update of symbol attributes from
594 * primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
595 updated from the class container.
596 * symbol.cc (free_old_symbol): Adjust management of symbol versions
597 to not prematurely free array specs while working on the declation
600 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
603 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
604 type(C_ptr) variables.
606 2023-02-27 Harald Anlauf <anlauf@gmx.de>
609 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
610 LEN argument of IBITS equal to BITSIZE(I).
612 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
615 * intrinsic.cc (get_intrinsic_dummy_arg,
616 set_intrinsic_dummy_arg): Rename the former to the latter.
617 Remove the return value, add a reference to the lhs as argument,
618 and do the pointer assignment inside the function. Don't do
619 it if the pointer is already non-NULL.
620 (sort_actual): Update caller.
622 2023-02-25 Harald Anlauf <anlauf@gmx.de>
624 * arith.cc (gfc_real2int): Clear mpfr variable after use.
626 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
629 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
630 bounds of CFI desc for 'pointer,intent(out)'.
632 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
634 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
635 (generate_local_decl): Add diagnostic for dummy and local variables.
637 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
640 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
642 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
643 field if it is set in the original element.
645 2023-02-24 Harald Anlauf <anlauf@gmx.de>
648 * frontend-passes.cc (do_subscript): Clear used gmp variable.
650 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
652 * invoke.texi: Reorder index entries around @items.
654 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
656 * invoke.texi: Reorder @opindex commands to precede @items they
659 2023-02-22 Harald Anlauf <anlauf@gmx.de>
662 * resolve.cc (resolve_component): The type of a CHARACTER length
663 expression must be INTEGER.
665 2023-02-21 Harald Anlauf <anlauf@gmx.de>
668 * parse.cc (check_function_result_typed): Improve type check of
669 specification expression for character length and return status.
670 (parse_spec): Use status from above.
671 * resolve.cc (resolve_fntype): Prevent use of invalid specification
672 expression for character length.
674 2023-02-16 Patrick Palka <ppalka@redhat.com>
676 * gfortran.h: Mechanically drop static from static inline
677 functions via s/^static inline/inline/g.
679 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
682 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
683 reference to invalid formal argument.
685 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
688 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
691 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
694 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
696 (gfc_resolve_do_iterator): Set a source location for added
697 'private'-clause arguments.
698 * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
699 also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
700 combined directives with loop + '{masked,master} taskloop (simd)'.
702 2023-02-13 Harald Anlauf <anlauf@gmx.de>
705 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
706 invalid use of CLASS variable.
708 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
710 * decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
711 * gfortran.h (ext_attr_id_t): Ditto.
712 * gfortran.texi (GCC$ ATTRIBUTES): Document them.
713 * trans-decl.cc (build_function_decl): Apply them.
715 2023-02-09 Harald Anlauf <anlauf@gmx.de>
716 Steven G. Kargl <kargl@gcc.gnu.org>
720 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
721 kind in conversion instead of generating an internal error.
723 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
726 * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
727 'non_unit_incr' members.
728 (gfc_nonrect_loop_expr): New.
729 (gfc_trans_omp_do): Call it; use normal loop bounds
730 for unit stride - and only create local loop var.
732 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
734 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
737 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
740 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
741 when a symbol's location is not set.
743 2023-02-07 Harald Anlauf <anlauf@gmx.de>
746 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
747 make ASSOCIATE variables TREE_STATIC.
749 2023-02-05 Harald Anlauf <anlauf@gmx.de>
752 * arith.cc (gfc_arith_divide): Emit integer division truncation
753 warnings using gfc_warning instead of gfc_warning_now to prevent
756 2023-02-03 Jakub Jelinek <jakub@redhat.com>
759 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
762 2023-02-01 Harald Anlauf <anlauf@gmx.de>
765 * expr.cc (find_array_section): Add check to prevent interpreting an
766 mpz non-integer constant as an integer.
768 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
770 * openmp.cc (resolve_omp_clauses): Check also for
773 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
776 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
777 (gfc_check_findloc): Ditto.
779 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
782 * parse.cc (parse_module): Remove use of a bool error value
783 that prevented proper setting of the namespace pointer.
785 2023-01-28 Harald Anlauf <anlauf@gmx.de>
786 Steven G. Kargl <kargl@gcc.gnu.org>
789 * resolve.cc (compare_bound_int): Expression to compare must be of
791 (compare_bound_mpz_t): Likewise.
792 (check_dimension): Fix comment on checks applied to array section
793 and clean up associated logic.
795 2023-01-28 Harald Anlauf <anlauf@gmx.de>
798 * match.cc (gfc_match_common): A USE associated name shall not appear
799 in a COMMON block (F2018:C8121).
801 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
804 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
806 2023-01-26 Harald Anlauf <anlauf@gmx.de>
809 * resolve.cc (check_host_association): Extend host association check
810 so that it is not restricted to functions. Also prevent NULL pointer
813 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
816 * array.cc (compare_bounds): Return false instead of generating an
817 internal error on an invalid argument type.
819 2023-01-24 Harald Anlauf <anlauf@gmx.de>
822 * simplify.cc (simplify_transformation): Do not try to simplify
823 transformational intrinsic when the ARRAY argument has a NULL shape.
825 2023-01-23 Harald Anlauf <anlauf@gmx.de>
828 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
829 dereference while recursively checking expressions.
831 2023-01-23 Harald Anlauf <anlauf@gmx.de>
834 * interface.cc (get_expr_storage_size): Check array subscript triplets
835 that we actually have integer values before trying to extract with
838 2023-01-23 Harald Anlauf <anlauf@gmx.de>
841 * iresolve.cc (check_charlen_present): Preserve character length if
842 there is no array constructor.
844 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
847 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
848 * primary.cc (match_variable): Add check for PARAMETER in DATA.
850 2023-01-19 Harald Anlauf <anlauf@gmx.de>
853 * expr.cc (class_allocatable): Prevent NULL pointer dereference
855 (class_pointer): Likewise.
857 2023-01-17 Harald Anlauf <anlauf@gmx.de>
860 * interface.cc (get_expr_storage_size): Check that we actually have
861 an integer value before trying to extract it with mpz_get_si.
863 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
866 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
868 2023-01-11 Jakub Jelinek <jakub@redhat.com>
871 * f95-lang.cc (gfc_init_builtin_function): Fix up function types
872 for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
874 2023-01-10 Harald Anlauf <anlauf@gmx.de>
877 * frontend-passes.cc (do_subscript): Clear used gmp variables.
879 2023-01-02 Jakub Jelinek <jakub@redhat.com>
881 * gfortranspec.cc (lang_specific_driver): Update copyright notice
883 * gfc-internals.texi: Bump @copying's copyright year.
884 * gfortran.texi: Ditto.
885 * intrinsic.texi: Ditto.
886 * invoke.texi: Ditto.
889 Copyright (C) 2023 Free Software Foundation, Inc.
891 Copying and distribution of this file, with or without modification,
892 are permitted in any medium without royalty provided the copyright
893 notice and this notice are preserved.