Skip to content
Permalink
Browse files

Add error messages, return value for clause_errchk for future use

  • Loading branch information...
gklimowicz committed May 3, 2019
1 parent 04644d8 commit 5c8d7a9d33db6d0c627c01bd6c3ea541b905ded8
Showing with 49 additions and 4 deletions.
  1. +37 −0 include/flang/Error/errmsg-accel.n
  2. +3 −0 include/flang/Error/errmsg-in.n
  3. +9 −4 tools/flang1/flang1exe/semsmp.c
@@ -14,11 +14,42 @@
.\" * limitations under the License.
.\" *
.\" */
.MS W 972 "The directive #pragma acc mirror is deprecated; use #pragma acc declare create instead"
.MS W 973 "The directive #pragma acc reflected is deprecated; use #pragma acc declare present"
.MS W 974 "The directive #pragma acc region is deprecated; use #pragma acc kernels instead"
.MS W 975 "The directive #pragma acc data region is deprecated; use #pragma acc data instead"
.MS W 976 "The directive #pragma acc for is deprecated; use #pragma acc loop instead"
.MS W 977 "The directive #pragma acc for kernel is deprecated; use #pragma acc loop instead"
.MS W 978 "The clause parallel is deprecated; use clause gang instead"
.MS W 979 "The directive #pragma acc region for is deprecated; use #pragma acc kernels loop instead"
.MS W 980 "The directive #pragma acc region loop is deprecated; use #pragma acc kernels loop instead"
.MS W 981 "The directive #pragma acc kernels for is deprecated; use #pragma acc kernels loop instead"
.MS W 982 "The directive #pragma acc deviceptr is deprecated; use #pragma acc declare deviceptr instead"
.MS W 983 "The directive #pragma acc parallel for is deprecated; use #pragma acc parallel loop instead"
.MS W 984 "The directive #pragma acc scalar region is deprecated; use #pragma acc serial instead"
.MS W 985 "The clause local is deprecated; use clause create instead"
.MS W 986 "The clause cache is deprecated; use directive #pragma acc cache instead"
.MS W 987 "The clause update host is deprecated; use separate update host directive after the region instead"
.MS W 988 "The clause update device is deprecated; use separate update device directive before the region instead"
.MS W 989 "The clause update in is deprecated; use separate update device directeve before the region instead"
.MS W 990 "The clause update out is deprecated; use update self instead"
.MS W 991 "The clause pnot is deprecated; use no_create instead"
.MS W 992 "The clause updatein is deprecated; use update device instead"
.MS W 993 "The clause updateout is deprecated; use update self instead"
.MS W 994 "The directive #pragma acc copy is deprecated; use #pragma acc declare copy instead"
.MS W 995 "The directive #pragma acc copyin is deprecated; use #pragma acc declare copyin instead"
.MS W 996 "The directive #pragma acc copyout is deprecated; use #pragma acc declare copyout instead"
.MS W 997 "The directive #pragma acc device_resident is deprecated; use #pragma acc declare device_resident instead"
.MS W 998 "The directive #pragma acc for host is deprecated; no OpenACC equivalent"
.MS W 999 "The directive #pragma acc loop kernel is deprecated; no OpenACC equivalent"
.MS S 1000 "Call in OpenACC region to procedure '$' which has no acc routine information"
.MS S 1001 "All selected compute capabilities were disabled (see -Minfo)"
.MS S 1002 "Reduction type not supported for this variable datatype - $"
.MS W 1003 "Lambda capture by reference not supported in Accellerated region"
.MS W 1004 "Lambda capture 'this' by reference not supported in Accellerated region"
.MS W 1005 "The clause unroll is deprecated; no OpenACC equivalent"
.MS W 1006 "The clause mirror is deprecated; no OpenACC equivalent"
.MS W 1007 "The clause host is deprecated; no OpenACC equivalent"
.\" Skipping ahead to 1011 to keep the same numbers as the fortran front-end.
.MS S 1011 "Device variable cannot be THREADPRIVATE - $"
.MS S 1012 "Threadprivate variables are not supported in acc routine - $"
@@ -42,8 +73,14 @@
.MS F 1028 "The variable $ doesn't have predefined policy $ available"
.MS F 1029 "The variable $ using policy $ is not a structure-based type"
.MS F 1030 "Policy motion $ is not allowed in $ directive"
.MS W 1031 "The directive #pragma acc create is deprecated; use #pragma acc declare create instead"
.MS W 1032 "The directive #pragma acc present is deprecated; use #pragma acc declare present instead"
.MS W 1033 "The directive #pragma acc link is deprecated; use #pragma acc declare link instead"
.MS F 1034 "Only signed/unsigned 32 bits and 64 bits integer variables are allowed in bound expression. $ is is not such variable"
.MS F 1035 "Only integer sibling members and global variables are allowed in bound expression. $ is is neither of them."
.MS F 1036 "No global variable named $ has been defined"
.MS F 1037 "Default clause can only contain include and exclude keyword."
.MS W 1038 "COPY clause on a dummy variable with INTENT(IN) attribute demoted to COPYIN - $"
.MS S 1039 "OpenACC data clause expected after $"
.MS S 1040 "OpenACC $ data clause may not follow a device_type clause."
.MS S 1041 "OpenACC $ clause may not follow a device_type clause."
@@ -1523,3 +1523,6 @@ A DO CONCURRENT variable with LOCAL_INIT locality must have a host variable of t
.MS S 1210 "Parent module $ must declare a separate module procedure."
.MS S 1211 "Submodule's ancestor module $ must be a nonintrinsic module."
.MS S 1212 "$ was previously declared to be a module procedure."
.MS S 1213 "OpenACC $ data clause may not follow a device_type clause."
.MS S 1214 "PGI Accelerator $ data clause may not follow a device_type clause."
.MS S 1215 "OpenACC data clause expected after $."
@@ -42,7 +42,7 @@
/* contents of this file: */

static void add_clause(int, LOGICAL);
static void clause_errchk(BIGINT64, char *);
static bool clause_errchk(BIGINT64, char *);
static void accel_sched_errchk();
static void accel_nosched_errchk();
static void accel_pragmagen(int, int, int);
@@ -5807,14 +5807,19 @@ add_clause(int clause, LOGICAL one_only)
CL_PRESENT(clause) = 1;
}

static void
static bool
clause_errchk(BIGINT64 bt, char *dirname)
{
int i;
bool any = false;

for (i = 0; i < CL_MAXV; i++)
if (CL_PRESENT(i) && !(CL_STMT(i) & bt))
error(533, 3, gbl.lineno, CL_NAME(i), dirname);
if (CL_PRESENT(i)) {
any = true;
if (!(CL_STMT(i) & bt))
error(533, 3, gbl.lineno, CL_NAME(i), dirname);
}
return any;
}

static void

0 comments on commit 5c8d7a9

Please sign in to comment.
You can’t perform that action at this time.