[patch, fortran] Fix PR 57048

Thomas König tk@tkoenig.net
Mon Jan 28 19:49:00 GMT 2019


Hello world,

let the regression hunt continue!

the attached patch fixes a long-time regression where a c_funptr from a
module could not be found.

The solution is a bit of a hack, but so is our whole implementation of
the C interop stuff.

Regression-tested. OK for trunk?

Regards

	Thomas

2019-01-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/57048
	* interface.c (gfc_compare_types): If a derived type and an
	integer both have a derived type, and they are identical,
	this is a C binding type and compares equal.

2019-01-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/57048
	* gfortran.dg/c_funptr_1.f90: New file.
	* gfortran.dg/c_funptr_1_mod.f90: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 844 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190128/5c5507ae/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_funptr_1.f90
Type: text/x-fortran
Size: 733 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190128/5c5507ae/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_funptr_1_mod.f90
Type: text/x-fortran
Size: 376 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190128/5c5507ae/attachment-0002.bin>


More information about the Fortran mailing list