@@ -11316,6 +11316,7 @@ c_finish_omp_clauses (tree clauses)
"%qE has invalid type for %<reduction(%s)%>",
t, r_name);
remove = true;
+ break;
}
}
else if (OMP_CLAUSE_REDUCTION_PLACEHOLDER (c) == error_mark_node)
@@ -11323,6 +11324,7 @@ c_finish_omp_clauses (tree clauses)
error_at (OMP_CLAUSE_LOCATION (c),
"user defined reduction not found for %qD", t);
remove = true;
+ break;
}
else if (OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
{
@@ -11406,6 +11408,7 @@ c_finish_omp_clauses (tree clauses)
error_at (OMP_CLAUSE_LOCATION (c),
"%qE must be %<threadprivate%> for %<copyin%>", t);
remove = true;
+ break;
}
goto check_dup_generic;
@@ -11615,8 +11618,9 @@ c_finish_omp_clauses (tree clauses)
error_at (OMP_CLAUSE_LOCATION (c),
"%qE is not an argument in %<uniform%> clause", t);
remove = true;
+ break;
}
- break;
+ goto check_dup_generic;
case OMP_CLAUSE_NOWAIT:
if (copyprivate_seen)
@@ -5188,12 +5188,16 @@ finish_omp_clauses (tree clauses)
if (t == NULL_TREE)
t = integer_one_node;
if (t == error_mark_node)
- remove = true;
+ {
+ remove = true;
+ break;
+ }
else if (!type_dependent_expression_p (t)
&& !INTEGRAL_TYPE_P (TREE_TYPE (t)))
{
error ("linear step expression must be integral");
remove = true;
+ break;
}
else
{
@@ -5210,7 +5214,10 @@ finish_omp_clauses (tree clauses)
MINUS_EXPR, sizetype, t,
OMP_CLAUSE_DECL (c));
if (t == error_mark_node)
- remove = true;
+ {
+ remove = true;
+ break;
+ }
}
}
OMP_CLAUSE_LINEAR_STEP (c) = t;
@@ -5626,8 +5633,9 @@ finish_omp_clauses (tree clauses)
else
error ("%qE is not an argument in %<uniform%> clause", t);
remove = true;
+ break;
}
- break;
+ goto check_dup_generic;
case OMP_CLAUSE_NOWAIT:
case OMP_CLAUSE_ORDERED:
@@ -39,3 +39,16 @@ struct D { int d; };
#pragma omp declare simd aligned (e) /* { dg-error "neither a pointer nor an array" } */
int fn11 (struct D e);
+
+#pragma omp declare simd linear(a:7) uniform(a) /* { dg-error "appears more than once" } */
+int f12 (int a);
+#pragma omp declare simd linear(a) linear(a) /* { dg-error "appears more than once" } */
+int f13 (int a);
+#pragma omp declare simd linear(a) linear(a:7) /* { dg-error "appears more than once" } */
+int f14 (int a);
+#pragma omp declare simd linear(a:6) linear(a:6)/* { dg-error "appears more than once" } */
+int f15 (int a);
+#pragma omp declare simd uniform(a) uniform(a) /* { dg-error "appears more than once" } */
+int f16 (int a);
+#pragma omp declare simd uniform(a) aligned (a: 32)
+int f17 (int *a);
@@ -82,4 +82,17 @@ int fn14 (double &d);
#pragma omp declare simd aligned (e) // { dg-error "neither a pointer nor an array" }
int fn14 (D e);
+#pragma omp declare simd linear(a:7) uniform(a) // { dg-error "appears more than once" }
+int f15 (int a);
+#pragma omp declare simd linear(a) linear(a) // { dg-error "appears more than once" }
+int f16 (int a);
+#pragma omp declare simd linear(a) linear(a:7) // { dg-error "appears more than once" }
+int f17 (int a);
+#pragma omp declare simd linear(a:6) linear(a:6)// { dg-error "appears more than once" }
+int f18 (int a);
+#pragma omp declare simd uniform(a) uniform(a) // { dg-error "appears more than once" }
+int f19 (int a);
+#pragma omp declare simd uniform(a) aligned (a: 32)
+int f20 (int *a);
+
// { dg-error "has no member" "" { target *-*-* } 61 }