summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-01 12:25:16 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-01 12:25:16 +0000
commitdf2052513b0e00d78dbd5f8b482b09055e28e483 (patch)
tree3bf29afa20d3958be9adb2e4822cb58e2bb661d1
parentb252ec3e8ccf0364309f2ad8893c2fd318e1b238 (diff)
downloadppe42-gcc-df2052513b0e00d78dbd5f8b482b09055e28e483.tar.gz
ppe42-gcc-df2052513b0e00d78dbd5f8b482b09055e28e483.zip
* c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
check_dup_generic at the end, unless remove is true. (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after remove = true;. (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise. * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to check_dup_generic at the end, unless remove is true. (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after remove = true;. * gcc.dg/gomp/declare-simd-2.c (f12, f13, f14, f15, f16, f17): New tests. * g++.dg/gomp/declare-simd-2.C (f15, f16, f17, f18, f19, f20): New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204294 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/c/ChangeLog8
-rw-r--r--gcc/c/c-typeck.c6
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/semantics.c14
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/gomp/declare-simd-2.C13
-rw-r--r--gcc/testsuite/gcc.dg/gomp/declare-simd-2.c13
7 files changed, 64 insertions, 4 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 8f8a245edcf..f009ee9af1e 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,11 @@
+2013-11-01 Jakub Jelinek <jakub@redhat.com>
+
+ * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
+ check_dup_generic at the end, unless remove is true.
+ (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
+ remove = true;.
+ (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
+
2013-10-31 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 5a23c843295..8f1d3a4837a 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -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)
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e7b1e254318..66ef9e3576f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-01 Jakub Jelinek <jakub@redhat.com>
+
+ * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
+ check_dup_generic at the end, unless remove is true.
+ (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
+ remove = true;.
+
2013-10-31 Jakub Jelinek <jakub@redhat.com>
* semantics.c (finish_omp_clauses): Diagnose aligned clause
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 49097f7f1b3..6c560c660a9 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 03ad579ad31..03eb1b3c909 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-01 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/gomp/declare-simd-2.c (f12, f13, f14, f15, f16, f17): New
+ tests.
+ * g++.dg/gomp/declare-simd-2.C (f15, f16, f17, f18, f19, f20): New
+ tests.
+
2013-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/57893
diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-2.C b/gcc/testsuite/g++.dg/gomp/declare-simd-2.C
index e450a0241c7..a6151015bae 100644
--- a/gcc/testsuite/g++.dg/gomp/declare-simd-2.C
+++ b/gcc/testsuite/g++.dg/gomp/declare-simd-2.C
@@ -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 }
diff --git a/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c b/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c
index 6c7de8b73f9..c0a42a2ef46 100644
--- a/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c
+++ b/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c
@@ -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);
OpenPOWER on IntegriCloud