[Patch, fortran] PR51791 - [OOP] Failure to resolve typebound function call with base object in parentheses

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun Jan 8 16:36:00 GMT 2012


Dear All,

Having stated in the PR that I did not have time to fix it, after a
few hours in the workshop doing woodwork I alighted on the obvious and
simple solution :-)

A question for the standard aficianados: Are there other base object
expressions that are legal? Clearly this fix is extendable.

Bootstrapped and regtested on FC9/x86_64 - OK for trunk?

Paul

2012-01-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/PR51791
	* interface.c (matching_typebound_op): Drill down through
	possible parentheses to obtain base expression.
	* resolve.c (resolve_ordinary_assign): Extend error message for
	polymorphic assignment to advise checking for specific
	subroutine.

2012-01-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/PR51791
	* gfortran.dg/typebound_operator_7.f03: Insert parentheses
	around base object in first assignment in main program.
	* gfortran.dg/typebound_operator_7.f03: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit0801.diff
Type: text/x-patch
Size: 3232 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120108/c6f5465a/attachment.bin>


More information about the Gcc-patches mailing list