diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-06 16:26:02 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-06 16:26:02 +0000 |
commit | c6cd3066bcb72a59fecce6bfa99cb4e169a4a751 (patch) | |
tree | 6b20ae56f767cd6edf0d68afa82cbb77738f5cfc /gcc/fortran/intrinsic.texi | |
parent | cb84e3260f2c8971ed840a90546cfebf87bfae78 (diff) | |
download | gcc-c6cd3066bcb72a59fecce6bfa99cb4e169a4a751.tar.gz |
2010-04-06 Tobias Burnus <burnus@net-b.de>
PR fortran/39997
* intrinsic.c (add_functions): Add num_images.
* decl.c (gfc_match_end): Handle END CRITICAL.
* intrinsic.h (gfc_simplify_num_images): Add prototype.
* dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
and SYNC.
* gfortran.h (gfc_statement): Add enum items for those.
(gfc_exec_op) Ditto.
(gfc_isym_id): Add num_images.
* trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
(gfc_trans_sync,gfc_trans_critical): New functions.
* trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
gfc_trans_critical): Add/update prototypes.
* trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
and SYNC statements.
* trans.h (gfor_fndecl_error_stop_string) Add variable.
* resolve.c (resolve_sync): Add function.
(gfc_resolve_blocks): Handle CRITICAL.
(resolve_code): Handle CRITICAL, ERROR STOP,
(resolve_branch): Add CRITICAL constraint check.
and SYNC statements.
* st.c (gfc_free_statement): Add new statements.
* trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
(gfc_build_builtin_function_decls): Initialize it.
* match.c (gfc_match_if): Handle ERROR STOP and SYNC.
(gfc_match_critical, gfc_match_error_stop, sync_statement,
gfc_match_sync_all, gfc_match_sync_images,
gfc_match_sync_memory):
New functions.
(match_exit_cycle): Handle CRITICAL constraint.
(gfc_match_stopcode): Handle ERROR STOP.
* match.h (gfc_match_critical, gfc_match_error_stop,
gfc_match_sync_all, gfc_match_sync_images,
gfc_match_sync_memory): Add prototype.
* parse.c (decode_statement, gfc_ascii_statement,
parse_executable): Handle new statements.
(parse_critical_block): New function.
* parse.h (gfc_compile_state): Add COMP_CRITICAL.
* intrinsic.texi (num_images): Document new function.
* simplify.c (gfc_simplify_num_images): Add function.
2010-04-06 Tobias Burnus <burnus@net-b.de>
PR fortran/39997
* gfortran.dg/coarray_1.f90: New test.
* gfortran.dg/coarray_2.f90: New test.
* gfortran.dg/coarray_3.f90: New test.
2010-04-06 Tobias Burnus <burnus@net-b.de>
PR fortran/39997
* runtime/stop.c (error_stop_string): New function.
* gfortran.map (_gfortran_error_stop_string): Add.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.texi')
-rw-r--r-- | gcc/fortran/intrinsic.texi | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index b9b1c254e9c..52992ba0c41 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -204,6 +204,7 @@ Some basic guidelines for editing this document: * @code{NINT}: NINT, Nearest whole number * @code{NOT}: NOT, Logical negation * @code{NULL}: NULL, Function that returns an disassociated pointer +* @code{NUM_IMAGES}: NUM_IMAGES, Number of images * @code{OR}: OR, Bitwise logical OR * @code{PACK}: PACK, Pack an array into an array of rank one * @code{PERROR}: PERROR, Print system error message @@ -8375,6 +8376,49 @@ REAL, POINTER, DIMENSION(:) :: VEC => NULL () +@node NUM_IMAGES +@section @code{NUM_IMAGES} --- Function that returns the number of images +@fnindex NUM_IMAGES +@cindex coarray, NUM_IMAGES +@cindex images, number of + +@table @asis +@item @emph{Description}: +Returns the number of images. + +@item @emph{Standard}: +Fortran 2008 and later + +@item @emph{Class}: +Transformational function + +@item @emph{Syntax}: +@code{RESULT = NUM_IMAGES()} + +@item @emph{Arguments}: None. + +@item @emph{Return value}: +Scalar default-kind integer. + +@item @emph{Example}: +@smallexample +INTEGER :: value[*] +INTEGER :: i +value = THIS_IMAGE() +SYNC ALL +IF (THIS_IMAGE() == 1) THEN + DO i = 1, NUM_IMAGES() + WRITE(*,'(2(a,i0))') 'value[', i, '] is ', value[i] + END DO +END IF +@end smallexample + +@item @emph{See also}: +@c FIXME: ref{THIS_IMAGE} +@end table + + + @node OR @section @code{OR} --- Bitwise logical OR @fnindex OR |