[PATCH, Fortran] (Coarray) Change declaration of CAF sync functions.

Daniel Carrera dcarrera@gmail.com
Fri Jun 10 09:58:00 GMT 2011


This is the patch recently discussed in the GFortran list, now ready for 
official submission.

As my first submission as a GSoC student, this is a simple patch mainly 
intended to familiarize me with GFortran. I changed the signature of the 
functions _gfortran_caf_sync_all and _gfortran_caf_sync_images so that 
the "stat" (status) is a function parameter. For example:

==============
BEFORE:

void *
_gfortran_caf_sync_all (char *errmsg, int errmsg_len)

==============
AFTER:

void
_gfortran_caf_sync_all (int *stat, char *errmsg, int errmsg_len)

--------------

This will be necessary to implement SYNC ALL and SYNC IMAGES correctly. 
In the process I also fixed a couple other issues: The parameters 
"errmsg" and "images" (caf_sync_images) were not passed correctly.


Attached is my patch, along with the corresponding test cases, which is 
destined for gcc/testsuite/gfortran.dg/coarray. Lastly, here is my 
ChangeLog:


=================== ./gcc/fortran/ChangeLog ===================

2011-06-07  Daniel Carrera  <dcarrera@gmail.com>

	* trans-decl.c (gfc_build_builtin_function_decls):
	Updated declaration of caf_sync_all and caf_sync_images.
	* trans-stmt.c (gfc_trans_sync): Function
	can now handle a "stat" variable that has an integer type
	different from integer_type_node.

=================== ./libgfortran/ChangeLog ===================

2011-06-07  Daniel Carrera  <dcarrera@gmail.com>

	* caf/mpi.c (_gfortran_caf_sync_all,
	_gfortran_caf_sync_images): Functions have void return type
	and move status into parameter list.
	* caf/single.c (_gfortran_caf_sync_all,
	_gfortran_caf_sync_images): Functions have void return type
	and move status into parameter list.
	* caf/libcaf.h (_gfortran_caf_sync_all,
	_gfortran_caf_sync_images): Functions have void return type
	and move status into parameter list.

=================== ./gcc/testsuite/ChangeLog ===================

2011-06-07  Daniel Carrera  <dcarrera@gmail.com>

	* gfortran.dg/coarray/sync_1.f90: New
	Test "SYNC ALL", "SYNC MEMORY" and "SYNC IMAGES".


-- 
I'm not overweight, I'm undertall.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CAF-sync_all+sync_images.patch
Type: text/x-patch
Size: 9162 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110610/a57e95b4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sync_1.f90
Type: text/x-fortran
Size: 844 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110610/a57e95b4/attachment-0001.bin>


More information about the Gcc-patches mailing list