This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] PR29507 and PR31404 - scalarization in initialization expressions


:ADDPATCH fortran:

This patch is concerned with "scalarizing" elemental, intrinsic
function calls, in initialization expressions, that have array
arguments.  The fix is a straightforward bit of graft that gathers the
arguments and applies the function to them in sequence, simplifying
along the way.  The result is an array, whose elements are the
function values.  Care has to be taken for scalar and missing,
optional arguments.  The shape of the result is assumed to be that of
the first argument and its characteristics those of the original
expression.  The testcase is a combination and expansion of the
reporters'.

A rudimentary test for conformance has been added.
gfc_check_conformance was tried but segfaulted because the expressions
are missing bits and pieces that this function requires.

Regtested on x86_ia64/FC5 - OK for trunk?

Paul

2007-04-05 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29507
	PR fortran/31404
	* expr.c (scalarize_intrinsic_call): New function to
	scalarize elemental intrinsic functions in initialization
	expressions.
	(check_init_expr): Detect elemental intrinsic functions
	in initalization expressions and call previous.

2007-04-05 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29507
	PR fortran/31404
	* gfortran.dg/initialization_6.f90: New test.



--
Saint Augustine - "O Lord, help me to be pure, but not yet"

Attachment: pr29507.diff
Description: Text document


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