diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-03 21:02:44 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-03 21:02:44 +0000 |
commit | e7327393a185fd1e57cca3ba4eaddd87f7519b28 (patch) | |
tree | 7337ce1fc06ad5e8ff8f9584479ecb8e19b23807 /gcc/omp-low.c | |
parent | 23632bd1fcc6919244bb1fc5a19cde87feff5a08 (diff) | |
download | gcc-e7327393a185fd1e57cca3ba4eaddd87f7519b28.tar.gz |
PR middle-end/35818
* omp-low.c (scan_sharing_clauses) <case OMP_CLAUSE_SHARED>: Don't
call is_variable_sized if decl has incomplete type.
* gcc.dg/gomp/pr35818.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 45602c24d74..ffdf447d329 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -993,7 +993,8 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_SHARED: gcc_assert (is_parallel_ctx (ctx)); decl = OMP_CLAUSE_DECL (c); - gcc_assert (!is_variable_sized (decl)); + gcc_assert (!COMPLETE_TYPE_P (TREE_TYPE (decl)) + || !is_variable_sized (decl)); by_ref = use_pointer_for_field (decl, ctx); /* Global variables don't need to be copied, the receiver side will use them directly. */ |