This is the mail archive of the 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] PR29387 - ICE for intrinsics with array valued function arguments.

:ADDPATCH fortran:

This PR comes about because calls are made to intrinsics LEN and
ASSOCIATED with array valued function arguments.  Since, in extremis,
the function has to be called and a temporary produced for the result,
an ss has to be made, followed by a call to gfc_conv_expr_descriptor.
The testcase is an amalgam of the two provided by the reporter in the

It should be noted that there is a really perverse expression that still
ICEs, which has been commented out in the testcase.  I still have not
got to the bottom of this one but the core of the problem is that the
expression fed to LEN has no character length expression. Evidently
something is going wrong in the front end.  The expression can be
provided to other calls, without problem. If this patch is accepted,
I will write a PR for the new problem.

Many of the cases fixed here can be dealt with in simplification. I
wrote a prototype for LEN, which seemed to work OK but needs a lot
more work.  I thought it a good idea to get this rather inefficient
backstop into place.

Regested on PIV/Cygwin_NT - OK for trunk?


2006-10-19  Paul Thomas  <>

	PR fortran/29387
	* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
	a specific case for EXPR_VARIABLE and, in default, build an ss
	to call gfc_conv_expr_descriptor for array expressions..

2006-10-19  Paul Thomas  <>

	PR fortran/29387
	* gfortran.dg/intrinsic_actual_2.f90: New test.

Attachment: submit.diff
Description: submit.diff

Attachment: Change.Logs
Description: Change.Logs

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