diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-04-03 23:02:44 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-04-03 23:02:44 +0200 |
commit | 5da250fca2d707547044284a84e94beb0c74bb5a (patch) | |
tree | 7337ce1fc06ad5e8ff8f9584479ecb8e19b23807 /gcc/omp-low.c | |
parent | 637b5a8e7ced71facbb36d9505b85ad3b991572b (diff) | |
download | gcc-5da250fca2d707547044284a84e94beb0c74bb5a.zip gcc-5da250fca2d707547044284a84e94beb0c74bb5a.tar.gz gcc-5da250fca2d707547044284a84e94beb0c74bb5a.tar.bz2 |
re PR middle-end/35818 (ICE on incomplete array in shared clause)
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.
From-SVN: r133875
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 45602c2..ffdf447 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. */ |