Skip to content

Commit 5c8d7a9

Browse files
committedMay 3, 2019
Add error messages, return value for clause_errchk for future use
1 parent 04644d8 commit 5c8d7a9

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed
 

‎include/flang/Error/errmsg-accel.n

+37
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,42 @@
1414
.\" * limitations under the License.
1515
.\" *
1616
.\" */
17+
.MS W 972 "The directive #pragma acc mirror is deprecated; use #pragma acc declare create instead"
18+
.MS W 973 "The directive #pragma acc reflected is deprecated; use #pragma acc declare present"
19+
.MS W 974 "The directive #pragma acc region is deprecated; use #pragma acc kernels instead"
20+
.MS W 975 "The directive #pragma acc data region is deprecated; use #pragma acc data instead"
21+
.MS W 976 "The directive #pragma acc for is deprecated; use #pragma acc loop instead"
22+
.MS W 977 "The directive #pragma acc for kernel is deprecated; use #pragma acc loop instead"
23+
.MS W 978 "The clause parallel is deprecated; use clause gang instead"
24+
.MS W 979 "The directive #pragma acc region for is deprecated; use #pragma acc kernels loop instead"
25+
.MS W 980 "The directive #pragma acc region loop is deprecated; use #pragma acc kernels loop instead"
26+
.MS W 981 "The directive #pragma acc kernels for is deprecated; use #pragma acc kernels loop instead"
27+
.MS W 982 "The directive #pragma acc deviceptr is deprecated; use #pragma acc declare deviceptr instead"
28+
.MS W 983 "The directive #pragma acc parallel for is deprecated; use #pragma acc parallel loop instead"
29+
.MS W 984 "The directive #pragma acc scalar region is deprecated; use #pragma acc serial instead"
30+
.MS W 985 "The clause local is deprecated; use clause create instead"
31+
.MS W 986 "The clause cache is deprecated; use directive #pragma acc cache instead"
32+
.MS W 987 "The clause update host is deprecated; use separate update host directive after the region instead"
33+
.MS W 988 "The clause update device is deprecated; use separate update device directive before the region instead"
34+
.MS W 989 "The clause update in is deprecated; use separate update device directeve before the region instead"
35+
.MS W 990 "The clause update out is deprecated; use update self instead"
36+
.MS W 991 "The clause pnot is deprecated; use no_create instead"
37+
.MS W 992 "The clause updatein is deprecated; use update device instead"
38+
.MS W 993 "The clause updateout is deprecated; use update self instead"
39+
.MS W 994 "The directive #pragma acc copy is deprecated; use #pragma acc declare copy instead"
40+
.MS W 995 "The directive #pragma acc copyin is deprecated; use #pragma acc declare copyin instead"
41+
.MS W 996 "The directive #pragma acc copyout is deprecated; use #pragma acc declare copyout instead"
42+
.MS W 997 "The directive #pragma acc device_resident is deprecated; use #pragma acc declare device_resident instead"
43+
.MS W 998 "The directive #pragma acc for host is deprecated; no OpenACC equivalent"
44+
.MS W 999 "The directive #pragma acc loop kernel is deprecated; no OpenACC equivalent"
1745
.MS S 1000 "Call in OpenACC region to procedure '$' which has no acc routine information"
1846
.MS S 1001 "All selected compute capabilities were disabled (see -Minfo)"
1947
.MS S 1002 "Reduction type not supported for this variable datatype - $"
2048
.MS W 1003 "Lambda capture by reference not supported in Accellerated region"
2149
.MS W 1004 "Lambda capture 'this' by reference not supported in Accellerated region"
50+
.MS W 1005 "The clause unroll is deprecated; no OpenACC equivalent"
51+
.MS W 1006 "The clause mirror is deprecated; no OpenACC equivalent"
52+
.MS W 1007 "The clause host is deprecated; no OpenACC equivalent"
2253
.\" Skipping ahead to 1011 to keep the same numbers as the fortran front-end.
2354
.MS S 1011 "Device variable cannot be THREADPRIVATE - $"
2455
.MS S 1012 "Threadprivate variables are not supported in acc routine - $"
@@ -42,8 +73,14 @@
4273
.MS F 1028 "The variable $ doesn't have predefined policy $ available"
4374
.MS F 1029 "The variable $ using policy $ is not a structure-based type"
4475
.MS F 1030 "Policy motion $ is not allowed in $ directive"
76+
.MS W 1031 "The directive #pragma acc create is deprecated; use #pragma acc declare create instead"
77+
.MS W 1032 "The directive #pragma acc present is deprecated; use #pragma acc declare present instead"
78+
.MS W 1033 "The directive #pragma acc link is deprecated; use #pragma acc declare link instead"
4579
.MS F 1034 "Only signed/unsigned 32 bits and 64 bits integer variables are allowed in bound expression. $ is is not such variable"
4680
.MS F 1035 "Only integer sibling members and global variables are allowed in bound expression. $ is is neither of them."
4781
.MS F 1036 "No global variable named $ has been defined"
4882
.MS F 1037 "Default clause can only contain include and exclude keyword."
4983
.MS W 1038 "COPY clause on a dummy variable with INTENT(IN) attribute demoted to COPYIN - $"
84+
.MS S 1039 "OpenACC data clause expected after $"
85+
.MS S 1040 "OpenACC $ data clause may not follow a device_type clause."
86+
.MS S 1041 "OpenACC $ clause may not follow a device_type clause."

‎include/flang/Error/errmsg-in.n

+3
Original file line numberDiff line numberDiff line change
@@ -1523,3 +1523,6 @@ A DO CONCURRENT variable with LOCAL_INIT locality must have a host variable of t
15231523
.MS S 1210 "Parent module $ must declare a separate module procedure."
15241524
.MS S 1211 "Submodule's ancestor module $ must be a nonintrinsic module."
15251525
.MS S 1212 "$ was previously declared to be a module procedure."
1526+
.MS S 1213 "OpenACC $ data clause may not follow a device_type clause."
1527+
.MS S 1214 "PGI Accelerator $ data clause may not follow a device_type clause."
1528+
.MS S 1215 "OpenACC data clause expected after $."

‎tools/flang1/flang1exe/semsmp.c

+9-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
/* contents of this file: */
4343

4444
static void add_clause(int, LOGICAL);
45-
static void clause_errchk(BIGINT64, char *);
45+
static bool clause_errchk(BIGINT64, char *);
4646
static void accel_sched_errchk();
4747
static void accel_nosched_errchk();
4848
static void accel_pragmagen(int, int, int);
@@ -5807,14 +5807,19 @@ add_clause(int clause, LOGICAL one_only)
58075807
CL_PRESENT(clause) = 1;
58085808
}
58095809

5810-
static void
5810+
static bool
58115811
clause_errchk(BIGINT64 bt, char *dirname)
58125812
{
58135813
int i;
5814+
bool any = false;
58145815

58155816
for (i = 0; i < CL_MAXV; i++)
5816-
if (CL_PRESENT(i) && !(CL_STMT(i) & bt))
5817-
error(533, 3, gbl.lineno, CL_NAME(i), dirname);
5817+
if (CL_PRESENT(i)) {
5818+
any = true;
5819+
if (!(CL_STMT(i) & bt))
5820+
error(533, 3, gbl.lineno, CL_NAME(i), dirname);
5821+
}
5822+
return any;
58185823
}
58195824

58205825
static void

0 commit comments

Comments
 (0)
Please sign in to comment.