Fortran: -fc-prototypes, deferred shape and deferred length dummies [PR125902]

Commit r17-1785 fixed the C prototypes emitted by -fc-prototypes for
procedure interfaces with deferred shape and deferred length dummies, but
did not consistently detect when "#include <ISO_Fortran_binding.h>" was
needed.  Use common helper function to handle this.

	PR fortran/125902

gcc/fortran/ChangeLog:

	* dump-parse-tree.cc (needs_CFI_cdesc): New helper function to
	determine when struct CFI_cdesc_t is used.
	(has_cfi_cdesc): Use it here...
	(get_c_type_name): ... and here.

gcc/testsuite/ChangeLog:

	* gfortran.dg/c-prototypes_2.F90: New test.

(cherry picked from commit fdffb66e398d4440116a7d7834aae11053973ffe)
2 files changed