aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-12-27 16:38:22 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-12-27 16:38:22 +0100
commite1e2bac4bd14a37e9dadc8bcfc79bd254af1a837 (patch)
tree81a6d4ca8e9e261b635a0bdd4cbc0f6fae985875 /gcc/tree-cfg.c
parent749db154bd0d496379afca19ef72c3e121a034bb (diff)
downloadgcc-e1e2bac4bd14a37e9dadc8bcfc79bd254af1a837.zip
gcc-e1e2bac4bd14a37e9dadc8bcfc79bd254af1a837.tar.gz
gcc-e1e2bac4bd14a37e9dadc8bcfc79bd254af1a837.tar.bz2
re PR middle-end/38633 (ICE with #pragma omp parallel and struct declaration)
PR middle-end/38633 * tree-cfg.c (replace_block_vars_by_duplicates): Only call replace_by_duplicate_decl for VAR_DECLs or CONST_DECLs. * gcc.dg/gomp/pr38633.c: New test. * g++.dg/gomp/pr38633.C: New test. From-SVN: r142934
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 89621f0..b300c53 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5835,6 +5835,8 @@ replace_block_vars_by_duplicates (tree block, struct pointer_map_t *vars_map,
for (tp = &BLOCK_VARS (block); *tp; tp = &TREE_CHAIN (*tp))
{
t = *tp;
+ if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != CONST_DECL)
+ continue;
replace_by_duplicate_decl (&t, vars_map, to_context);
if (t != *tp)
{