gcc/libgfortran
Sandra Loosemore e78480ad09 Bind(c): Improve error checking in CFI_* functions
This patch adds additional run-time checking for invalid arguments to
CFI_establish and CFI_setpointer.  It also changes existing messages
throughout the CFI_* functions to use PRIiPTR to format CFI_index_t
values instead of casting them to int and using %d (which may not work
on targets where int is a smaller type), simplifies wording of some
messages, and fixes issues with capitalization, typos, and the like.
Additionally some coding standards problems such as >80 character lines
are addressed.

2021-07-24  Sandra Loosemore  <sandra@codesourcery.com>

	PR libfortran/101317

libgfortran/
	* runtime/ISO_Fortran_binding.c: Include <inttypes.h>.
	(CFI_address): Tidy error messages and comments.
	(CFI_allocate): Likewise.
	(CFI_deallocate): Likewise.
	(CFI_establish): Likewise.  Add new checks for validity of
	elem_len when it's used, plus type argument and extents.
	(CFI_is_contiguous): Tidy error messages and comments.
	(CFI_section): Likewise.  Refactor some repetitive code to
	make it more understandable.
	(CFI_select_part): Likewise.
	(CFI_setpointer): Likewise.  Check that source is not an
	unallocated allocatable array or an assumed-size array.

gcc/testsuite/
	* gfortran.dg/ISO_Fortran_binding_17.f90: Fix typo in error
	message patterns.
2021-07-27 21:24:26 -07:00
..
caf
config
generated
ieee
intrinsics Fix "tailing" typo. 2021-06-08 09:42:18 +02:00
io Fix "tailing" typo. 2021-06-08 09:42:18 +02:00
m4
runtime Bind(c): Improve error checking in CFI_* functions 2021-07-27 21:24:26 -07:00
acinclude.m4
aclocal.m4
c99_protos.h
ChangeLog Daily bump. 2021-07-27 00:16:27 +00:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
config.h.in
configure Fortran: Re-enable 128-bit integers for AMD GCN 2021-06-29 08:19:56 -07:00
configure.ac Fortran: Re-enable 128-bit integers for AMD GCN 2021-06-29 08:19:56 -07:00
configure.host
gfortran.map
ISO_Fortran_binding-1-tmpl.h Bind(C): Fix type encodings in ISO_Fortran_binding.h 2021-07-27 21:20:21 -07:00
ISO_Fortran_binding-2-tmpl.h Bind(C): Fix type encodings in ISO_Fortran_binding.h 2021-07-27 21:20:21 -07:00
ISO_Fortran_binding-3-tmpl.h Bind(C): Fix type encodings in ISO_Fortran_binding.h 2021-07-27 21:20:21 -07:00
kinds-override.h
libgfortran.h Fortran: Fix some issues with pointers to character. 2021-06-05 11:12:50 +00:00
libgfortran.spec.in
libtool-version
Makefile.am Bind(C): Fix type encodings in ISO_Fortran_binding.h 2021-07-27 21:20:21 -07:00
Makefile.in Bind(C): Fix type encodings in ISO_Fortran_binding.h 2021-07-27 21:20:21 -07:00
mk-kinds-h.sh Bind(C): Fix type encodings in ISO_Fortran_binding.h 2021-07-27 21:20:21 -07:00
mk-sik-inc.sh
mk-srk-inc.sh