aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-02-10 17:22:29 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-02-10 17:22:29 +0100
commitfc3103e7c981bfdd5c842f82ac6047256b5d1ee8 (patch)
treeeb1fb857e229b58695341024ec649f95610b921f /gcc/gimplify.c
parentdbf9ee15b8b1863086ac94c0e2657cd911655880 (diff)
downloadgcc-fc3103e7c981bfdd5c842f82ac6047256b5d1ee8.zip
gcc-fc3103e7c981bfdd5c842f82ac6047256b5d1ee8.tar.gz
gcc-fc3103e7c981bfdd5c842f82ac6047256b5d1ee8.tar.bz2
re PR target/39139 (ICE with stringop and register var)
PR target/39139 * function.h (struct function): Add has_local_explicit_reg_vars bit. * gimplify.c (gimplify_bind_expr): Set it if local DECL_HARD_REGISTER VAR_DECLs were seen. * tree-ssa-live.c (remove_unused_locals): Recompute cfun->has_local_explicit_reg_vars. * tree-ssa-sink.c (statement_sink_location): Don't sink BLKmode copies or clearings if cfun->has_local_explicit_reg_vars. * gcc.target/i386/pr39139.c: New test. From-SVN: r144065
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 6f88ec5..4af5029 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
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
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>.
@@ -1240,6 +1240,9 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
omp_add_variable (gimplify_omp_ctxp, t, GOVD_LOCAL | GOVD_SEEN);
DECL_SEEN_IN_BIND_EXPR_P (t) = 1;
+
+ if (DECL_HARD_REGISTER (t) && !is_global_var (t) && cfun)
+ cfun->has_local_explicit_reg_vars = true;
}
/* Preliminarily mark non-addressed complex variables as eligible