gcc/libgfortran/runtime
Tobias Burnus 0cbf03689e PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling
Fortran: Fix attributes and bounds in ISO_Fortran_binding.

2021-07-26  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
	    Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/93308
	PR fortran/93963
	PR fortran/94327
	PR fortran/94331
	PR fortran/97046

gcc/fortran/ChangeLog:

	* trans-decl.c (convert_CFI_desc): Only copy out the descriptor
	if necessary.
	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
	handling which reflect a previous intermediate version of the
	standard. Only copy out the descriptor if necessary.

libgfortran/ChangeLog:

	* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Add code
	to verify the descriptor. Correct bounds calculation.
	(gfc_desc_to_cfi_desc): Add code to verify the descriptor.

gcc/testsuite/ChangeLog:

	* gfortran.dg/ISO_Fortran_binding_1.f90: Add pointer attribute,
	this test is still erroneous but now it compiles.
	* gfortran.dg/bind_c_array_params_2.f90: Update regex to match
	code changes.
	* gfortran.dg/PR93308.f90: New test.
	* gfortran.dg/PR93963.f90: New test.
	* gfortran.dg/PR94327.c: New test.
	* gfortran.dg/PR94327.f90: New test.
	* gfortran.dg/PR94331.c: New test.
	* gfortran.dg/PR94331.f90: New test.
	* gfortran.dg/PR97046.f90: New test.
2021-07-26 14:32:53 +02:00
..
backtrace.c Update copyright years. 2021-01-04 10:26:59 +01:00
bounds.c Update copyright years. 2021-01-04 10:26:59 +01:00
compile_options.c Update copyright years. 2021-01-04 10:26:59 +01:00
convert_char.c Update copyright years. 2021-01-04 10:26:59 +01:00
environ.c Update copyright years. 2021-01-04 10:26:59 +01:00
error.c Update copyright years. 2021-01-04 10:26:59 +01:00
fpu.c Update copyright years. 2021-01-04 10:26:59 +01:00
in_pack_generic.c Update copyright years. 2021-01-04 10:26:59 +01:00
in_unpack_generic.c Update copyright years. 2021-01-04 10:26:59 +01:00
ISO_Fortran_binding.c PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling 2021-07-26 14:32:53 +02:00
main.c Update copyright years. 2021-01-04 10:26:59 +01:00
memory.c Update copyright years. 2021-01-04 10:26:59 +01:00
minimal.c Update copyright years. 2021-01-04 10:26:59 +01:00
pause.c Update copyright years. 2021-01-04 10:26:59 +01:00
select_inc.c Update copyright years. 2021-01-04 10:26:59 +01:00
select.c Update copyright years. 2021-01-04 10:26:59 +01:00
stop.c Update copyright years. 2021-01-04 10:26:59 +01:00
string.c libgfortran: Fix negation for largest integer [PR81986] 2021-03-03 08:07:16 +01:00