aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/c-typeck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index e158d23..bb27099 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -13298,7 +13298,7 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types,
{
if (length == NULL_TREE)
{
- if (C_ARRAY_PARAMETER (ret))
+ if (TREE_CODE (ret) == PARM_DECL && C_ARRAY_PARAMETER (ret))
error_at (OMP_CLAUSE_LOCATION (c),
"for array function parameter length expression "
"must be specified");