[patch, libfortran] Bounds checking for unpack
Thomas Koenig
tkoenig@gcc.gnu.org
Thu Aug 13 18:35:00 GMT 2009
Hello world,
I'm back from holidays now (I survived two full weeks without Internet
access!), and here's my first patch: Bounds checking for unpack.
This patch introduces a new function to count the true values in a
logical array. In a followup-patch, I want to use this function from
within the pack intrinsic, too, in order to improve maintainability a
little bit.
Regression-tested on x86_64-unknown-linux-gnu.
OK for trunk?
Thomas
2009-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34670
* runtime/bounds.c (count_0): New function.
* intrinsics/unpack_generic (unpack_bounds): New function.
(unpack_internal): Remove zero stride checks.
(unpack1): Use unpack_bounds.
(unpack1_char): Likeweise.
(unpack1_char4): Likewise
(unpack0): Likewise.
(unpack0_char): Likewise.
(unpack0_char4): Likewise.
2009-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34670
* gfortran.dg/unpack_bounds_1.f90: New test.
* gfortran.dg/unpack_bounds_2.f90: New test.
* gfortran.dg/unpack_bounds_3.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack-bounds-1.diff
Type: text/x-patch
Size: 5541 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090813/aa8a708b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack_bounds_1.f90
Type: text/x-fortran
Size: 651 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090813/aa8a708b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack_bounds_2.f90
Type: text/x-fortran
Size: 634 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090813/aa8a708b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack_bounds_3.f90
Type: text/x-fortran
Size: 723 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090813/aa8a708b/attachment-0003.bin>
More information about the Fortran
mailing list