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