e78480ad09
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. |
||
---|---|---|
.. | ||
backtrace.c | ||
bounds.c | ||
compile_options.c | ||
convert_char.c | ||
environ.c | ||
error.c | ||
fpu.c | ||
in_pack_generic.c | ||
in_unpack_generic.c | ||
ISO_Fortran_binding.c | ||
main.c | ||
memory.c | ||
minimal.c | ||
pause.c | ||
select_inc.c | ||
select.c | ||
stop.c | ||
string.c |