diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-03-03 17:09:55 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-03-03 17:09:55 +0100 |
commit | 423ed4163b160e8fa81758ed53e54c60040f3c0f (patch) | |
tree | 0f811ce7e5a3fe13add75d303194536c46f30e87 /gcc/gimplify.c | |
parent | 71f3a3f5171d29dc3625fa7556c5732aa6b26241 (diff) | |
download | gcc-423ed4163b160e8fa81758ed53e54c60040f3c0f.zip gcc-423ed4163b160e8fa81758ed53e54c60040f3c0f.tar.gz gcc-423ed4163b160e8fa81758ed53e54c60040f3c0f.tar.bz2 |
re PR c/47963 (ICE: tree check: expected tree that contains 'decl common' structure, have 'integer_cst' in is_global_var, at tree-flow-inline.h:599 on invalid code with -fopenmp)
PR c/47963
* gimplify.c (omp_add_variable): Only call omp_notice_variable
on TYPE_SIZE_UNIT if it is a DECL.
* gcc.dg/gomp/pr47963.c: New test.
* g++.dg/gomp/pr47963.C: New test.
From-SVN: r170655
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 350d793..cf9495c 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1,6 +1,6 @@ /* Tree lowering pass. This pass converts the GENERIC functions-as-trees tree representation into the GIMPLE form. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Major work done by Sebastian Pop <s.pop@laposte.net>, Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@redhat.com>. @@ -5511,7 +5511,8 @@ omp_add_variable (struct gimplify_omp_ctx *ctx, tree decl, unsigned int flags) For local variables TYPE_SIZE_UNIT might not be gimplified yet, in this case omp_notice_variable will be called later on when it is gimplified. */ - else if (! (flags & GOVD_LOCAL)) + else if (! (flags & GOVD_LOCAL) + && DECL_P (TYPE_SIZE_UNIT (TREE_TYPE (decl)))) omp_notice_variable (ctx, TYPE_SIZE_UNIT (TREE_TYPE (decl)), true); } else if (lang_hooks.decls.omp_privatize_by_reference (decl)) |