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