{patch, fortran] PR37203: additional checks for RESHAPE

Daniel Franke franke.daniel@gmail.com
Sun Jan 4 21:24:00 GMT 2009


Hi all.

This patch adds additional argument checks for the RESHAPE intrinsic.
These checks are also implemented in simplify.c (gfc_simplify_reshape), but 
there they are only triggered if all arguments are constant. The implemented 
checks test each argument individually. 

I think that the checks during simplification could be removed, but I left 
them untouched for now.


gcc/fortran:
2009-08-04  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/37203
	* check.c (gfc_check_reshape): Additional checks for the
	SHAPE and ORDER arguments.

gcc/testsuite:
2009-08-04  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/37203
	* gfortran.dg/reshape_order_5.f90: New.
	* gfortran.dg/reshape_shape_1.f90: New.


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

Regards

	Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr37203.diff
Type: text/x-patch
Size: 5101 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090104/7f7e822f/attachment.bin>


More information about the Fortran mailing list