diff options
author | Hafiz Abid Qadeer <abidh@codesourcery.com> | 2022-03-09 21:40:45 +0000 |
---|---|---|
committer | Hafiz Abid Qadeer <abidh@codesourcery.com> | 2022-03-10 13:51:24 +0000 |
commit | a03a01959576337cb0cac35de6915cc2b5d9a36c (patch) | |
tree | 7c191c1e1f1b9c82aca258a87e99968d2ac5e0eb | |
parent | a58f7c3023cf3e69671cfdb75d75ce4d62afcebb (diff) | |
download | gcc-a03a01959576337cb0cac35de6915cc2b5d9a36c.zip gcc-a03a01959576337cb0cac35de6915cc2b5d9a36c.tar.gz gcc-a03a01959576337cb0cac35de6915cc2b5d9a36c.tar.bz2 |
Fix an ICE with allocate directive.
Add case for OMP_CLAUSE_ALLOCATOR in walk_tree_1. This helps fix
an ICE which occurs only on OG11 with allocate directive.
Please note that this change is not needed on master. The code
there handles all clauses in the same way so a special case for
OMP_CLAUSE_ALLOCATOR is not required.
gcc/
* tree.c (walk_tree_1): Add case for OMP_CLAUSE_ALLOCATOR.
-rw-r--r-- | gcc/ChangeLog.omp | 4 | ||||
-rw-r--r-- | gcc/tree.c | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index c6c60c2..46143dd 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,7 @@ +2022-03-10 Abid Qadeer <abidh@codesourcery.com> + + * tree.c (walk_tree_1): Add case for OMP_CLAUSE_ALLOCATOR. + 2022-03-09 Abid Qadeer <abidh@codesourcery.com> Backport of a patch posted at @@ -12359,6 +12359,16 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp)); } + /* This hunk is only needed on og11 as master uses same code + for all clauses. */ + case OMP_CLAUSE_ALLOCATOR: + { + int len = omp_clause_num_ops[OMP_CLAUSE_CODE (*tp)]; + for (int i = 0; i < len; i++) + WALK_SUBTREE (OMP_CLAUSE_OPERAND (*tp, i)); + WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp)); + } + default: gcc_unreachable (); } |