This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libfortran] Fix PR 38225
- From: Daniel Kraft <d at domob dot eu>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 22 Nov 2008 21:51:05 +0100
- Subject: Re: [patch, libfortran] Fix PR 38225
- References: <1227385841.2853.2.camel@meiner.onlinehome.de>
Hi Thomas,
- source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+ source_extent = 1;
+ sdim = GFC_DESCRIPTOR_RANK (source);
+ for (n = 0; n < sdim; n++)
+ {
+ index_type se;
+ se = source->dim[n].ubound + 1 - source->dim[0].lbound;
+ source_extent *= se > 0 ? se : 0;
This is there to catch the case se < 0, I guess? Could this happen and
what would it mean? (Just curious)
Daniel
--
Done: Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou