summaryrefslogtreecommitdiffstats
path: root/gcc/c/c-typeck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-typeck.c')
-rw-r--r--gcc/c/c-typeck.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 1034cee1fcc..5a23c843295 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -11504,6 +11504,14 @@ c_finish_omp_clauses (tree clauses)
"%qE is not a variable in %<aligned%> clause", t);
remove = true;
}
+ else if (!POINTER_TYPE_P (TREE_TYPE (t))
+ && TREE_CODE (TREE_TYPE (t)) != ARRAY_TYPE)
+ {
+ error_at (OMP_CLAUSE_LOCATION (c),
+ "%qE in %<aligned%> clause is neither a pointer nor "
+ "an array", t);
+ remove = true;
+ }
else if (bitmap_bit_p (&aligned_head, DECL_UID (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
OpenPOWER on IntegriCloud