https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101317
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Sandra Loosemore <san...@gcc.gnu.org>: https://gcc.gnu.org/g:e78480ad0983cf75813af5e02d68cdad09e441e9 commit r12-2555-ge78480ad0983cf75813af5e02d68cdad09e441e9 Author: Sandra Loosemore <san...@codesourcery.com> Date: Thu Jul 15 08:48:45 2021 -0700 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 <san...@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.