[Patch,Fortran,committed] PR40472/50520 - Fix SPREAD for scalar SOURCE=

Tobias Burnus burnus@net-b.de
Mon Jun 22 21:03:00 GMT 2009


Attached patch was committed as Rev. 148814 after approval
by Paul in the PR.

The problem was that gfc_array_size does not return any size if
SOURCE is a scalar (the mpz_t is not initialized), which then
causes problems for "mpz_get_si (size)*ncopies". The solution is
simple: One has first to check whether SOURCE= is an array.

Committed after bootstrapping, check-gfortran + check libgomp.
I also valgrind-checked the test case in the PR. (For some
reason it does not fail on my x86-64-linux system.)
The fix was also confirmed by Dominique on PPC Darwin (?).

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commit.log
Type: text/x-log
Size: 850 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090622/2528eb6a/attachment.bin>


More information about the Gcc-patches mailing list