]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2023-10-13 Harald Anlauf <anlauf@gmx.de>
2
3 PR fortran/104351
4 * decl.cc (get_proc_name): Extend name conflict detection between
5 internal procedure and previous declaration also to derived type.
6
7 2023-10-13 Harald Anlauf <anlauf@gmx.de>
8
9 PR fortran/110957
10 * invoke.texi: Update documentation to reflect '-ffpe-trap=none'.
11 * options.cc (gfc_handle_fpe_option): Fix mixup up of error messages
12 for options -ffpe-trap and -ffpe-summary. Accept '-ffpe-trap=none'
13 to clear FPU traps previously set on command line.
14
15 2023-10-13 Richard Biener <rguenther@suse.de>
16
17 PR tree-optimization/111779
18 * trans-expr.cc (gfc_trans_assignment_1): Initialize
19 lhs_caf_attr and rhs_caf_attr codimension flag to avoid
20 false positive -Wuninitialized.
21
22 2023-10-12 Paul Thomas <pault@gcc.gnu.org>
23
24 PR fortran/67740
25 * trans-expr.cc (gfc_trans_pointer_assignment): Set the hidden
26 string length component for pointer assignment to character
27 pointer components.
28
29 2023-10-08 Tobias Burnus <tobias@codesourcery.com>
30
31 * parse.cc (parse_omp_structured_block): Make the user code end
32 up inside of BLOCK construct for strictly structured blocks;
33 fix fallout for 'section' and 'teams'.
34 * openmp.cc (resolve_omp_target): Fix changed BLOCK handling
35 for teams in target checking.
36
37 2023-10-04 Paul Thomas <pault@gcc.gnu.org>
38
39 PR fortran/37336
40 PR fortran/111674
41 * trans-expr.cc (gfc_trans_scalar_assign): Finalize components
42 on deallocation if derived type is not finalizable.
43
44 2023-10-03 David Malcolm <dmalcolm@redhat.com>
45
46 * error.cc (gfc_format_decoder): Update for "m_" prefixes to
47 text_info fields.
48
49 2023-10-02 David Malcolm <dmalcolm@redhat.com>
50
51 * error.cc (gfc_diagnostics_init): Update for change to start_span.
52
53 2023-10-02 David Malcolm <dmalcolm@redhat.com>
54
55 * error.cc (gfc_diagnostic_starter): Update for reorganization of
56 source-printing fields of diagnostic_context.
57 (gfc_diagnostics_init): Likewise.
58 (gfc_diagnostics_finish): Likewise.
59
60 2023-09-29 Andre Vehreschild <vehre@gcc.gnu.org>
61
62 PR fortran/37336
63 * trans-array.cc (structure_alloc_comps): Deref coarray.
64 (gfc_trans_deferred_array): Add freeing of components after
65 check for allocated coarray.
66
67 2023-09-24 Paul Thomas <pault@gcc.gnu.org>
68
69 PR fortran/68155
70 PR fortran/111271
71 * decl.cc (fix_initializer_charlen): New function broken out of
72 add_init_expr_to_sym.
73 (add_init_expr_to_sym, build_struct): Call the new function.
74 * trans-expr.cc (gfc_conv_intrinsic_to_class): Remove repeated
75 condition.
76
77 2023-09-23 Harald Anlauf <anlauf@gmx.de>
78
79 PR fortran/95710
80 * class.cc (gfc_build_class_symbol): Do not try to build class
81 container for invalid typespec.
82 * resolve.cc (resolve_fl_var_and_proc): Prevent NULL pointer
83 dereference.
84 (resolve_symbol): Likewise.
85
86 2023-09-19 Harald Anlauf <anlauf@gmx.de>
87
88 PR fortran/70231
89 * trans-array.cc (trans_array_constructor): In absence of a typespec,
90 use string length determined by get_array_ctor_strlen() to reasonably
91 initialize auxiliary variable for bounds-checking.
92
93 2023-09-15 Harald Anlauf <anlauf@gmx.de>
94
95 PR fortran/30802
96 * trans-array.cc (trans_array_bound_check): Add optional argument
97 COMPNAME for explicit specification of array component name.
98 (array_bound_check_elemental): Helper function for generating
99 bounds-checking code for elemental dimensions.
100 (gfc_conv_expr_descriptor): Use bounds-checking also for elemental
101 dimensions, i.e. those not handled by the scalarizer.
102
103 2023-09-15 Mikael Morin <mikael@gcc.gnu.org>
104
105 PR fortran/108957
106 * gfortran.h (gfc_symbol): Add comment documenting reference counting.
107 * parse.cc (parse_interface): Remove reference count incrementation.
108
109 2023-09-12 Mikael Morin <mikael@gcc.gnu.org>
110
111 PR fortran/110996
112 * gfortran.h (gfc_release_symbol): Set return type to bool.
113 * symbol.cc (gfc_release_symbol): Ditto. Return whether symbol was
114 freed.
115 (delete_symbol_from_ns): New, outline code from...
116 (gfc_restore_last_undo_checkpoint): ... here. Delete new symbols
117 from two more namespaces.
118
119 2023-09-09 Mikael Morin <mikael@gcc.gnu.org>
120
121 * bbt.cc (delete_treap): Add argument REMOVED, set it to the removed
122 element from the tree. Change NULL to nullptr.
123 (gfc_delete_bbt): Return the removed element from the tree.
124 * gfortran.h (gfc_delete_symtree): Remove prototype.
125 (gfc_delete_bbt): Set return type to pointer.
126 * symbol.cc (gfc_delete_symtree): Make static. Get the element to be
127 freed from the result of gfc_delete_bbt. Remove the preliminary walk to
128 get it.
129
130 2023-09-01 Harald Anlauf <anlauf@gmx.de>
131
132 PR fortran/31059
133 * trans-array.cc (gfc_conv_ss_startstride): For array bounds checking,
134 consider also array constructors in expressions, and use their shape.
135
136 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
137
138 * gfortran.texi: Likewise.
139
140 2023-08-30 Mikael Morin <mikael@gcc.gnu.org>
141
142 PR fortran/48776
143 * gfortran.h (gfc_drop_interface_elements_before): New prototype.
144 (gfc_current_interface_head): Return a reference to the pointer.
145 * interface.cc (gfc_current_interface_head): Ditto.
146 (free_interface_elements_until): New function, generalizing
147 gfc_free_interface.
148 (gfc_free_interface): Use free_interface_elements_until.
149 (gfc_drop_interface_elements_before): New function.
150 * parse.cc
151 (current_interface_ptr, previous_interface_head): New static variables.
152 (current_interface_valid_p, get_current_interface_ptr): New functions.
153 (decode_statement): Initialize previous_interface_head.
154 (reject_statement): Restore current interface pointer to point to
155 previous_interface_head.
156
157 2023-08-26 Paul Thomas <pault@gcc.gnu.org>
158
159 PR fortran/92586
160 * trans-expr.cc (gfc_trans_arrayfunc_assign): Supply a missing
161 dereference for the call to gfc_deallocate_alloc_comp_no_caf.
162
163 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
164
165 * gfortran.h (struct gfc_namespace): Add omp_structured_block bit.
166 * openmp.cc: Include omp-api.h.
167 (resolve_omp_clauses): Consolidate inscan reduction clause conflict
168 checking here.
169 (find_nested_loop_in_chain): New.
170 (find_nested_loop_in_block): New.
171 (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse properly.
172 Handle imperfectly-nested loops when looking for nested omp scan.
173 Refactor to move inscan reduction clause conflict checking to
174 resolve_omp_clauses.
175 (gfc_resolve_do_iterator): Handle imperfectly-nested loops.
176 (struct icode_error_state): New.
177 (icode_code_error_callback): New.
178 (icode_expr_error_callback): New.
179 (diagnose_intervening_code_errors_1): New.
180 (diagnose_intervening_code_errors): New.
181 (make_structured_block): New.
182 (restructure_intervening_code): New.
183 (is_outer_iteration_variable): Do not assume loops are perfectly
184 nested.
185 (check_nested_loop_in_chain): New.
186 (check_nested_loop_in_block_state): New.
187 (check_nested_loop_in_block_symbol): New.
188 (check_nested_loop_in_block): New.
189 (expr_uses_intervening_var): New.
190 (is_intervening_var): New.
191 (expr_is_invariant): Do not assume loops are perfectly nested.
192 (resolve_omp_do): Handle imperfectly-nested loops.
193 * trans-stmt.cc (gfc_trans_block_construct): Generate
194 OMP_STRUCTURED_BLOCK if magic bit is set on block namespace.
195
196 2023-08-25 Harald Anlauf <anlauf@gmx.de>
197
198 PR fortran/35095
199 * data.cc (get_array_index): Add bounds-checking code and return error
200 status. Overindexing will be allowed as an extension for -std=legacy
201 and generate an error in standard-conforming mode.
202 (gfc_assign_data_value): Use error status from get_array_index for
203 graceful error recovery.
204
205 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
206
207 * match.cc (gfc_match_equivalence): Rename TRUE/FALSE to true/false.
208 * module.cc (check_access): Ditto.
209 * primary.cc (match_real_constant): Ditto.
210 * trans-array.cc (gfc_trans_allocate_array_storage): Ditto.
211 (get_array_ctor_strlen): Ditto.
212 * trans-common.cc (find_equivalence): Ditto.
213 (add_equivalences): Ditto.
214
215 2023-08-23 Harald Anlauf <anlauf@gmx.de>
216
217 PR fortran/32986
218 * resolve.cc (is_non_constant_shape_array): Add forward declaration.
219 (resolve_common_vars): Diagnose automatic array object in COMMON.
220 (resolve_symbol): Prevent confusing follow-on error.
221
222 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
223
224 * gfortran.h (enum gfc_omp_defaultmap_category):
225 Add OMP_DEFAULTMAP_CAT_ALL.
226 * openmp.cc (gfc_match_omp_clauses): Parse
227 'all' as category.
228 * trans-openmp.cc (gfc_trans_omp_clauses): Handle it.
229
230 2023-08-22 Harald Anlauf <anlauf@gmx.de>
231
232 PR fortran/49588
233 * data.cc (gfc_advance_section): Derive next index set and next offset
234 into DATA variable also for array references using vector sections.
235 Use auxiliary array to keep track of offsets into indexing vectors.
236 (gfc_get_section_index): Set up initial indices also for DATA variables
237 with array references using vector sections.
238 * data.h (gfc_get_section_index): Adjust prototype.
239 (gfc_advance_section): Likewise.
240 * resolve.cc (check_data_variable): Pass vector offsets.
241
242 2023-08-16 Harald Anlauf <anlauf@gmx.de>
243
244 PR fortran/110360
245 * trans-expr.cc (conv_scalar_char_value): Use gfc_replace_expr to
246 avoid leaking replaced gfc_expr.
247
248 2023-08-15 Martin Jambor <mjambor@suse.cz>
249 Harald Anlauf <anlauf@gmx.de>
250
251 PR fortran/110677
252 * resolve.cc (resolve_structure_cons): Check comp->ts is character
253 type before accessing stuff through comp->ts.u.cl.
254
255 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
256 Thomas Schwinge <thomas@codesourcery.com>
257
258 * openmp.cc (OACC_DATA_CLAUSES): Add OMP_CLAUSE_DEFAULT.
259
260 2023-08-14 Mikael Morin <mikael@gcc.gnu.org>
261
262 PR fortran/110360
263 PR fortran/110419
264 * trans-types.cc (gfc_sym_type): Use a bare character type for length
265 one value character dummy arguments.
266 * trans-expr.cc (gfc_conv_string_parameter): Handle single character
267 case.
268 (gfc_conv_procedure_call): Don't exclude interoperable kinds
269 from single character handling. For single character dummy arguments,
270 extend the existing handling of non-constant expressions to constant
271 expressions.
272
273 2023-08-14 Mikael Morin <mikael@gcc.gnu.org>
274
275 * gfortran.h (gfc_length_one_character_type_p): New inline
276 function.
277 * check.cc (is_c_interoperable): Use
278 gfc_length_one_character_type_p.
279 * decl.cc (verify_bind_c_sym): Same.
280 * trans-expr.cc (gfc_conv_procedure_call): Same.
281
282 2023-08-09 Steve Kargl <sgk@troutmask.apl.washington.edu>
283
284 PR fortran/109684
285 * resolve.cc (resolve_types): Exclude contained procedures with
286 the artificial attribute from test for pureness.
287
288 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
289
290 * openmp.cc (resolve_omp_clauses): Add checking requiring
291 OpenACC host_data construct to have an use_device clause.
292
293 2023-07-28 Harald Anlauf <anlauf@gmx.de>
294
295 PR fortran/110825
296 * gfortran.texi: Clarify argument passing convention.
297 * trans-expr.cc (gfc_conv_procedure_call): Do not pass the character
298 length as hidden argument when the declared dummy argument is
299 assumed-type.
300
301 2023-07-27 Tobias Burnus <tobias@codesourcery.com>
302
303 * openmp.cc (resolve_omp_target): Minor cleanup.
304 * parse.cc (decode_omp_directive): Find TARGET statement
305 also higher in the stack.
306
307 2023-07-26 Harald Anlauf <anlauf@gmx.de>
308
309 PR fortran/68569
310 * resolve.cc (check_data_variable): Do not accept strings with
311 deferred length or non-constant length in a DATA statement.
312 Reject also substrings of string variables of non-constant length.
313
314 2023-07-25 Tobias Burnus <tobias@codesourcery.com>
315
316 PR fortran/110725
317 PR middle-end/71065
318 * gfortran.h (gfc_omp_clauses): Add target_first_st_is_teams.
319 * parse.cc (parse_omp_structured_block): Set it if the first
320 statement in the structured block of a TARGET is TEAMS or
321 a combined/composite starting with TEAMS.
322 * openmp.cc (resolve_omp_target): Also show an error for
323 contains_teams_construct without target_first_st_is_teams.
324
325 2023-07-24 Tobias Burnus <tobias@codesourcery.com>
326
327 PR fortran/110725
328 PR middle-end/71065
329 * gfortran.h (gfc_omp_clauses): Add contains_teams_construct.
330 * openmp.cc (resolve_omp_target): New; check for teams nesting.
331 (gfc_resolve_omp_directive): Call it.
332 * parse.cc (decode_omp_directive): Set contains_teams_construct
333 on enclosing ST_OMP_TARGET.
334
335 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
336
337 * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): Only
338 define it once.
339
340 2023-07-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
341
342 * f95-lang.cc (gfc_init_builtin_functions): Add __builtin_iseqsig.
343 * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): New
344 function.
345 (gfc_conv_ieee_arithmetic_function): Handle IEEE comparisons.
346
347 2023-07-19 Tobias Burnus <tobias@codesourcery.com>
348
349 PR fortran/107424
350 * trans-openmp.cc (gfc_nonrect_loop_expr): Accept all
351 constant loop steps.
352 (gfc_trans_omp_do): Likewise; use sign to determine
353 loop direction.
354
355 2023-07-17 Harald Anlauf <anlauf@gmx.de>
356
357 PR fortran/95947
358 PR fortran/110658
359 * trans-expr.cc (gfc_conv_procedure_call): For intrinsic procedures
360 whose result characteristics depends on the first argument and which
361 can be of type character, the character length will not be deferred.
362
363 2023-07-17 Tobias Burnus <tobias@codesoucery.com>
364 Chung-Lin Tang <cltang@codesourcery.com>
365
366 * dump-parse-tree.cc (show_omp_namelist, show_omp_clauses): Dump
367 uses_allocators clause.
368 * gfortran.h (gfc_free_omp_namelist): Add memspace_sym to u union
369 and traits_sym to u2 union.
370 (OMP_LIST_USES_ALLOCATORS): New enum value.
371 (gfc_free_omp_namelist): Add 'bool free_mem_traits_space' arg.
372 * match.cc (gfc_free_omp_namelist): Likewise.
373 * openmp.cc (gfc_free_omp_clauses, gfc_match_omp_variable_list,
374 gfc_match_omp_to_link, gfc_match_omp_doacross_sink,
375 gfc_match_omp_clause_reduction, gfc_match_omp_allocate,
376 gfc_match_omp_flush): Update call.
377 (gfc_match_omp_clauses): Likewise. Parse uses_allocators clause.
378 (gfc_match_omp_clause_uses_allocators): New.
379 (enum omp_mask2): Add new OMP_CLAUSE_USES_ALLOCATORS.
380 (OMP_TARGET_CLAUSES): Accept it.
381 (resolve_omp_clauses): Resolve uses_allocators clause
382 * st.cc (gfc_free_statement): Update gfc_free_omp_namelist call.
383 * trans-openmp.cc (gfc_trans_omp_clauses): Handle
384 OMP_LIST_USES_ALLOCATORS; fail with sorry unless predefined allocator.
385 (gfc_split_omp_clauses): Handle uses_allocators.
386
387 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
388
389 PR fortran/110618
390 * trans.h (gfc_deallocate_with_status): Add class container
391 argument.
392 (gfc_deallocate_scalar_with_status): Ditto.
393 * trans.cc (gfc_deallocate_with_status): Add class container
394 argument and pass it down to gfc_add_finalize_call.
395 (gfc_deallocate_scalar_with_status): Same.
396 * trans-array.cc (structure_alloc_comps): Update caller.
397 * trans-stmt.cc (gfc_trans_deallocate): Ditto.
398 * trans-expr.cc (gfc_conv_procedure_call): Ditto. Pass
399 pre-evaluated class container argument if it's available.
400
401 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
402
403 PR fortran/110618
404 * trans.h (gfc_add_finalizer_call): Add class container argument.
405 * trans.cc (gfc_add_finalizer_call): Ditto. Pass down new
406 argument to get_final_proc_ref, get_elem_size, get_var_desc,
407 and get_vptr.
408 (get_elem_size): Add class container argument.
409 Use provided class container if it's available.
410 (get_var_descr): Same.
411 (get_vptr): Same.
412 (get_final_proc_ref): Same. Add boolean telling the class
413 container argument is used. Set it. Don't try to use
414 final_wrapper if class container argument was used.
415
416 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
417
418 * trans.cc (get_var_descr): Factor scalar descriptor generation.
419
420 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
421
422 * trans.cc (get_vptr): New function.
423 (gfc_add_finalizer_call): Move virtual table pointer evaluation
424 to get_vptr.
425
426 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
427
428 * trans.cc (get_var_descr): Remove argument ts. Use var->ts
429 instead.
430 (gfc_add_finalizer_call): Update caller.
431
432 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
433
434 * trans.cc (gfc_add_finalizer_call): Inline definition of
435 variable has_finalizer. Merge nested conditions.
436
437 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
438
439 * trans.cc (gfc_add_finalizer_call): Remove local variable
440 final_expr. Pass down expr to get_final_proc_ref and move
441 final procedure expression generation down to its one usage
442 in get_final_proc_ref.
443 (get_final_proc_ref): Add argument expr. Remove argument
444 final_wrapper. Recreate final_wrapper from expr.
445
446 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
447
448 * trans.cc (gfc_add_finalizer_call): Remove local variable
449 elem_size. Pass expression to get_elem_size and move the
450 element size expression generation close to its usage there.
451 (get_elem_size): Add argument expr, remove class_size argument
452 and rebuild it from expr. Remove ts argument and use the
453 type of expr instead.
454
455 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
456
457 * trans.cc (gfc_add_finalizer_call): Move pre and post code for
458 the final procedure pointer expression to the outer block.
459 Reuse the previously evaluated final procedure pointer
460 expression.
461
462 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
463
464 * trans.cc (gfc_add_finalizer_call): Add post code for desc_se
465 after the finalizer call. Add post code for final_se and
466 size_se as well.
467
468 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
469
470 * trans.cc (gfc_build_final_call): Inline...
471 (gfc_add_finalizer_call): ... to its one caller.
472
473 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
474
475 * trans.cc (get_var_descr): New function.
476 (gfc_build_final_call): Outline the data reference descriptor
477 evaluation code to get_var_descr.
478
479 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
480
481 * trans.cc (get_elem_size): New function.
482 (gfc_build_final_call): Outline the element size evaluation
483 to get_elem_size.
484
485 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
486
487 * trans.cc (get_final_proc_ref): New function.
488 (gfc_build_final_call): Outline the pointer evaluation code
489 to get_final_proc_ref.
490
491 2023-07-17 Mikael Morin <mikael@gcc.gnu.org>
492
493 * trans.cc (gfc_build_final_call): Remove commented assertion.
494
495 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
496
497 PR fortran/92178
498 * trans.h (gfc_reset_vptr): Add class_container argument.
499 * trans-expr.cc (gfc_reset_vptr): Ditto. If a valid vptr can
500 be obtained through class_container argument, bypass evaluation
501 of e.
502 (gfc_conv_procedure_call): Wrap the argument evaluation code
503 in a conditional if the associated dummy is optional. Evaluate
504 the data reference to a pointer now, and replace later
505 references with usage of the pointer.
506
507 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
508
509 PR fortran/92178
510 * trans.h (struct gfc_se): New field class_container.
511 (struct gfc_ss_info): Ditto.
512 (gfc_evaluate_data_ref_now): New prototype.
513 * trans.cc (gfc_evaluate_data_ref_now): Implement it.
514 * trans-array.cc (gfc_conv_ss_descriptor): Copy class_container
515 field from gfc_se struct to gfc_ss_info struct.
516 (gfc_conv_expr_descriptor): Copy class_container field from
517 gfc_ss_info struct to gfc_se struct.
518 * trans-expr.cc (gfc_conv_class_to_class): Use class container
519 set in class_container field if available.
520 (gfc_conv_variable): Set class_container field on encountering
521 class variables or components, clear it on encountering
522 non-class components.
523 (gfc_conv_procedure_call): Evaluate data ref to a pointer now,
524 and replace later references by usage of the pointer.
525
526 2023-07-14 Mikael Morin <mikael@gcc.gnu.org>
527
528 PR fortran/92178
529 * trans-expr.cc (gfc_conv_procedure_call): Use a separate gfc_se
530 struct, initalized from parmse, to generate the class wrapper.
531 After the class wrapper code has been generated, copy it back
532 depending on whether parameter deallocation code has been
533 generated.
534
535 2023-07-13 Mikael Morin <mikael@gcc.gnu.org>
536
537 PR fortran/106050
538 * symbol.cc (gfc_restore_last_undo_checkpoint): Release symbols
539 in reverse order.
540
541 2023-07-12 Andre Vehreschild <vehre@gcc.gnu.org>
542
543 PR fortran/102003
544 * expr.cc (find_inquiry_ref): Replace len of pdt_string by
545 constant.
546 (simplify_ref_chain): Ensure input to find_inquiry_ref is
547 NULL.
548 (gfc_match_init_expr): Prevent PDT analysis for function calls.
549 (gfc_pdt_find_component_copy_initializer): Get the initializer
550 value for given component.
551 * gfortran.h (gfc_pdt_find_component_copy_initializer): New
552 function.
553 * simplify.cc (gfc_simplify_len): Replace len() of PDT with pdt
554 component ref or constant.
555
556 2023-07-11 Harald Anlauf <anlauf@gmx.de>
557
558 PR fortran/110288
559 * symbol.cc (gfc_copy_formal_args_intr): When deriving the formal
560 argument attributes from the actual ones for intrinsic procedure
561 calls, take special care of CHARACTER arguments that we do not
562 wrongly treat them formally as deferred-length.
563
564 2023-07-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
565
566 PR fortran/99139
567 PR fortran/99368
568 * match.cc (gfc_match_namelist): Check for host associated or
569 defined types before applying default type.
570 (gfc_match_select_rank): Apply default type to selector of
571 unknown type if possible.
572 * resolve.cc (resolve_fl_variable): Do not apply local default
573 initialization to assumed rank entities.
574
575 2023-07-08 Harald Anlauf <anlauf@gmx.de>
576 Steven G. Kargl <kargl@gcc.gnu.org>
577
578 PR fortran/92178
579 * trans-expr.cc (gfc_conv_procedure_call): Check procedures for
580 allocatable dummy arguments with INTENT(OUT) and move deallocation
581 of actual arguments after evaluation of argument expressions before
582 the procedure is executed.
583
584 2023-07-08 Harald Anlauf <anlauf@gmx.de>
585
586 PR fortran/110585
587 * arith.cc (gfc_compare_expr): Handle equality comparison of constant
588 complex gfc_expr arguments.
589
590 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
591 Juzhe-Zhong <juzhe.zhong@rivai.ai>
592
593 * trans-types.cc (gfc_type_for_mode): Ditto.
594
595 2023-06-28 Harald Anlauf <anlauf@gmx.de>
596
597 PR fortran/110360
598 * trans-expr.cc (gfc_conv_procedure_call): For non-constant string
599 argument passed to CHARACTER(LEN=1),VALUE dummy, ensure proper
600 dereferencing and truncation of string to length 1.
601
602 2023-06-28 Paul Thomas <pault@gcc.gnu.org>
603
604 PR fortran/49213
605 * expr.cc (gfc_is_ptr_fcn): Remove reference to class_pointer.
606 * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow
607 associate names with pointer function targets to be used in
608 variable definition context.
609 * trans-decl.cc (get_symbol_decl): Remove extraneous line.
610 * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Obtain
611 size of intrinsic and character expressions.
612 (gfc_trans_subcomponent_assign): Expand assignment to class
613 components to include intrinsic and character expressions.
614
615 2023-06-24 Harald Anlauf <anlauf@gmx.de>
616
617 PR fortran/110360
618 * trans-expr.cc (gfc_conv_procedure_call): Truncate constant string
619 argument of length > 1 passed to scalar CHARACTER(1),VALUE dummy.
620
621 2023-06-23 Harald Anlauf <anlauf@gmx.de>
622
623 PR fortran/110360
624 * trans-expr.cc (gfc_conv_procedure_call): Pass actual argument
625 to scalar CHARACTER(1),VALUE dummy argument by value.
626
627 2023-06-21 Paul Thomas <pault@gcc.gnu.org>
628
629 PR fortran/87477
630 PR fortran/88688
631 PR fortran/94380
632 PR fortran/107900
633 PR fortran/110224
634 * decl.cc (char_len_param_value): Fix memory leak.
635 (resolve_block_construct): Remove unnecessary static decls.
636 * expr.cc (gfc_is_ptr_fcn): New function.
637 (gfc_check_vardef_context): Use it to permit pointer function
638 result selectors to be used for associate names in variable
639 definition context.
640 * gfortran.h: Prototype for gfc_is_ptr_fcn.
641 * match.cc (build_associate_name): New function.
642 (gfc_match_select_type): Use the new function to replace inline
643 version and to build a new associate name for the case where
644 the supplied associate name is already used for that purpose.
645 * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow
646 associate names with pointer function targets to be used in
647 variable definition context.
648 * trans-decl.cc (gfc_get_symbol_decl): Unlimited polymorphic
649 variables need deferred initialisation of the vptr.
650 (gfc_trans_deferred_vars): Do the vptr initialisation.
651 * trans-stmt.cc (trans_associate_var): Ensure that a pointer
652 associate name points to the target of the selector and not
653 the selector itself.
654
655 2023-06-21 Paul Thomas <pault@gcc.gnu.org>
656
657 PR fortran/108961
658 * trans-expr.cc (gfc_conv_procedure_call): The hidden string
659 length must not be passed to a formal arg of type(cptr).
660
661 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
662
663 * dump-parse-tree.cc (show_omp_namelist): Fix dump of the allocator
664 modifier of OMP_LIST_ALLOCATE.
665
666 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
667
668 * match.cc (gfc_match_char): Match with '%S' a symbol
669 with host_assoc = 1.
670
671 2023-06-19 Tobias Burnus <tobias@codesourcery.com>
672
673 * intrinsic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS): Also
674 add references to the OpenMP 5.1 and 5.2 spec; add omp_initial_device
675 and omp_invalid_device named constants.
676
677 2023-06-13 Harald Anlauf <anlauf@gmx.de>
678 Mikael Morin <mikael@gcc.gnu.org>
679
680 PR fortran/86277
681 * trans-array.cc (gfc_trans_allocate_array_storage): When passing a
682 zero-sized array with fixed (= non-dynamic) size, allocate temporary
683 by the caller, not by the callee.
684
685 2023-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
686
687 * f95-lang.cc (gfc_init_builtin_functions): Add fmax() and
688 fmin() built-ins, and their variants.
689 * mathbuiltins.def: Add FMAX and FMIN built-ins.
690 * trans-intrinsic.cc (conv_intrinsic_ieee_minmax): New function.
691 (gfc_conv_ieee_arithmetic_function): Handle IEEE_MIN_NUM and
692 IEEE_MAX_NUM functions.
693
694 2023-06-09 Jakub Jelinek <jakub@redhat.com>
695
696 PR fortran/96024
697 * primary.cc (gfc_convert_to_structure_constructor): Only do
698 constant string ctor length verification and truncation/padding
699 if constant length has INTEGER type.
700
701 2023-06-08 Paul Thomas <pault@gcc.gnu.org>
702
703 PR fortran/87477
704 PR fortran/99350
705 PR fortran/107821
706 PR fortran/109451
707 * decl.cc (char_len_param_value): Simplify a copy of the expr
708 and replace the original if there is no error.
709 * gfortran.h : Remove the redundant field 'rankguessed' from
710 'gfc_association_list'.
711 * resolve.cc (resolve_assoc_var): Remove refs to 'rankguessed'.
712 (resolve_variable): Associate names with constant or structure
713 constructor targets cannot have array refs.
714 * trans-array.cc (gfc_conv_expr_descriptor): Guard expression
715 character length backend decl before using it. Suppress the
716 assignment if lhs equals rhs.
717 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
718 associate variables pointing to a variable. Add comment.
719 * trans-stmt.cc (trans_associate_var): Remove requirement that
720 the character length be deferred before assigning the value
721 returned by gfc_conv_expr_descriptor. Also, guard the backend
722 decl before testing with VAR_P.
723
724 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
725 Tobias Burnus <tobias@codesourcery.com>
726
727 * dump-parse-tree.cc (show_omp_namelist): Display 'present' map
728 modifier.
729 (show_omp_clauses): Display 'present' motion modifier for 'to'
730 and 'from' clauses.
731 * gfortran.h (enum gfc_omp_map_op): Add entries with 'present'
732 modifiers.
733 (struct gfc_omp_namelist): Add 'present_modifer'.
734 * openmp.cc (gfc_match_motion_var_list): New, handles optional
735 'present' modifier for to/from clauses.
736 (gfc_match_omp_clauses): Call it for to/from clauses; parse 'present'
737 in defaultmap and map clauses.
738 (resolve_omp_clauses): Allow 'present' modifiers on 'target',
739 'target data', 'target enter' and 'target exit' directives.
740 * trans-openmp.cc (gfc_trans_omp_clauses): Apply 'present' modifiers
741 to tree node for 'map', 'to' and 'from' clauses. Apply 'present' for
742 defaultmap.
743
744 2023-06-02 Steve Kargl <kargl@gcc.gnu.org>
745
746 PR fortran/100607
747 * resolve.cc (resolve_select_rank): Remove duplicate error.
748 (resolve_fl_var_and_proc): Prevent NULL pointer dereference and
749 suppress error message for temporary.
750
751 2023-06-02 Paul Thomas <pault@gcc.gnu.org>
752
753 PR fortran/87477
754 * parse.cc (parse_associate): Replace the existing evaluation
755 of the target rank with calls to gfc_resolve_ref and
756 gfc_expression_rank. Identify untyped target function results
757 with structure constructors by finding the appropriate derived
758 type.
759 * resolve.cc (resolve_symbol): Allow associate variables to be
760 assumed shape.
761
762 2023-06-01 Harald Anlauf <anlauf@gmx.de>
763
764 PR fortran/88552
765 * decl.cc (gfc_match_kind_spec): Use error path on missing right
766 parenthesis.
767 (gfc_match_decl_type_spec): Use error return when an error occurred
768 during matching a KIND specifier.
769
770 2023-06-01 Tobias Burnus <tobias@codesourcery.com>
771
772 * parse.cc (decode_omp_directive): Accept all pure directives
773 inside a PURE procedures; handle 'error at(execution).
774
775 2023-05-26 Tobias Burnus <tobias@codesourcery.com>
776
777 * dump-parse-tree.cc (show_omp_namelist): Update allocator, fix
778 align dump.
779 (show_omp_node, show_code_node): Handle EXEC_OMP_ALLOCATE.
780 * gfortran.h (enum gfc_statement): Add ST_OMP_ALLOCATE and ..._EXEC.
781 (enum gfc_exec_op): Add EXEC_OMP_ALLOCATE.
782 (struct gfc_omp_namelist): Add 'allocator' to 'u2' union.
783 (struct gfc_namespace): Add omp_allocate.
784 (gfc_resolve_omp_allocate): New.
785 * match.cc (gfc_free_omp_namelist): Free 'u2.allocator'.
786 * match.h (gfc_match_omp_allocate, gfc_match_omp_allocators): New.
787 * openmp.cc (gfc_omp_directives): Uncomment allocate/allocators.
788 (gfc_match_omp_variable_list): Add bool arg for
789 rejecting listening common-block vars separately.
790 (gfc_match_omp_clauses): Update for u2.allocators.
791 (OMP_ALLOCATORS_CLAUSES, gfc_match_omp_allocate,
792 gfc_match_omp_allocators, is_predefined_allocator,
793 gfc_resolve_omp_allocate): New.
794 (resolve_omp_clauses): Update 'allocate' clause checks.
795 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
796 OMP ALLOCATE/ALLOCATORS.
797 * parse.cc (in_exec_part): New global var.
798 (check_omp_allocate_stmt, parse_openmp_allocate_block): New.
799 (decode_omp_directive, case_exec_markers, case_omp_decl,
800 gfc_ascii_statement, parse_omp_structured_block): Handle
801 OMP allocate/allocators.
802 (verify_st_order, parse_executable): Set in_exec_part.
803 * resolve.cc (gfc_resolve_blocks, resolve_codes): Handle
804 allocate/allocators.
805 * st.cc (gfc_free_statement): Likewise.
806 * trans.cc (trans_code): Likewise.
807 * trans-openmp.cc (gfc_trans_omp_directive): Likewise.
808 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
809 u2.allocator, fix for u.align.
810
811 2023-05-24 Harald Anlauf <anlauf@gmx.de>
812
813 PR fortran/104350
814 * simplify.cc (simplify_size): Reject DIM argument of intrinsic SIZE
815 with error when out of valid range.
816
817 2023-05-24 Harald Anlauf <anlauf@gmx.de>
818
819 PR fortran/103794
820 * check.cc (gfc_check_reshape): Expand constant arguments SHAPE and
821 ORDER before checking.
822 * gfortran.h (gfc_is_constant_array_expr): Add prototype.
823 * iresolve.cc (gfc_resolve_reshape): Expand constant argument SHAPE.
824 * simplify.cc (is_constant_array_expr): If array is determined to be
825 constant, expand small array constructors if needed.
826 (gfc_is_constant_array_expr): Wrapper for is_constant_array_expr.
827 (gfc_simplify_reshape): Fix check for insufficient elements in SOURCE
828 when no padding specified.
829
830 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
831
832 PR fortran/103716
833 * resolve.cc (gfc_resolve_ref): Conversion of array_ref into an
834 element should be done for all characters without a len expr,
835 not just deferred lens, and for integer expressions.
836 * trans-expr.cc (conv_inquiry): For len and kind inquiry refs,
837 set the se string_length to NULL_TREE.
838
839 2023-05-23 Paul Thomas <pault@gcc.gnu.org>
840 Steven G. Kargl <kargl@gcc.gnu.org>
841
842 PR fortran/97122
843 * decl.cc (variable_decl): Clean up white space issues.
844 (gfc_match_final_decl): Declaration of finalizable derived type
845 is allowed in a submodule.
846
847 2023-05-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
848
849 * expr.cc (gfc_get_corank): Use CLASS_DATA from gfortran.h.
850 * resolve.cc (resolve_component): Same.
851 (resolve_fl_derived0): Same.
852 * simplify.cc (gfc_simplify_extends_type_of): Same.
853 (simplify_cobound): Same.
854
855 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
856
857 * trans-array.cc (is_pointer_array): Use _P() defines from tree.h.
858 (gfc_conv_scalarized_array_ref): Ditto.
859 (gfc_conv_array_ref): Ditto.
860 * trans-decl.cc (gfc_finish_decl): Ditto.
861 (gfc_get_symbol_decl): Ditto.
862 * trans-expr.cc (gfc_trans_pointer_assignment): Ditto.
863 (gfc_trans_arrayfunc_assign): Ditto.
864 (gfc_trans_assignment_1): Ditto.
865 * trans-intrinsic.cc (gfc_conv_intrinsic_minmax): Ditto.
866 (conv_intrinsic_ieee_value): Ditto.
867 * trans-io.cc (gfc_convert_array_to_string): Ditto.
868 * trans-openmp.cc (gfc_omp_is_optional_argument): Ditto.
869 (gfc_trans_omp_clauses): Ditto.
870 * trans-stmt.cc (gfc_conv_label_variable): Ditto.
871 * trans.cc (gfc_build_addr_expr): Ditto.
872 (get_array_span): Ditto.
873
874 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
875
876 PR fortran/78798
877 * array.cc (compare_bounds): Use narrower return type.
878 (gfc_compare_array_spec): Likewise.
879 (is_constant_element): Likewise.
880 (gfc_constant_ac): Likewise.
881 * check.cc (dim_rank_check): Likewise.
882 * cpp.cc (gfc_cpp_init_options): Likewise.
883 (dump_macro): Likewise.
884 * cpp.h (gfc_cpp_handle_option): Likewise.
885 * dependency.cc (gfc_ref_needs_temporary_p): Likewise.
886 (gfc_check_argument_dependency): Likewise.
887 (gfc_check_fncall_dependency): Likewise.
888 (ref_same_as_full_array): Likewise.
889 * dependency.h (gfc_check_fncall_dependency): Likewise.
890 (gfc_dep_resolver): Likewise.
891 (gfc_are_equivalenced_arrays): Likewise.
892 * expr.cc (gfc_copy_ref): Likewise.
893 (gfc_kind_max): Likewise.
894 (numeric_type): Likewise.
895 * gfortran.h (gfc_at_end): Likewise.
896 (gfc_at_eof): Likewise.
897 (gfc_at_bol): Likewise.
898 (gfc_at_eol): Likewise.
899 (gfc_define_undef_line): Likewise.
900 (gfc_wide_is_printable): Likewise.
901 (gfc_wide_is_digit): Likewise.
902 (gfc_wide_fits_in_byte): Likewise.
903 (gfc_find_sym_tree): Likewise.
904 (gfc_generic_intrinsic): Likewise.
905 (gfc_specific_intrinsic): Likewise.
906 (gfc_intrinsic_actual_ok): Likewise.
907 (gfc_has_vector_index): Likewise.
908 (gfc_numeric_ts): Likewise.
909 (gfc_impure_variable): Likewise.
910 (gfc_pure): Likewise.
911 (gfc_implicit_pure): Likewise.
912 (gfc_elemental): Likewise.
913 (gfc_pure_function): Likewise.
914 (gfc_implicit_pure_function): Likewise.
915 (gfc_compare_array_spec): Likewise.
916 (gfc_constant_ac): Likewise.
917 (gfc_expanded_ac): Likewise.
918 (gfc_check_digit): Likewise.
919 * intrinsic.cc (gfc_find_subroutine): Likewise.
920 (gfc_generic_intrinsic): Likewise.
921 (gfc_specific_intrinsic): Likewise.
922 * io.cc (compare_to_allowed_values): Likewise. And remove
923 unneeded forward declaration.
924 * parse.cc: Likewise.
925 * parse.h (gfc_check_do_variable): Likewise.
926 * primary.cc (gfc_check_digit): Likewise.
927 * resolve.cc (resolve_structure_cons): Likewise.
928 (pure_stmt_function): Likewise.
929 (gfc_pure_function): Likewise.
930 (impure_stmt_fcn): Likewise.
931 (resolve_forall_iterators): Likewise.
932 (resolve_data): Likewise.
933 (gfc_impure_variable): Likewise.
934 (gfc_pure): Likewise.
935 (gfc_unset_implicit_pure): Likewise.
936 * scanner.cc (wide_is_ascii): Likewise.
937 (gfc_wide_toupper): Likewise.
938 (gfc_open_included_file): Likewise.
939 (gfc_at_end): Likewise.
940 (gfc_at_eof): Likewise.
941 (gfc_at_bol): Likewise.
942 (skip_comment_line): Likewise.
943 (gfc_gobble_whitespace): Likewise.
944 * symbol.cc (gfc_find_symtree_in_proc): Likewise.
945 * trans-array.cc: Likewise.
946 * trans-decl.cc (gfc_set_decl_assembler_name): Likewise.
947 * trans-types.cc (gfc_get_element_type): Likewise.
948 (gfc_add_field_to_struct): Likewise.
949 * trans-types.h (gfc_copy_dt_decls_ifequal): Likewise.
950 (gfc_return_by_reference): Likewise.
951 (gfc_is_nodesc_array): Likewise.
952 * trans.h (gfc_can_put_var_on_stack): Likewise.
953
954 2023-05-17 Harald Anlauf <anlauf@gmx.de>
955
956 PR fortran/95374
957 PR fortran/104352
958 * decl.cc (add_init_expr_to_sym): Set shape of initializer also for
959 zero-sized arrays, so that bounds violations can be detected later.
960
961 2023-05-17 Tobias Burnus <tobias@codesourcery.com>
962
963 * trans-decl.cc (gfc_get_symbol_decl): Add attributes
964 such as 'declare target' also to hidden artificial
965 variable for deferred-length character variables.
966 * trans-openmp.cc (gfc_trans_omp_array_section,
967 gfc_trans_omp_clauses, gfc_trans_omp_target_exit_data):
968 Improve mapping of array descriptors and deferred-length
969 string variables.
970
971 2023-05-16 Paul Thomas <pault@gcc.gnu.org>
972
973 PR fortran/105152
974 PR fortran/100193
975 PR fortran/87496
976 PR fortran/103389
977 PR fortran/104429
978 PR fortran/82774
979 * interface.cc (gfc_compare_actual_formal): Emit an error if an
980 unlimited polymorphic actual is not matched either to an
981 unlimited or assumed type formal argument.
982 * resolve.cc (resolve_ordinary_assign): Emit an error if the
983 var expression of an ordinary assignment is a proc pointer
984 component.
985 * trans-array.cc (gfc_walk_array_ref): Provide assumed shape
986 arrays coming from interface mapping with a viable arrayspec.
987 * trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
988 of unlimited polymorphic 'class_ts'.
989 (gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
990 polymorphic and should accept any actual type.
991 (gfc_conv_procedure_call): Replace dreadful kludge with a call
992 to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
993 by giving it the pointer type of the actual argument.
994 (alloc_scalar_allocatable_subcomponent): Shorten the function
995 name and replace the symbol argument with the se string length.
996 If a deferred length character length is either not present or
997 is not a variable, give the typespec a variable and assign the
998 string length to that. Use gfc_deferred_strlen to find the
999 hidden string length component.
1000 (gfc_trans_subcomponent_assign): Convert the expression before
1001 the call to alloc_scalar_allocatable_subcomponent so that a
1002 good string length is provided.
1003 (gfc_trans_structure_assign): Remove the unneeded derived type
1004 symbol from calls to gfc_trans_subcomponent_assign.
1005
1006 2023-05-15 Harald Anlauf <anlauf@gmx.de>
1007
1008 PR fortran/109846
1009 * expr.cc (gfc_check_vardef_context): Check appropriate pointer
1010 attribute for CLASS vs. non-CLASS function result in variable
1011 definition context.
1012
1013 2023-05-11 Xi Ruoyao <xry111@xry111.site>
1014
1015 * Make-lang.in: Use grep instead of fgrep.
1016
1017 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1018
1019 * dump-parse-tree.cc (gfc_debug_expr): Remove forward declaration.
1020 (debug): Add DEBUG_FUNCTION.
1021 (show_code_node): Remove erroneous whitespace.
1022
1023 2023-05-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1024
1025 PR fortran/109624
1026 * dump-parse-tree.cc (debug): New function for gfc_namespace.
1027 (gfc_debug_code): Delete forward declaration.
1028 (show_attr): Make sure to print balanced braces.
1029
1030 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1031
1032 * resolve.cc (resolve_select_type): Fix coding style.
1033
1034 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1035
1036 * resolve.cc (resolve_select_type): Call free() unconditionally.
1037
1038 2023-05-08 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1039
1040 PR fortran/68800
1041 * expr.cc (find_array_section): Fix mpz memory leak.
1042 * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in
1043 error paths.
1044
1045 2023-05-05 Harald Anlauf <anlauf@gmx.de>
1046
1047 PR fortran/109641
1048 * arith.cc (eval_intrinsic): Check conformability of ranks of operands
1049 for intrinsic binary operators before performing type conversions.
1050 * gfortran.h (gfc_op_rank_conformable): Add prototype.
1051 * resolve.cc (resolve_operator): Check conformability of ranks of
1052 operands for intrinsic binary operators before performing type
1053 conversions.
1054 (gfc_op_rank_conformable): New helper function to compare ranks of
1055 operands of binary operator.
1056
1057 2023-05-04 Julian Brown <julian@codesourcery.com>
1058
1059 PR fortran/109622
1060 * openmp.cc (resolve_omp_clauses): Add diagnostic for
1061 non-pointer/non-allocatable attach/detach.
1062 * trans-openmp.cc (gfc_trans_omp_clauses): Remove dereference for
1063 pointer-to-scalar derived type component attach/detach. Fix
1064 attach/detach handling for descriptors.
1065
1066 2023-04-28 Julian Brown <julian@codesourcery.com>
1067
1068 PR fortran/109622
1069 * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fixes.
1070
1071 2023-04-28 Tobias Burnus <tobias@codesourcery.com>
1072
1073 * gfortran.texi: Fix typos.
1074 * decl.cc: Fix typos in comments and in a variable name.
1075 * arith.cc: Fix comment typos.
1076 * check.cc: Likewise.
1077 * class.cc: Likewise.
1078 * dependency.cc: Likewise.
1079 * expr.cc: Likewise.
1080 * frontend-passes.cc: Likewise.
1081 * gfortran.h: Likewise.
1082 * intrinsic.cc: Likewise.
1083 * iresolve.cc: Likewise.
1084 * match.cc: Likewise.
1085 * module.cc: Likewise.
1086 * primary.cc: Likewise.
1087 * resolve.cc: Likewise.
1088 * simplify.cc: Likewise.
1089 * trans-array.cc: Likewise.
1090 * trans-decl.cc: Likewise.
1091 * trans-expr.cc: Likewise.
1092 * trans-intrinsic.cc: Likewise.
1093 * trans-openmp.cc: Likewise.
1094 * trans-stmt.cc: Likewise.
1095
1096 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
1097
1098 * openmp.cc (gfc_resolve_omp_do_blocks): Handle zero
1099 or more than one exec statements before/after 'omp scan'.
1100 * trans-openmp.cc (gfc_trans_omp_do): Likewise.
1101
1102 2023-04-22 Harald Anlauf <anlauf@gmx.de>
1103 Steven G. Kargl <kargl@gcc.gnu.org>
1104
1105 PR fortran/109500
1106 * interface.cc (gfc_compare_actual_formal): Reject allocatable
1107 functions being used as actual argument for allocable dummy.
1108
1109 2023-04-14 Harald Anlauf <anlauf@gmx.de>
1110
1111 PR fortran/109511
1112 * simplify.cc (gfc_simplify_set_exponent): Fix implementation of
1113 compile-time simplification of intrinsic SET_EXPONENT for argument
1114 X < 1 and for I < 0.
1115
1116 2023-04-14 Paul Thomas <pault@gcc.gnu.org>
1117
1118 PR fortran/104272
1119 * gfortran.h : Add expr3_not_explicit bit field to gfc_code.
1120 * resolve.cc (resolve_allocate_expr): Set bit field when the
1121 default initializer is applied to expr3.
1122 * trans-stmt.cc (gfc_trans_allocate): If expr3_not_explicit is
1123 set, do not deallocate expr3.
1124
1125 2023-04-13 Harald Anlauf <anlauf@gmx.de>
1126
1127 PR fortran/109492
1128 * trans-expr.cc (gfc_conv_power_op): Use absu_hwi and
1129 unsigned HOST_WIDE_INT for portability.
1130
1131 2023-04-12 Harald Anlauf <anlauf@gmx.de>
1132
1133 PR fortran/104312
1134 * resolve.cc (resolve_entries): Handle functions with ENTRY and
1135 ALLOCATABLE results.
1136 * trans-expr.cc (gfc_conv_procedure_call): Functions with a result
1137 with the POINTER or ALLOCATABLE attribute shall not get any special
1138 treatment with -ff2c, as they cannot be written in Fortran 77.
1139 * trans-types.cc (gfc_return_by_reference): Likewise.
1140 (gfc_get_function_type): Likewise.
1141
1142 2023-04-12 Harald Anlauf <anlauf@gmx.de>
1143
1144 PR fortran/61615
1145 PR fortran/99982
1146 * interface.cc (compare_parameter): Enable type and rank checks for
1147 arguments of derived type from the intrinsic module ISO_C_BINDING.
1148
1149 2023-04-08 Paul Thomas <pault@gcc.gnu.org>
1150
1151 PR fortran/87477
1152 * iresolve.cc (gfc_resolve_adjustl, gfc_resolve_adjustr): if
1153 string length is deferred use the string typespec for result.
1154 * resolve.cc (resolve_assoc_var): Handle parentheses around the
1155 target expression.
1156 (resolve_block_construct): Remove unnecessary static decls.
1157 * trans-array.cc (gfc_conv_expr_descriptor): Guard string len
1158 expression in condition. Improve handling of string length and
1159 span, especially for substrings of the descriptor.
1160 (duplicate_allocatable): Make element type more explicit with
1161 'eltype'.
1162 * trans-decl.cc (gfc_get_symbol_decl): Emit a fatal error with
1163 appropriate message instead of ICE if symbol type is unknown.
1164 (gfc_generate_function_code): Set current locus to proc_sym
1165 declared_at.
1166 * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in
1167 'previous' and use if end expression in substring reference is
1168 null.
1169 (gfc_conv_string_length): Use gfc_conv_expr_descriptor if
1170 'expr_flat' is an array. Add post block to catch deallocation
1171 of temporaries.
1172 (gfc_conv_procedure_call): Assign the parmse string length to
1173 the expression string length, if it is deferred.
1174 (gfc_trans_alloc_subarray_assign): If this is a deferred string
1175 length component, store the string length in the hidden comp.
1176 Update the typespec length accordingly. Generate a new type
1177 spec for the call to gfc_duplicate-allocatable in this case.
1178 * trans-io.cc (gfc_trans_transfer): Scalarize transfer of
1179 deferred character array components.
1180
1181 2023-04-04 Harald Anlauf <anlauf@gmx.de>
1182
1183 PR fortran/104349
1184 * expr.cc (check_restricted): Adjust check for valid variables in
1185 restricted expressions: make no exception for module variables.
1186
1187 2023-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1188
1189 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
1190 type name to be "long long".
1191
1192 2023-03-30 Andrew Pinski <apinski@marvell.com>
1193
1194 * dump-parse-tree.cc (get_c_type_name): Fix "long_long"
1195 type name to be "long long". Add a comment on why adding
1196 2 to the name too.
1197
1198 2023-03-28 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR fortran/109314
1201 * openmp.cc (gfc_omp_absent_contains_clause): Fix typo in diagnostics
1202 - composit -> composite.
1203
1204 2023-03-25 Harald Anlauf <anlauf@gmx.de>
1205
1206 PR fortran/104321
1207 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
1208
1209 2023-03-24 Harald Anlauf <anlauf@gmx.de>
1210
1211 * expr.cc (free_expr0): Free also BOZ strings as part of an expression.
1212
1213 2023-03-24 Haochen Gui <guihaoc@gcc.gnu.org>
1214 Tobias Burnus <tobias@codesourcery.com>
1215
1216 PR target/103628
1217 * target-memory.cc (gfc_interpret_float): Return FAIL when
1218 native_interpret_expr gets a NULL tree.
1219 * arith.cc (gfc_hollerith2real): Return NULL when
1220 gfc_interpret_float fails.
1221 * error.cc (gfc_buffered_p): Define.
1222 * gfortran.h (gfc_buffered_p): Declare.
1223 * intrinsic.cc: Add diagnostic.h to include list.
1224 (do_simplify): Save errorcount and check it at finish. Report a
1225 "Cannot simplify expression" error on a bad result if error count
1226 doesn't change and no other errors buffered.
1227
1228 2023-03-22 Harald Anlauf <anlauf@gmx.de>
1229 Steven G. Kargl <kargl@gcc.gnu.org>
1230
1231 PR fortran/104572
1232 * resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
1233 cannot be an alternate return.
1234
1235 2023-03-21 Harald Anlauf <anlauf@gmx.de>
1236
1237 PR fortran/99036
1238 * decl.cc (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
1239 generic module interface.
1240
1241 2023-03-21 Arsen Arsenović <arsen@aarsen.me>
1242
1243 * invoke.texi: Remove usages of @gol.
1244 * intrinsic.texi: Ditto.
1245
1246 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
1247
1248 PR fortran/109206
1249 * trans-array.cc (gfc_trans_array_constructor_value): Correct
1250 incorrect setting of typespec.
1251
1252 2023-03-21 Paul Thomas <pault@gcc.gnu.org>
1253
1254 PR fortran/109209
1255 * resolve.cc (generate_component_assignments): Restore the
1256 exclusion of allocatable components from the loop.
1257
1258 2023-03-20 Harald Anlauf <anlauf@gmx.de>
1259
1260 PR fortran/109216
1261 * invoke.texi: Correct documentation of how underscores are appended
1262 to external names.
1263
1264 2023-03-20 Harald Anlauf <anlauf@gmx.de>
1265
1266 PR fortran/109186
1267 * simplify.cc (gfc_simplify_nearest): Fix off-by-one error in setting
1268 up real kind-specific maximum exponent for mpfr.
1269
1270 2023-03-20 Paul Thomas <pault@gcc.gnu.org>
1271
1272 PR fortran/87127
1273 * resolve.cc (check_host_association): If an external function
1274 is typed but not declared explicitly to be external, change the
1275 old symbol from a variable to an external function.
1276
1277 2023-03-19 Harald Anlauf <anlauf@gmx.de>
1278
1279 PR fortran/85877
1280 * resolve.cc (resolve_fl_procedure): Check for an explicit interface
1281 of procedures with the BIND(C) attribute (F2018:15.4.2.2).
1282
1283 2023-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1284
1285 * gfortran.texi: Mention behavior on overflow.
1286
1287 2023-03-18 Paul Thomas <pault@gcc.gnu.org>
1288
1289 PR fortran/103854
1290 PR fortran/96122
1291 PR fortran/37336
1292 * class.cc (finalize_component): Include the missing arguments
1293 in the call to the component's finalizer wrapper.
1294 (has_finalizer_component): Do not return true for procedure
1295 pointer components.
1296 (finalizer_insert_packed_call): Remove the redundant argument
1297 in the call to the final subroutine.
1298 (generate_finalization_wrapper): Add support for assumed rank
1299 finalizers.
1300 (gfc_may_be_finalized): New helper function.
1301 * dump-parse-tree.cc (write_proc): Whitespace.
1302 * gfortran.h : Add prototype for gfc_may_be_finalized.
1303 * resolve.cc (resolve_function): Correct derived types that
1304 have an incomplete namespace.
1305 (resolve_where, gfc_resolve_where_code_in_forall,
1306 gfc_resolve_forall_body, gfc_resolve_code): Check that the op
1307 code is still EXEC_ASSIGN. If it is set lhs to must finalize.
1308 (is_finalizable_type): New function.
1309 (generate_component_assignments): Set must_finalize if needed.
1310 (gfc_resolve_finalizers): Error if assumed rank finalizer is
1311 not the only one. Warning on lack of scalar finalizer modified
1312 to account for assumed rank finalizers.
1313 (generate_final_call): New function.
1314 (generate_component_assignments): Enclose the outermost call in
1315 a block to capture automatic deallocation and final calls.
1316 Set must_finalize as required to satisfy the standards. Use an
1317 explicit pointer assignment for pointer components to capture
1318 finalization of the target. Likewise use explicit assignment
1319 for allocatable components. Do not use the temporary copy of
1320 the lhs in defined assignment if the component is allocatable.
1321 Put the temporary in the same namespace as the lhs symbol if
1322 the component may be finalized. Remove the leading assignment
1323 from the expansion of assignment of components that have their
1324 own defined assignment components. Suppress finalization of
1325 assignment of temporary components to the lhs. Make an explicit
1326 final call for the rhs function temporary if it exists.
1327 (gfc_resolve_code): Set must_finalize for assignments with an
1328 array constructor on the rhs.
1329 (gfc_resolve_finalizers): Ensure that an assumed rank finalizer
1330 is the only finalizer for that type and correct the surprising
1331 warning for the lack of a scalar finalizer.
1332 (check_defined_assignments): Handle allocatable components.
1333 (resolve_fl_derived): Set referenced the vtab for use
1334 associated symbols.
1335 (resolve_symbol): Set referenced an unreferenced symbol that
1336 will be finalized.
1337 * trans-array.cc (gfc_trans_array_constructor_value): Add code
1338 to finalize the constructor result. Warn that this feature was
1339 removed in F2018 and that it is suppressed by -std=2018.
1340 (trans_array_constructor): Add finalblock, pass to previous
1341 and apply to loop->post if filled.
1342 (gfc_add_loop_ss_code): Add se finalblock to outer loop post.
1343 (gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
1344 generated finalization code to the main block.
1345 (structure_alloc_comps): Add boolean argument to suppress
1346 finalization and use it for calls from
1347 gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
1348 false.
1349 (gfc_copy_alloc_comp_no_fini): New wrapper for
1350 structure_alloc_comps.
1351 (gfc_alloc_allocatable_for_assignment): Suppress finalization
1352 by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
1353 (gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
1354 deallocate the components of entities with a leading '_' in the
1355 name that are also marked as artificial.
1356 * trans-array.h : Add the new boolean argument to the prototype
1357 of gfc_deallocate_alloc_comp_no_caf with a default of false.
1358 Add prototype for gfc_copy_alloc_comp_no_fini.
1359 * trans-decl.cc(init_intent_out_dt): Tidy up the code.
1360 * trans-expr.cc (gfc_init_se): Initialize finalblock.
1361 (gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
1362 finalize function results. Replace in-line block for class
1363 results with call to new function.
1364 (gfc_conv_expr): Finalize structure constructors for F2003 and
1365 F2008. Warn that this feature was deleted in F2018 and, unlike
1366 array constructors, is not default. Add array constructor
1367 finalblock to the post block.
1368 (gfc_trans_scalar_assign): Suppress finalization by setting new
1369 argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
1370 finalization blocks to the main block.
1371 (gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
1372 and ensure that finalization occurs after the evaluation of the
1373 rhs but using the initial value for the lhs. Finalize rhs
1374 function results using gfc_finalize_tree_expr.
1375 (trans_class_assignment, gfc_trans_assignment_1): As previous
1376 function, taking care to order evaluation, assignment and
1377 finalization correctly.
1378 * trans-io.cc (gfc_trans_transfer): Add the final block.
1379 * trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
1380 (trans_associate_var): Nullify derived allocatable components
1381 and finalize function targets with defined assignment
1382 components on leaving the block scope.
1383 (trans_allocate): Finalize source expressions, if required,
1384 and set init_expr artificial temporarily to suppress the
1385 finalization in gfc_trans_assignment.
1386 * trans.cc (gfc_add_finalizer_call): Do not finalize the
1387 temporaries generated in type assignment with defined
1388 assignment components.
1389 (gfc_assignment_finalizer_call): New function.
1390 (gfc_finalize_tree_expr): New function.
1391 * trans.h: Add finalblock to gfc_se. Add the prototypes for
1392 gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
1393
1394 2023-03-15 Harald Anlauf <anlauf@gmx.de>
1395 Tobias Burnus <tobias@codesourcery.com>
1396
1397 PR fortran/58331
1398 * interface.cc (compare_parameter): Adjust check of array dummy
1399 arguments to handle the case of CLASS variables.
1400
1401 2023-03-11 Harald Anlauf <anlauf@gmx.de>
1402
1403 PR fortran/106945
1404 * trans-expr.cc (gfc_copy_class_to_class): Convert element counts in
1405 bounds check to common type for comparison.
1406
1407 2023-03-10 Harald Anlauf <anlauf@gmx.de>
1408
1409 PR fortran/104332
1410 * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
1411 checking a symbol with the BIND(C) attribute.
1412
1413 2023-03-05 Harald Anlauf <anlauf@gmx.de>
1414 Tobias Burnus <tobias@codesourcery.com>
1415
1416 PR fortran/106856
1417 * class.cc (gfc_build_class_symbol): Handle update of attributes of
1418 existing class container.
1419 (gfc_find_derived_vtab): Fix several memory leaks.
1420 (find_intrinsic_vtab): Ditto.
1421 * decl.cc (attr_decl1): Manage update of symbol attributes from
1422 CLASS attributes.
1423 * primary.cc (gfc_variable_attr): OPTIONAL shall not be taken or
1424 updated from the class container.
1425 * symbol.cc (free_old_symbol): Adjust management of symbol versions
1426 to not prematurely free array specs while working on the declation
1427 of CLASS variables.
1428
1429 2023-03-01 Tobias Burnus <tobias@codesourcery.com>
1430
1431 PR middle-end/108546
1432 * trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
1433 type(C_ptr) variables.
1434
1435 2023-02-27 Harald Anlauf <anlauf@gmx.de>
1436
1437 PR fortran/108937
1438 * trans-intrinsic.cc (gfc_conv_intrinsic_ibits): Handle corner case
1439 LEN argument of IBITS equal to BITSIZE(I).
1440
1441 2023-02-25 Mikael Morin <mikael@gcc.gnu.org>
1442
1443 PR fortran/108923
1444 * intrinsic.cc (get_intrinsic_dummy_arg,
1445 set_intrinsic_dummy_arg): Rename the former to the latter.
1446 Remove the return value, add a reference to the lhs as argument,
1447 and do the pointer assignment inside the function. Don't do
1448 it if the pointer is already non-NULL.
1449 (sort_actual): Update caller.
1450
1451 2023-02-25 Harald Anlauf <anlauf@gmx.de>
1452
1453 * arith.cc (gfc_real2int): Clear mpfr variable after use.
1454
1455 2023-02-25 Tobias Burnus <tobias@codesourcery.com>
1456
1457 PR fortran/108621
1458 * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Skip setting of
1459 bounds of CFI desc for 'pointer,intent(out)'.
1460
1461 2023-02-24 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
1462
1463 * trans-decl.cc (gfc_finish_var_decl): Apply attribute.
1464 (generate_local_decl): Add diagnostic for dummy and local variables.
1465
1466 2023-02-24 Mikael Morin <mikael@gcc.gnu.org>
1467
1468 PR fortran/108923
1469 * expr.cc (gfc_free_actual_arglist): Free associated_dummy
1470 memory.
1471 (gfc_copy_actual_arglist): Make a copy of the associated_dummy
1472 field if it is set in the original element.
1473
1474 2023-02-24 Harald Anlauf <anlauf@gmx.de>
1475
1476 PR fortran/108924
1477 * frontend-passes.cc (do_subscript): Clear used gmp variable.
1478
1479 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
1480
1481 * invoke.texi: Reorder index entries around @items.
1482
1483 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
1484
1485 * invoke.texi: Reorder @opindex commands to precede @items they
1486 relate to.
1487
1488 2023-02-22 Harald Anlauf <anlauf@gmx.de>
1489
1490 PR fortran/96024
1491 * resolve.cc (resolve_component): The type of a CHARACTER length
1492 expression must be INTEGER.
1493
1494 2023-02-21 Harald Anlauf <anlauf@gmx.de>
1495
1496 PR fortran/96025
1497 * parse.cc (check_function_result_typed): Improve type check of
1498 specification expression for character length and return status.
1499 (parse_spec): Use status from above.
1500 * resolve.cc (resolve_fntype): Prevent use of invalid specification
1501 expression for character length.
1502
1503 2023-02-16 Patrick Palka <ppalka@redhat.com>
1504
1505 * gfortran.h: Mechanically drop static from static inline
1506 functions via s/^static inline/inline/g.
1507
1508 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
1509
1510 PR fortran/103608
1511 * frontend-passes.cc (do_intent): Catch NULL pointer dereference on
1512 reference to invalid formal argument.
1513
1514 2023-02-15 Steve Kargl <kargl@gcc.gnu.org>
1515
1516 PR fortran/104554
1517 * resolve.cc (check_assumed_size_reference): Avoid NULL pointer
1518 dereference.
1519
1520 2023-02-15 Tobias Burnus <tobias@codesourcery.com>
1521
1522 PR fortran/108512
1523 * openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
1524 directives.
1525 (gfc_resolve_do_iterator): Set a source location for added
1526 'private'-clause arguments.
1527 * resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
1528 also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
1529 combined directives with loop + '{masked,master} taskloop (simd)'.
1530
1531 2023-02-13 Harald Anlauf <anlauf@gmx.de>
1532
1533 PR fortran/103475
1534 * primary.cc (gfc_expr_attr): Avoid NULL pointer dereference for
1535 invalid use of CLASS variable.
1536
1537 2023-02-13 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
1538
1539 * decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
1540 * gfortran.h (ext_attr_id_t): Ditto.
1541 * gfortran.texi (GCC$ ATTRIBUTES): Document them.
1542 * trans-decl.cc (build_function_decl): Apply them.
1543
1544 2023-02-09 Harald Anlauf <anlauf@gmx.de>
1545 Steven G. Kargl <kargl@gcc.gnu.org>
1546
1547 PR fortran/69636
1548 PR fortran/103779
1549 * intrinsic.cc (gfc_convert_chartype): Recover on invalid character
1550 kind in conversion instead of generating an internal error.
1551
1552 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1553
1554 PR fortran/107424
1555 * trans-openmp.cc (struct dovar_init_d): Add 'sym' and
1556 'non_unit_incr' members.
1557 (gfc_nonrect_loop_expr): New.
1558 (gfc_trans_omp_do): Call it; use normal loop bounds
1559 for unit stride - and only create local loop var.
1560
1561 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1562
1563 * parse.cc (decode_omp_directive): Really ignore 'assumes' with
1564 -fopenmp-simd.
1565
1566 2023-02-08 Steve Kargl <kargl@gcc.gnu.org>
1567
1568 PR fortran/103259
1569 * resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
1570 when a symbol's location is not set.
1571
1572 2023-02-07 Harald Anlauf <anlauf@gmx.de>
1573
1574 PR fortran/95107
1575 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
1576 make ASSOCIATE variables TREE_STATIC.
1577
1578 2023-02-05 Harald Anlauf <anlauf@gmx.de>
1579
1580 PR fortran/108592
1581 * arith.cc (gfc_arith_divide): Emit integer division truncation
1582 warnings using gfc_warning instead of gfc_warning_now to prevent
1583 redundant messages.
1584
1585 2023-02-03 Jakub Jelinek <jakub@redhat.com>
1586
1587 PR fortran/108451
1588 * trans-decl.cc (gfc_trans_use_stmts): Call clear_slot before
1589 doing continue.
1590
1591 2023-02-01 Harald Anlauf <anlauf@gmx.de>
1592
1593 PR fortran/108609
1594 * expr.cc (find_array_section): Add check to prevent interpreting an
1595 mpz non-integer constant as an integer.
1596
1597 2023-02-01 Tobias Burnus <tobias@codesourcery.com>
1598
1599 * openmp.cc (resolve_omp_clauses): Check also for
1600 power of two.
1601
1602 2023-01-29 Mikael Morin <mikael@gcc.gnu.org>
1603
1604 PR fortran/108450
1605 * check.cc (gfc_check_minloc_maxloc): Explicitly set argument name.
1606 (gfc_check_findloc): Ditto.
1607
1608 2023-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1609
1610 PR fortran/103506
1611 * parse.cc (parse_module): Remove use of a bool error value
1612 that prevented proper setting of the namespace pointer.
1613
1614 2023-01-28 Harald Anlauf <anlauf@gmx.de>
1615 Steven G. Kargl <kargl@gcc.gnu.org>
1616
1617 PR fortran/108527
1618 * resolve.cc (compare_bound_int): Expression to compare must be of
1619 type INTEGER.
1620 (compare_bound_mpz_t): Likewise.
1621 (check_dimension): Fix comment on checks applied to array section
1622 and clean up associated logic.
1623
1624 2023-01-28 Harald Anlauf <anlauf@gmx.de>
1625
1626 PR fortran/108453
1627 * match.cc (gfc_match_common): A USE associated name shall not appear
1628 in a COMMON block (F2018:C8121).
1629
1630 2023-01-27 Tobias Burnus <tobias@codesourcery.com>
1631
1632 PR fortran/108558
1633 * trans-openmp.cc (gfc_split_omp_clauses): Handle has_device_addr.
1634
1635 2023-01-26 Harald Anlauf <anlauf@gmx.de>
1636
1637 PR fortran/108544
1638 * resolve.cc (check_host_association): Extend host association check
1639 so that it is not restricted to functions. Also prevent NULL pointer
1640 dereference.
1641
1642 2023-01-25 Steve Kargl <kargl@gcc.gnu.org>
1643
1644 PR fortran/108528
1645 * array.cc (compare_bounds): Return false instead of generating an
1646 internal error on an invalid argument type.
1647
1648 2023-01-24 Harald Anlauf <anlauf@gmx.de>
1649
1650 PR fortran/108529
1651 * simplify.cc (simplify_transformation): Do not try to simplify
1652 transformational intrinsic when the ARRAY argument has a NULL shape.
1653
1654 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1655
1656 PR fortran/108502
1657 * dependency.cc (gfc_check_dependency): Prevent NULL pointer
1658 dereference while recursively checking expressions.
1659
1660 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1661
1662 PR fortran/108501
1663 * interface.cc (get_expr_storage_size): Check array subscript triplets
1664 that we actually have integer values before trying to extract with
1665 mpz_get_si.
1666
1667 2023-01-23 Harald Anlauf <anlauf@gmx.de>
1668
1669 PR fortran/108420
1670 * iresolve.cc (check_charlen_present): Preserve character length if
1671 there is no array constructor.
1672
1673 2023-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1674
1675 PR fortran/102595
1676 * data.cc (gfc_assign_data_value): Remove check for PARAMETER in DATA.
1677 * primary.cc (match_variable): Add check for PARAMETER in DATA.
1678
1679 2023-01-19 Harald Anlauf <anlauf@gmx.de>
1680
1681 PR fortran/108434
1682 * expr.cc (class_allocatable): Prevent NULL pointer dereference
1683 or invalid read.
1684 (class_pointer): Likewise.
1685
1686 2023-01-17 Harald Anlauf <anlauf@gmx.de>
1687
1688 PR fortran/108421
1689 * interface.cc (get_expr_storage_size): Check that we actually have
1690 an integer value before trying to extract it with mpz_get_si.
1691
1692 2023-01-12 Tobias Burnus <tobias@codesourcery.com>
1693
1694 PR fortran/107706
1695 * openmp.cc (gfc_resolve_omp_assumptions): Reject nonscalars.
1696
1697 2023-01-11 Jakub Jelinek <jakub@redhat.com>
1698
1699 PR fortran/108349
1700 * f95-lang.cc (gfc_init_builtin_function): Fix up function types
1701 for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
1702
1703 2023-01-10 Harald Anlauf <anlauf@gmx.de>
1704
1705 PR fortran/97345
1706 * frontend-passes.cc (do_subscript): Clear used gmp variables.
1707
1708 2023-01-02 Jakub Jelinek <jakub@redhat.com>
1709
1710 * gfortranspec.cc (lang_specific_driver): Update copyright notice
1711 dates.
1712 * gfc-internals.texi: Bump @copying's copyright year.
1713 * gfortran.texi: Ditto.
1714 * intrinsic.texi: Ditto.
1715 * invoke.texi: Ditto.
1716
1717 \f
1718 Copyright (C) 2023 Free Software Foundation, Inc.
1719
1720 Copying and distribution of this file, with or without modification,
1721 are permitted in any medium without royalty provided the copyright
1722 notice and this notice are preserved.