[Patch, Fortran, Regression] PR 48059: ICE in in gfc_conv_component_ref: character function of extended type

Janus Weil janus@gcc.gnu.org
Sat Mar 12 11:16:00 GMT 2011


Hi all,

the attached patch fixes the PR in the subject line. The problem was
the following: During the interface mapping for a procedure call we
need to take special care of polymorphic arguments, since the type of
the actual argument can differ from the type of the formal argument.
Therefore we need to replace the base type of component references by
the actual type (in particular to get parent references right).

The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


2011-03-12  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/48059
	* trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
	for polymorphic arguments.

2011-03-12  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/48059
	* gfortran.dg/class_41.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr48059.diff
Type: text/x-diff
Size: 653 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110312/897998ac/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class_41.f03
Type: application/octet-stream
Size: 664 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110312/897998ac/attachment.obj>


More information about the Fortran mailing list