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 * 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 * 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 * gfortran.dg/coarray/sync_1.f90: New Test "SYNC ALL", "SYNC MEMORY" and "SYNC IMAGES". -- I'm not overweight, I'm undertall.