2021-04-08  Release Manager

	* GCC 10.3.0 released.

2021-04-01  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2021-04-01  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/99840
	* simplify.c (gfc_simplify_transpose): Properly initialize
	resulting shape.

2021-03-29  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-03-26  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99651
	* intrinsic.c (gfc_intrinsic_func_interface): Set
	attr.proc = PROC_INTRINSIC if FL_PROCEDURE.

2021-03-25  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-03-23  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/93660
	* trans-decl.c (build_function_decl): Add comment;
	increment hidden_typelist for caf_token/caf_offset.
	* trans-types.c (gfc_get_function_type): Add comment;
	add missing caf_token/caf_offset args.

2021-03-25  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-03-24  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99369
	* resolve.c (resolve_operator): Make 'msg' buffer larger
	and use snprintf.

2021-03-23  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-03-22  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99688
	* match.c (select_type_set_tmp, gfc_match_select_type,
	gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
	* resolve.c (resolve_select_type): Likewise.

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

	Backported from master:
	2021-03-10  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/99205
	* data.c (gfc_assign_data_value): Reject non-constant character
	length for lvalue.
	* trans-array.c (gfc_conv_array_initializer): Restrict loop to
	elements which are defined to avoid NULL pointer dereference.

2021-03-15  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2021-03-15  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/99545
	* trans-stmt.c (gfc_trans_allocate): Mark the initialization
	assignment by setting init_flag.

2021-02-26  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2021-01-14  Harald Anlauf  <anlauf@gmx.de>

	* gfortran.h (gfc_resolve_substring): Add prototype.
	* primary.c (match_string_constant): Simplify substrings with
	constant starting and ending points.
	* resolve.c: Rename resolve_substring to gfc_resolve_substring.
	(gfc_resolve_ref): Use renamed function gfc_resolve_substring.

2021-02-24  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2021-02-23  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/99124
	* resolve.c (resolve_fl_procedure): Include class results in
	the test for F2018, C15100.
	* trans-array.c (get_class_info_from_ss): Do not use the saved
	descriptor to obtain the class expression for variables. Use
	gfc_get_class_from_expr instead.

2021-02-23  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2021-02-21  Harald Anlauf  <anlauf@gmx.de>

	* trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
	allocatable intent(out) argument.

2021-02-22  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-02-22  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99171
	* trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
	dummy procs as nonoptional as no special treatment is needed.

2021-02-22  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-02-19  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99027
	* simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
	when using dim=.

2021-02-19  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-02-16  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99111
	* io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
	as (array-valued) FORMAT tag.

2021-02-12  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2021-02-12  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/99043
	* trans-expr.c (gfc_conv_procedure_call): Don't reset
	rank of assumed-rank array.

2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/98897
	* match.c (gfc_match_call): Include associate names as possible
	entities with typebound subroutines. The target needs to be
	resolved for the type.

2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/99060
	* primary.c (gfc_match_varspec): Test for non-null 'previous'
	before using its name in the error message.

2021-01-28  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2021-01-28  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/86470
	* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
	size is NULL (as documented).

2021-01-25  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2021-01-25  Steve Kargl  <kargl@gcc.gnu.org>

	PR fortran/98517
	* resolve.c (resolve_charlen): Check that length expression is
	present before testing for scalar/integer..

2021-01-25  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-12-29  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/93833
	* trans-array.c (get_array_ctor_var_strlen): If the character
	length backend_decl cannot be found, convert the expression and
	use the string length. Clear up some minor white space issues
	in the rest of the file.

2021-01-23  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-12-26  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/98022
	* data.c (gfc_assign_data_value): Throw an error for inquiry
	references. Follow with corrected code that would provide the
	expected result and provides clean error recovery.

2021-01-23  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-12-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/98022
	* data.c (gfc_assign_data_value): Handle inquiry references in
	the data statement object list.

2021-01-07  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2021-01-06  Harald Anlauf  <anlauf@gmx.de>

	* resolve.c (resolve_component): Add check for valid CLASS
	reference before trying to access CLASS data.

2021-01-07  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-08-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/96325
	* primary.c (gfc_match_varspec): In the case that a component
	reference is added to an intrinsic type component, emit the
	error message in this function.

2021-01-07  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/83118
	* trans-array.c (gfc_alloc_allocatable_for_assignment): Make
	sure that class expressions are captured for dummy arguments by
	use of gfc_get_class_from_gfc_expr otherwise the wrong vptr is
	used.
	* trans-expr.c (gfc_get_class_from_gfc_expr): New function.
	(gfc_get_class_from_expr): If a constant expression is
	encountered, return NULL_TREE;
	(gfc_trans_assignment_1): Deallocate rhs allocatable components
	after passing derived type function results to class lhs.
	* trans.h : Add prototype for gfc_get_class_from_gfc_expr.

2021-01-07  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-12-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/83118
	PR fortran/96012
	* resolve.c (resolve_ordinary_assign): Generate a vtable if
	necessary for scalar non-polymorphic rhs's to unlimited lhs's.
	* trans-array.c (get_class_info_from_ss): New function.
	(gfc_trans_allocate_array_storage): Defer obtaining class
	element type until all sources of class exprs are tried. Use
	class API rather than TREE_OPERAND. Look for class expressions
	in ss->info by calling get_class_info_from_ss. After, obtain
	the element size for class descriptors. Where the element type
	is unknown, cast the data as character(len=size) to overcome
	unlimited polymorphic problems.
	(gfc_conv_ss_descriptor): Do not fix class variable refs.
	(build_class_array_ref, structure_alloc_comps): Replace code
	replicating the new function gfc_resize_class_size_with_len.
	(gfc_alloc_allocatable_for_assignment): Obtain element size
	for lhs in cases of deferred characters and class enitities.
	Move code for the element size of rhs to start of block. Clean
	up extraction of class parameters throughout this function.
	After the shape check test whether or not the lhs and rhs
	element sizes are the same. Use earlier evaluation of
	'cond_null'. Reallocation of lhs only to happen if size changes
	or element size changes.
	* trans-expr.c (gfc_resize_class_size_with_len): New function.
	(gfc_get_class_from_expr): If a constant expression is
	encountered, return NULL_TREE;
	(trans_scalar_class_assign): New function.
	(gfc_conv_procedure_call): Ensure the vtable is present for
	passing a non-class actual to an unlimited formal.
	(trans_class_vptr_len_assignment): For expressions of type
	BT_CLASS, extract the class expression if necessary. Use a
	statement block outside the loop body. Ensure that 'rhs' is
	of the correct type. Obtain rhs vptr in all circumstances.
	(gfc_trans_scalar_assign): Call trans_scalar_class_assign to
	make maximum use of the vptr copy in place of assignment.
	(trans_class_assignment): Actually do reallocation if needed.
	(gfc_trans_assignment_1): Simplify some of the logic with
	'realloc_flag'. Set 'vptr_copy' for all array assignments to
	unlimited polymorphic lhs.
	* trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
	with_len to correct span for unlimited polymorphic decls.
	* trans.h : Add prototype for gfc_resize_class_size_with_len.

2021-01-04  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2021-01-01  Harald Anlauf  <anlauf@gmx.de>

	* class.c (gfc_find_vtab): Add check on attribute is_class.

2021-01-04  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-12-17  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/92587
	* match.c (gfc_match_assignment): Move gfc_find_vtab call from here ...
	* resolve.c (gfc_resolve_code): ... to here.

2020-12-28  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-08-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/96100
	PR fortran/96101
	* trans-array.c (get_array_charlen): Tidy up the evaluation of
	the string length for array constructors. Avoid trailing array
	references. Ensure string lengths of deferred length components
	are set. For parentheses operator apply string  length to both
	the primary expression and the enclosed expression.

2020-12-28  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-08-02  Paul Thomas  <pault@gcc.gnu.org>

	PR target/96320
	* interface.c (gfc_check_dummy_characteristics): If a module
	procedure arrives with assumed shape in the interface and
	deferred shape in the procedure itself, update the latter and
	copy the lower bounds.

2020-12-27  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-12-25  Harald Anlauf  <anlauf@gmx.de>

	* data.c (gfc_assign_data_value): Restrict use of
	create_character_initializer to constant initializers.
	* trans-expr.c (gfc_conv_initializer): Ensure that character
	initializer is constant, otherwise fall through to get the same
	error handling as for non-character cases.

2020-12-19  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-12-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/98307
	* trans-stmt.c (check_forall_dependencies): Extend dependency
	check to allocatable components of derived types.

2020-12-06  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-11-29  Harald Anlauf  <anlauf@gmx.de>

	* expr.c (simplify_parameter_variable): Fix up character length
	after copying an array-valued expression.

2020-12-04  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-12-03  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95342
	* decl.c (gfc_match_function_decl): Avoid NULL pointer dereference.
	(gfc_match_subroutine): Likewise.

2020-11-25  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-11-25  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/85796
	* resolve.c (traverse_data_list): Fix copy&paste errors; catch
	step=0 in implied do loop.

2020-11-12  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-11-12  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/97782
	* trans-openmp.c (gfc_trans_oacc_construct, gfc_trans_omp_parallel_do,
	gfc_trans_omp_parallel_do_simd, gfc_trans_omp_parallel_sections,
	gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
	gfc_trans_omp_single, gfc_trans_omp_task, gfc_trans_omp_teams
	gfc_trans_omp_target, gfc_trans_omp_target_data,
	gfc_trans_omp_workshare): Use code->loc instead of input_location
	when building the OMP_/OACC_ construct.

2020-11-12  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-11-10  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/95847
	* trans-decl.c (gfc_get_symbol_decl): Do not (re)set the location
	of an external procedure.
	(build_entry_thunks, generate_coarray_init, create_main_function,
	gfc_generate_function_code): Use fndecl's location in BIND_EXPR.

2020-11-11  Jakub Jelinek  <jakub@redhat.com>

	Backported from master:
	2020-11-11  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/97768
	* misc.c (gfc_typename): Use ex->value.character.length only if
	ex->expr_type == EXPR_CONSTANT.  If ex->ts.deferred, print : instead
	of length.  If ex->ts.u.cl && ex->ts.u.cl->length == NULL, print *
	instead of length.  Otherwise if character length is non-constant,
	print just CHARACTER or CHARACTER(KIND=N).

2020-11-06  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-11-06  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/97652
	* module.c (mio_symbol): Fix symbol name for pdt_type.

2020-11-06  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2020-11-06  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (oacc_is_parallel, resolve_oacc_params_in_parallel):
	Remove.
	(resolve_oacc_loop_blocks): Don't call the former.

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

	Backported from master:
	2020-10-27  Harald Anlauf  <anlauf@gmx.de>

	* resolve.c (gfc_impure_variable): A dummy argument with the VALUE
	attribute may be redefined without making a procedure impure.

2020-11-03  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2020-11-03  Thomas Schwinge  <thomas@codesourcery.com>

	PR fortran/92793
	* trans-openmp.c (gfc_trans_omp_clauses): More precise location
	information for OpenACC 'gang', 'worker', 'vector' clauses with
	argument.

2020-11-02  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2020-11-02  Thomas Schwinge  <thomas@codesourcery.com>

	PR fortran/92793
	* trans.c (gfc_set_backend_locus): Use 'gfc_get_location'.
	(gfc_restore_backend_locus): Adjust.

2020-10-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-10-16  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95979
	* expr.c (gfc_check_init_expr): Fix check of return code from
	gfc_intrinsic_func_interface.
	* intrinsic.c (gfc_intrinsic_func_interface): Add further attempt
	of simplification of elemental intrinsics with array arguments.
	* iresolve.c (gfc_resolve_index_func): Keep optional KIND argument
	for simplification of elemental use of INDEX.

2020-10-08  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-10-04  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/97272
	* trans-intrinsic.c (strip_kind_from_actual): Helper function for
	removal of KIND argument.
	(gfc_conv_intrinsic_minmaxloc): Ignore KIND argument here, as it
	is treated elsewhere.

2020-09-28  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Revert:
	2020-09-27  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95614
	* decl.c (gfc_get_common): Use gfc_match_common_name instead
	of match_common_name.
	* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
	of match_common_name.
	* match.c : Rename match_common_name to gfc_match_common_name.
	* match.c (gfc_match_common): Use gfc_match_common_name instead
	of match_common_name.
	* match.h : Rename match_common_name to gfc_match_common_name.
	* resolve.c (resolve_common_vars): Check each symbol in a
	common block has a global symbol.  If there is a global symbol
	issue an error if the symbol type is known as is not a common
	block name.

2020-09-27  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-09-27  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95614
	* decl.c (gfc_get_common): Use gfc_match_common_name instead
	of match_common_name.
	* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
	of match_common_name.
	* match.c : Rename match_common_name to gfc_match_common_name.
	* match.c (gfc_match_common): Use gfc_match_common_name instead
	of match_common_name.
	* match.h : Rename match_common_name to gfc_match_common_name.
	* resolve.c (resolve_common_vars): Check each symbol in a
	common block has a global symbol.  If there is a global symbol
	issue an error if the symbol type is known as is not a common
	block name.

2020-09-18  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-09-17  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/96041
	PR fortran/93423
	* decl.c (gfc_match_submod_proc): Avoid later double-free
	in the error case.

2020-09-18  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-02  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/93423
	* resolve.c (resolve_symbol): Avoid NULL pointer dereference.

2020-09-11  Jakub Jelinek  <jakub@redhat.com>

	Backported from master:
	2020-09-02  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/96859
	* check.c (gfc_boz2real, gfc_boz2int): When clearing first two bits,
	change also '2' to '0' and '3' to '1' rather than just handling '4'
	through '7'.

2020-09-09  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-09-09  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/95109
	PR fortran/94690
	* resolve.c (gfc_resolve_code): Also call
	gfc_resolve_omp_parallel_blocks for 'distribute parallel do (simd)'.
	* openmp.c (gfc_resolve_omp_parallel_blocks): Handle it.
	* trans-openmp.c (gfc_trans_omp_target): For TARGET_PARALLEL_DO_SIMD,
	call simd not do processing function.

2020-09-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2020-09-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* intrinsic.texi: Fix description of FINDLOC result.

2020-09-01  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-09-01  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95398
	* resolve.c (resolve_select_type): Add check for BT_CLASS
	type before using the CLASS_DATA macro which will have a
	NULL pointer to derive components if it isn't BT_CLASS.

2020-08-31  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2020-08-28  Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/94672
	* trans-array.c (gfc_trans_g77_array): Check against the parm decl and
	set the nonparm decl used for the is-present check to NULL if absent.

2020-08-27  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-08-27  Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95882
	* decl.c (char_len_param_value): Check gfc_seen_div0 and
	if it is set return MATCH_ERROR.

2020-08-11  Paul Thomas  <pault@gcc.gnu.org>

	Backported from master:
	2020-08-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/96312
	* trans-expr.c (fcncall_realloc_result): Only compare shapes if
	lhs was allocated..

2020-07-29  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-07-29  Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/96319
	* intrinsic.c (gfc_convert_type_warn):  Add check for
	LOGICAL type so that warnings are not output.

2020-07-27  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95612
	* expr.c (gfc_check_pointer_assigb): Output an error if
	rvalue is a zero sized array or output an error if rvalue
	doesn't have a symbol tree.

2020-07-26  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-06-22  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95585
	* check.c (gfc_check_reshape): Add check for a value when
	the symbol has an attribute flavor FL_PARAMETER.

2020-07-23  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-10  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95980
	* class.c (gfc_add_component_ref, gfc_build_class_symbol):
	Add checks for NULL pointer dereference.
	* primary.c (gfc_variable_attr): Likewise.
	* resolve.c (resolve_variable, resolve_assoc_var)
	(resolve_fl_var_and_proc, resolve_fl_variable_derived)
	(resolve_symbol): Likewise.

2020-07-23  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-06  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95980
	* match.c (copy_ts_from_selector_to_associate, build_class_sym):
	Distinguish between unlimited polymorphic and ordinary variables
	to avoid NULL pointer dereference.
	* resolve.c (resolve_select_type):
	Distinguish between unlimited polymorphic and ordinary variables
	to avoid NULL pointer dereference.

2020-07-23  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-10  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/96086
	* match.c (gfc_match_select_rank): Catch NULL pointer
	dereference.
	* resolve.c (resolve_assoc_var): Catch NULL pointer dereference
	that may occur after an illegal declaration.

2020-07-23  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-21  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/89574
	* trans-decl.c (gfc_get_extern_function_decl): Check whether a
	symbol belongs to a different module.

2020-07-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2020-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/96220
	* dump-parse-tree.c (get_c_type_name): Always use the entries from
	c_interop_kinds_table to find the correct C type.

2020-07-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/96018
	* frontend-passes.c (gfc_check_externals): Adjust formatting.
	(implicit_pure_call): New function.
	(implicit_pure_expr): New function.
	(gfc_fix_implicit_pure): New function.
	* gfortran.h (gfc_fix_implicit_pure): New prototype.
	* parse.c (translate_all_program_units): Call gfc_fix_implicit_pure.

2020-07-23  Release Manager

	* GCC 10.2.0 released.

2020-07-13  Julian Brown  <julian@codesourcery.com>

	Backported from master:
	2020-07-09  Julian Brown  <julian@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_clauses): Use 'inner' not 'decl' for
	derived type members which themselves have derived types.

2020-07-08  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-06  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95709
	* resolve.c (gfc_resolve_code): Check for valid arguments to
	assigned GOTO.

2020-07-06  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-07-02  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/93337
	* class.c (gfc_find_derived_vtab): Punt if name is not set.

2020-07-05  Thomas Koenig  <tkoenig@gcc.gnu.org>

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

	PR fortran/95366
	* gfortran.h (gfc_typename): Add optional argument for_hash.
	* misc.c (gfc_typename): When for_hash is true, just retur
	  CHARACTER(kind).
	* class.c (gfc_intrinsic_hash_value): Call gfc_typename with
	  for_hash = true.

2020-07-02  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-30  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/88379
	* resolve.c (resolve_assoc_var): Avoid NULL pointer dereference.

2020-07-01  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-07-01  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95829
	* decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
	of "*)".

2020-06-30  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-29  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95978
	* decl.c (gfc_match_data): Avoid NULL pointer dereference.

2020-06-30  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-29  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/71706
	* trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
	bounds-checking code.

2020-06-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2020-06-29  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/95743
	* trans-decl.c (gfc_generate_function_code): Do not generate
	recursion check for compiler-generated procedures.

2020-06-29  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-28  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95340
	* match.c (gfc_match_select_rank): Do not dereference NULL pointer.

2020-06-29  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-28  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95880
	* symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
	otherwise fall back to sym->name.

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

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

	PR fortran/95881
	* resolve.c (resolve_symbol): Avoid NULL pointer dereference.

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

	Backported from master:
	2020-06-25  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95826
	* decl.c (gfc_match_decl_type_spec): Replace a fixed size
	buffer by a pointer and reallocate if necessary.

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

	Backported from master:
	2020-06-25  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95828
	* match.c (select_rank_set_tmp): Enlarge internal buffer used in
	generating a mangled name.
	* resolve.c (resolve_select_rank): Likewise.

2020-06-25  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-24  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95827
	* iresolve.c (gfc_get_string): Enlarge internal buffer used in
	generating the mangled name.

2020-06-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backported from master:
	2020-06-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/95812
	* dependency.c (ref_same_as_full_array): Handle case of AR_FULL
	vs. AR_FULL.

2020-06-23  Mark Eggleston  <markeggleston@gcc.gnu.org>

	Backported from master:
	2020-06-22  Steven G. Kargl  <kargl@gcc.gnu.org>
		    Mark Eggleston  <markeggleston@gcc.gnu.org>

	PR fortran/95708
	* intrinsic.c (add_functions): Replace CLASS_INQUIRY with
	CLASS_TRANSFORMATIONAL for intrinsic num_images.
	(make_generic): Replace ACTUAL_NO with ACTUAL_YES for
	intrinsic team_number.
	* resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
	exists before using it.

2020-06-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-20  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95707
	* gfortran.h (gfc_common_head): Enlarge buffer.
	* trans-common.c (gfc_sym_mangled_common_id): Enlarge temporary
	buffers, and add check on length on mangled name to prevent
	overflow.

2020-06-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-20  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95688
	* iresolve.c (gfc_get_string): Enlarge static buffer size.

2020-06-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-20  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95687
	* class.c (get_unique_type_string): Return a string with dynamic
	length.
	(get_unique_hashed_string, gfc_hash_value): Use dynamic result
	from get_unique_type_string instead of static buffer.

2020-06-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-20  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95689
	* interface.c (check_sym_interfaces): Enlarge temporary buffer,
	and add check on length on mangled name to prevent overflow.

2020-06-22  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-20  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95587
	* match.c (gfc_match_equivalence): Check constraints on
	EQUIVALENCE objects also for CLASS variables.

2020-06-17  Harald Anlauf  <anlauf@gmx.de>

	Backported from master:
	2020-06-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95088
	* class.c (get_unique_type_string): Replace use of fixed size
	buffer by internally passing a pointer to strings.

2020-06-14  Steven G. Kargl  <kargl@gcc.gnu.org>
	    Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95544
	* check.c (invalid_null_arg): Rename to gfc_invalid_null_arg.
	(gfc_check_associated, gfc_check_kind, gfc_check_merge)
	(gfc_check_shape, gfc_check_size, gfc_check_spread)
	(gfc_check_transfer): Adjust.
	(gfc_check_len_lentrim, gfc_check_trim): Check for NULL() argument.
	* gfortran.h: Declare gfc_invalid_null_arg ().
	* intrinsic.c (check_arglist): Check for NULL() argument.

2020-06-14  Steve Kargl  <kargl@gcc.gnu.org>
	    Harald Anlauf  <anlauf@gmx.de>

	PR fortran/93366
	* check.c (gfc_check_associated, invalid_null_arg): Factorize
	check for presence of invalid NULL() argument.
	(gfc_check_kind, gfc_check_merge, gfc_check_shape)
	(gfc_check_sizeof, gfc_check_spread, gfc_check_transfer): Use this
	check for presence of invalid NULL() arguments.

2020-06-14  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95503
	* expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
	of pointer assignment if lhs cannot be simply contiguous.

2020-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/94109
	* class.c (finalize_component): Return early if finalization has
	already happened for expression and component within namespace.
	* gfortran.h (gfc_was_finalized): New type.
	(gfc_namespace): Add member was_finalzed.
	(gfc_expr): Remove finalized.
	* symbol.c (gfc_free_namespace): Free was_finalized.

2020-06-11  Harald Anlauf  <anlauf@gmx.de>
	    Steven G. Kargl   <kargl@gcc.gnu.org>

	PR fortran/95611
	* decl.c (access_attr_decl): Use correct symbol in error message.

2020-06-11  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95091
	* class.c (gfc_hash_value): Add cast.

2020-06-11  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95091
	* class.c (get_unique_type_string, gfc_hash_value): Enlarge
	buffers, and check whether the strings returned by
	get_unique_type_string() fit.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95373
	* primary.c (is_inquiry_ref): Move validity check of inquiry
	references against selected Fortran standard from here...
	(gfc_match_varspec) ...to here.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95373
	* primary.c (is_inquiry_ref): Check validity of inquiry
	references against selected Fortran standard.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95106
	* trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
	for name-mangling.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/95530
	PR fortran/95537
	* decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
	string copy to detect buffer overflow.
	* gfortran.h (gfc_common_head): Enlarge buffer.
	* trans-common.c (finish_equivalences): Enhance string copy to
	detect buffer overflow.
