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]

Fix for temporary allocation in spread


[CC:ing Walt Brainerd on this, because what is actually is
fixed is his bug report.]

This fixes at least part of PR 18495 (comment #7, when spread
appears in an I/O statement).  I don't have a complete test case
for the original bug report, so I can't say wether the bug is
completely fixed or not.

Regression-tested on mainline.

OK for mainline?

2005-04-13  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/18495
	* intrinsics/spread_generic.c (spread):  Remove const from
	return array descriptor.
	New variables: rrank (rank of return array),  rs (for
	calculating the size of the return array), srank (rank
	of the source array).
	Generate runtime error if the dim= argument is larger than
	the rank of the source array.
	Generate runtime error if the needed rank of the return
	array is larger than 7.
	If ret->data is null, populate the return array descriptor
	and initialize the variables for the actual operation.
	Change second, independent use of variable dim to srank.

2005-04-13  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/18495
	* gfortran.fortran-torture/execute/intrinsic_spread.f90:
	Test callee-allocated version of return array with a write
	statement.


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