diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-02-23 19:06:21 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-02-23 19:06:21 +0100 |
commit | a5c8d67f10eb90a6f2eff58e50c9ee90d401eb56 (patch) | |
tree | f66c7d26145b7181e2d7622fae3701243f16af8d /gcc/gimplify.c | |
parent | 98b2060a0def628fcc061edb036feabc98d00362 (diff) | |
download | gcc-a5c8d67f10eb90a6f2eff58e50c9ee90d401eb56.tar.gz |
re PR middle-end/26412 (ICE with external arrays using OpenMP)
PR middle-end/26412
* gimplify.c (omp_add_variable): Guard variable size decl test with
DECL_SIZE (decl) check.
* gcc.dg/gomp/pr26412.c: New test.
From-SVN: r111391
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 82e747f0070..10373c2d92f 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4267,7 +4267,7 @@ omp_add_variable (struct gimplify_omp_ctx *ctx, tree decl, unsigned int flags) /* When adding a variable-sized variable, we have to handle all sorts of additional bits of data: the pointer replacement variable, and the parameters of the type. */ - if (!TREE_CONSTANT (DECL_SIZE (decl))) + if (DECL_SIZE (decl) && !TREE_CONSTANT (DECL_SIZE (decl))) { /* Add the pointer replacement variable as PRIVATE if the variable replacement is private, else FIRSTPRIVATE since we'll need the |