This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,fortran] fix PR 32599 and PR 32601


hi all,

the attached patch fixes PR 32601 and 32599. for 32601, the user is allowed to print out a c_ptr or c_funptr by default. however, if -pedantic or -std=f2003 is given, an error message is reported. for 32599, the compiler now enforces that character string dummy args have a length of 1 (or ommitted) if the procedure is bind(c).

bootstrapped and regtested on x86 linux with no new failures, but i am still seeing the following regression:

FAIL: gfortran.fortran-torture/compile/pr32417.f90, "-O" (internal compiler error)

ChangeLog entry:

2007-07-06 Christopher D. Rickett <crickett@lanl.gov>

	PR fortran/32599
	* decl.c (verify_c_interop_param): Require character string dummy
	args to BIND(C) procedures to have length 1.
	* resolve.c (resolve_fl_procedure): Modify parameter checking for
	BIND(C) procedures.
	* gfortran.dg/32599.f03: New test case.

	PR fortran/32601
	* resolve.c (gfc_iso_c_func_interface): Verify that a valid
	expression is given as an argument to C_LOC and C_ASSOCIATED.
	* trans-io.c (transfer_expr): Add argument for code block.  Add
	standards check to determine if an error message should be
	reported for printing C_PTR or C_FUNPTR.
	(transfer_array_component): Update arguments to transfer_expr.
	(gfc_trans_transfer): Ditto.
	* gfortran.dg/32601.f03: New test case.
	* gfortran.dg/32601_1.f03: Ditto.
	* gfortran.dg/c_ptr_tests_9.f03: Updated dg-options.
	* gfortran.dg/c_ptr_tests_10.f03: Ditto.

* symbol.c (gen_cptr_param): Fix whitespace.


i apologize if i got the ChangeLog entry form wrong; the patch is mostly for the two PRs but there is also a little whitespace fixup for symbol.c.


thanks.
Chris

Attachment: icb.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]