]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2023-05-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2
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.
8
9 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
10
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.
27
28 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
29
30 PR fortran/78798
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.
64 (gfc_pure): 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.
78 * parse.cc: Likewise.
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.
88 (gfc_pure): 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.
107
108 2023-05-17 Harald Anlauf <anlauf@gmx.de>
109
110 PR fortran/95374
111 PR fortran/104352
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.
114
115 2023-05-17 Tobias Burnus <tobias@codesourcery.com>
116
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
123 string variables.
124
125 2023-05-16 Paul Thomas <pault@gcc.gnu.org>
126
127 PR fortran/105152
128 PR fortran/100193
129 PR fortran/87496
130 PR fortran/103389
131 PR fortran/104429
132 PR fortran/82774
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
138 component.
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.
159
160 2023-05-15 Harald Anlauf <anlauf@gmx.de>
161
162 PR fortran/109846
163 * expr.cc (gfc_check_vardef_context): Check appropriate pointer
164 attribute for CLASS vs. non-CLASS function result in variable
165 definition context.
166
167 2023-05-11 Xi Ruoyao <xry111@xry111.site>
168
169 * Make-lang.in: Use grep instead of fgrep.
170
171 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
172
173 * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration.
174 (debug): Add DEBUG_FUNCTION.
175 (show_code_node): Remove erroneous whitespace.
176
177 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
178
179 PR fortran/109624
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.
183
184 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
185
186 * resolve.cc (resolve_select_type): Fix coding style.
187
188 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
189
190 * resolve.cc (resolve_select_type): Call free() unconditionally.
191
192 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
193
194 PR fortran/68800
195 * expr.cc (find_array_section): Fix mpz memory leak.
196 * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in
197 error paths.
198
199 2023-05-05 Harald Anlauf <anlauf@gmx.de>
200
201 PR fortran/109641
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
207 conversions.
208 (gfc_op_rank_conformable): New helper function to compare ranks of
209 operands of binary operator.
210
211 2023-05-04 Julian Brown <julian@codesourcery.com>
212
213 PR fortran/109622
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.
219
220 2023-04-28 Julian Brown <julian@codesourcery.com>
221
222 PR fortran/109622
223 * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fixes.
224
225 2023-04-28 Tobias Burnus <tobias@codesourcery.com>
226
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.
233 * expr.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.
249
250 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
251
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.
255
256 2023-04-22 Harald Anlauf <anlauf@gmx.de>
257 Steven G. Kargl <kargl@gcc.gnu.org>
258
259 PR fortran/109500
260 * interface.cc (gfc_compare_actual_formal): Reject allocatable
261 functions being used as actual argument for allocable dummy.
262
263 2023-04-14 Harald Anlauf <anlauf@gmx.de>
264
265 PR fortran/109511
266 * simplify.cc (gfc_simplify_set_exponent): Fix implementation of
267 compile-time simplification of intrinsic SET_EXPONENT for argument
268 X < 1 and for I < 0.
269
270 2023-04-14 Paul Thomas <pault@gcc.gnu.org>
271
272 PR fortran/104272
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.
278
279 2023-04-13 Harald Anlauf <anlauf@gmx.de>
280
281 PR fortran/109492
282 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and
283 unsigned HOST_WIDE_INT for portability.
284
285 2023-04-12 Harald Anlauf <anlauf@gmx.de>
286
287 PR fortran/104312
288 * resolve.cc (resolve_entries): Handle functions with ENTRY and
289 ALLOCATABLE results.
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.
295
296 2023-04-12 Harald Anlauf <anlauf@gmx.de>
297
298 PR fortran/61615
299 PR fortran/99982
300 * interface.cc (compare_parameter): Enable type and rank checks for
301 arguments of derived type from the intrinsic module ISO_C_BINDING.
302
303 2023-04-08 Paul Thomas <pault@gcc.gnu.org>
304
305 PR fortran/87477
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
309 target expression.
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
315 'eltype'.
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
319 declared_at.
320 * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in
321 'previous' and use if end expression in substring reference is
322 null.
323 (gfc_conv_string_length): Use gfc_conv_expr_descriptor if
324 'expr_flat' is an array. Add post block to catch deallocation
325 of temporaries.
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.
334
335 2023-04-04 Harald Anlauf <anlauf@gmx.de>
336
337 PR fortran/104349
338 * expr.cc (check_restricted): Adjust check for valid variables in
339 restricted expressions: make no exception for module variables.
340
341 2023-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
342
343 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
344 type name to be "long long".
345
346 2023-03-30 Andrew Pinski <apinski@marvell.com>
347
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
350 2 to the name too.
351
352 2023-03-28 Jakub Jelinek <jakub@redhat.com>
353
354 PR fortran/109314
355 * openmp.cc (gfc_omp_absent_contains_clause): Fix typo in diagnostics
356 - composit -> composite.
357
358 2023-03-25 Harald Anlauf <anlauf@gmx.de>
359
360 PR fortran/104321
361 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
362
363 2023-03-24 Harald Anlauf <anlauf@gmx.de>
364
365 * expr.cc (free_expr0): Free also BOZ strings as part of an expression.
366
367 2023-03-24 Haochen Gui <guihaoc@gcc.gnu.org>
368 Tobias Burnus <tobias@codesourcery.com>
369
370 PR target/103628
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.
381
382 2023-03-22 Harald Anlauf <anlauf@gmx.de>
383 Steven G. Kargl <kargl@gcc.gnu.org>
384
385 PR fortran/104572
386 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
387 cannot be an alternate return.
388
389 2023-03-21 Harald Anlauf <anlauf@gmx.de>
390
391 PR fortran/99036
392 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
393 generic module interface.
394
395 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
396
397 * invoke.texi: Remove usages of @gol.
398 * intrinsic.texi: Ditto.
399
400 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
401
402 PR fortran/109206
403 * trans-array.cc (gfc_trans_array_constructor_value): Correct
404 incorrect setting of typespec.
405
406 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
407
408 PR fortran/109209
409 * resolve.cc (generate_component_assignments): Restore the
410 exclusion of allocatable components from the loop.
411
412 2023-03-20 Harald Anlauf <anlauf@gmx.de>
413
414 PR fortran/109216
415 * invoke.texi: Correct documentation of how underscores are appended
416 to external names.
417
418 2023-03-20 Harald Anlauf <anlauf@gmx.de>
419
420 PR fortran/109186
421 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
422 up real kind-specific maximum exponent for mpfr.
423
424 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
425
426 PR fortran/87127
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.
430
431 2023-03-19 Harald Anlauf <anlauf@gmx.de>
432
433 PR fortran/85877
434 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
435 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
436
437 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
438
439 * gfortran.texi: Mention behavior on overflow.
440
441 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
442
443 PR fortran/103854
444 PR fortran/96122
445 PR fortran/37336
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
449 pointer components.
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
453 finalizers.
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
488 associated symbols.
489 (resolve_symbol): Set referenced an unreferenced symbol that
490 will be finalized.
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
502 false.
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.
547
548 2023-03-15 Harald Anlauf <anlauf@gmx.de>
549 Tobias Burnus <tobias@codesourcery.com>
550
551 PR fortran/58331
552 * interface.cc (compare_parameter): Adjust check of array dummy
553 arguments to handle the case of CLASS variables.
554
555 2023-03-11 Harald Anlauf <anlauf@gmx.de>
556
557 PR fortran/106945
558 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
559 bounds check to common type for comparison.
560
561 2023-03-10 Harald Anlauf <anlauf@gmx.de>
562
563 PR fortran/104332
564 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
565 checking a symbol with the BIND(C) attribute.
566
567 2023-03-05 Harald Anlauf <anlauf@gmx.de>
568 Tobias Burnus <tobias@codesourcery.com>
569
570 PR fortran/106856
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
576 CLASS attributes.
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
581 of CLASS variables.
582
583 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
584
585 PR middle-end/108546
586 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
587 type(C_ptr) variables.
588
589 2023-02-27 Harald Anlauf <anlauf@gmx.de>
590
591 PR fortran/108937
592 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
593 LEN argument of IBITS equal to BITSIZE(I).
594
595 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
596
597 PR fortran/108923
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.
604
605 2023-02-25 Harald Anlauf <anlauf@gmx.de>
606
607 * arith.cc (gfc_real2int): Clear mpfr variable after use.
608
609 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
610
611 PR fortran/108621
612 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
613 bounds of CFI desc for 'pointer,intent(out)'.
614
615 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
616
617 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
618 (generate_local_decl): Add diagnostic for dummy and local variables.
619
620 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
621
622 PR fortran/108923
623 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
624 memory.
625 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
626 field if it is set in the original element.
627
628 2023-02-24 Harald Anlauf <anlauf@gmx.de>
629
630 PR fortran/108924
631 * frontend-passes.cc (do_subscript): Clear used gmp variable.
632
633 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
634
635 * invoke.texi: Reorder index entries around @items.
636
637 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
638
639 * invoke.texi: Reorder @opindex commands to precede @items they
640 relate to.
641
642 2023-02-22 Harald Anlauf <anlauf@gmx.de>
643
644 PR fortran/96024
645 * resolve.cc (resolve_component): The type of a CHARACTER length
646 expression must be INTEGER.
647
648 2023-02-21 Harald Anlauf <anlauf@gmx.de>
649
650 PR fortran/96025
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.
656
657 2023-02-16 Patrick Palka <ppalka@redhat.com>
658
659 * gfortran.h: Mechanically drop static from static inline
660 functions via s/^static inline/inline/g.
661
662 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
663
664 PR fortran/103608
665 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
666 reference to invalid formal argument.
667
668 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
669
670 PR fortran/104554
671 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
672 dereference.
673
674 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
675
676 PR fortran/108512
677 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
678 directives.
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)'.
684
685 2023-02-13 Harald Anlauf <anlauf@gmx.de>
686
687 PR fortran/103475
688 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
689 invalid use of CLASS variable.
690
691 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
692
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.
697
698 2023-02-09 Harald Anlauf <anlauf@gmx.de>
699 Steven G. Kargl <kargl@gcc.gnu.org>
700
701 PR fortran/69636
702 PR fortran/103779
703 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
704 kind in conversion instead of generating an internal error.
705
706 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
707
708 PR fortran/107424
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.
714
715 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
716
717 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
718 -fopenmp-simd.
719
720 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
721
722 PR fortran/103259
723 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
724 when a symbol's location is not set.
725
726 2023-02-07 Harald Anlauf <anlauf@gmx.de>
727
728 PR fortran/95107
729 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
730 make ASSOCIATE variables TREE_STATIC.
731
732 2023-02-05 Harald Anlauf <anlauf@gmx.de>
733
734 PR fortran/108592
735 * arith.cc (gfc_arith_divide): Emit integer division truncation
736 warnings using gfc_warning instead of gfc_warning_now to prevent
737 redundant messages.
738
739 2023-02-03 Jakub Jelinek <jakub@redhat.com>
740
741 PR fortran/108451
742 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
743 doing continue.
744
745 2023-02-01 Harald Anlauf <anlauf@gmx.de>
746
747 PR fortran/108609
748 * expr.cc (find_array_section): Add check to prevent interpreting an
749 mpz non-integer constant as an integer.
750
751 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
752
753 * openmp.cc (resolve_omp_clauses): Check also for
754 power of two.
755
756 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
757
758 PR fortran/108450
759 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
760 (gfc_check_findloc): Ditto.
761
762 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
763
764 PR fortran/103506
765 * parse.cc (parse_module): Remove use of a bool error value
766 that prevented proper setting of the namespace pointer.
767
768 2023-01-28 Harald Anlauf <anlauf@gmx.de>
769 Steven G. Kargl <kargl@gcc.gnu.org>
770
771 PR fortran/108527
772 * resolve.cc (compare_bound_int): Expression to compare must be of
773 type INTEGER.
774 (compare_bound_mpz_t): Likewise.
775 (check_dimension): Fix comment on checks applied to array section
776 and clean up associated logic.
777
778 2023-01-28 Harald Anlauf <anlauf@gmx.de>
779
780 PR fortran/108453
781 * match.cc (gfc_match_common): A USE associated name shall not appear
782 in a COMMON block (F2018:C8121).
783
784 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
785
786 PR fortran/108558
787 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
788
789 2023-01-26 Harald Anlauf <anlauf@gmx.de>
790
791 PR fortran/108544
792 * resolve.cc (check_host_association): Extend host association check
793 so that it is not restricted to functions. Also prevent NULL pointer
794 dereference.
795
796 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
797
798 PR fortran/108528
799 * array.cc (compare_bounds): Return false instead of generating an
800 internal error on an invalid argument type.
801
802 2023-01-24 Harald Anlauf <anlauf@gmx.de>
803
804 PR fortran/108529
805 * simplify.cc (simplify_transformation): Do not try to simplify
806 transformational intrinsic when the ARRAY argument has a NULL shape.
807
808 2023-01-23 Harald Anlauf <anlauf@gmx.de>
809
810 PR fortran/108502
811 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
812 dereference while recursively checking expressions.
813
814 2023-01-23 Harald Anlauf <anlauf@gmx.de>
815
816 PR fortran/108501
817 * interface.cc (get_expr_storage_size): Check array subscript triplets
818 that we actually have integer values before trying to extract with
819 mpz_get_si.
820
821 2023-01-23 Harald Anlauf <anlauf@gmx.de>
822
823 PR fortran/108420
824 * iresolve.cc (check_charlen_present): Preserve character length if
825 there is no array constructor.
826
827 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
828
829 PR fortran/102595
830 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
831 * primary.cc (match_variable): Add check for PARAMETER in DATA.
832
833 2023-01-19 Harald Anlauf <anlauf@gmx.de>
834
835 PR fortran/108434
836 * expr.cc (class_allocatable): Prevent NULL pointer dereference
837 or invalid read.
838 (class_pointer): Likewise.
839
840 2023-01-17 Harald Anlauf <anlauf@gmx.de>
841
842 PR fortran/108421
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.
845
846 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
847
848 PR fortran/107706
849 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
850
851 2023-01-11 Jakub Jelinek <jakub@redhat.com>
852
853 PR fortran/108349
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.
856
857 2023-01-10 Harald Anlauf <anlauf@gmx.de>
858
859 PR fortran/97345
860 * frontend-passes.cc (do_subscript): Clear used gmp variables.
861
862 2023-01-02 Jakub Jelinek <jakub@redhat.com>
863
864 * gfortranspec.cc (lang_specific_driver): Update copyright notice
865 dates.
866 * gfc-internals.texi: Bump @copying's copyright year.
867 * gfortran.texi: Ditto.
868 * intrinsic.texi: Ditto.
869 * invoke.texi: Ditto.
870
871 \f
872 Copyright (C) 2023 Free Software Foundation, Inc.
873
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.