aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2014-05-08 19:00:07 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2014-05-08 19:00:07 +0200
commit8a8d1a16c7a355304ad77a873eda56d5fca915e8 (patch)
treef2d0daef2d098f751fcd083d8e97e0c3481625f2 /gcc/fortran/intrinsic.c
parent9c980a137cc7c86dc7a0bf67149af3d3b8ca5367 (diff)
downloadgcc-8a8d1a16c7a355304ad77a873eda56d5fca915e8.zip
gcc-8a8d1a16c7a355304ad77a873eda56d5fca915e8.tar.gz
gcc-8a8d1a16c7a355304ad77a873eda56d5fca915e8.tar.bz2
gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET and GFC_ISYM_CAF_SEND.
2014-05-08 Tobias Burnus <burnus@net-b.de> * gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET and GFC_ISYM_CAF_SEND. * intrinsic.c (add_functions): Add only internally accessible caf_get and caf_send functions. * resolve.c (add_caf_get_intrinsic, remove_caf_get_intrinsic): New functions. (resolve_variable): Resolve expression rank and prepare for add_caf_get_intrinsic call. (gfc_resolve_expr): For variables, remove rank resolution. (resolve_ordinary_assign): Prepare call to GFC_ISYM_CAF_SEND. (resolve_code): Avoid call to GFC_ISYM_CAF_GET for the LHS of an assignment. From-SVN: r210225
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r--gcc/fortran/intrinsic.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 852ae92..4c2eaa5 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -2756,7 +2756,7 @@ add_functions (void)
make_generic ("size", GFC_ISYM_SIZE, GFC_STD_F95);
/* Obtain the stride for a given dimensions; to be used only internally.
- "make_from_module" makes inaccessible for external users. */
+ "make_from_module" makes it inaccessible for external users. */
add_sym_2 (GFC_PREFIX ("stride"), GFC_ISYM_STRIDE, CLASS_INQUIRY, ACTUAL_NO,
BT_INTEGER, gfc_index_integer_kind, GFC_STD_GNU,
NULL, NULL, gfc_resolve_stride,
@@ -2994,6 +2994,13 @@ add_functions (void)
x, BT_UNKNOWN, 0, REQUIRED);
make_generic ("loc", GFC_ISYM_LOC, GFC_STD_GNU);
+
+ /* The following function is internally used for coarray libray functions.
+ "make_from_module" makes it inaccessible for external users. */
+ add_sym_1 (GFC_PREFIX ("caf_get"), GFC_ISYM_CAF_GET, CLASS_IMPURE, ACTUAL_NO,
+ BT_REAL, dr, GFC_STD_GNU, NULL, NULL, NULL,
+ x, BT_REAL, dr, REQUIRED);
+ make_from_module();
}
@@ -3235,6 +3242,15 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+ /* The following subroutine is internally used for coarray libray functions.
+ "make_from_module" makes it inaccessible for external users. */
+ add_sym_2s (GFC_PREFIX ("caf_send"), GFC_ISYM_CAF_SEND, CLASS_IMPURE,
+ BT_UNKNOWN, 0, GFC_STD_GNU, NULL, NULL, NULL,
+ "x", BT_REAL, dr, REQUIRED, INTENT_OUT,
+ "y", BT_REAL, dr, REQUIRED, INTENT_IN);
+ make_from_module();
+
+
/* More G77 compatibility garbage. */
add_sym_3s ("alarm", GFC_ISYM_ALARM, CLASS_IMPURE, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_alarm_sub, NULL, gfc_resolve_alarm_sub,