2025-08-08  Release Manager

	* GCC 15.2.0 released.

2025-07-28  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-07-21  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/119106
	* expr.cc (simplify_constructor): Do not simplify constants.
	(gfc_simplify_expr): Continue to simplify expression when an
	iterator is present.

2025-07-26  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-07-23  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/121203
	* trans-expr.cc (gfc_conv_procedure_call): Obtain the character
	length of an assumed character length procedure from the typespec
	of the actual argument even if there is no explicit interface.

2025-07-20  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-07-18  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/121145
	* trans-expr.cc (gfc_conv_procedure_call): Do not create pointer
	check for proc-pointer actual passed to optional dummy.

2025-07-16  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2025-07-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/121060
	* interface.cc (matching_typebound_op): Defer determination of
	specific procedure until resolution by returning NULL.

2025-07-15  Kwok Cheung Yeung  <kcyeung@baylibre.com>

	Backported from master:
	2025-07-15  Kwok Cheung Yeung  <kcyeung@baylibre.com>

	PR fortran/104428
	* trans-openmp.cc (gfc_trans_omp_declare_variant): Check that proc_st
	is non-NULL before dereferencing.  Add line number to error message.

2025-07-15  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-07-08  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/120637
	* class.cc (finalize_component): Return true, when a finalizable
	component was detect and do not free it.

2025-07-09  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-07-03  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/120843
	* resolve.cc (resolve_operator): Remove conformability check,
	because it is not in the standard.

2025-07-08  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-07-01  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/120847
	* coarray.cc (check_add_new_comp_handle_array): Make the count
	of components static to be able to create more than one.  Create
	an array component only for array expressions.

2025-07-08  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-07-01  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/120843
	* resolve.cc (resolve_operator): Report inconsistent coranks
	only when not referencing this_image.
	(gfc_op_rank_conformable): Treat coranks as inconformable only
	when a coindex other then implicit this_image is used.

2025-07-03  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-06-26  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/120711
	* trans-array.cc (gfc_trans_array_ctor_element): Store the value
	of the offset for reuse.

2025-06-27  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-06-27  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/120784
	* interface.cc (gfc_match_end_interface): Detect empty local_name.

2025-06-26  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-06-23  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/120784
	* interface.cc (gfc_match_end_interface): If a use-associated
	symbol is renamed, use the local_name for checking.

2025-06-25  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2025-05-01  Paul Thomas  <pault@gcc.gnu.org>
		    and Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/119948
	* resolve.cc (gfc_impure_variable): The result of a module
	procedure with an interface declaration is not impure even if
	the current namespace is not the same as the symbol's.
	* primary.cc (match_variable): Module procedures with sym the
	same as result can be treated as variables, although marked
	external.

2025-06-18  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-06-16  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/51961
	* resolve.cc (conformable_arrays): Use modified rank check when
	MOLD= expression is given.

2025-06-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	Backported from master:
	2025-06-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/120483
	* trans-expr.cc (gfc_conv_substring): Use pointer arithmetic on
	static allocatable char arrays.

2025-06-04  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-06-03  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/99838
	* data.cc (gfc_assign_data_value): For a new initializer use the
	location from the constructor as fallback.

2025-06-03  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-30  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/102599
	PR fortran/114022
	* expr.cc (simplify_complex_array_inquiry_ref): Helper function for
	simplification of inquiry references (%re/%im) of constant complex
	arrays.
	(find_inquiry_ref): Use it for handling %re/%im inquiry references
	of complex arrays.
	(scalarize_intrinsic_call): Fix frontend memleak.
	* primary.cc (gfc_match_varspec): When the reference is NULL, the
	previous simplification has succeeded in evaluating inquiry
	references also of arrays.

2025-06-03  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-27  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/101735
	* primary.cc (gfc_match_varspec): Correct order of logic.

2025-06-03  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-27  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/101735
	* expr.cc (find_inquiry_ref): If an inquiry reference applies to
	a substring, use that, and calculate substring length if needed.
	* primary.cc (extend_ref): Also handle attaching to end of
	reference chain for appending.
	(gfc_match_varspec): Discrimate between arrays of character and
	substrings of them.  If a substring is taken from a character
	component of a derived type, get the proper typespec so that
	inquiry references work correctly.
	(gfc_match_rvalue): Handle corner case where we hit a seemingly
	dangling '%' and missed an inquiry reference. Try another match.

2025-06-02  Jakub Jelinek  <jakub@redhat.com>

	Backported from master:
	2025-05-10  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/120193
	* trans-types.cc (gfc_init_types): For flag_unsigned use
	build_distinct_type_copy or build_variant_type_copy from
	gfc_character_types[index_char] if index_char > -1 instead of
	gfc_character_types[index_char] or
	gfc_build_unsigned_type (&gfc_unsigned_kinds[index]).

2025-06-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backported from master:
	2025-05-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/119856
	* io.cc: Set missing comma error checks to STD_STD_LEGACY.

2025-05-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backported from master:
	2025-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/120049
	* check.cc (gfc_check_c_associated): Use new helper functions.
	Only call check_c_ptr_1 if optional c_ptr_2 tests succeed.
	(check_c_ptr_1): Handle only c_ptr_1 checks.
	(check_c_ptr_2): Expand checks for c_ptr_2 and handle cases
	where there is no derived pointer in the gfc_expr and check
	the inmod_sym_id only if it exists. Rephrase error message.
	* misc.cc (gfc_typename): Handle the case for BT_VOID rather
	than throw an internal error.

2025-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2025-05-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/120355
	* interface.cc (compare_parameter): If the global function has a
	result clause, take typespec from there for the comparison against
	the dummy argument.

2025-05-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-15  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/85750
	* resolve.cc (resolve_symbol): Reorder conditions when to apply
	default-initializers.

2025-05-20  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-10  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/102891
	* dependency.cc (gfc_ref_needs_temporary_p): Within an array
	reference, inquiry references of complex variables generally
	need a temporary.

2025-05-19  Tobias Burnus  <tburnus@baylibre.com>

	Backported from master:
	2025-05-15  Tobias Burnus  <tburnus@baylibre.com>

	* trans-openmp.cc (gfc_omp_deep_mapping_do): Handle SSA_NAME if
	a def_stmt is available.

2025-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backported from master:
	2025-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/120049
	* check.cc (gfc_check_c_associated): Modify checks to avoid
	ICE and allow use, intrinsic :: iso_c_binding from a separate
	module file.

2025-05-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2025-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/120139
	* dump-parse-tree.cc (get_c_type_name): If no constant
	size of an array exists, output an asterisk.

2025-05-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2025-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/120107
	* dump-parse-tree.cc (write_type): Do not dump non-interoperable
	types.

2025-05-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/120163
	* gfortran.h: Add formal_resolved to gfc_symbol.
	* resolve.cc (gfc_resolve_formal_arglist): Set it.
	(resolve_function): Do not call gfc_get_formal_from_actual_arglist
	if we already resolved a formal arglist.
	(resolve_call): Likewise.

2025-05-13  Jakub Jelinek  <jakub@redhat.com>

	Backported from master:
	2025-05-13  Jakub Jelinek  <jakub@redhat.com>
		    Daniil Kochergin  <daniil2472s@gmail.com>
		    Tobias Burnus  <tburnus@baylibre.com>

	PR fortran/120191
	* trans-intrinsic.cc (strip_kind_from_actual): Remove.
	(gfc_conv_intrinsic_minmaxloc): Don't call strip_kind_from_actual.
	Free and clear kind_arg->expr if non-NULL.  Set back_arg->name to
	"%VAL" instead of a loop looking for last argument.  Remove actual
	variable, use array_arg instead.  Free and clear dim_arg->expr if
	non-NULL for BT_CHARACTER cases instead of using a loop.

2025-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119928
	* interface.cc (gfc_check_dummy_characteristics): Do not issue
	error if one dummy symbol has been generated from an actual
	argument and the other one has OPTIONAL, INTENT, ALLOCATABLE,
	POINTER, TARGET, VALUE, ASYNCHRONOUS or CONTIGUOUS.
	(gfc_get_formal_from_actual_arglist): Do nothing if symbol
	is a class.

2025-05-09  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-08  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/120179
	* match.cc (gfc_match_do): Do not attempt to match end-of-statement
	twice.

2025-05-09  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-05-04  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/119986
	* expr.cc (is_subref_array): When searching for array references,
	do not terminate early so that inquiry references to complex
	components work.
	* primary.cc (gfc_variable_attr): A substring reference can refer
	to either a scalar or array character variable.  Adjust search
	accordingly.

2025-05-03  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2025-04-25  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/102900
	* trans-decl.cc (gfc_generate_function_code): Use sym->result
	when generating fake result decl for functions returning
	allocatable or pointer results.
	* trans-expr.cc (gfc_conv_procedure_call): When checking the
	pointer status of an actual argument passed to a non-allocatable,
	non-pointer dummy which is of type CLASS, do not check the
	class container of the actual if it is just a procedure pointer.
	(gfc_trans_pointer_assignment): Fix treatment of assignment to
	NULL of a procedure pointer.

2025-04-25  Release Manager

	* GCC 15.1.0 released.

2025-04-23  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backported from master:
	2025-04-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/119836
	* resolve.cc (check_pure_function): Fix checking for
	an impure subprogram within a DO CONCURRENT construct.
	(pure_subroutine): Ditto.

2025-04-16  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/106948
	* resolve.cc (gfc_pure_function): If a function has been resolved,
	but esym is not yet set, look at its attributes to see whether it
	is pure or elemental.

2025-04-15  Tobias Burnus  <tburnus@baylibre.com>

	* f95-lang.cc (LANG_HOOKS_OMP_DEEP_MAPPING,
	LANG_HOOKS_OMP_DEEP_MAPPING_P, LANG_HOOKS_OMP_DEEP_MAPPING_CNT):
	Define.
	* openmp.cc (gfc_match_omp_clause_reduction): Fix location setting.
	(resolve_omp_clauses): Permit allocatable components, reject
	them and polymorphic variables in PRIVATE/FIRSTPRIVATE.
	* trans-decl.cc (add_clause): Set clause location.
	* trans-openmp.cc (gfc_has_alloc_comps): Add ptr_ok and
	shallow_alloc_only Boolean arguments.
	(gfc_omp_replace_alloc_by_to_mapping): New.
	(gfc_omp_private_outer_ref, gfc_walk_alloc_comps,
	gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
	gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Update call to it.
	(gfc_omp_finish_clause): Minor cleanups, improve location data,
	handle allocatable components.
	(gfc_omp_deep_mapping_map, gfc_omp_deep_mapping_item,
	gfc_omp_deep_mapping_comps, gfc_omp_gen_simple_loop,
	gfc_omp_get_array_size, gfc_omp_elmental_loop,
	gfc_omp_deep_map_kind_p, gfc_omp_deep_mapping_int_p,
	gfc_omp_deep_mapping_p, gfc_omp_deep_mapping_do,
	gfc_omp_deep_mapping_cnt, gfc_omp_deep_mapping): New.
	(gfc_trans_omp_array_section): Save array descriptor in case
	deep-mapping lang hook will need it.
	(gfc_trans_omp_clauses): Likewise; use better clause location data.
	* trans.h (gfc_omp_deep_mapping_p, gfc_omp_deep_mapping_cnt,
	gfc_omp_deep_mapping): Add function prototypes.

2025-04-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119669
	* interface.cc (compare_parameter): Error when mismatch between
	formal argument as subroutine and function.  If the dummy
	argument is a known function, set its typespec.

2025-04-12  Thomas Schwinge  <tschwinge@baylibre.com>

	PR fortran/101602
	* trans-stmt.cc (gfc_trans_concurrent_locality_spec): Fix
	'static_assert'.

2025-04-09  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/119656
	* interface.cc (gfc_compare_actual_formal): Fix front-end memleak
	when searching for matching interfaces.
	* trans-expr.cc (gfc_conv_procedure_call): If there is a formal
	dummy corresponding to an absent argument, use its type, and only
	fall back to inferred type otherwise.

2025-04-09  Paul Thomas  <pault@gcc.gnu.org>
	    and Harald Anlauf  <anlauf@gcc.gnu.org>

	PR fortran/119460
	* iresolve.cc (generate_reduce_op_wrapper): Increase the size
	of 'tname'. Change intent of 'a' and 'b' to intent_in.
	* trans-decl.cc (add_argument_checking): Do not test artificial
	formal symbols.
	* trans-expr.cc (gfc_conv_procedure_call): Remove reduce_scalar
	and the blocks triggered by it.
	* trans-intrinsic.cc (gfc_conv_intrinsic_function): Set the
	result of non-character, scalar reduce to be allocatable.

2025-04-09  Tobias Burnus  <tburnus@baylibre.com>

	PR fortran/101602
	* resolve.cc (resolve_locality_spec): Remove 'sorry, unimplemented'.
	* trans-stmt.cc (struct symbol_and_tree_t): New.
	(gfc_trans_concurrent_locality_spec): New.
	(gfc_trans_forall_1): Call it; update to handle local and local_init.
	* trans-decl.cc (gfc_start_saved_local_decls,
	gfc_stop_saved_local_decls): New; moved code from ...
	(gfc_process_block_locals): ... here. Call it.
	* trans.h (gfc_start_saved_local_decls,
	gfc_stop_saved_local_decls): Declare.

2025-04-02  Sandra Loosemore  <sloosemore@baylibre.com>

	PR middle-end/118965
	* openmp.cc (gfc_parser_omp_clause_init_modifiers): Fix some
	inconsistent code indentation.  Remove code for recognizing
	clauses	without modifiers.  Diagnose prefer_type without a
	following paren.  Adjust error message for an unrecognized modifier.
	Diagnose missing target/targetsync modifier.
	(gfc_match_omp_init): Fix more inconsistent code indentation.

2025-03-28  Harald Anlauf  <anlauf@gmx.de>

	* check.cc (gfc_invalid_boz): Correct spelling of compiler flag in
	hint to -fallow-invalid-boz.

2025-03-26  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/118796
	* resolve.cc: Do not apply default initialization to a derived-type
	function result if the resolved function is use-associated.

2025-03-25  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119419
	* dump-parse-tree.cc (write_funptr_fcn): New function.
	(write_type): Invoke it for C_FUNPTR.
	(write_interop_decl): Do not dump vtabs.

2025-03-25  Sandra Loosemore  <sloosemore@baylibre.com>
	    Tobias Burnus  <tburnus@baylibre.com>

	* trans-openmp.cc (gfc_trans_omp_declare_variant): Remove accidental
	redeclaration of pref.

2025-03-22  Jakub Jelinek  <jakub@redhat.com>

	* resolve.cc (resolve_procedure_expression): Remove extraneous space
	from the middle of diagnostics.

2025-03-21  Paul-Antoine Arras  <parras@baylibre.com>
	    Tobias Burnus  <tburnus@baylibre.com>

	* trans-openmp.cc (gfc_trans_omp_clauses): Make OMP_CLAUSE_DESTROY and
	OMP_CLAUSE_INIT addressable.
	* types.def (BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR):
	New.

2025-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/119406
	* resolve.cc (resolve_locality_spec): Add space in error
	message.

2025-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/119403
	* interface.cc (compare_parameter): Fix typo.

2025-03-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/85836
	* check.cc (get_ul_from_cst_cl): New function used in
	check_operation.
	(check_operation): New function used in check_reduce and
	check_co_reduce.
	(gfc_check_co_reduce): Use it.
	(gfc_check_reduce): New function.
	(gfc_check_rename): Add prototype for intrinsic with 6 arguments.
	* gfortran.h : Add isym id for reduce and prototype for f6.
	* intrinsic.cc (do_check): Add another argument expression and use
	it in the call to the six argument specific check.
	(add_sym_6): New function.
	(add_functions): Add the discription of the reduce intrinsic and
	add it to the intrinsic list.
	* intrinsic.h : Add prototypes for gfc_check_reduce and
	gfc_resolve_reduce.
	* iresolve.cc (generate_reduce_op_wrapper): Generate a wrapper
	subroutine for the 'operation' function to enable the library
	implementation to be type agnostic and use pointer arithmetic
	throughout.
	(gfc_resolve_reduce): New function.
	* trans-expr.cc (gfc_conv_procedure_call): Add flag for scalar
	reduce. Generate a return variable 'sr' for scalar reduce, pass its
	address to the library function and return it as the scalar result.
	* trans-intrinsic.cc (gfc_conv_intrinsic_function): Array valued
	reduce is called in same way as reshape. Fall through for call to
	the scalar version.

2025-03-21  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/119380
	* trans-array.cc (structure_alloc_comps): Prevent freeing of
	procedure pointer components.

2025-03-21  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/119349
	* trans-expr.cc (gfc_conv_procedure_call): Prevent deallocation
	of array temporary for polymorphic temporary argument.

2025-03-19  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/116706
	* trans-array.cc (gfc_is_reallocatable_lhs): Fix check on
	allocatable components of derived type or class objects.

2025-03-19  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/119272
	* resolve.cc (resolve_compcall): Postpone error report when
	symbol is not resolved yet for component call resolve.

2025-03-18  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/119338
	* resolve.cc (resolve_allocate_expr): Check F2003:C626: Type-spec
	in ALLOCATE of an assumed-length character dummy argument shall be
	an asterisk.

2025-03-16  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/60560
	* expr.cc (gfc_traverse_expr): Do not descend into length type
	parameter for negative values of auxiliary parameter f.
	* resolve.cc (gfc_find_var_in_expr): New helper function to check
	dependence of an expression on given variable.
	(resolve_allocate_expr): Use it to determine if array bounds in an
	ALLOCATE statement depend explicitly on a variable.

2025-03-15  Tobias Burnus  <tburnus@baylibre.com>

	PR fortran/115271
	* module.cc (mio_omp_declare_simd_clauses): New, moved from ...
	(mio_omp_declare_simd): ... here. Update call, write empty '( )'
	if there is no declare simd but a declare variant.
	(mio_omp_declare_variant): New.
	(mio_symbol): Call it.
	* openmp.cc (gfc_match_omp_context_selector): Add comment about
	module.cc to TODO note.
	* trans-stmt.h (gfc_trans_omp_declare_variant): Take additional
	parent_ns argument.
	* trans-decl.cc (create_function_arglist,
	gfc_create_function_decl): Update call.
	* trans-openmp.cc (gfc_trans_omp_declare_variant): Take new
	argument, add some special case handling for attr.use_assoc.

2025-03-13  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/119118
	* dependency.cc (contains_forall_index_p): Let loop over elements
	of a constructor update its control variable.  Handle REF_INQUIRY
	in switch statement.
	(gfc_contains_implied_index_p): Likewise.

2025-03-12  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/98903
	* array.cc (gfc_copy_array_ref): Copy team, team_type and stat.
	(match_team_or_stat): Match a single team(_number)= or stat=.
	(gfc_match_array_ref): Add switching to image_selector_parsing
	and error handling when indices come after named arguments.
	* coarray.cc (move_coarray_ref): Move also team_type.
	* expr.cc (gfc_free_ref_list): Free team and stat expression.
	(gfc_find_team_co): Find team or team_number in array-ref.
	* gfortran.h (enum gfc_array_ref_team_type): New enum to
	distinguish unset, team or team_number expression.
	(gfc_find_team_co): Default searching to team= expressions.
	* resolve.cc (resolve_array_ref): Check for type correctness of
	team(_number) and stats in coindices.
	* trans-array.cc (gfc_conv_array_ref): Ensure stat is cleared
	when fcoarray=single is used.
	* trans-intrinsic.cc (conv_stat_and_team): Including team_number
	in conversion.
	(gfc_conv_intrinsic_caf_get): Propagate team_number to ABI
	routine.
	(conv_caf_send_to_remote): Same.
	(conv_caf_sendget): Same.

2025-03-11  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/119199
	* decl.cc (gfc_match_save): Reject SAVE statement of a COMMON block
	when in a BLOCK construct.
	* trans-common.cc (translate_common): Avoid NULL pointer dereference.

2025-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119078
	* frontend-passes.cc (check_against_globals): Do not check
	for abstract interfaces or dummy arguments.
	* resolve.cc (gfc_verify_binding_labels): Adjust comment.
	Do not put abstract interfaces or dummy argument into global
	namespace.

2025-03-10  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107143
	* dependency.cc (check_data_pointer_types): Do not just compare
	for derived type, but for same derived type.

2025-03-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119157
	* gfortran.h (gfc_pop_undo_symbol): Remove prototype.
	* interface.cc (gfc_get_formal_from_actual_arglist): Use
	gfc_commit_symbol() instead of gfc_pop_undo_symbol().
	* symbol.cc (gfc_pop_undo_symbol): Remove.

2025-03-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119157
	* gfortran.h (gfc_symbol): Make ext_dummy_arglist_mismatch a
	one-bit bitfield
	(gfc_pop_undo_symbol): Declare prototype.
	* symbol.cc (gfc_pop_undo_symbol): New function.
	* interface.cc (gfc_get_formal_from_actual_arglist): Call it
	for artificially introduced formal variables.

2025-03-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/119054
	* resolve.cc (resolve_elemental_actual): When checking other
	actual arguments to elemental procedures, don't check
	attributes of literals and function calls.

2025-03-06  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/119118
	* dependency.cc (gfc_contains_implied_index_p): Helper function to
	determine if an expression has a dependence on an implied-do index.
	* dependency.h (gfc_contains_implied_index_p): Add prototype.
	* trans-expr.cc (gfc_conv_substring): Adjust logic to not generate
	substring bounds checks before implied-do indices have been
	substituted.

2025-03-05  Mark Wielaard  <mark@klomp.org>

	* lang.opt.urls: Regenerated.

2025-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/104684
	* trans-array.cc (gfc_conv_expr_descriptor): Look at the
	lang-specific akind and do a view convert when only the akind
	attribute differs between pointer and allocatable array.

2025-03-04  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/119049
	PR fortran/119074
	* dump-parse-tree.cc (seen_conflict): New static varaible.
	(gfc_dump_external_c_prototypes): Initialize it. If it was
	set, write out a warning that -std=c23 will not work.
	(write_proc): Move the work of actually writing out the
	formal arglist to...
	(write_formal_arglist): New function. Handle external dummy
	parameters and their argument lists. If there were mismatched
	arguments, output an empty argument list in pre-C23 style.
	* gfortran.h (struct gfc_symbol): Add ext_dummy_arglist_mismatch
	flag and formal_at.
	* invoke.texi: Document -Wexternal-argument-mismatch.
	* lang.opt: Put it in.
	* resolve.cc (resolve_function): If warning about external
	argument mismatches, build a formal from actual arglist the
	first time around, and later compare and warn.
	(resolve_call): Likewise

2025-03-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/103391
	* trans-expr.cc (gfc_trans_assignment_1): Do not use poly assign
	for pointer arrays on lhs (as it is done for allocatables
	already).

2025-03-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/77872
	* trans-expr.cc (gfc_get_tree_for_caf_expr): Pick up token from
	decl when it is present there for class types.

2025-03-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/77872
	* trans-expr.cc (gfc_conv_procedure_call): Use attr instead of
	doing type check and branching for BT_CLASS.

2025-03-03  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/101577
	* symbol.cc (verify_bind_c_derived_type): Generate error message
	for derived type with no components in standard conformance mode,
	indicating that this is a GNU extension.

2025-03-03  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/118747
	* trans-array.cc (gfc_trans_array_ctor_element): Remove copy to
	temporary variable.
	* trans-expr.cc (gfc_conv_procedure_call): Use references to
	array members instead of copies when freeing after use.
	Formatting fix.

2025-03-02  Sandra Loosemore  <sloosemore@baylibre.com>

	* intrinsic.texi: Fix inconsistent capitalization of argument
	names and other minor copy-editing.

2025-03-02  Sandra Loosemore  <sloosemore@baylibre.com>

	PR fortran/47928
	* intrinsic.texi: Move the "Standard" subheading farther down.

2025-03-02  Sandra Loosemore  <sloosemore@baylibre.com>

	PR fortran/47928
	* gfortran.texi: Move all the "Syntax" subheadings ahead of
	"Description", and rename to "Synopsis".
	* intrinsic.texi: Likewise.

2025-03-02  Sandra Loosemore  <sloosemore@baylibre.com>

	PR fortran/47928
	* intrinsic.texi: Put a blank line between "@item @emph{}"
	subheadings, but not more than one.

2025-03-02  Sandra Loosemore  <sloosemore@baylibre.com>

	PR fortran/47928
	* gfortran.texi: Consistently use "@emph{Notes}:" instead of
	other spellings.
	* intrinsic.texi: Likewise.  Also fix an inconsistent capitalization
	and remove a redundant "Standard" entry.

2025-03-01  Harald Anlauf  <anlauf@gmx.de>

	* match.cc (gfc_match_nullify): Free matched expression when
	cleaning up.
	* primary.cc (match_variable): Initialize result to NULL.

2025-02-28  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/118730
	* resolve.cc: Mark unused derived type variable with finalizers
	referenced to execute finalizer when leaving scope.

2025-02-27  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/118789
	* trans-stmt.cc (trans_associate_var): Compare pointed to types when
	expr to associate is already a pointer.

2025-02-26  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/108233
	* trans-expr.cc (gfc_trans_assignment_1): Remove SAVE_EXPR on lhs.

2025-02-25  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* coarray.cc (fixup_comp_refs): For class types set correct
	component (class) type.
	(split_expr_at_caf_ref): Provide location.
	* trans-intrinsic.cc (conv_caf_send_to_remote): Look at
	generated formal argument and not declared one to detect
	descriptor arrays.
	(conv_caf_sendget): Same.

2025-02-25  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* trans-intrinsic.cc (conv_caf_sendget): Use the size of data
	transferred between the two images and not the descritor's size.

2025-02-21  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/48958
	* trans-array.cc (gfc_trans_deferred_array): Initialize the data
	component of non-saved pointers when -fcheck=pointer is set.

2025-02-21  Tobias Burnus  <tburnus@baylibre.com>

	* trans-array.cc (gfc_full_array_size): Obtain the rank from
	the array descriptor for assumed rank.
	(gfc_tree_array_size): Likewise; permit expr = NULL to operate
	only the tree.
	(gfc_conv_descriptor_stride_get): Update for added assumed-rank
	array types.
	* trans-openmp.cc (gfc_omp_finish_clause): Likewise.
	* trans-types.cc (gfc_build_array_type, gfc_get_derived_type,
	gfc_get_array_descr_info): Likewise.
	* trans.h (enum gfc_array_kind): Add
	GFC_ARRAY_ASSUMED_RANK_{ALLOCATABLE,POINTER{,_CONT}}.

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* gfortran.texi: Remove deprecated functions from documentation.
	* trans-decl.cc (gfc_build_builtin_function_decls): Remove
	decprecated function decls.
	* trans-intrinsic.cc (gfc_conv_intrinsic_exponent): Remove
	deprecated/no longer needed routines.
	* trans.h: Remove unused decls.

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* coarray.cc (rewrite_caf_send): Rewrite to
	transfer_between_remotes when both sides of the assignment have
	a coarray.
	(coindexed_code_callback): Prevent duplicate rewrite.
	* gfortran.texi: Add documentation for transfer_between_remotes.
	* intrinsic.cc (add_subroutines): Add intrinsic symbol for
	caf_sendget to allow easy rewrite to transfer_between_remotes.
	* trans-decl.cc (gfc_build_builtin_function_decls): Add
	prototype for transfer_between_remotes.
	* trans-intrinsic.cc (conv_caf_vector_subscript_elem): Mark as
	deprecated.
	(conv_caf_vector_subscript): Same.
	(compute_component_offset): Same.
	(conv_expr_ref_to_caf_ref): Same.
	(conv_stat_and_team): Extract stat and team from expr.
	(gfc_conv_intrinsic_caf_get): Use conv_stat_and_team.
	(conv_caf_send_to_remote): Same.
	(has_ref_after_cafref): Mark as deprecated.
	(conv_caf_sendget): Translate to transfer_between_remotes.
	* trans.h: Add prototype for transfer_between_remotes.

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* coarray.cc (move_coarray_ref): Move the coarray reference out
	of the given one.  Especially when there is a regular array ref.
	(fixup_comp_refs): Move components refs to a derived type where
	the codim has been removed, aka a new type.
	(split_expr_at_caf_ref): Correctly split the reference chain.
	(remove_caf_ref): Simplify.
	(create_get_callback): Fix some deficiencies.
	(create_allocated_callback): Adapt to new signature of split.
	(create_send_callback): New function.
	(rewrite_caf_send): Rewrite a call to caf_send to
	caf_send_to_remote.
	(coindexed_code_callback): Treat caf_send and caf_sendget
	correctly.
	* gfortran.h (enum gfc_isym_id): Add SENDGET-isym.
	* gfortran.texi: Add documentation for send_to_remote.
	* resolve.cc (gfc_resolve_code): No longer generate send_by_ref
	when allocatable coarray (component) is on the lhs.
	* trans-decl.cc (gfc_build_builtin_function_decls): Add
	caf_send_to_remote decl.
	* trans-intrinsic.cc (conv_caf_func_index): Ensure the static
	variables created are not in a block-scope.
	(conv_caf_send_to_remote): Translate caf_send_to_remote calls.
	(conv_caf_send): Renamed to conv_caf_sendget.
	(conv_caf_sendget): Renamed from conv_caf_send.
	(gfc_conv_intrinsic_subroutine): Branch correctly for
	conv_caf_send and sendget.
	* trans.h: Correct decl.

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* coarray.cc (create_allocated_callback): Add creating remote
	side procedure for checking allocation status of coarray.
	(rewrite_caf_allocated): Rewrite ALLOCATED on coarray to use caf
	routine.
	(coindexed_expr_callback): Exempt caf_is_present_on_remote from
	being rewritten again.
	* gfortran.h (enum gfc_isym_id): Add caf_is_present_on_remote
	id.
	* gfortran.texi: Add documentation for caf_is_present_on_remote.
	* intrinsic.cc (add_functions): Add caf_is_present_on_remote
	symbol.
	* trans-decl.cc (gfc_build_builtin_function_decls): Define
	interface of caf_is_present_on_remote.
	* trans-intrinsic.cc (gfc_conv_intrinsic_caf_is_present_remote):
	Translate caf_is_present_on_remote.
	(trans_caf_is_present): Remove.
	(caf_this_image_ref): Remove.
	(gfc_conv_allocated): Take out coarray treatment, because that
	is rewritten to caf_is_present_on_remote now.
	(gfc_conv_intrinsic_function): Handle caf_is_present_on_remote
	calls.
	* trans.h: Add symbol for caf_is_present_on_remote and remove
	old one.

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* coarray.cc (get_arrayspec_from_expr): Treat array result of
	function calls correctly.
	(remove_coarray_from_derived_type): Prevent memory loss.
	(add_caf_get_from_remote): Correct locus.
	(find_comp): New function to find or create a new component in a
	derived type.
	(check_add_new_comp_handle_array): Handle allocatable arrays or
	non-pure/non-elemental functions in indexes of coarrays.
	(check_add_new_component): Use above function.
	(create_get_parameter_type): Rename to
	create_caf_add_data_parameter_type.
	(create_caf_add_data_parameter_type): Renaming of variable and
	make the additional data a coarray.
	(remove_caf_ref): Factor out to reuse in other caf-functions.
	(create_get_callback): Use function factored out, set locus
	correctly and ensure a kind is set for parameters.
	(add_caf_get_intrinsic): Rename to add_caf_get_from_remote and
	rename some variables.
	(coindexed_expr_callback): Skip over function created by the
	rewriter.
	(coindexed_code_callback): Filter some intrinsics not to
	process.
	(gfc_coarray_rewrite): Rewrite also contained functions.
	* trans-intrinsic.cc (gfc_conv_intrinsic_caf_get): Reflect
	changed order on caf_get_from_remote ().

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* gfortran.texi: Rename caf_get_by_ct to caf_get_from_remote.
	* trans-decl.cc (gfc_build_builtin_function_decls): Rename
	intrinsic.
	* trans-intrinsic.cc (conv_caf_func_index): Factor out
	functionality to be reused by other caf-functions.
	(conv_caf_add_call_data): Same.
	(gfc_conv_intrinsic_caf_get): Use functions factored out.
	* trans.h: Rename intrinsic symbol.

2025-02-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/107635
	* Make-lang.in: Add coarray.cc.
	* coarray.cc: New file.
