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