aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-02-23 19:06:21 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-02-23 19:06:21 +0100
commita5c8d67f10eb90a6f2eff58e50c9ee90d401eb56 (patch)
treef66c7d26145b7181e2d7622fae3701243f16af8d /gcc/gimplify.c
parent98b2060a0def628fcc061edb036feabc98d00362 (diff)
downloadgcc-a5c8d67f10eb90a6f2eff58e50c9ee90d401eb56.zip
gcc-a5c8d67f10eb90a6f2eff58e50c9ee90d401eb56.tar.gz
gcc-a5c8d67f10eb90a6f2eff58e50c9ee90d401eb56.tar.bz2
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 82e747f..10373c2 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