Debian Codegraph @

gcc/fortran/ChangeLog

raw
1 2026-06-12 Harald Anlauf <[email protected]>
2
3 Backported from master:
4 2026-06-06 Harald Anlauf <[email protected]>
5
6 PR fortran/125606
7 * trans-intrinsic.cc (gfc_conv_intrinsic_loc): When the argument
8 of LOC() is not scalar or known to be simply contiguous, simply
9 take the address of the argument array's first element.
10
11 2026-06-12 Release Manager
12
13 * GCC 15.3.0 released.
14
15 2026-05-21 Thomas Koenig <[email protected]>
16
17 Backported from master:
18 2026-05-20 Thomas Koenig <[email protected]>
19
20 PR fortran/106546
21 * frontend-passes.cc (create_var): Set attr->automatic on
22 new symbol.
23 (create_do_loop): Likewise on iteration variable.
24
25 2026-05-20 Thomas Koenig <[email protected]>
26
27 PR fortran/115260
28 * trans-expr.cc (gfc_conv_subref_array_arg): Pass false to
29 dealloc argument of gfc_trans_scalar_assign if we are
30 converting a g77-style argument.
31
32 2026-05-19 Andre Vehreschild <[email protected]>
33
34 Backported from master:
35 2026-04-29 Andre Vehreschild <[email protected]>
36
37 PR fortran/125021
38 * coarray.cc (check_add_new_comp_handle_array): Prefix internal
39 symbols by two underscores.
40 (create_get_callback): Same.
41 (create_allocated_callback): Same.
42 (create_send_callback): Same.
43
44 2026-05-16 Harald Anlauf <[email protected]>
45
46 Backported from master:
47 2026-05-08 Harald Anlauf <[email protected]>
48
49 PR fortran/111952
50 PR fortran/125059
51 * trans-decl.cc (gfc_finish_var_decl): Remove bogus code forcing
52 a DT variable with DTIO as static.
53 * trans-io.cc (gfc_build_io_library_fndecls): Fix fnspec attribute.
54
55 2026-05-14 Christopher Albert <[email protected]>
56
57 Backported from master:
58 2026-04-08 Christopher Albert <[email protected]>
59
60 PR fortran/96986
61 * resolve.cc (resolve_global_procedure): Move entry symbol
62 lookup outside the resolved != -1 block.
63
64 2026-05-13 Christopher Albert <[email protected]>
65
66 Backported from master:
67 2026-04-10 Christopher Albert <[email protected]>
68
69 PR fortran/94978
70 * frontend-passes.cc (evaluate_loop_bound): New helper.
71 (inner_loop_may_be_skipped): New helper.
72 (do_subscript): Skip outer-loop bound warnings when nested inner loops
73 may be zero-trip for the substituted bound.
74
75 2026-05-13 Paul Thomas <[email protected]>
76
77 Backported from master:
78 2026-03-16 Paul Thomas <[email protected]>
79 Steve Kargl <[email protected]>
80
81 PR fortran/93832
82 * array.cc (resolve_array_bound): Emit error and return false
83 if bound expression is derived type or class.
84 * primary.cc (gfc_convert_to_structure_constructor): Do not
85 dereference NULL in character component test. Define 'shorter'
86 and use it help cure one of several whitespace issues.
87
88 2026-05-13 Christopher Albert <[email protected]>
89
90 Backported from master:
91 2026-04-11 Christopher Albert <[email protected]>
92
93 PR fortran/93814
94 * trans-decl.cc (build_entry_thunks): Create local result buffer
95 and length temporaries for bind(c) CHARACTER entry thunks when the
96 master returns by reference but the thunk returns by value.
97
98 2026-05-12 Christopher Albert <[email protected]>
99
100 Backported from master:
101 2026-04-08 Paul Thomas <[email protected]>
102
103 PR fortran/93715
104 * trans-decl.cc (gfc_trans_deferred_vars): Skip auto array
105 allocation for scalar coarrays.
106
107 2026-05-12 Christopher Albert <[email protected]>
108
109 Backported from master:
110 2026-04-13 Christopher Albert <[email protected]>
111
112 PR fortran/101760
113 PR fortran/102314
114 * trans-openmp.cc (gfc_omp_finish_clause): Compute OMP_CLAUSE_SIZE
115 from the array domain bounds and element size for VLA types instead
116 of using TYPE_SIZE_UNIT directly, to avoid corrupting the type.
117
118 2026-05-12 Christopher Albert <[email protected]>
119
120 Backported from master:
121 2026-04-07 Paul Thomas <[email protected]>
122
123 PR fortran/85352
124 * resolve.cc (specification_expr_symbol): New variable.
125 (entry_dummy_seen_p): Return whether a dummy appears in an already
126 seen ENTRY.
127 (gfc_resolve_formal_arglist): Remember the dummy whose specification
128 expressions are being resolved.
129 (resolve_variable): Accept unresolved sibling ENTRY dummy arguments
130 while resolving the current dummy's specification expressions.
131 (resolve_fl_variable): Preserve specification_expr_symbol.
132 (resolve_symbol_array_spec): Likewise.
133
134 2026-05-09 Christopher Albert <[email protected]>
135
136 Backported from master:
137 2026-04-07 Paul Thomas <[email protected]>
138
139 PR fortran/107425
140 * trans-decl.cc (gfc_finish_var_decl): Check for
141 omp_affinity_iterators namespace before FL_LABEL BLOCK check.
142 Only route actual iterator variables through add_decl_as_local;
143 add other variables to the enclosing function.
144
145 2026-05-08 Christopher Albert <[email protected]>
146
147 Backported from master:
148 2026-04-06 Christopher Albert <[email protected]>
149
150 PR fortran/79524
151 PR fortran/79524
152 * decl.cc (discard_pending_charlens): New helper.
153 (add_init_expr_to_sym): Drop statement-local charlens when
154 rejecting variable-length parameter arrays.
155 (variable_decl, do_parm, enumerator_decl): Save the current
156 namespace charlen list before parsing declarations with
157 initializers.
158 (match_procedure_decl): Adjust call to add_init_expr_to_sym.
159
160 2026-05-06 Christopher Albert <[email protected]>
161
162 Backported from master:
163 2026-04-05 Christopher Albert <[email protected]>
164
165 PR fortran/109788
166 * iresolve.cc (copy_intrinsic_sym): New helper.
167 (gfc_resolve_spread): Copy the intrinsic descriptor before
168 specializing the character formal argument type.
169
170 2026-05-06 Christopher Albert <[email protected]>
171
172 Backported from master:
173 2026-04-07 Christopher Albert <[email protected]>
174
175 PR fortran/102430
176 * openmp.cc (resolve_omp_clauses): Reject array/allocatable LINEAR on
177 worksharing-loop constructs.
178
179 2026-04-17 Paul Thomas <[email protected]>
180
181 Backported from master:
182 2026-04-03 Paul Thomas <[email protected]>
183
184 PR fortran/100155
185 * trans-expr.cc (gfc_add_interface_mapping): 'new_sym' dummy
186 attribute set to zero.
187 (gfc_conv_procedure_call): Deallocate allocatable components of
188 a class argument, enclosed in parentheses,wrap up the parmse
189 and proceed to the next argument.
190
191 2026-04-17 Paul Thomas <[email protected]>
192
193 Backported from master:
194 2026-03-27 Paul Thomas <[email protected]>
195
196 PR fortran/102619
197 * trans-expr.cc (gfc_get_interface_mapping_array): Add argument
198 'assumed_rank_formal', which if true returns the descriptor in
199 'ifm'.
200 (gfc_add_interface_mapping): Detect an assumed rank formal arg
201 of a non-intrinsic function to set 'assumed_rank_formal' and
202 pass the descriptor to gfc_get_interface_mapping_array.
203
204 2026-04-13 Christopher Albert <[email protected]>
205
206 Backported from master:
207 2026-03-30 Christopher Albert <[email protected]>
208
209 * scanner.cc (skip_free_oacc_sentinel): Clear openmp_flag only for
210 fresh OpenACC directive lines.
211 (skip_free_omp_sentinel): Clear openacc_flag only for fresh OpenMP
212 directive lines.
213
214 2026-04-13 Christopher Albert <[email protected]>
215
216 PR fortran/95879
217 PR fortran/95879
218 * parse.cc (fixup_st_func_formals): New function to update
219 statement function formal argument lists referencing a symbol
220 about to be freed.
221 (gfc_fixup_sibling_symbols): Call fixup_st_func_formals before
222 gfc_release_symbol.
223
224 2026-04-06 Harald Anlauf <[email protected]>
225
226 Backported from master:
227 2026-04-04 Harald Anlauf <[email protected]>
228
229 PR fortran/66973
230 * interface.cc (gfc_compare_actual_formal): Check that C_LOC and
231 C_FUNLOC from ISO_C_BINDING as actual argument are passed to a
232 dummy argument of matching type C_PTR/C_FUNPTR.
233
234 2026-04-05 Harald Anlauf <[email protected]>
235
236 Backported from master:
237 2026-04-03 Harald Anlauf <[email protected]>
238
239 PR fortran/124652
240 * trans-expr.cc (gfc_conv_procedure_call): Do not clobber a
241 procedure pointer intent(out) argument.
242 * trans-intrinsic.cc (conv_isocbinding_function): When passing to
243 C_FUNLOC a procedure pointer that is a dummy, dereference it.
244
245 2026-04-05 Kirill Chilikin <[email protected]>
246
247 Backported from master:
248 2026-02-03 Kirill Chilikin <[email protected]>
249
250 PR fortran/117303
251 * trans-intrinsic.cc (conv_isocbinding_function):
252 Assign the reference returned by C_FUNLOC to a variable.
253
254 2026-04-05 Christopher Albert <[email protected]>
255
256 Backported from master:
257 2026-03-20 Christopher Albert <[email protected]>
258
259 PR fortran/120723
260 * trans-openmp.cc (gfc_trans_omp_clauses): Handle bare scalar
261 OpenACC attach/detach clauses without pointer-mapping nodes.
262
263 2026-04-02 Christopher Albert <[email protected]>
264
265 Backported from master:
266 2026-04-02 Christopher Albert <[email protected]>
267 Paul Thomas <[email protected]>
268
269 PR fortran/124751
270 * trans-array.cc (gfc_conv_array_parameter): Build a packed
271 descriptor for assumed-rank actual arguments instead of reusing
272 stale metadata from the original descriptor.
273
274 2026-04-02 Christopher Albert <[email protected]>
275
276 Backported from master:
277 2026-04-01 Christopher Albert <[email protected]>
278
279 PR fortran/100194
280 * trans-expr.cc (gfc_conv_procedure_call): Skip
281 gfc_conv_subref_array_arg for assumed-rank actual arguments
282 (e->rank == -1) when the dummy is contiguous.
283
284 2026-03-31 Harald Anlauf <[email protected]>
285
286 Backported from master:
287 2026-03-25 Harald Anlauf <[email protected]>
288
289 PR fortran/124567
290 * interface.cc (gfc_check_dummy_characteristics): Split shape check
291 into a separate check for rank and a check for shape, taking into
292 account a corner case where the ambiguity between deferred shape
293 and assumed shape has not been fully resolved at the time of
294 checking.
295
296 2026-03-31 Mikael Morin <[email protected]>
297
298 Backported from master:
299 2025-07-31 Mikael Morin <[email protected]>
300
301 PR fortran/121342
302 * trans-expr.cc (gfc_conv_subref_array_arg): Remove offset
303 update.
304 (gfc_conv_procedure_call): For polymorphic functions, move the
305 scalarizer descriptor information...
306 * trans-array.cc (gfc_add_loop_ss_code): ... here, and evaluate
307 the bounds to fresh variables.
308 (get_class_info_from_ss): Remove offset update.
309 (gfc_conv_ss_startstride): Don't set a zero value for function
310 result upper bounds.
311 (late_set_loop_bounds): New.
312 (gfc_conv_loop_setup): If the bounds of a function result have
313 been set, and no other array provided loop bounds for a
314 dimension, use the function result bounds as loop bounds for
315 that dimension.
316 (gfc_set_delta): Don't skip delta setting for polymorphic
317 function results.
318
319 2026-03-31 Mikael Morin <[email protected]>
320
321 Backported from master:
322 2025-06-19 Mikael Morin <[email protected]>
323
324 PR fortran/120713
325 * trans-array.cc (gfc_trans_deferred_array): Statically
326 initialize deferred length variable for SAVEd character arrays.
327
328 2026-03-30 Harald Anlauf <[email protected]>
329
330 Backported from master:
331 2026-03-27 Harald Anlauf <[email protected]>
332
333 PR fortran/124631
334 * simplify.cc (gfc_simplify_eoshift): Initialize sstride[0] to
335 prevent pointer arithmetic with undefined offset. Fix several
336 frontend memleaks.
337
338 2026-03-30 Christopher Albert <[email protected]>
339
340 Backported from master:
341 2026-03-11 Christopher Albert <[email protected]>
342
343 PR fortran/95338
344 * trans-types.cc (gfc_get_entry_result_type): New helper to use the
345 ABI return type for mixed ENTRY union fields.
346 (gfc_get_mixed_entry_union): Use it for each entry result field.
347
348 2026-03-29 Christopher Albert <[email protected]>
349
350 Backported from master:
351 2026-03-13 Christopher Albert <[email protected]>
352
353 PR fortran/102459
354 * trans-openmp.cc (gfc_trans_omp_clauses): Choose the scalar
355 reference path from the full expression rank rather than the first
356 array reference.
357 (gfc_trans_omp_depobj): Likewise.
358
359 2026-03-29 Christopher Albert <[email protected]>
360
361 Backported from master:
362 2026-03-12 Christopher Albert <[email protected]>
363
364 PR fortran/82721
365 * decl.cc (discard_pending_charlen): New helper.
366 (build_sym): Discard unattached CHARACTER length nodes when
367 gfc_add_type rejects the declaration.
368
369 2026-03-28 Paul Thomas <[email protected]>
370
371 Backported from master:
372 2026-03-28 Paul Thomas <[email protected]>
373
374 PR fortran/84245
375 * match.cc (gfc_match_select_type): Free the temporary namespace
376 only on MATCH_NO. Return immediately on MATCH_ERROR.
377
378 2026-03-25 Paul Thomas <[email protected]>
379
380 Backported from master:
381 2026-03-25 Paul Thomas <[email protected]>
382
383 PR fortran/119273
384 * trans-array.cc (expr_contains_impure_fcn): New function.
385 (gfc_expr_contains_impure_fcn): New function calling above fcn.
386 (array_bound_check_elemental): Add indexse pre-block to se pre.
387 Warn if the index expression contains a function not declared
388 to be pure.
389
390 2026-03-25 Paul Thomas <[email protected]>
391
392 Backported from master:
393 2026-03-16 Paul Thomas <[email protected]>
394
395 PR fortran/105168
396 * trans-expr.cc (gfc_conv_class_to_class): If the argument expr
397 is not a class type use the parent tree if that is a class.
398 (gfc_conv_procedure_call): If the argument expression is not a
399 variable, shift the bounds to give unity lbounds.
400 (gfc_trans_arrayfunc_assign): Return NULL_TREE instead of NULL.
401
402 2026-03-20 Mikael Morin <[email protected]>
403
404 Backported from master:
405 2025-09-24 Mikael Morin <[email protected]>
406
407 PR fortran/122046
408 * symbol.cc (gfc_get_procedure_ns): Try to find the namespace
409 among the list of contained namespaces before returning the
410 value from the formal_ns field.
411
412 2026-03-19 Paul Thomas <[email protected]>
413
414 Backported from master:
415 2026-03-19 Paul Thomas <[email protected]>
416
417 PR fortran/124161
418 * resolve.cc (resolve_symbol): Do not apply the default
419 initializer if the symbol is used in a submodule.
420
421 2026-03-18 Christopher Albert <[email protected]>
422
423 Backported from master:
424 2026-03-17 Christopher Albert <[email protected]>
425
426 PR fortran/120286
427 * trans-openmp.cc (gfc_is_class_pointer_type): New helper.
428 (gfc_omp_clause_copy_ctor): Unwrap saved descriptors before
429 deciding whether privatization should preserve only pointer
430 association. Handle scalar class pointers on that path too.
431 (gfc_omp_clause_dtor): Likewise.
432
433 2026-03-16 Christopher Albert <[email protected]>
434
435 Backported from master:
436 2026-03-12 Christopher Albert <[email protected]>
437
438 PR fortran/102596
439 * trans-openmp.cc (gfc_omp_clause_default_ctor): Only require an
440 outer reference when the constructor path actually uses it.
441
442 2026-03-15 Jerry DeLisle <[email protected]>
443
444 PR fortran/106946
445 PR fortran/124482
446 * decl.cc (gfc_match_data_decl): Defer CLASS container cleanup
447 until after all failed components are unlinked. Check remaining
448 component list before freeing a shared container.
449 * gfortran.h (gfc_free_component): Declare.
450 (gfc_delete_symtree): Declare.
451 * symbol.cc (gfc_free_component): New function.
452 (free_components): Use it.
453
454 2026-03-14 Jakub Jelinek <[email protected]>
455
456 Backported from master:
457 2026-03-12 Jakub Jelinek <[email protected]>
458
459 PR fortran/124450
460 * trans-io.cc (transfer_expr): If code is NULL, call
461 transfer_array_component with NULL where argument rather than
462 &code->loc.
463
464 2026-03-14 Jerry DeLisle <[email protected]>
465
466 Backported from master:
467 2026-03-12 Jerry DeLisle <[email protected]>
468 Gilles Gouaillardet <[email protected]>
469
470 PR fortran/121743
471 * trans-decl.cc (build_function_decl): Adjust the
472 gcc_assert condition to avoid the ICE.
473
474 2026-02-14 Harald Anlauf <[email protected]>
475
476 Backported from master:
477 2026-02-08 Harald Anlauf <[email protected]>
478
479 PR fortran/123961
480 * check.cc (array_check): Extend check to class array functions.
481 * class.cc (gfc_add_class_array_ref): Fix NULL pointer dereference.
482
483 2025-12-16 Jerry DeLisle <[email protected]>
484
485 Backported from master:
486 2025-12-11 Jerry DeLisle <[email protected]>
487
488 PR fortran/107406
489 * parse.cc (check_component): Adjust the error check to
490 require a codimension if the allocatable type has
491 a non-coarray LOCK_TYPE component.
492
493 2025-12-09 Harald Anlauf <[email protected]>
494
495 Backported from master:
496 2025-12-05 Harald Anlauf <[email protected]>
497
498 PR fortran/122977
499 * expr.cc (gfc_is_simply_contiguous): For an associate variable
500 check whether the associate target is contiguous.
501 * resolve.cc (resolve_symbol): Skip array type check for an
502 associate variable when the target has the contiguous attribute.
503
504 2025-11-18 Harald Anlauf <[email protected]>
505
506 Backported from master:
507 2025-11-17 Harald Anlauf <[email protected]>
508
509 PR fortran/122709
510 * resolve.cc (resolve_assoc_var): If the associate target is a
511 contiguous pointer, so is the associate variable.
512
513 2025-11-01 Harald Anlauf <[email protected]>
514
515 Backported from master:
516 2025-10-25 Harald Anlauf <[email protected]>
517
518 PR fortran/114023
519 * trans-expr.cc (gfc_trans_pointer_assignment): Always set dtype
520 when remapping a pointer. For unlimited polymorphic LHS use
521 elem_len from RHS.
522 * trans-intrinsic.cc (gfc_conv_is_contiguous_expr): Extend inline
523 generated code for IS_CONTIGUOUS for pointer arguments to detect
524 when span differs from the element size.
525
526 2025-11-01 Harald Anlauf <[email protected]>
527
528 Backported from master:
529 2025-10-24 Harald Anlauf <[email protected]>
530
531 PR fortran/122386
532 * dependency.cc (gfc_ref_needs_temporary_p): Revert r16-518.
533 * trans-intrinsic.cc (gfc_conv_intrinsic_transfer): Force temporary
534 for SOURCE not being a simply-contiguous array.
535
536 2025-10-25 Harald Anlauf <[email protected]>
537
538 Backported from master:
539 2025-10-09 Harald Anlauf <[email protected]>
540
541 PR fortran/122206
542 * trans-types.cc (gfc_get_function_type): Do not clobber an
543 existing procedure interface.
544
545 2025-10-25 Harald Anlauf <[email protected]>
546
547 Backported from master:
548 2025-10-04 Harald Anlauf <[email protected]>
549
550 PR fortran/107968
551 * trans-io.cc (gfc_trans_transfer): Also scalarize I/O of section
552 of an array pointer.
553
554 2025-09-28 Harald Anlauf <[email protected]>
555
556 Backported from master:
557 2025-09-11 Harald Anlauf <[email protected]>
558
559 PR fortran/121616
560 * primary.cc (gfc_variable_attr): Properly set dimension attribute
561 from a component ref.
562
563 2025-09-28 Harald Anlauf <[email protected]>
564
565 Backported from master:
566 2025-09-25 Harald Anlauf <[email protected]>
567
568 PR fortran/121939
569 * trans-types.cc (gfc_init_types): Set string flag for all
570 character types.
571
572 2025-09-28 Harald Anlauf <[email protected]>
573
574 Backported from master:
575 2025-09-21 Harald Anlauf <[email protected]>
576
577 PR fortran/108581
578 * trans-array.cc (gfc_conv_expr_descriptor): Take the dynamic
579 string length into account when deriving the dataptr offset for
580 a deferred-length character array.
581
582 2025-09-23 Paul Thomas <[email protected]>
583
584 Backported from master:
585 2025-08-13 Paul Thomas <[email protected]>
586
587 PR fortran/89092
588 * resolve.cc (was_declared): Add subroutine attribute.
589
590 2025-09-09 Harald Anlauf <[email protected]>
591
592 Backported from master:
593 2025-09-03 Harald Anlauf <[email protected]>
594
595 PR fortran/121263
596 * trans-intrinsic.cc (gfc_conv_intrinsic_transfer): For an
597 unlimited polymorphic SOURCE to TRANSFER use saved descriptor
598 if possible.
599
600 2025-08-08 Release Manager
601
602 * GCC 15.2.0 released.
603
604 2025-07-28 Andre Vehreschild <[email protected]>
605
606 Backported from master:
607 2025-07-21 Andre Vehreschild <[email protected]>
608
609 PR fortran/119106
610 * expr.cc (simplify_constructor): Do not simplify constants.
611 (gfc_simplify_expr): Continue to simplify expression when an
612 iterator is present.
613
614 2025-07-26 Harald Anlauf <[email protected]>
615
616 Backported from master:
617 2025-07-23 Harald Anlauf <[email protected]>
618
619 PR fortran/121203
620 * trans-expr.cc (gfc_conv_procedure_call): Obtain the character
621 length of an assumed character length procedure from the typespec
622 of the actual argument even if there is no explicit interface.
623
624 2025-07-20 Harald Anlauf <[email protected]>
625
626 Backported from master:
627 2025-07-18 Harald Anlauf <[email protected]>
628
629 PR fortran/121145
630 * trans-expr.cc (gfc_conv_procedure_call): Do not create pointer
631 check for proc-pointer actual passed to optional dummy.
632
633 2025-07-16 Paul Thomas <[email protected]>
634
635 Backported from master:
636 2025-07-16 Paul Thomas <[email protected]>
637
638 PR fortran/121060
639 * interface.cc (matching_typebound_op): Defer determination of
640 specific procedure until resolution by returning NULL.
641
642 2025-07-15 Kwok Cheung Yeung <[email protected]>
643
644 Backported from master:
645 2025-07-15 Kwok Cheung Yeung <[email protected]>
646
647 PR fortran/104428
648 * trans-openmp.cc (gfc_trans_omp_declare_variant): Check that proc_st
649 is non-NULL before dereferencing. Add line number to error message.
650
651 2025-07-15 Andre Vehreschild <[email protected]>
652
653 Backported from master:
654 2025-07-08 Andre Vehreschild <[email protected]>
655
656 PR fortran/120637
657 * class.cc (finalize_component): Return true, when a finalizable
658 component was detect and do not free it.
659
660 2025-07-09 Andre Vehreschild <[email protected]>
661
662 Backported from master:
663 2025-07-03 Andre Vehreschild <[email protected]>
664
665 PR fortran/120843
666 * resolve.cc (resolve_operator): Remove conformability check,
667 because it is not in the standard.
668
669 2025-07-08 Andre Vehreschild <[email protected]>
670
671 Backported from master:
672 2025-07-01 Andre Vehreschild <[email protected]>
673
674 PR fortran/120847
675 * coarray.cc (check_add_new_comp_handle_array): Make the count
676 of components static to be able to create more than one. Create
677 an array component only for array expressions.
678
679 2025-07-08 Andre Vehreschild <[email protected]>
680
681 Backported from master:
682 2025-07-01 Andre Vehreschild <[email protected]>
683
684 PR fortran/120843
685 * resolve.cc (resolve_operator): Report inconsistent coranks
686 only when not referencing this_image.
687 (gfc_op_rank_conformable): Treat coranks as inconformable only
688 when a coindex other then implicit this_image is used.
689
690 2025-07-03 Andre Vehreschild <[email protected]>
691
692 Backported from master:
693 2025-06-26 Andre Vehreschild <[email protected]>
694
695 PR fortran/120711
696 * trans-array.cc (gfc_trans_array_ctor_element): Store the value
697 of the offset for reuse.
698
699 2025-06-27 Harald Anlauf <[email protected]>
700
701 Backported from master:
702 2025-06-27 Harald Anlauf <[email protected]>
703
704 PR fortran/120784
705 * interface.cc (gfc_match_end_interface): Detect empty local_name.
706
707 2025-06-26 Harald Anlauf <[email protected]>
708
709 Backported from master:
710 2025-06-23 Harald Anlauf <[email protected]>
711
712 PR fortran/120784
713 * interface.cc (gfc_match_end_interface): If a use-associated
714 symbol is renamed, use the local_name for checking.
715
716 2025-06-25 Paul Thomas <[email protected]>
717
718 Backported from master:
719 2025-05-01 Paul Thomas <[email protected]>
720 and Steven G. Kargl <[email protected]>
721
722 PR fortran/119948
723 * resolve.cc (gfc_impure_variable): The result of a module
724 procedure with an interface declaration is not impure even if
725 the current namespace is not the same as the symbol's.
726 * primary.cc (match_variable): Module procedures with sym the
727 same as result can be treated as variables, although marked
728 external.
729
730 2025-06-18 Harald Anlauf <[email protected]>
731
732 Backported from master:
733 2025-06-16 Harald Anlauf <[email protected]>
734
735 PR fortran/51961
736 * resolve.cc (conformable_arrays): Use modified rank check when
737 MOLD= expression is given.
738
739 2025-06-13 Andre Vehreschild <[email protected]>
740
741 Backported from master:
742 2025-06-13 Andre Vehreschild <[email protected]>
743
744 PR fortran/120483
745 * trans-expr.cc (gfc_conv_substring): Use pointer arithmetic on
746 static allocatable char arrays.
747
748 2025-06-04 Harald Anlauf <[email protected]>
749
750 Backported from master:
751 2025-06-03 Harald Anlauf <[email protected]>
752
753 PR fortran/99838
754 * data.cc (gfc_assign_data_value): For a new initializer use the
755 location from the constructor as fallback.
756
757 2025-06-03 Harald Anlauf <[email protected]>
758
759 Backported from master:
760 2025-05-30 Harald Anlauf <[email protected]>
761
762 PR fortran/102599
763 PR fortran/114022
764 * expr.cc (simplify_complex_array_inquiry_ref): Helper function for
765 simplification of inquiry references (%re/%im) of constant complex
766 arrays.
767 (find_inquiry_ref): Use it for handling %re/%im inquiry references
768 of complex arrays.
769 (scalarize_intrinsic_call): Fix frontend memleak.
770 * primary.cc (gfc_match_varspec): When the reference is NULL, the
771 previous simplification has succeeded in evaluating inquiry
772 references also of arrays.
773
774 2025-06-03 Harald Anlauf <[email protected]>
775
776 Backported from master:
777 2025-05-27 Harald Anlauf <[email protected]>
778
779 PR fortran/101735
780 * primary.cc (gfc_match_varspec): Correct order of logic.
781
782 2025-06-03 Harald Anlauf <[email protected]>
783
784 Backported from master:
785 2025-05-27 Harald Anlauf <[email protected]>
786
787 PR fortran/101735
788 * expr.cc (find_inquiry_ref): If an inquiry reference applies to
789 a substring, use that, and calculate substring length if needed.
790 * primary.cc (extend_ref): Also handle attaching to end of
791 reference chain for appending.
792 (gfc_match_varspec): Discrimate between arrays of character and
793 substrings of them. If a substring is taken from a character
794 component of a derived type, get the proper typespec so that
795 inquiry references work correctly.
796 (gfc_match_rvalue): Handle corner case where we hit a seemingly
797 dangling '%' and missed an inquiry reference. Try another match.
798
799 2025-06-02 Jakub Jelinek <[email protected]>
800
801 Backported from master:
802 2025-05-10 Jakub Jelinek <[email protected]>
803
804 PR fortran/120193
805 * trans-types.cc (gfc_init_types): For flag_unsigned use
806 build_distinct_type_copy or build_variant_type_copy from
807 gfc_character_types[index_char] if index_char > -1 instead of
808 gfc_character_types[index_char] or
809 gfc_build_unsigned_type (&gfc_unsigned_kinds[index]).
810
811 2025-06-02 Jerry DeLisle <[email protected]>
812
813 Backported from master:
814 2025-05-28 Jerry DeLisle <[email protected]>
815
816 PR fortran/119856
817 * io.cc: Set missing comma error checks to STD_STD_LEGACY.
818
819 2025-05-31 Jerry DeLisle <[email protected]>
820
821 Backported from master:
822 2025-05-27 Jerry DeLisle <[email protected]>
823
824 PR fortran/120049
825 * check.cc (gfc_check_c_associated): Use new helper functions.
826 Only call check_c_ptr_1 if optional c_ptr_2 tests succeed.
827 (check_c_ptr_1): Handle only c_ptr_1 checks.
828 (check_c_ptr_2): Expand checks for c_ptr_2 and handle cases
829 where there is no derived pointer in the gfc_expr and check
830 the inmod_sym_id only if it exists. Rephrase error message.
831 * misc.cc (gfc_typename): Handle the case for BT_VOID rather
832 than throw an internal error.
833
834 2025-05-31 Thomas Koenig <[email protected]>
835
836 Backported from master:
837 2025-05-30 Thomas Koenig <[email protected]>
838
839 PR fortran/120355
840 * interface.cc (compare_parameter): If the global function has a
841 result clause, take typespec from there for the comparison against
842 the dummy argument.
843
844 2025-05-22 Harald Anlauf <[email protected]>
845
846 Backported from master:
847 2025-05-15 Harald Anlauf <[email protected]>
848
849 PR fortran/85750
850 * resolve.cc (resolve_symbol): Reorder conditions when to apply
851 default-initializers.
852
853 2025-05-20 Harald Anlauf <[email protected]>
854
855 Backported from master:
856 2025-05-10 Harald Anlauf <[email protected]>
857
858 PR fortran/102891
859 * dependency.cc (gfc_ref_needs_temporary_p): Within an array
860 reference, inquiry references of complex variables generally
861 need a temporary.
862
863 2025-05-19 Tobias Burnus <[email protected]>
864
865 Backported from master:
866 2025-05-15 Tobias Burnus <[email protected]>
867
868 * trans-openmp.cc (gfc_omp_deep_mapping_do): Handle SSA_NAME if
869 a def_stmt is available.
870
871 2025-05-17 Jerry DeLisle <[email protected]>
872
873 Backported from master:
874 2025-05-06 Jerry DeLisle <[email protected]>
875
876 PR fortran/120049
877 * check.cc (gfc_check_c_associated): Modify checks to avoid
878 ICE and allow use, intrinsic :: iso_c_binding from a separate
879 module file.
880
881 2025-05-15 Thomas Koenig <[email protected]>
882
883 Backported from master:
884 2025-05-14 Thomas Koenig <[email protected]>
885
886 PR fortran/120139
887 * dump-parse-tree.cc (get_c_type_name): If no constant
888 size of an array exists, output an asterisk.
889
890 2025-05-15 Thomas Koenig <[email protected]>
891
892 Backported from master:
893 2025-05-14 Thomas Koenig <[email protected]>
894
895 PR fortran/120107
896 * dump-parse-tree.cc (write_type): Do not dump non-interoperable
897 types.
898
899 2025-05-13 Thomas Koenig <[email protected]>
900
901 PR fortran/120163
902 * gfortran.h: Add formal_resolved to gfc_symbol.
903 * resolve.cc (gfc_resolve_formal_arglist): Set it.
904 (resolve_function): Do not call gfc_get_formal_from_actual_arglist
905 if we already resolved a formal arglist.
906 (resolve_call): Likewise.
907
908 2025-05-13 Jakub Jelinek <[email protected]>
909
910 Backported from master:
911 2025-05-13 Jakub Jelinek <[email protected]>
912 Daniil Kochergin <[email protected]>
913 Tobias Burnus <[email protected]>
914
915 PR fortran/120191
916 * trans-intrinsic.cc (strip_kind_from_actual): Remove.
917 (gfc_conv_intrinsic_minmaxloc): Don't call strip_kind_from_actual.
918 Free and clear kind_arg->expr if non-NULL. Set back_arg->name to
919 "%VAL" instead of a loop looking for last argument. Remove actual
920 variable, use array_arg instead. Free and clear dim_arg->expr if
921 non-NULL for BT_CHARACTER cases instead of using a loop.
922
923 2025-05-11 Thomas Koenig <[email protected]>
924
925 PR fortran/119928
926 * interface.cc (gfc_check_dummy_characteristics): Do not issue
927 error if one dummy symbol has been generated from an actual
928 argument and the other one has OPTIONAL, INTENT, ALLOCATABLE,
929 POINTER, TARGET, VALUE, ASYNCHRONOUS or CONTIGUOUS.
930 (gfc_get_formal_from_actual_arglist): Do nothing if symbol
931 is a class.
932
933 2025-05-09 Harald Anlauf <[email protected]>
934
935 Backported from master:
936 2025-05-08 Harald Anlauf <[email protected]>
937
938 PR fortran/120179
939 * match.cc (gfc_match_do): Do not attempt to match end-of-statement
940 twice.
941
942 2025-05-09 Harald Anlauf <[email protected]>
943
944 Backported from master:
945 2025-05-04 Harald Anlauf <[email protected]>
946
947 PR fortran/119986
948 * expr.cc (is_subref_array): When searching for array references,
949 do not terminate early so that inquiry references to complex
950 components work.
951 * primary.cc (gfc_variable_attr): A substring reference can refer
952 to either a scalar or array character variable. Adjust search
953 accordingly.
954
955 2025-05-03 Harald Anlauf <[email protected]>
956
957 Backported from master:
958 2025-04-25 Harald Anlauf <[email protected]>
959
960 PR fortran/102900
961 * trans-decl.cc (gfc_generate_function_code): Use sym->result
962 when generating fake result decl for functions returning
963 allocatable or pointer results.
964 * trans-expr.cc (gfc_conv_procedure_call): When checking the
965 pointer status of an actual argument passed to a non-allocatable,
966 non-pointer dummy which is of type CLASS, do not check the
967 class container of the actual if it is just a procedure pointer.
968 (gfc_trans_pointer_assignment): Fix treatment of assignment to
969 NULL of a procedure pointer.
970
971 2025-04-25 Release Manager
972
973 * GCC 15.1.0 released.
974
975 2025-04-23 Steven G. Kargl <[email protected]>
976
977 Backported from master:
978 2025-04-19 Steven G. Kargl <[email protected]>
979
980 PR fortran/119836
981 * resolve.cc (check_pure_function): Fix checking for
982 an impure subprogram within a DO CONCURRENT construct.
983 (pure_subroutine): Ditto.
984
985 2025-04-16 Harald Anlauf <[email protected]>
986
987 PR fortran/106948
988 * resolve.cc (gfc_pure_function): If a function has been resolved,
989 but esym is not yet set, look at its attributes to see whether it
990 is pure or elemental.
991
992 2025-04-15 Tobias Burnus <[email protected]>
993
994 * f95-lang.cc (LANG_HOOKS_OMP_DEEP_MAPPING,
995 LANG_HOOKS_OMP_DEEP_MAPPING_P, LANG_HOOKS_OMP_DEEP_MAPPING_CNT):
996 Define.
997 * openmp.cc (gfc_match_omp_clause_reduction): Fix location setting.
998 (resolve_omp_clauses): Permit allocatable components, reject
999 them and polymorphic variables in PRIVATE/FIRSTPRIVATE.
1000 * trans-decl.cc (add_clause): Set clause location.
1001 * trans-openmp.cc (gfc_has_alloc_comps): Add ptr_ok and
1002 shallow_alloc_only Boolean arguments.
1003 (gfc_omp_replace_alloc_by_to_mapping): New.
1004 (gfc_omp_private_outer_ref, gfc_walk_alloc_comps,
1005 gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
1006 gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Update call to it.
1007 (gfc_omp_finish_clause): Minor cleanups, improve location data,
1008 handle allocatable components.
1009 (gfc_omp_deep_mapping_map, gfc_omp_deep_mapping_item,
1010 gfc_omp_deep_mapping_comps, gfc_omp_gen_simple_loop,
1011 gfc_omp_get_array_size, gfc_omp_elmental_loop,
1012 gfc_omp_deep_map_kind_p, gfc_omp_deep_mapping_int_p,
1013 gfc_omp_deep_mapping_p, gfc_omp_deep_mapping_do,
1014 gfc_omp_deep_mapping_cnt, gfc_omp_deep_mapping): New.
1015 (gfc_trans_omp_array_section): Save array descriptor in case
1016 deep-mapping lang hook will need it.
1017 (gfc_trans_omp_clauses): Likewise; use better clause location data.
1018 * trans.h (gfc_omp_deep_mapping_p, gfc_omp_deep_mapping_cnt,
1019 gfc_omp_deep_mapping): Add function prototypes.
1020
1021 2025-04-13 Thomas Koenig <[email protected]>
1022
1023 PR fortran/119669
1024 * interface.cc (compare_parameter): Error when mismatch between
1025 formal argument as subroutine and function. If the dummy
1026 argument is a known function, set its typespec.
1027
1028 2025-04-12 Thomas Schwinge <[email protected]>
1029
1030 PR fortran/101602
1031 * trans-stmt.cc (gfc_trans_concurrent_locality_spec): Fix
1032 'static_assert'.
1033
1034 2025-04-09 Harald Anlauf <[email protected]>
1035
1036 PR fortran/119656
1037 * interface.cc (gfc_compare_actual_formal): Fix front-end memleak
1038 when searching for matching interfaces.
1039 * trans-expr.cc (gfc_conv_procedure_call): If there is a formal
1040 dummy corresponding to an absent argument, use its type, and only
1041 fall back to inferred type otherwise.
1042
1043 2025-04-09 Paul Thomas <[email protected]>
1044 and Harald Anlauf <[email protected]>
1045
1046 PR fortran/119460
1047 * iresolve.cc (generate_reduce_op_wrapper): Increase the size
1048 of 'tname'. Change intent of 'a' and 'b' to intent_in.
1049 * trans-decl.cc (add_argument_checking): Do not test artificial
1050 formal symbols.
1051 * trans-expr.cc (gfc_conv_procedure_call): Remove reduce_scalar
1052 and the blocks triggered by it.
1053 * trans-intrinsic.cc (gfc_conv_intrinsic_function): Set the
1054 result of non-character, scalar reduce to be allocatable.
1055
1056 2025-04-09 Tobias Burnus <[email protected]>
1057
1058 PR fortran/101602
1059 * resolve.cc (resolve_locality_spec): Remove 'sorry, unimplemented'.
1060 * trans-stmt.cc (struct symbol_and_tree_t): New.
1061 (gfc_trans_concurrent_locality_spec): New.
1062 (gfc_trans_forall_1): Call it; update to handle local and local_init.
1063 * trans-decl.cc (gfc_start_saved_local_decls,
1064 gfc_stop_saved_local_decls): New; moved code from ...
1065 (gfc_process_block_locals): ... here. Call it.
1066 * trans.h (gfc_start_saved_local_decls,
1067 gfc_stop_saved_local_decls): Declare.
1068
1069 2025-04-02 Sandra Loosemore <[email protected]>
1070
1071 PR middle-end/118965
1072 * openmp.cc (gfc_parser_omp_clause_init_modifiers): Fix some
1073 inconsistent code indentation. Remove code for recognizing
1074 clauses without modifiers. Diagnose prefer_type without a
1075 following paren. Adjust error message for an unrecognized modifier.
1076 Diagnose missing target/targetsync modifier.
1077 (gfc_match_omp_init): Fix more inconsistent code indentation.
1078
1079 2025-03-28 Harald Anlauf <[email protected]>
1080
1081 * check.cc (gfc_invalid_boz): Correct spelling of compiler flag in
1082 hint to -fallow-invalid-boz.
1083
1084 2025-03-26 Harald Anlauf <[email protected]>
1085
1086 PR fortran/118796
1087 * resolve.cc: Do not apply default initialization to a derived-type
1088 function result if the resolved function is use-associated.
1089
1090 2025-03-25 Thomas Koenig <[email protected]>
1091
1092 PR fortran/119419
1093 * dump-parse-tree.cc (write_funptr_fcn): New function.
1094 (write_type): Invoke it for C_FUNPTR.
1095 (write_interop_decl): Do not dump vtabs.
1096
1097 2025-03-25 Sandra Loosemore <[email protected]>
1098 Tobias Burnus <[email protected]>
1099
1100 * trans-openmp.cc (gfc_trans_omp_declare_variant): Remove accidental
1101 redeclaration of pref.
1102
1103 2025-03-22 Jakub Jelinek <[email protected]>
1104
1105 * resolve.cc (resolve_procedure_expression): Remove extraneous space
1106 from the middle of diagnostics.
1107
1108 2025-03-21 Paul-Antoine Arras <[email protected]>
1109 Tobias Burnus <[email protected]>
1110
1111 * trans-openmp.cc (gfc_trans_omp_clauses): Make OMP_CLAUSE_DESTROY and
1112 OMP_CLAUSE_INIT addressable.
1113 * types.def (BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR):
1114 New.
1115
1116 2025-03-21 Jerry DeLisle <[email protected]>
1117
1118 PR fortran/119406
1119 * resolve.cc (resolve_locality_spec): Add space in error
1120 message.
1121
1122 2025-03-21 Jerry DeLisle <[email protected]>
1123
1124 PR fortran/119403
1125 * interface.cc (compare_parameter): Fix typo.
1126
1127 2025-03-21 Paul Thomas <[email protected]>
1128
1129 PR fortran/85836
1130 * check.cc (get_ul_from_cst_cl): New function used in
1131 check_operation.
1132 (check_operation): New function used in check_reduce and
1133 check_co_reduce.
1134 (gfc_check_co_reduce): Use it.
1135 (gfc_check_reduce): New function.
1136 (gfc_check_rename): Add prototype for intrinsic with 6 arguments.
1137 * gfortran.h : Add isym id for reduce and prototype for f6.
1138 * intrinsic.cc (do_check): Add another argument expression and use
1139 it in the call to the six argument specific check.
1140 (add_sym_6): New function.
1141 (add_functions): Add the discription of the reduce intrinsic and
1142 add it to the intrinsic list.
1143 * intrinsic.h : Add prototypes for gfc_check_reduce and
1144 gfc_resolve_reduce.
1145 * iresolve.cc (generate_reduce_op_wrapper): Generate a wrapper
1146 subroutine for the 'operation' function to enable the library
1147 implementation to be type agnostic and use pointer arithmetic
1148 throughout.
1149 (gfc_resolve_reduce): New function.
1150 * trans-expr.cc (gfc_conv_procedure_call): Add flag for scalar
1151 reduce. Generate a return variable 'sr' for scalar reduce, pass its
1152 address to the library function and return it as the scalar result.
1153 * trans-intrinsic.cc (gfc_conv_intrinsic_function): Array valued
1154 reduce is called in same way as reshape. Fall through for call to
1155 the scalar version.
1156
1157 2025-03-21 Andre Vehreschild <[email protected]>
1158
1159 PR fortran/119380
1160 * trans-array.cc (structure_alloc_comps): Prevent freeing of
1161 procedure pointer components.
1162
1163 2025-03-21 Andre Vehreschild <[email protected]>
1164
1165 PR fortran/119349
1166 * trans-expr.cc (gfc_conv_procedure_call): Prevent deallocation
1167 of array temporary for polymorphic temporary argument.
1168
1169 2025-03-19 Harald Anlauf <[email protected]>
1170
1171 PR fortran/116706
1172 * trans-array.cc (gfc_is_reallocatable_lhs): Fix check on
1173 allocatable components of derived type or class objects.
1174
1175 2025-03-19 Andre Vehreschild <[email protected]>
1176
1177 PR fortran/119272
1178 * resolve.cc (resolve_compcall): Postpone error report when
1179 symbol is not resolved yet for component call resolve.
1180
1181 2025-03-18 Harald Anlauf <[email protected]>
1182
1183 PR fortran/119338
1184 * resolve.cc (resolve_allocate_expr): Check F2003:C626: Type-spec
1185 in ALLOCATE of an assumed-length character dummy argument shall be
1186 an asterisk.
1187
1188 2025-03-16 Harald Anlauf <[email protected]>
1189
1190 PR fortran/60560
1191 * expr.cc (gfc_traverse_expr): Do not descend into length type
1192 parameter for negative values of auxiliary parameter f.
1193 * resolve.cc (gfc_find_var_in_expr): New helper function to check
1194 dependence of an expression on given variable.
1195 (resolve_allocate_expr): Use it to determine if array bounds in an
1196 ALLOCATE statement depend explicitly on a variable.
1197
1198 2025-03-15 Tobias Burnus <[email protected]>
1199
1200 PR fortran/115271
1201 * module.cc (mio_omp_declare_simd_clauses): New, moved from ...
1202 (mio_omp_declare_simd): ... here. Update call, write empty '( )'
1203 if there is no declare simd but a declare variant.
1204 (mio_omp_declare_variant): New.
1205 (mio_symbol): Call it.
1206 * openmp.cc (gfc_match_omp_context_selector): Add comment about
1207 module.cc to TODO note.
1208 * trans-stmt.h (gfc_trans_omp_declare_variant): Take additional
1209 parent_ns argument.
1210 * trans-decl.cc (create_function_arglist,
1211 gfc_create_function_decl): Update call.
1212 * trans-openmp.cc (gfc_trans_omp_declare_variant): Take new
1213 argument, add some special case handling for attr.use_assoc.
1214
1215 2025-03-13 Harald Anlauf <[email protected]>
1216
1217 PR fortran/119118
1218 * dependency.cc (contains_forall_index_p): Let loop over elements
1219 of a constructor update its control variable. Handle REF_INQUIRY
1220 in switch statement.
1221 (gfc_contains_implied_index_p): Likewise.
1222
1223 2025-03-12 Andre Vehreschild <[email protected]>
1224
1225 PR fortran/98903
1226 * array.cc (gfc_copy_array_ref): Copy team, team_type and stat.
1227 (match_team_or_stat): Match a single team(_number)= or stat=.
1228 (gfc_match_array_ref): Add switching to image_selector_parsing
1229 and error handling when indices come after named arguments.
1230 * coarray.cc (move_coarray_ref): Move also team_type.
1231 * expr.cc (gfc_free_ref_list): Free team and stat expression.
1232 (gfc_find_team_co): Find team or team_number in array-ref.
1233 * gfortran.h (enum gfc_array_ref_team_type): New enum to
1234 distinguish unset, team or team_number expression.
1235 (gfc_find_team_co): Default searching to team= expressions.
1236 * resolve.cc (resolve_array_ref): Check for type correctness of
1237 team(_number) and stats in coindices.
1238 * trans-array.cc (gfc_conv_array_ref): Ensure stat is cleared
1239 when fcoarray=single is used.
1240 * trans-intrinsic.cc (conv_stat_and_team): Including team_number
1241 in conversion.
1242 (gfc_conv_intrinsic_caf_get): Propagate team_number to ABI
1243 routine.
1244 (conv_caf_send_to_remote): Same.
1245 (conv_caf_sendget): Same.
1246
1247 2025-03-11 Harald Anlauf <[email protected]>
1248
1249 PR fortran/119199
1250 * decl.cc (gfc_match_save): Reject SAVE statement of a COMMON block
1251 when in a BLOCK construct.
1252 * trans-common.cc (translate_common): Avoid NULL pointer dereference.
1253
1254 2025-03-11 Thomas Koenig <[email protected]>
1255
1256 PR fortran/119078
1257 * frontend-passes.cc (check_against_globals): Do not check
1258 for abstract interfaces or dummy arguments.
1259 * resolve.cc (gfc_verify_binding_labels): Adjust comment.
1260 Do not put abstract interfaces or dummy argument into global
1261 namespace.
1262
1263 2025-03-10 Andre Vehreschild <[email protected]>
1264
1265 PR fortran/107143
1266 * dependency.cc (check_data_pointer_types): Do not just compare
1267 for derived type, but for same derived type.
1268
1269 2025-03-09 Thomas Koenig <[email protected]>
1270
1271 PR fortran/119157
1272 * gfortran.h (gfc_pop_undo_symbol): Remove prototype.
1273 * interface.cc (gfc_get_formal_from_actual_arglist): Use
1274 gfc_commit_symbol() instead of gfc_pop_undo_symbol().
1275 * symbol.cc (gfc_pop_undo_symbol): Remove.
1276
1277 2025-03-08 Thomas Koenig <[email protected]>
1278
1279 PR fortran/119157
1280 * gfortran.h (gfc_symbol): Make ext_dummy_arglist_mismatch a
1281 one-bit bitfield
1282 (gfc_pop_undo_symbol): Declare prototype.
1283 * symbol.cc (gfc_pop_undo_symbol): New function.
1284 * interface.cc (gfc_get_formal_from_actual_arglist): Call it
1285 for artificially introduced formal variables.
1286
1287 2025-03-08 Jerry DeLisle <[email protected]>
1288
1289 PR fortran/119054
1290 * resolve.cc (resolve_elemental_actual): When checking other
1291 actual arguments to elemental procedures, don't check
1292 attributes of literals and function calls.
1293
1294 2025-03-06 Harald Anlauf <[email protected]>
1295
1296 PR fortran/119118
1297 * dependency.cc (gfc_contains_implied_index_p): Helper function to
1298 determine if an expression has a dependence on an implied-do index.
1299 * dependency.h (gfc_contains_implied_index_p): Add prototype.
1300 * trans-expr.cc (gfc_conv_substring): Adjust logic to not generate
1301 substring bounds checks before implied-do indices have been
1302 substituted.
1303
1304 2025-03-05 Mark Wielaard <[email protected]>
1305
1306 * lang.opt.urls: Regenerated.
1307
1308 2025-03-05 Andre Vehreschild <[email protected]>
1309
1310 PR fortran/104684
1311 * trans-array.cc (gfc_conv_expr_descriptor): Look at the
1312 lang-specific akind and do a view convert when only the akind
1313 attribute differs between pointer and allocatable array.
1314
1315 2025-03-04 Thomas Koenig <[email protected]>
1316
1317 PR fortran/119049
1318 PR fortran/119074
1319 * dump-parse-tree.cc (seen_conflict): New static varaible.
1320 (gfc_dump_external_c_prototypes): Initialize it. If it was
1321 set, write out a warning that -std=c23 will not work.
1322 (write_proc): Move the work of actually writing out the
1323 formal arglist to...
1324 (write_formal_arglist): New function. Handle external dummy
1325 parameters and their argument lists. If there were mismatched
1326 arguments, output an empty argument list in pre-C23 style.
1327 * gfortran.h (struct gfc_symbol): Add ext_dummy_arglist_mismatch
1328 flag and formal_at.
1329 * invoke.texi: Document -Wexternal-argument-mismatch.
1330 * lang.opt: Put it in.
1331 * resolve.cc (resolve_function): If warning about external
1332 argument mismatches, build a formal from actual arglist the
1333 first time around, and later compare and warn.
1334 (resolve_call): Likewise
1335
1336 2025-03-04 Andre Vehreschild <[email protected]>
1337
1338 PR fortran/103391
1339 * trans-expr.cc (gfc_trans_assignment_1): Do not use poly assign
1340 for pointer arrays on lhs (as it is done for allocatables
1341 already).
1342
1343 2025-03-04 Andre Vehreschild <[email protected]>
1344
1345 PR fortran/77872
1346 * trans-expr.cc (gfc_get_tree_for_caf_expr): Pick up token from
1347 decl when it is present there for class types.
1348
1349 2025-03-04 Andre Vehreschild <[email protected]>
1350
1351 PR fortran/77872
1352 * trans-expr.cc (gfc_conv_procedure_call): Use attr instead of
1353 doing type check and branching for BT_CLASS.
1354
1355 2025-03-03 Harald Anlauf <[email protected]>
1356
1357 PR fortran/101577
1358 * symbol.cc (verify_bind_c_derived_type): Generate error message
1359 for derived type with no components in standard conformance mode,
1360 indicating that this is a GNU extension.
1361
1362 2025-03-03 Andre Vehreschild <[email protected]>
1363
1364 PR fortran/118747
1365 * trans-array.cc (gfc_trans_array_ctor_element): Remove copy to
1366 temporary variable.
1367 * trans-expr.cc (gfc_conv_procedure_call): Use references to
1368 array members instead of copies when freeing after use.
1369 Formatting fix.
1370
1371 2025-03-02 Sandra Loosemore <[email protected]>
1372
1373 * intrinsic.texi: Fix inconsistent capitalization of argument
1374 names and other minor copy-editing.
1375
1376 2025-03-02 Sandra Loosemore <[email protected]>
1377
1378 PR fortran/47928
1379 * intrinsic.texi: Move the "Standard" subheading farther down.
1380
1381 2025-03-02 Sandra Loosemore <[email protected]>
1382
1383 PR fortran/47928
1384 * gfortran.texi: Move all the "Syntax" subheadings ahead of
1385 "Description", and rename to "Synopsis".
1386 * intrinsic.texi: Likewise.
1387
1388 2025-03-02 Sandra Loosemore <[email protected]>
1389
1390 PR fortran/47928
1391 * intrinsic.texi: Put a blank line between "@item @emph{}"
1392 subheadings, but not more than one.
1393
1394 2025-03-02 Sandra Loosemore <[email protected]>
1395
1396 PR fortran/47928
1397 * gfortran.texi: Consistently use "@emph{Notes}:" instead of
1398 other spellings.
1399 * intrinsic.texi: Likewise. Also fix an inconsistent capitalization
1400 and remove a redundant "Standard" entry.
1401
1402 2025-03-01 Harald Anlauf <[email protected]>
1403
1404 * match.cc (gfc_match_nullify): Free matched expression when
1405 cleaning up.
1406 * primary.cc (match_variable): Initialize result to NULL.
1407
1408 2025-02-28 Andre Vehreschild <[email protected]>
1409
1410 PR fortran/118730
1411 * resolve.cc: Mark unused derived type variable with finalizers
1412 referenced to execute finalizer when leaving scope.
1413
1414 2025-02-27 Andre Vehreschild <[email protected]>
1415
1416 PR fortran/118789
1417 * trans-stmt.cc (trans_associate_var): Compare pointed to types when
1418 expr to associate is already a pointer.
1419
1420 2025-02-26 Andre Vehreschild <[email protected]>
1421
1422 PR fortran/108233
1423 * trans-expr.cc (gfc_trans_assignment_1): Remove SAVE_EXPR on lhs.
1424
1425 2025-02-25 Andre Vehreschild <[email protected]>
1426
1427 PR fortran/107635
1428 * coarray.cc (fixup_comp_refs): For class types set correct
1429 component (class) type.
1430 (split_expr_at_caf_ref): Provide location.
1431 * trans-intrinsic.cc (conv_caf_send_to_remote): Look at
1432 generated formal argument and not declared one to detect
1433 descriptor arrays.
1434 (conv_caf_sendget): Same.
1435
1436 2025-02-25 Andre Vehreschild <[email protected]>
1437
1438 PR fortran/107635
1439 * trans-intrinsic.cc (conv_caf_sendget): Use the size of data
1440 transferred between the two images and not the descritor's size.
1441
1442 2025-02-21 Harald Anlauf <[email protected]>
1443
1444 PR fortran/48958
1445 * trans-array.cc (gfc_trans_deferred_array): Initialize the data
1446 component of non-saved pointers when -fcheck=pointer is set.
1447
1448 2025-02-21 Tobias Burnus <[email protected]>
1449
1450 * trans-array.cc (gfc_full_array_size): Obtain the rank from
1451 the array descriptor for assumed rank.
1452 (gfc_tree_array_size): Likewise; permit expr = NULL to operate
1453 only the tree.
1454 (gfc_conv_descriptor_stride_get): Update for added assumed-rank
1455 array types.
1456 * trans-openmp.cc (gfc_omp_finish_clause): Likewise.
1457 * trans-types.cc (gfc_build_array_type, gfc_get_derived_type,
1458 gfc_get_array_descr_info): Likewise.
1459 * trans.h (enum gfc_array_kind): Add
1460 GFC_ARRAY_ASSUMED_RANK_{ALLOCATABLE,POINTER{,_CONT}}.
1461
1462 2025-02-20 Andre Vehreschild <[email protected]>
1463
1464 PR fortran/107635
1465 * gfortran.texi: Remove deprecated functions from documentation.
1466 * trans-decl.cc (gfc_build_builtin_function_decls): Remove
1467 decprecated function decls.
1468 * trans-intrinsic.cc (gfc_conv_intrinsic_exponent): Remove
1469 deprecated/no longer needed routines.
1470 * trans.h: Remove unused decls.
1471
1472 2025-02-20 Andre Vehreschild <[email protected]>
1473
1474 PR fortran/107635
1475 * coarray.cc (rewrite_caf_send): Rewrite to
1476 transfer_between_remotes when both sides of the assignment have
1477 a coarray.
1478 (coindexed_code_callback): Prevent duplicate rewrite.
1479 * gfortran.texi: Add documentation for transfer_between_remotes.
1480 * intrinsic.cc (add_subroutines): Add intrinsic symbol for
1481 caf_sendget to allow easy rewrite to transfer_between_remotes.
1482 * trans-decl.cc (gfc_build_builtin_function_decls): Add
1483 prototype for transfer_between_remotes.
1484 * trans-intrinsic.cc (conv_caf_vector_subscript_elem): Mark as
1485 deprecated.
1486 (conv_caf_vector_subscript): Same.
1487 (compute_component_offset): Same.
1488 (conv_expr_ref_to_caf_ref): Same.
1489 (conv_stat_and_team): Extract stat and team from expr.
1490 (gfc_conv_intrinsic_caf_get): Use conv_stat_and_team.
1491 (conv_caf_send_to_remote): Same.
1492 (has_ref_after_cafref): Mark as deprecated.
1493 (conv_caf_sendget): Translate to transfer_between_remotes.
1494 * trans.h: Add prototype for transfer_between_remotes.
1495
1496 2025-02-20 Andre Vehreschild <[email protected]>
1497
1498 PR fortran/107635
1499 * coarray.cc (move_coarray_ref): Move the coarray reference out
1500 of the given one. Especially when there is a regular array ref.
1501 (fixup_comp_refs): Move components refs to a derived type where
1502 the codim has been removed, aka a new type.
1503 (split_expr_at_caf_ref): Correctly split the reference chain.
1504 (remove_caf_ref): Simplify.
1505 (create_get_callback): Fix some deficiencies.
1506 (create_allocated_callback): Adapt to new signature of split.
1507 (create_send_callback): New function.
1508 (rewrite_caf_send): Rewrite a call to caf_send to
1509 caf_send_to_remote.
1510 (coindexed_code_callback): Treat caf_send and caf_sendget
1511 correctly.
1512 * gfortran.h (enum gfc_isym_id): Add SENDGET-isym.
1513 * gfortran.texi: Add documentation for send_to_remote.
1514 * resolve.cc (gfc_resolve_code): No longer generate send_by_ref
1515 when allocatable coarray (component) is on the lhs.
1516 * trans-decl.cc (gfc_build_builtin_function_decls): Add
1517 caf_send_to_remote decl.
1518 * trans-intrinsic.cc (conv_caf_func_index): Ensure the static
1519 variables created are not in a block-scope.
1520 (conv_caf_send_to_remote): Translate caf_send_to_remote calls.
1521 (conv_caf_send): Renamed to conv_caf_sendget.
1522 (conv_caf_sendget): Renamed from conv_caf_send.
1523 (gfc_conv_intrinsic_subroutine): Branch correctly for
1524 conv_caf_send and sendget.
1525 * trans.h: Correct decl.
1526
1527 2025-02-20 Andre Vehreschild <[email protected]>
1528
1529 PR fortran/107635
1530 * coarray.cc (create_allocated_callback): Add creating remote
1531 side procedure for checking allocation status of coarray.
1532 (rewrite_caf_allocated): Rewrite ALLOCATED on coarray to use caf
1533 routine.
1534 (coindexed_expr_callback): Exempt caf_is_present_on_remote from
1535 being rewritten again.
1536 * gfortran.h (enum gfc_isym_id): Add caf_is_present_on_remote
1537 id.
1538 * gfortran.texi: Add documentation for caf_is_present_on_remote.
1539 * intrinsic.cc (add_functions): Add caf_is_present_on_remote
1540 symbol.
1541 * trans-decl.cc (gfc_build_builtin_function_decls): Define
1542 interface of caf_is_present_on_remote.
1543 * trans-intrinsic.cc (gfc_conv_intrinsic_caf_is_present_remote):
1544 Translate caf_is_present_on_remote.
1545 (trans_caf_is_present): Remove.
1546 (caf_this_image_ref): Remove.
1547 (gfc_conv_allocated): Take out coarray treatment, because that
1548 is rewritten to caf_is_present_on_remote now.
1549 (gfc_conv_intrinsic_function): Handle caf_is_present_on_remote
1550 calls.
1551 * trans.h: Add symbol for caf_is_present_on_remote and remove
1552 old one.
1553
1554 2025-02-20 Andre Vehreschild <[email protected]>
1555
1556 PR fortran/107635
1557 * coarray.cc (get_arrayspec_from_expr): Treat array result of
1558 function calls correctly.
1559 (remove_coarray_from_derived_type): Prevent memory loss.
1560 (add_caf_get_from_remote): Correct locus.
1561 (find_comp): New function to find or create a new component in a
1562 derived type.
1563 (check_add_new_comp_handle_array): Handle allocatable arrays or
1564 non-pure/non-elemental functions in indexes of coarrays.
1565 (check_add_new_component): Use above function.
1566 (create_get_parameter_type): Rename to
1567 create_caf_add_data_parameter_type.
1568 (create_caf_add_data_parameter_type): Renaming of variable and
1569 make the additional data a coarray.
1570 (remove_caf_ref): Factor out to reuse in other caf-functions.
1571 (create_get_callback): Use function factored out, set locus
1572 correctly and ensure a kind is set for parameters.
1573 (add_caf_get_intrinsic): Rename to add_caf_get_from_remote and
1574 rename some variables.
1575 (coindexed_expr_callback): Skip over function created by the
1576 rewriter.
1577 (coindexed_code_callback): Filter some intrinsics not to
1578 process.
1579 (gfc_coarray_rewrite): Rewrite also contained functions.
1580 * trans-intrinsic.cc (gfc_conv_intrinsic_caf_get): Reflect
1581 changed order on caf_get_from_remote ().
1582
1583 2025-02-20 Andre Vehreschild <[email protected]>
1584
1585 PR fortran/107635
1586 * gfortran.texi: Rename caf_get_by_ct to caf_get_from_remote.
1587 * trans-decl.cc (gfc_build_builtin_function_decls): Rename
1588 intrinsic.
1589 * trans-intrinsic.cc (conv_caf_func_index): Factor out
1590 functionality to be reused by other caf-functions.
1591 (conv_caf_add_call_data): Same.
1592 (gfc_conv_intrinsic_caf_get): Use functions factored out.
1593 * trans.h: Rename intrinsic symbol.
1594
1595 2025-02-20 Andre Vehreschild <[email protected]>
1596
1597 PR fortran/107635
1598 * Make-lang.in: Add coarray.cc.
1599 * coarray.cc: New file.
1600 * gfortran.h (gfc_coarray_rewrite): New procedure.
1601 * parse.cc (rewrite_expr_tree): Add entrypoint for rewriting
1602 expression trees.
1603 * resolve.cc (gfc_resolve_ref): Remove caf_lhs handling.
1604 (get_arrayspec_from_expr): Moved to rewrite.cc.
1605 (remove_coarray_from_derived_type): Same.
1606 (convert_coarray_class_to_derived_type): Same.
1607 (split_expr_at_caf_ref): Same.
1608 (check_add_new_component): Same.
1609 (create_get_parameter_type): Same.
1610 (create_get_callback): Same.
1611 (add_caf_get_intrinsic): Same.
1612 (resolve_variable): Remove caf_lhs handling.
1613
1614 2025-02-17 Tobias Burnus <[email protected]>
1615
1616 PR fortran/115271
1617 * gfortran.h (gfc_omp_namelist): Change need_device_ptr to adj_args
1618 union and add more flags.
1619 * openmp.cc (gfc_match_omp_declare_variant,
1620 gfc_resolve_omp_declare): For adjust_args, handle need_device_addr
1621 and numeric values/ranges besides dummy argument names.
1622 (resolve_omp_dispatch): Remove bogus a adjust_args check.
1623 * trans-decl.cc (gfc_handle_omp_declare_variant): New.
1624 (gfc_generate_module_vars, gfc_generate_function_code): Call it.
1625 * trans-openmp.cc (gfc_trans_omp_declare_variant): Handle numeric
1626 values/ranges besides dummy argument names.
1627
1628 2025-02-17 Thomas Koenig <[email protected]>
1629
1630 PR fortran/118862
1631 * trans-expr.cc (gfc_conv_cst_int_power): Use functions for
1632 unsigned wide integer.
1633 (gfc_conv_cst_uint_power): Avoid generating the mask if it would
1634 overflow an unsigned HOST_WIDE_INT. Format fixes.
1635
1636 2025-02-16 Thomas Koenig <[email protected]>
1637
1638 * dump-parse-tree.cc (show_attr): Remove double output
1639 of attr->save.
1640
1641 2025-02-15 Harald Anlauf <[email protected]>
1642
1643 PR fortran/118080
1644 * gfortran.texi: Adjust documentation.
1645 * trans-decl.cc (create_function_arglist): Adjust to pass hidden
1646 presence flag also for derived type dummies with VALUE,OPTIONAL
1647 attribute.
1648 * trans-expr.cc (gfc_conv_expr_present): Expect hidden presence
1649 flag also for derived type dummies with VALUE,OPTIONAL attribute.
1650 (conv_cond_temp): Adjust to allow derived types.
1651 (conv_dummy_value): Extend to handle derived type dummies with
1652 VALUE,OPTIONAL attribute.
1653 (gfc_conv_procedure_call): Adjust for actual arguments passed to
1654 derived type dummies with VALUE,OPTIONAL attribute.
1655 * trans-types.cc (gfc_get_function_type): Adjust fndecl for
1656 hidden presence flag.
1657
1658 2025-02-15 Jerry DeLisle <[email protected]>
1659
1660 PR fortran/117430
1661 * resolve.cc (resolve_transfer): Change gfc_notify_std to
1662 gfc_error.
1663
1664 2025-02-15 Andrew Pinski <[email protected]>
1665
1666 PR fortran/118159
1667 * invoke.texi: Remove mention of defunct web site for Coco.
1668
1669 2025-02-15 Thomas Koenig <[email protected]>
1670
1671 * frontend-passes.cc (check_externals_procedure): Copy
1672 typespec from old to new symbol.
1673
1674 2025-02-13 Thomas Koenig <[email protected]>
1675
1676 PR fortran/118845
1677 * interface.cc (compare_parameter): If the formal attribute has been
1678 generated from an actual argument list, also output an pointer to
1679 there in case of an error.
1680 (gfc_get_formal_from_actual_arglist): Set function and subroutine
1681 attributes and (if it is a function) the typespec from the actual
1682 argument.
1683
1684 2025-02-11 Sandra Loosemore <[email protected]>
1685
1686 * trans-openmp.cc (gfc_trans_omp_declare_variant): Update call to
1687 omp_check_context_selector.
1688 (gfc_trans_omp_metadirective): Likewise.
1689
1690 2025-02-10 Thomas Koenig <[email protected]>
1691
1692 PR fortran/24878
1693 * interface.cc (compare_parameter): Better wording on
1694 error message.
1695
1696 2025-02-10 Harald Anlauf <[email protected]>
1697
1698 PR fortran/56423
1699 * resolve.cc (resolve_structure_cons): Check rank of pointer target;
1700 reject pointer target with vector subscripts.
1701
1702 2025-02-09 Thomas Koenig <[email protected]>
1703
1704 PR fortran/24878
1705 * interface.cc (compare_parameter): Check global subroutines
1706 passed as actual arguments for subroutine / function and
1707 function type.
1708
1709 2025-02-08 Sandra Loosemore <[email protected]>
1710
1711 PR middle-end/107067
1712 * parse.cc (parse_omp_do): Diagnose missing "OMP END METADIRECTIVE"
1713 after loop.
1714 (parse_omp_structured_block): Likewise for strictly structured block.
1715 (parse_omp_metadirective_body): Use better test for variants ending
1716 at different places. Issue a user diagnostic at the end if any
1717 were inconsistent, instead of calling gcc_assert.
1718
1719 2025-02-07 Harald Anlauf <[email protected]>
1720
1721 PR fortran/59252
1722 * trans-expr.cc (gfc_trans_subcomponent_assign): Initialize
1723 allocatable non-deferred character with NULL properly.
1724
1725 2025-02-07 Tomáš Trnka <[email protected]>
1726
1727 PR fortran/116829
1728 * trans-decl.cc (init_intent_out_dt): Always call
1729 gfc_init_default_dt() for BT_DERIVED to apply s->value if the
1730 symbol isn't allocatable. Also simplify the logic a bit.
1731
1732 2025-02-06 Paul Thomas <[email protected]>
1733
1734 PR fortran/118750
1735 * resolve.cc (resolve_assoc_var): If the target expression has
1736 a rank, do not use gfc_expression_rank, since it will return 0
1737 if the function is elemental. Resolution will have produced the
1738 correct rank.
1739
1740 2025-02-05 Tobias Burnus <[email protected]>
1741
1742 PR fortran/118740
1743 * openmp.cc (gfc_match_omp_context_selector, match_omp_metadirective):
1744 Change sorry to sorry_at and use gfc_current_locus as location.
1745 * trans-openmp.cc (gfc_trans_omp_clauses): Likewise, but use n->where.
1746
1747 2025-02-05 Tobias Burnus <[email protected]>
1748
1749 PR fortran/118745
1750 * trans-openmp.cc (gfc_trans_omp_declare_variant): Use
1751 append_args_list in the condition for the append_arg location.
1752
1753 2025-02-05 Jerry DeLisle <[email protected]>
1754
1755 PR fortran/47485
1756 * cpp.cc: fix -MT/-MQ adding additional target instead of
1757 replacing the default.
1758
1759 2025-02-04 Thomas Koenig <[email protected]>
1760
1761 * arith.cc (arith_power): Handle modular arithmetic for
1762 BT_UNSIGNED.
1763 (eval_intrinsic): Error for unsigned exponentiation with
1764 -pedantic.
1765 * expr.cc (gfc_type_convert_binary): Use type of first
1766 argument for unsigned exponentiation.
1767 * gfortran.texi: Mention arithmetic exponentiation.
1768 * resolve.cc (resolve_operator): Allow unsigned exponentiation.
1769 * trans-decl.cc (gfc_build_intrinsic_function_decls): Build
1770 declarations for unsigned exponentiation.
1771 * trans-expr.cc (gfc_conv_cst_uint_power): New function.
1772 (gfc_conv_power_op): Call it. Handle unsigned exponentiation.
1773 * trans.h (gfor_fndecl_unsigned_pow_list): Add declaration.
1774
1775 2025-02-03 Harald Anlauf <[email protected]>
1776
1777 PR fortran/93289
1778 * decl.cc (gfc_set_constant_character_len): Downgrade different
1779 string lengths in character array constructor to legacy extension.
1780
1781 2025-01-31 Harald Anlauf <[email protected]>
1782
1783 PR fortran/108454
1784 * resolve.cc (resolve_common_blocks): Initialize variable.
1785 (resolve_symbol): If a symbol is already registered with a COMMON
1786 block, do not search for an interface with the same name.
1787
1788 2025-01-31 Paul-Antoine Arras <[email protected]>
1789
1790 PR fortran/118714
1791 * parse.cc (parse_omp_dispatch): Add missing pop_state.
1792
1793 2025-01-30 Sandra Loosemore <[email protected]>
1794 Kwok Cheung Yeung <[email protected]>
1795 Sandra Loosemore <[email protected]>
1796 Tobias Burnus <[email protected]>
1797 Paul-Antoine Arras <[email protected]>
1798
1799 PR middle-end/112779
1800 PR middle-end/113904
1801 * decl.cc (gfc_match_end): Handle COMP_OMP_BEGIN_METADIRECTIVE and
1802 COMP_OMP_METADIRECTIVE.
1803 * dump-parse-tree.cc (show_omp_node): Handle EXEC_OMP_METADIRECTIVE.
1804 (show_code_node): Likewise.
1805 * gfortran.h (enum gfc_statement): Add ST_OMP_METADIRECTIVE,
1806 ST_OMP_BEGIN_METADIRECTIVE, and ST_OMP_END_METADIRECTIVE.
1807 (struct gfc_omp_clauses): Rename target_first_st_is_teams to
1808 target_first_st_is_teams_or_meta.
1809 (struct gfc_omp_variant): New.
1810 (gfc_get_omp_variant): New.
1811 (struct gfc_st_label): Add omp_region field.
1812 (enum gfc_exec_op): Add EXEC_OMP_METADIRECTIVE.
1813 (struct gfc_code): Add omp_variants fields.
1814 (gfc_free_omp_variants): Declare.
1815 (match_omp_directive): Declare.
1816 (is_omp_declarative_stmt): Declare.
1817 * io.cc (format_asterisk): Adjust initializer.
1818 * match.h (gfc_match_omp_begin_metadirective): Declare.
1819 (gfc_match_omp_metadirective): Declare.
1820 * openmp.cc (gfc_omp_directives): Uncomment metadirective.
1821 (gfc_match_omp_eos): Adjust to match context selectors.
1822 (gfc_free_omp_variants): New.
1823 (gfc_match_omp_clauses): Remove context_selector parameter and adjust
1824 to use gfc_match_omp_eos instead.
1825 (match_omp): Adjust call to gfc_match_omp_clauses.
1826 (gfc_match_omp_context_selector): Add metadirective_p parameter and
1827 adjust error-checking. Adjust matching of simd clauses.
1828 (gfc_match_omp_context_selector_specification): Adjust parameters
1829 so it can be used for metadirective as well as declare variant.
1830 (match_omp_metadirective): New.
1831 (gfc_match_omp_begin_metadirective): New.
1832 (gfc_match_omp_metadirective): New.
1833 (resolve_omp_metadirective): New.
1834 (resolve_omp_target): Handle metadirectives.
1835 (gfc_resolve_omp_directive): Handle EXEC_OMP_METADIRECTIVE.
1836 * parse.cc (gfc_matching_omp_context_selector): New.
1837 (gfc_in_omp_metadirective_body): New.
1838 (gfc_omp_region_count): New.
1839 (decode_omp_directive): Handle ST_OMP_BEGIN_METADIRECTIVE and
1840 ST_OMP_METADIRECTIVE.
1841 (match_omp_directive): New.
1842 (case_omp_structured_block): Define.
1843 (case_omp_do): Define.
1844 (gfc_ascii_statement): Handle ST_OMP_BEGIN_METADIRECTIVE,
1845 ST_OMP_END_METADIRECTIVE, and ST_OMP_METADIRECTIVE.
1846 (accept_statement): Handle ST_OMP_METADIRECTIVE and
1847 ST_OMP_BEGIN_METADIRECTIVE.
1848 (gfc_omp_end_stmt): New, split from...
1849 (parse_omp_do): ...here, and...
1850 (parse_omp_structured_block): ...here. Handle metadirectives,
1851 plus "allocate", "atomic", and "dispatch" which were missing.
1852 (parse_omp_oacc_atomic): Handle "end metadirective".
1853 (parse_openmp_allocate_block): Likewise.
1854 (parse_omp_dispatch): Likewise.
1855 (parse_omp_metadirective_body): New.
1856 (parse_executable): Handle metadirective. Use new case macros
1857 defined above.
1858 (gfc_parse_file): Initialize metadirective state.
1859 (is_omp_declarative_stmt): New.
1860 * parse.h (enum gfc_compile_state): Add COMP_OMP_METADIRECTIVE
1861 and COMP_OMP_BEGIN_METADIRECTIVE.
1862 (gfc_omp_end_stmt): Declare.
1863 (gfc_matching_omp_context_selector): Declare.
1864 (gfc_in_omp_metadirective_body): Declare.
1865 (gfc_omp_metadirective_region_count): Declare.
1866 * resolve.cc (gfc_resolve_code): Handle EXEC_OMP_METADIRECTIVE.
1867 * st.cc (gfc_free_statement): Likewise.
1868 * symbol.cc (compare_st_labels): Handle labels within a metadirective
1869 body.
1870 (gfc_get_st_label): Likewise.
1871 * trans-decl.cc (gfc_get_label_decl): Encode the metadirective region
1872 in the label_name.
1873 * trans-openmp.cc (gfc_trans_omp_directive): Handle
1874 EXEC_OMP_METADIRECTIVE.
1875 (gfc_trans_omp_set_selector): New, split/adapted from code....
1876 (gfc_trans_omp_declare_variant): ...here.
1877 (gfc_trans_omp_metadirective): New.
1878 * trans-stmt.h (gfc_trans_omp_metadirective): Declare.
1879 * trans.cc (trans_code): Handle EXEC_OMP_METADIRECTIVE.
1880
1881 2025-01-30 Tobias Burnus <[email protected]>
1882
1883 * gfortran.h (gfc_omp_declare_variant): Add append_args_list.
1884 * openmp.cc (gfc_parser_omp_clause_init_modifiers): New;
1885 splitt of from ...
1886 (gfc_match_omp_init): ... here; call it.
1887 (gfc_match_omp_declare_variant): Update to handle append_args
1888 clause; some syntax handling fixes.
1889 * trans-openmp.cc (gfc_trans_omp_declare_variant): Handle
1890 append_args clause; add some diagnostic.
1891
1892 2025-01-29 Harald Anlauf <[email protected]>
1893
1894 PR fortran/118683
1895 * trans-expr.cc (gfc_conv_procedure_call): The bounds update for
1896 passing to assumed-rank dummies shall also handle component
1897 references besides inquiry references.
1898
1899 2025-01-27 Harald Anlauf <[email protected]>
1900
1901 PR fortran/110993
1902 * frontend-passes.cc (check_externals_procedure): Do not compare
1903 interfaces of a non-bind(C) procedure against a bind(C) global one.
1904 (check_against_globals): Use local name from rename-on-use in the
1905 search for interfaces.
1906
1907 2025-01-27 Paul Thomas <[email protected]>
1908
1909 PR fortran/118640
1910 * resolve.cc (generate_component_assignments): Make sure that
1911 the rhs temporary does not pick up the optional attribute from
1912 the lhs.
1913
1914 2025-01-26 Tobias Burnus <[email protected]>
1915
1916 * openmp.cc (gfc_omp_directives): Uncomment unroll and tile lines
1917 as the directives are by now implemented.
1918
1919 2025-01-26 Sandra Loosemore <[email protected]>
1920
1921 * openmp.cc (resolve_omp_atomic): Fix typo in error message.
1922
1923 2025-01-25 Harald Anlauf <[email protected]>
1924
1925 PR fortran/58857
1926 * class.cc (gfc_find_derived_vtab): Declare some frontend generated
1927 variables and procedures (_vtab, _copy, _deallocate) as artificial.
1928 (find_intrinsic_vtab): Likewise.
1929 * trans-decl.cc (check_block_data_decls): New helper function.
1930 (gfc_generate_block_data): Use it to emit warnings for variables
1931 declared in a BLOCK DATA program unit but not in a COMMON block.
1932
1933 2025-01-23 Harald Anlauf <[email protected]>
1934
1935 PR fortran/118613
1936 * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxval): Adjust algorithm
1937 for inlined version of MINLOC and MAXLOC so that arguments are only
1938 evaluted once, and create temporaries where necessary. Document
1939 change of algorithm.
1940
1941 2025-01-23 Paul Thomas <[email protected]>
1942
1943 PR fortran/96087
1944 * trans-decl.cc (gfc_get_symbol_decl): If a dummy is missing a
1945 backend decl, it is likely that it has come from a module proc
1946 interface. Look for the formal symbol by name in the containing
1947 proc and use its backend decl.
1948 * trans-expr.cc (gfc_apply_interface_mapping_to_expr): For the
1949 same reason, match the name, rather than the symbol address to
1950 perform the mapping.
1951
1952 2025-01-20 Harald Anlauf <[email protected]>
1953
1954 PR fortran/107122
1955 * openmp.cc (resolve_omp_clauses): Add 'with' to error message text.
1956
1957 2025-01-20 Harald Anlauf <[email protected]>
1958
1959 PR fortran/81978
1960 * trans-array.cc (gfc_conv_array_parameter): Do not copy back data
1961 if actual array parameter has the PARAMETER attribute.
1962 * trans-expr.cc (gfc_conv_subref_array_arg): Likewise.
1963
1964 2025-01-16 Tobias Burnus <[email protected]>
1965
1966 PR fortran/118321
1967 * trans-openmp.cc (gfc_trans_omp_declare_variant): Honor hidden
1968 arguments for append_arg's need_device_ptr.
1969
1970 2025-01-16 Thomas Koenig <[email protected]>
1971
1972 PR fortran/118359
1973 * dump-parse-tree.cc (show_external_symbol): New function.
1974 (write_type): Add prototype, put in restrictions on what not to dump.
1975 (has_cfi_cdesc): New function.
1976 (need_iso_fortran_binding): New function.
1977 (gfc_dump_c_prototypes): Adjust to take only a file output. Add
1978 "#include <ISO_Fortran_binding.h" if CFI_cdesc_t is found.
1979 Traverse global namespaces to dump types and the globalsymol list
1980 to dump external symbols.
1981 (gfc_dump_external_c_prototypes): Traverse global namespaces.
1982 (get_c_type_name): Handle CFI_cdesc_t.
1983 (write_proc): Also pass array spec to get_c_type_name.
1984 * gfortran.h (gfc_dump_c_prototypes): Adjust prototype.
1985 * parse.cc (gfc_parse_file): Adjust call to gfc_dump_c_prototypes.
1986
1987 2025-01-16 Sandra Loosemore <[email protected]>
1988
1989 * openmp.cc (gfc_omp_absent_contains_clause): Use an Oxford comma
1990 in the message.
1991
1992 2025-01-16 Tobias Burnus <[email protected]>
1993
1994 PR fortran/118441
1995 * trans-intrinsic.cc (gfc_get_symbol_for_expr): Use
1996 gfc_new_charlen for character-returning functions.
1997
1998 2025-01-15 Harald Anlauf <[email protected]>
1999
2000 PR fortran/71884
2001 * resolve.cc (resolve_allocate_expr): Reject intrinsic NULL as
2002 source-expr.
2003
2004 2025-01-14 Sandra Loosemore <[email protected]>
2005 Kwok Cheung Yeung <[email protected]>
2006 Sandra Loosemore <[email protected]>
2007 Marcel Vollweiler <[email protected]>
2008
2009 PR middle-end/114596
2010 PR middle-end/112779
2011 PR middle-end/113904
2012 * trans-openmp.cc (gfc_trans_omp_declare_variant): Update for changes
2013 to omp-general.h interfaces.
2014
2015 2025-01-14 Anuj Mohite <[email protected]>
2016
2017 * dump-parse-tree.cc (show_code_node): Updated to use
2018 c->ext.concur.forall_iterator instead of c->ext.forall_iterator.
2019 * frontend-passes.cc (index_interchange): Updated to
2020 use c->ext.concur.forall_iterator instead of c->ext.forall_iterator.
2021 (gfc_code_walker): Likewise.
2022 * gfortran.h (enum locality_type): Added new enum for locality types
2023 in DO CONCURRENT constructs.
2024 * match.cc (match_simple_forall): Updated to use
2025 new_st.ext.concur.forall_iterator instead of new_st.ext.forall_iterator.
2026 (gfc_match_forall): Likewise.
2027 (gfc_match_do): Implemented support for matching DO CONCURRENT locality
2028 specifiers (LOCAL, LOCAL_INIT, SHARED, DEFAULT(NONE), and REDUCE).
2029 * parse.cc (parse_do_block): Updated to use
2030 new_st.ext.concur.forall_iterator instead of new_st.ext.forall_iterator.
2031 * resolve.cc (struct check_default_none_data): Added struct
2032 check_default_none_data.
2033 (do_concur_locality_specs_f2023): New function to check compliance
2034 with F2023's C1133 constraint for DO CONCURRENT.
2035 (check_default_none_expr): New function to check DEFAULT(NONE)
2036 compliance.
2037 (resolve_locality_spec): New function to resolve locality specs.
2038 (gfc_count_forall_iterators): Updated to use
2039 code->ext.concur.forall_iterator.
2040 (gfc_resolve_forall): Updated to use code->ext.concur.forall_iterator.
2041 * st.cc (gfc_free_statement): Updated to free locality specifications
2042 and use p->ext.concur.forall_iterator.
2043 * trans-stmt.cc (gfc_trans_forall_1): Updated to use
2044 code->ext.concur.forall_iterator.
2045
2046 2025-01-13 Thomas Koenig <[email protected]>
2047
2048 * dump-parse-tree.cc (show_attr): Fix typos for in_equivalence.
2049
2050 2025-01-13 Paul-Antoine Arras <[email protected]>
2051
2052 * openmp.cc (gfc_match_omp_declare_variant): Match comma after directive
2053 name and between clauses. Emit more useful diagnostics.
2054
2055 2025-01-12 Thomas Koenig <[email protected]>
2056
2057 * dump-parse-tree.cc (show_attr): Dump all symbol attributes.
2058
2059 2025-01-12 Harald Anlauf <[email protected]>
2060
2061 PR fortran/115788
2062 * check.cc (gfc_check_out_of_range): Check arguments to intrinsic.
2063 * expr.cc (free_expr0): Fix a memleak with unsigned literals.
2064 * gfortran.h (enum gfc_isym_id): Define GFC_ISYM_OUT_OF_RANGE.
2065 * gfortran.texi: Add OUT_OF_RANGE to list of intrinsics supporting
2066 UNSIGNED.
2067 * intrinsic.cc (add_functions): Add Fortran prototype. Break some
2068 nearby lines with excessive length.
2069 * intrinsic.h (gfc_check_out_of_range): Add prototypes.
2070 * intrinsic.texi: Fortran documentation of OUT_OF_RANGE.
2071 * simplify.cc (gfc_simplify_out_of_range): Compile-time simplification
2072 of OUT_OF_RANGE.
2073 * trans-intrinsic.cc (gfc_conv_intrinsic_out_of_range): Generate
2074 inline expansion of runtime code for OUT_OF_RANGE.
2075 (gfc_conv_intrinsic_function): Use it.
2076
2077 2025-01-12 Thomas Koenig <[email protected]>
2078
2079 PR fortran/118432
2080 * frontend-passes.cc (doloop_code): Select correct member
2081 of co->ext.union for inquire.
2082
2083 2025-01-11 Tobias Burnus <[email protected]>
2084
2085 * gfortran.h: Add OMP_LIST_INTEROP to the unnamed OMP_LIST_ enum.
2086 * openmp.cc (gfc_match_omp_variable_list): Add reverse_order
2087 boolean argument, defaulting to false.
2088 (enum omp_mask2, OMP_DISPATCH_CLAUSES): Add OMP_CLAUSE_INTEROP.
2089 (gfc_match_omp_clauses, resolve_omp_clauses): Handle dispatch's
2090 'interop' clause.
2091 * trans-decl.cc (gfc_get_extern_function_decl): Use sym->declared_at
2092 instead input_location as DECL_SOURCE_LOCATION.
2093 * trans-openmp.cc (gfc_trans_omp_clauses): Handle OMP_LIST_INTEROP.
2094
2095 2025-01-11 Paul Thomas <[email protected]>
2096
2097 PR fortran/108434
2098 * class.cc (generate_finalization_wrapper): To avoid memory
2099 leaks from callocs, return immediately if the derived type
2100 error flag is set.
2101 * decl.cc (build_struct): If the declaration of a derived type
2102 or class component does not have a deferred arrayspec, correct,
2103 set the error flag of the derived type and emit an immediate
2104 error.
2105
2106 2025-01-10 Jakub Jelinek <[email protected]>
2107
2108 PR fortran/118337
2109 * module.cc (use_iso_fortran_env_module): Add a comment explaining
2110 the optimization performed. Add gcc_checking_assert that i was
2111 incremented for all the elements. Formatting fix.
2112
2113 2025-01-09 Andre Vehreschild <[email protected]>
2114
2115 PR fortran/118337
2116 * resolve.cc (resolve_fl_derived0): Exempt vtypes from cycle
2117 detection.
2118
2119 2025-01-09 Jakub Jelinek <[email protected]>
2120
2121 PR fortran/118337
2122 * module.cc (COMPAT_MOD_VERSIONS): Define.
2123 (use_iso_fortran_env_module): Don't assume all NAMED_INTCSTs come
2124 first followed by NAMED_UINTCSTs.
2125 (gfc_use_module): Accept also COMPAT_MOD_VERSIONS for compatibility.
2126 * iso-c-binding.def: Reorder entries so that the GCC 14 ones come
2127 before the ones new in GCC 15.
2128 * iso-fortran-env.def: Likewise.
2129
2130 2025-01-09 Tobias Burnus <[email protected]>
2131
2132 * types.def (BT_FN_PTRMODE_PTR_INT_PTR): Add.
2133
2134 2025-01-08 Jakub Jelinek <[email protected]>
2135
2136 PR fortran/118337
2137 * module.cc (MOD_VERSION): Bump to "16".
2138
2139 2025-01-07 Thomas Koenig <[email protected]>
2140
2141 * intrinsic.texi (ISO_FORTRAN_ENV): Also mention INT8 in the
2142 text. Document UINT8, UINT16, UINT32 and UINT64.
2143 (ISO_C_BINDING): New table for unsigned KIND numbers.
2144
2145 2025-01-07 Andre Vehreschild <[email protected]>
2146
2147 PR fortran/114612
2148 * trans-array.cc (structure_alloc_comps): Ensure deep copy is
2149 also done for types having cycles.
2150
2151 2025-01-07 Andre Vehreschild <[email protected]>
2152
2153 PR fortran/116669
2154 * class.cc (gfc_find_derived_vtab): Use attr to determine cyclic
2155 type dependendies.
2156 * expr.cc (gfc_has_default_initializer): Prevent endless
2157 recursion by storing already visited derived types.
2158 * resolve.cc (resolve_cyclic_derived_type): Determine if a type
2159 is used in its hierarchy in a cyclic way.
2160 (resolve_fl_derived0): Call resolve_cyclic_derived_type.
2161 (resolve_fl_derived): Ensure vtab is generated when cyclic
2162 derived types have allocatable components.
2163 * trans-array.cc (structure_alloc_comps): Prevent endless loop
2164 for derived type cycles.
2165 * trans-expr.cc (gfc_get_ultimate_alloc_ptr_comps_caf_token):
2166 Off topic, just prevent memory leaks.
2167
2168 2025-01-03 Thomas Koenig <[email protected]>
2169
2170 * gfortran.texi: New subsection "Generating C prototypes from
2171 Fortran".
2172
2173 2025-01-03 Harald Anlauf <[email protected]>
2174
2175 PR fortran/106692
2176 * trans-expr.cc (gfc_conv_expr_op): Inhibit excessive optimization
2177 of Cray pointers by treating them as volatile in comparisons.
2178
2179 2025-01-03 Sandra Loosemore <[email protected]>
2180
2181 * intrinsic.texi (ATAN): Add missing verb.
2182
2183 2025-01-02 Tobias Burnus <[email protected]>
2184
2185 * openmp.cc (OMP_DISPATCH_CLAUSES): Add OMP_CLAUSE_HAS_DEVICE_ADDR.
2186
2187 2025-01-02 Paul-Antoine Arras <[email protected]>
2188
2189 * dump-parse-tree.cc (show_omp_clauses): Handle novariants and nocontext
2190 clauses.
2191 (show_omp_node): Handle EXEC_OMP_DISPATCH.
2192 (show_code_node): Likewise.
2193 * frontend-passes.cc (gfc_code_walker): Handle novariants and nocontext.
2194 * gfortran.h (enum gfc_statement): Add ST_OMP_DISPATCH.
2195 (symbol_attribute): Add omp_declare_variant_need_device_ptr.
2196 (gfc_omp_clauses): Add novariants and nocontext.
2197 (gfc_omp_declare_variant): Add need_device_ptr_arg_list.
2198 (enum gfc_exec_op): Add EXEC_OMP_DISPATCH.
2199 * match.h (gfc_match_omp_dispatch): Declare.
2200 * openmp.cc (gfc_free_omp_clauses): Free novariants and nocontext
2201 clauses.
2202 (gfc_free_omp_declare_variant_list): Free need_device_ptr_arg_list
2203 namelist.
2204 (enum omp_mask2): Add OMP_CLAUSE_NOVARIANTS and OMP_CLAUSE_NOCONTEXT.
2205 (gfc_match_omp_clauses): Handle OMP_CLAUSE_NOVARIANTS and
2206 OMP_CLAUSE_NOCONTEXT.
2207 (OMP_DISPATCH_CLAUSES): Define.
2208 (gfc_match_omp_dispatch): New function.
2209 (gfc_match_omp_declare_variant): Parse adjust_args.
2210 (resolve_omp_clauses): Handle adjust_args, novariants and nocontext.
2211 Adjust handling of OMP_LIST_IS_DEVICE_PTR.
2212 (icode_code_error_callback): Handle EXEC_OMP_DISPATCH.
2213 (omp_code_to_statement): Likewise.
2214 (resolve_omp_dispatch): New function.
2215 (gfc_resolve_omp_directive): Handle EXEC_OMP_DISPATCH.
2216 * parse.cc (decode_omp_directive): Match dispatch.
2217 (next_statement): Handle ST_OMP_DISPATCH.
2218 (gfc_ascii_statement): Likewise.
2219 (parse_omp_dispatch): New function.
2220 (parse_executable): Handle ST_OMP_DISPATCH.
2221 * resolve.cc (gfc_resolve_blocks): Handle EXEC_OMP_DISPATCH.
2222 * st.cc (gfc_free_statement): Likewise.
2223 * trans-decl.cc (create_function_arglist): Declare.
2224 (gfc_get_extern_function_decl): Call it.
2225 * trans-openmp.cc (gfc_trans_omp_clauses): Handle novariants and
2226 nocontext.
2227 (replace_omp_dispatch_call): New function.
2228 (gfc_trans_omp_dispatch): New function.
2229 (gfc_trans_omp_directive): Handle EXEC_OMP_DISPATCH.
2230 (gfc_trans_omp_declare_variant): Handle adjust_args.
2231 * trans.cc (trans_code): Handle EXEC_OMP_DISPATCH:.
2232
2233 2025-01-02 Jakub Jelinek <[email protected]>
2234
2235 * gfortranspec.cc (lang_specific_driver): Update copyright notice
2236 dates.
2237 * gfc-internals.texi: Bump @copying's copyright year.
2238 * gfortran.texi: Ditto.
2239 * intrinsic.texi: Ditto.
2240 * invoke.texi: Ditto.
2241
2242 2025-01-01 Sandra Loosemore <[email protected]>
2243
2244 * gfortran.texi (Function ABI Documentation): Make menu ordering
2245 consistent with subsection ordering.
2246
2247 2025-01-01 Sandra Loosemore <[email protected]>
2248
2249 * gfortran.texi: Clean up that/which usage throughout the file.
2250 * intrinsic.texi: Likewise.
2251 * invoke.texi: Likewise.
2252
2253 2025-01-01 Sandra Loosemore <[email protected]>
2254
2255 * intrinsic.texi: Grammar and markup fixes throughout
2256 the file.
2257
2258 Copyright (C) 2025 Free Software Foundation, Inc.
2259
2260 Copying and distribution of this file, with or without modification,
2261 are permitted in any medium without royalty provided the copyright
2262 notice and this notice are preserved.