aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/gimplify.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
committerBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
commite3cc64dec20832769406aa38cde83c7dd4194bf4 (patch)
treeef8e39be37cfe0cb69d850043b7924389ff17164 /gcc-4.9/gcc/gimplify.c
parentf33c7b3122b1d7950efa88067c9a156229ba647b (diff)
downloadtoolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.gz
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.bz2
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.zip
[4.9] GCC 4.9.0 official release refresh
Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
Diffstat (limited to 'gcc-4.9/gcc/gimplify.c')
-rw-r--r--gcc-4.9/gcc/gimplify.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/gimplify.c b/gcc-4.9/gcc/gimplify.c
index ad2178dd9..744178420 100644
--- a/gcc-4.9/gcc/gimplify.c
+++ b/gcc-4.9/gcc/gimplify.c
@@ -627,6 +627,25 @@ force_constant_size (tree var)
/* Push the temporary variable TMP into the current binding. */
void
+gimple_add_tmp_var_fn (struct function *fn, tree tmp)
+{
+ gcc_assert (!DECL_CHAIN (tmp) && !DECL_SEEN_IN_BIND_EXPR_P (tmp));
+
+ /* Later processing assumes that the object size is constant, which might
+ not be true at this point. Force the use of a constant upper bound in
+ this case. */
+ if (!tree_fits_uhwi_p (DECL_SIZE_UNIT (tmp)))
+ force_constant_size (tmp);
+
+ DECL_CONTEXT (tmp) = fn->decl;
+ DECL_SEEN_IN_BIND_EXPR_P (tmp) = 1;
+
+ record_vars_into (tmp, fn->decl);
+}
+
+/* Push the temporary variable TMP into the current binding. */
+
+void
gimple_add_tmp_var (tree tmp)
{
gcc_assert (!DECL_CHAIN (tmp) && !DECL_SEEN_IN_BIND_EXPR_P (tmp));