[patch, fortran] PR33055 Runtime error in INQUIRE unit existance with -fdefault-integer-8

Jerry DeLisle jvdelisle@verizon.net
Mon Oct 1 22:20:00 GMT 2007


:ADDPATCH fortran:

Hi All,

This is a resubmission of my previous patch with the backend declaration for the 
dummy variable fixed.

Thanks to Paul Thomas for that fix.

Three test cases included.  The last checking the compile with INQUIRE within a 
module.

Regression tested on x86-64.

OK for trunk?

Regards,

Jerry

	PR fortran/33055
	* trans-io.c (create_dummy_iostat): New function to create a unique
	dummy variable expression to use with IOSTAT.
	(gfc_trans_inquire): Use the new function to pass unit number error info
	to run-time library if a regular IOSTAT variable was not given.

	PR libfortran/33055
	* io/inquire.c (inquire_via_unit):  If inquiring by unit, check for
	an error condition from the IOSTAT variable and set EXIST to false if
	there was a bad unit number.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33055-2.diff
Type: text/x-patch
Size: 2307 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071001/da478110/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inquire_11.f90
Type: text/x-fortran
Size: 309 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071001/da478110/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: negative_unit.f
Type: text/x-fortran
Size: 641 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071001/da478110/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: negative_unit_int8.f
Type: text/x-fortran
Size: 968 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071001/da478110/attachment-0003.bin>


More information about the Fortran mailing list