--- Comment #12 from tkoenig at gcc dot gnu dot org 2007-09-06 21:23
---
Fixed on trunk. Closing.
--
tkoenig at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #11 from tkoenig at alice-dsl dot net 2007-09-06 21:13 ---
Subject: Re: Wrong code for SPREAD on zero-sized
arrays
Hi Toon,
>
> --- Comment #8 from toon at moene dot indiv dot nluug dot nl 2007-09-06
> 08:56 ---
> Wouldn't it be an option to simply bail
--- Comment #10 from tkoenig at gcc dot gnu dot org 2007-09-06 19:25
---
Subject: Bug 33298
Author: tkoenig
Date: Thu Sep 6 19:25:30 2007
New Revision: 128206
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128206
Log:
2007-09-06 Thomas Koenig <[EMAIL PROTECTED]>
PR
--- Comment #9 from patchapp at dberlin dot org 2007-09-06 11:57 ---
Subject: Bug number PR 33298
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00394.html
--
http://gcc.gnu.org/bugzilla/s
--- Comment #8 from toon at moene dot indiv dot nluug dot nl 2007-09-06
08:56 ---
Wouldn't it be an option to simply bail out early (i.e., after the error
checks) in case of size == 0 ?
E.g., like this:
62
63 rrank = srank + 1;
64 if (rrank > GFC_MAX_DIMENSIONS)
--- Comment #7 from tkoenig at gcc dot gnu dot org 2007-09-04 21:03 ---
This one should be fairly straightforward.
Mine :-)
--
tkoenig at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #6 from toon at moene dot indiv dot nluug dot nl 2007-09-04
13:04 ---
Quoting spread_generic.c:
145 for (n = 0; n < ncopies; n++)
146{
147 memcpy (dest, sptr, size);
148 dest += rdelta;
149}
The C 99 Standard has the following to say
--- Comment #5 from fxcoudert at gcc dot gnu dot org 2007-09-04 10:51
---
Reduced testcase:
real :: x(0,3), y(0)
x = spread(y,2,3)
end
Backtrace:
#0 0x00431600 in memcpy ()
#1 0x0040400f in spread_internal (ret=,
source=, along=,
pncopies=, size=4)
a