aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/ChangeLog
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/ChangeLog')
-rw-r--r--gcc/fortran/ChangeLog491
1 files changed, 491 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 792f3c7..4fd2183 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,494 @@
+2025-12-08 Harald Anlauf <anlauf@gmx.de>
+ Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/123025
+ * decl.cc (match_char_length): Add a check for the
+ obsolete '*' style of character declarations in the
+ alternate branch of checking so we dont miss two
+ use cases:
+
+2025-12-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122693
+ * array.cc (gfc_match_array_constructor): Stash and restore
+ gfc_current_ns after the call to 'gfc_match_type_spec'.
+
+2025-12-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122670
+ * decl.cc (gfc_get_pdt_instance): Ensure that, in an interface
+ body, PDT instances imported implicitly if the template has
+ been explicitly imported.
+ * module.cc (read_module): If a PDT template appears in a use
+ only statement, implicitly add the instances as well.
+
+2025-12-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122669
+ * resolve.cc (resolve_allocate_deallocate): Mold expressions
+ with an array reference and a constant size must be resolved
+ for each allocate object.
+
+2025-12-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122578
+ * primary.cc (gfc_match_varspec): Try to resolve a typebound
+ generic procedure selector expression to provide the associate
+ name with a type. Also, resolve component calls. In both cases,
+ make a copy of the selector expression to guard against changes
+ made by gfc_resolve_expr.
+
+2025-12-05 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/122977
+ * expr.cc (gfc_is_simply_contiguous): For an associate variable
+ check whether the associate target is contiguous.
+ * resolve.cc (resolve_symbol): Skip array type check for an
+ associate variable when the target has the contiguous attribute.
+
+2025-12-05 Tobias Burnus <tburnus@baylibre.com>
+
+ * openmp.cc (resolve_omp_clauses): Permit zero with
+ DYN_GROUPPRIVATE clause.
+ * trans-openmp.cc (fallback): Generate TREE code
+ for DYN_GROUPPRIVATE and remove 'sorry'.
+
+2025-12-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/103371
+ * decl.cc (gfc_get_pdt_instance): Remove the requirement that
+ PDT components be of the same type as the enclosing type. Apply
+ initializers other than the default to PDT components.
+ * primary.cc (gfc_match_rvalue): Make combination of the two
+ actual_arglists conditional on 'type_spec_list' having been
+ seen as well together with applying component names to all the
+ arguments.
+ * trans-decl.cc (gfc_init_default_dt): Add 'pdt_ok' to the args
+ and use it to signal that a PDT can be default initialized.
+ (gfc_init_default_pdt): New function to check that a pdt is OK
+ for default intialization before calling gfc_init_default_dt.
+ (gfc_trans_deferred_vars): Use gfc_init_default_pdt.
+ * trans.h: Add bool 'pdt_ok' to prototype with defaul value of
+ false.
+
+2025-12-01 Christopher Albert <albert@tugraz.at>
+ Harald Anlauf <anlauf@gcc.gnu.org>
+
+ PR fortran/107721
+ PR fortran/102417
+ * arith.cc (eval_intrinsic): Call gfc_check_constructor_type on
+ array constructor operands with explicit type-spec to ensure
+ element type conversion before operations. Resolve character
+ array constructors before CONCAT operations.
+ (reduce_binary_ac, reduce_binary_ca, reduce_binary_aa): Preserve
+ character length info in result arrays.
+ * array.cc (check_constructor_type): Simplify non-constant
+ expressions before type checking to handle parenthesized elements.
+ Handle nested character array constructors with explicit type-spec
+ when outer constructor has no type-spec.
+ (gfc_resolve_character_array_constructor): Recursively propagate
+ type-spec to nested array constructors. If the nested constructor
+ has an explicit type-spec, resolve it first before propagating
+ the outer type-spec.
+
+2025-12-01 Tobias Burnus <tburnus@baylibre.com>
+
+ * gfortran.texi (Default exponents): Remove spurious @menu entry.
+
+2025-11-30 Andrew Pinski <andrew.pinski@oss.qualcomm.com>
+
+ * lang.opt.urls: Regenerate.
+
+2025-11-28 Tobias Burnus <tburnus@baylibre.com>
+
+ PR c/122892
+ * openmp.cc (gfc_resolve_omp_allocate): Reject non-local
+ static variables with cgroup/pteam/thread allocators.
+ * parse.cc: Permit OMP ALLOCATE in BLOCK DATA.
+
+2025-11-26 Tobias Burnus <tburnus@baylibre.com>
+
+ * dump-parse-tree.cc (show_attr): Handle OpenMP's 'local' clause
+ and the 'groupprivate' directive.
+ (show_omp_clauses): Handle dyn_groupprivate.
+ * frontend-passes.cc (gfc_code_walker): Walk dyn_groupprivate.
+ * gfortran.h (enum gfc_statement): Add ST_OMP_GROUPPRIVATE.
+ (enum gfc_omp_fallback, gfc_add_omp_groupprivate,
+ gfc_add_omp_declare_target_local): New.
+ * match.h (gfc_match_omp_groupprivate): New.
+ * module.cc (enum ab_attribute, mio_symbol_attribute, load_commons,
+ write_common_0): Handle 'groupprivate' + declare target's 'local'.
+ * openmp.cc (gfc_omp_directives): Add 'groupprivate'.
+ (gfc_free_omp_clauses): Free dyn_groupprivate.
+ (enum omp_mask2): Add OMP_CLAUSE_LOCAL and OMP_CLAUSE_DYN_GROUPPRIVATE.
+ (gfc_match_omp_clauses): Match them.
+ (OMP_TARGET_CLAUSES): Add OMP_CLAUSE_DYN_GROUPPRIVATE.
+ (OMP_DECLARE_TARGET_CLAUSES): Add OMP_CLAUSE_LOCAL.
+ (gfc_match_omp_declare_target): Handle groupprivate + fixes.
+ (gfc_match_omp_threadprivate): Code move to and calling now ...
+ (gfc_match_omp_thread_group_private): ... this new function.
+ Also handle groupprivate.
+ (gfc_match_omp_groupprivate): New.
+ (resolve_omp_clauses): Resolve dyn_groupprivate.
+ * parse.cc (decode_omp_directive): Match groupprivate.
+ (case_omp_decl, parse_spec, gfc_ascii_statement): Handle it.
+ * resolve.cc (resolve_symbol): Handle groupprivate.
+ * symbol.cc (gfc_check_conflict, gfc_copy_attr): Handle 'local'
+ and 'groupprivate'.
+ (gfc_add_omp_groupprivate, gfc_add_omp_declare_target_local): New.
+ * trans-common.cc (build_common_decl,
+ accumulate_equivalence_attributes): Print 'sorry' for
+ groupprivate and declare target's local.
+ * trans-decl.cc (add_attributes_to_decl): Likewise..
+ * trans-openmp.cc (gfc_trans_omp_clauses): Print 'sorry' for
+ dyn_groupprivate.
+ (fallback): Process declare target with link/local as
+ done for 'enter'.
+
+2025-11-26 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/104650
+ * decl.cc (gfc_get_pdt_instance): If the PDT template has
+ finalizers, make a new f2k_derived namespace for this intance
+ and copy the template namespace into it. Set the instance
+ template_sym field to point to the template.
+ * expr.cc (gfc_check_pointer_assign): Allow array value pointer
+ lvalues to point to scalar null expressions in initialization.
+ * gfortran.h : Add the template_sym field to gfc_symbol.
+ * resolve.cc (gfc_resolve_finalizers): For a pdt_type, copy the
+ final subroutines with the same type argument into the pdt_type
+ finalizer list. Prevent final subroutine type checking and
+ creation of the vtab for pdt_templates.
+ * symbol.cc (gfc_free_symbol): Do not call gfc_free_namespace
+ for pdt_type with finalizers. Instead, free the finalizers and
+ the namespace.
+
+2025-11-24 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122766
+ * decl.cc (gfc_match_decl_type_spec): A pdt_type found while
+ parsing a contains section can only arise from the typespec of
+ a function declaration. This can be retained in the typespec.
+ Once we are parsing the function, the first reference to this
+ derived type will find that it has no symtree. Provide it with
+ one so that gfc_use_derived does not complain and, again,retain
+ it in the typespec.
+
+2025-11-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/32365
+ * parse.cc (parse_executable): Reject declaration/OpenMP
+ specification statements seen after executable code
+ unconditionally, keeping the legacy DATA diagnostic as
+ a warning.
+
+2025-11-17 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/122709
+ * resolve.cc (resolve_assoc_var): If the associate target is a
+ contiguous pointer, so is the associate variable.
+
+2025-11-17 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.texi: Remove section "Experimental features for future
+ Fortran revisions". Move documentation of UNSIGNED into Extensions.
+ Mention flang compatibility.
+
+2025-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ * parse.cc (gfc_parse_file): Avoid arithmetics or
+ bitwise operations between enumerators from different enums.
+
+2025-11-14 Yuao Ma <c8ef@outlook.com>
+
+ * trans-expr.cc (conv_dummy_value): Add check for NULL allocatable.
+
+2025-11-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/117070
+ * array.cc (check_constructor): Allow procedures as potential
+ target of a procedure pointer.
+
+2025-11-13 Andrew Stubbs <ams@codesourcery.com>
+ Kwok Cheung Yeung <kcyeung@baylibre.com>
+ Thomas Schwinge <tschwinge@baylibre.com>
+
+ * openmp.cc (is_predefined_allocator): Use GOMP_OMP_PREDEF_ALLOC_MAX
+ and GOMP_OMPX_PREDEF_ALLOC_MIN/MAX instead of hardcoded values in the
+ comment.
+
+2025-11-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR other/122638
+ * gfortran.texi (OpenMP): Fix syntax.
+ * intrinsic.texi (UINT): Fix syntax.
+
+2025-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/96255
+ * match.cc (apply_typespec_to_iterator): Call gfc_set_sym_referenced
+ for both new and shadow iterator symbols.
+
+2025-11-12 Tobias Burnus <tburnus@baylibre.com>
+
+ PR libgomp/119677
+ * intrinsic.texi (OpenMP Modules): Add omp_default_device.
+ * openmp.cc (gfc_resolve_omp_context_selector): Accept
+ omp_default_device as conforming device number.
+
+2025-11-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/96255
+ * resolve.cc (gfc_resolve_forall): Delete outer_sym
+
+2025-11-11 Christopher Albert <albert@tugraz.at>
+
+ PR fortran/90519
+ * trans-expr.cc (strip_parentheses): New helper function to strip
+ INTRINSIC_PARENTHESES operators from expressions.
+ (is_runtime_conformable): Use strip_parentheses to handle cases
+ like a = (a) when checking for self-assignment.
+ (gfc_trans_assignment_1): Strip parentheses before checking if
+ expr2 is a variable, ensuring deep_copy is enabled for cases like
+ a = (a). Also strip parentheses when checking for self-assignment
+ to avoid use-after-free in finalization.
+ (gfc_trans_scalar_assign): Add comment about parentheses handling.
+ * class.cc (generate_finalization_wrapper): Create separate result
+ symbol for finalizer wrapper functions instead of self-referencing
+ the procedure symbol, avoiding ICE in gimplify_call_expr.
+
+2025-11-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+ Steve Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/96255
+ * gfortran.h (gfc_forall_iterator): Add bool shadow field.
+ * match.cc (apply_typespec_to_iterator): New helper function to
+ consolidate shadow variable creation logic.
+ (match_forall_header): Add type-spec parsing for DO CONCURRENT
+ and FORALL. Create shadow variables when type-spec differs from
+ outer scope. Replace duplicated code with apply_typespec_to_iterator.
+ * resolve.cc (replace_in_expr_recursive): New function to recursively
+ walk expressions and replace symbol references.
+ (replace_in_code_recursive): New function to recursively walk code
+ blocks and replace symbol references.
+ (gfc_replace_forall_variable): New entry point for shadow variable
+ substitution.
+ (gfc_resolve_assign_in_forall): Skip many-to-one assignment warning
+ for DO CONCURRENT.
+ (gfc_count_forall_iterators): Handle both EXEC_FORALL and
+ EXEC_DO_CONCURRENT with assertion.
+ (gfc_resolve_forall): Skip F2018 obsolescence warning for DO
+ CONCURRENT. Fix memory allocation check. Add NULL checks for shadow
+ variables. Implement shadow variable walker.
+ (gfc_resolve_code): Set gfc_do_concurrent_flag for DO CONCURRENT
+ constructs to enable constraint checking.
+
+2025-11-10 Sandra Loosemore <sloosemore@baylibre.com>
+
+ PR other/122243
+ * lang.opt.urls: Regenerated.
+
+2025-11-08 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/113338
+ * decl.cc (gfc_verify_c_interop_param): Allow further types of
+ dummy argument without the VALUE attribute as specified in
+ F2018 18.3.6 item (5).
+
+2025-11-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/121628
+ * trans-array.cc (seen_derived_types): Move to file scope and
+ preserve/restore around generate_element_copy_wrapper.
+ * trans-intrinsic.cc (conv_intrinsic_atomic_op): Reuse
+ gfc_trans_force_lval when forcing addressable CAF temps.
+
+2025-11-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/121628
+ * trans-array.cc (get_copy_helper_function_type): New function to
+ create function type for element copy helpers.
+ (get_copy_helper_pointer_type): New function to create pointer type
+ for element copy helpers.
+ (generate_element_copy_wrapper): New function to generate runtime
+ helper for element-wise deep copying of recursive types.
+ (structure_alloc_comps): Detect recursive allocatable array
+ components and use runtime helper instead of inline recursion.
+ Add includes for cgraph.h and function.h.
+ * trans-decl.cc (gfor_fndecl_cfi_deep_copy_array): New declaration
+ for runtime deep copy helper.
+ (gfc_build_builtin_function_decls): Initialize the runtime helper
+ declaration.
+ * trans-intrinsic.cc (conv_intrinsic_atomic_op): Enhance handling of
+ constant values in coarray atomic operations by detecting and
+ materializing address-of-constant expressions.
+ * trans.h (gfor_fndecl_cfi_deep_copy_array): Add external declaration.
+
+2025-11-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122566
+ * decl.cc (gfc_get_pdt_instance): Add non-PDT type exstention.
+
+2025-11-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122501
+ PR fortran/122524
+ * primary.cc (gfc_convert_to_structure_constructor): Correct
+ whitespace issue.
+ (gfc_match_rvalue): Remove the attempt to match specific procs
+ before filling out PDT constructor. Instead, defer this until
+ resolution with the condition that there not be a following
+ arglist and more than one procedure in the generic interface.
+
+2025-11-05 Tobias Burnus <tburnus@baylibre.com>
+
+ PR fortran/122570
+ * openmp.cc (resolve_omp_metadirective): Fix 'skip' of
+ never matchable metadirective variants.
+
+2025-11-04 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/122564
+ * resolve.cc (resolve_locality_spec): Delete temporary hash_set.
+
+2025-11-04 Paul-Antoine Arras <parras@baylibre.com>
+
+ PR fortran/122369
+ PR fortran/122508
+ * gfortran.h (gfc_rebind_label): Declare new function.
+ * parse.cc (parse_omp_metadirective_body): Rebind labels to the outer
+ region. Maintain a vector of metadirective regions.
+ (gfc_parse_file): Initialise it.
+ * parse.h (GFC_PARSE_H): Declare it.
+ * symbol.cc (gfc_get_st_label): Look for existing labels in outer
+ metadirective regions.
+ (gfc_rebind_label): Define new function.
+ (gfc_define_st_label): Accept duplicate labels in metadirective body.
+ (gfc_reference_st_label): Accept shared DO termination labels in
+ metadirective body.
+
+2025-11-03 Steve Kargl <kargls@comcast.net>
+
+ PR fortran/122513
+ * resolve.cc (check_default_none_expr): Do not allow an
+ iterator in a locality spec. Allow a named constant to be
+ used within the loop.
+
+2025-11-01 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/78640
+ * resolve.cc (resolve_fl_procedure): Check function result of a
+ pure function against F2018:C1585.
+
+2025-10-31 Yuao Ma <c8ef@outlook.com>
+
+ * intrinsic.texi: Fix typo.
+ * trans-intrinsic.cc (conv_intrinsic_atomic_cas): Remove unreachable
+ code.
+
+2025-10-31 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122452
+ * primary.cc (gfc_match_rvalue): Give priority to specific
+ procedures in a generic interface with the same name as a
+ PDT template. If found, use as the procedure instead of the
+ constructor generated from the PDT template.
+
+2025-10-30 Mikael Morin <mikael@gcc.gnu.org>
+
+ * trans-array.cc: Cleanup obsolete comment.
+
+2025-10-29 Yuao Ma <c8ef@outlook.com>
+
+ * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Remove unreachable
+ code.
+
+2025-10-29 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122165
+ * primary.cc (gfc_match_varspec): If the previous component ref
+ was a type specification parameter, a type inquiry ref cannot
+ follow.
+
+2025-10-29 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122433
+ PR fortran/122434
+ * decl.cc (gfc_get_pdt_instance): Prevent a PDT component of
+ the same type as the template from being converted into an
+ instance.
+ * resolve.cc (gfc_impure_variable): The result of a pure
+ function is a valid allocate object since it is pure.
+
+2025-10-28 Yuao Ma <c8ef@outlook.com>
+
+ PR fortran/122342
+ * trans-const.cc (gfc_conv_constant): Create a variable for the
+ non-char pointer.
+
+2025-10-28 Paul-Antoine Arras <parras@baylibre.com>
+
+ PR fortran/122439
+ * openmp.cc (gfc_resolve_omp_context_selector): Skip selectors that have
+ OMP_TRAIT_INVALID.
+
+2025-10-27 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/922290
+ PR fortran/95541
+ * resolve.cc (resolve_typebound_intrinsic_op): Add pdt_template
+ to the list of preemted specifics.
+ * trans-stmt.cc (trans_associate_var): PDT array and string
+ components are separately allocated for each element of a PDT
+ array, so copy in and copy out the selector expression.
+
+2025-10-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/122325
+ * options.cc (gfc_init_options_struct): Set flag_complex_method
+ to fortran rules.
+
+2025-10-26 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/122290
+ * decl.cc (variable_decl): Matching component initializer
+ expressions in PDT templates should be done with gfc_match_expr
+ to avoid reduction too early. If the expression type is unknown
+ copy the component typespec.
+ (gfc_get_pdt_instance): Change comment from a TODO to an
+ explanation. Insert parameter values in initializers. For
+ components that are not marked with PDT attributes, do the
+ full reduction for init expressions.
+ * primary.cc (gfc_match_actual_arglist): Convert PDT kind exprs
+ using the component initializer.
+ * resolve.cc (resolve_typebound_intrinsic_op): Preempt
+ gfc_check_new_interface for pdt_types as well as entities used
+ in submodules.
+ * simplify.cc (get_kind): Remove PDT kind conversion.
+
+2025-10-25 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/114023
+ * trans-expr.cc (gfc_trans_pointer_assignment): Always set dtype
+ when remapping a pointer. For unlimited polymorphic LHS use
+ elem_len from RHS.
+ * trans-intrinsic.cc (gfc_conv_is_contiguous_expr): Extend inline
+ generated code for IS_CONTIGUOUS for pointer arguments to detect
+ when span differs from the element size.
+
+2025-10-24 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/122386
+ * dependency.cc (gfc_ref_needs_temporary_p): Revert r16-518.
+ * trans-intrinsic.cc (gfc_conv_intrinsic_transfer): Force temporary
+ for SOURCE not being a simply-contiguous array.
+
+2025-10-24 Paul-Antoine Arras <parras@baylibre.com>
+
+ PR fortran/121452
+ * openmp.cc (resolve_omp_do): Allow CONTINUE as end statement of a
+ perfectly nested loop.
+
2025-10-21 Paul-Antoine Arras <parras@baylibre.com>
PR c/120180