[patch, libfortran] Fix run-time checking of ORDER to RESHAPE

Thomas Koenig tkoenig@netcologne.de
Sun Sep 7 10:22:00 GMT 2008


Hello world,

this patch fixes run-time checking of the ORDER parameter when
-fbounds-check is specified.  It uses the unlikely() macro, so
it is dependent on Tobias' commit from yesterday.  Please bear
that in mind when regression-testing :-)

The number of test cases came about because I wanted to
test each error message for the reshape_generic.c and m4 versions.
I've become cautious :-)

Regression-tested on i686-pc-linux-gnu.  OK for trunk?

	Thomas

2008-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/37203
	* intrinsics/reshape_generic.c:  Add checking on
	out-of-bounds and duplicate values of order argument.
	* m4/reshape.m4:  Likewise.
	* generated/reshape_c10.c: Regenerated.
	* generated/reshape_c16.c: Regenerated.
	* generated/reshape_c4.c: Regenerated.
	* generated/reshape_c8.c: Regenerated.
	* generated/reshape_i16.c: Regenerated.
	* generated/reshape_i4.c: Regenerated.
	* generated/reshape_i8.c: Regenerated.
	* generated/reshape_r10.c: Regenerated.
	* generated/reshape_r16.c: Regenerated.
	* generated/reshape_r4.c: Regenerated.
	* generated/reshape_r8.c: Regenerated.

2008-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/37203
	* gfortran.d/reshape_order_1.f90:  New test case.
	* gfortran.d/reshape_order_2.f90:  New test case.
	* gfortran.d/reshape_order_3.f90:  New test case.
	* gfortran.d/reshape_order_4.f90:  New test case.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_order_1.diff
Type: text/x-patch
Size: 1877 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080907/320de609/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_order_1.f90
Type: text/x-fortran
Size: 612 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080907/320de609/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_order_2.f90
Type: text/x-fortran
Size: 616 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080907/320de609/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_order_3.f90
Type: text/x-fortran
Size: 612 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080907/320de609/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_order_4.f90
Type: text/x-fortran
Size: 616 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080907/320de609/attachment-0004.bin>


More information about the Fortran mailing list