]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/41250 (hppa has DECL_VALUE_EXPR decls appearing in the function)
authorRichard Guenther <rguenther@suse.de>
Mon, 1 Mar 2010 15:43:32 +0000 (15:43 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 1 Mar 2010 15:43:32 +0000 (15:43 +0000)
2010-03-01  Richard Guenther  <rguenther@suse.de>
Martin Jambor  <mjambor@suse.cz>

PR middle-end/41250
* gimplify.c (gimplify_body): Unset DECL_HAS_VALUE_EXPR_P on
gimplified parameters.

Co-Authored-By: Martin Jambor <mjambor@suse.cz>
From-SVN: r157148

gcc/ChangeLog
gcc/gimplify.c

index a70aceba4f2d5ea1bf4f5dccbc722fb1e9a5bdda..70fa6286465d2daf2455ab1974e6f99473e2c065 100644 (file)
@@ -1,3 +1,10 @@
+2010-03-01  Richard Guenther  <rguenther@suse.de>
+       Martin Jambor  <mjambor@suse.cz>
+
+       PR middle-end/41250
+       * gimplify.c (gimplify_body): Unset DECL_HAS_VALUE_EXPR_P on
+       gimplified parameters.
+
 2010-03-01  Christian Bruel  <christian.bruel@st.com>
 
        * except.c (dw2_build_landing_pads): set LABEL_PRESERVE_P.
index 183874790be87b19faa3ffea335ff496bfad04ad..f87b5b57553bd92afa06f4313440be91dfd31b32 100644 (file)
@@ -7535,11 +7535,21 @@ gimplify_body (tree *body_p, tree fndecl, bool do_parms)
   *body_p = NULL_TREE;
 
   /* If we had callee-copies statements, insert them at the beginning
-     of the function.  */
+     of the function and clear DECL_VALUE_EXPR_P on the parameters.  */
   if (!gimple_seq_empty_p (parm_stmts))
     {
+      tree parm;
+
       gimplify_seq_add_seq (&parm_stmts, gimple_bind_body (outer_bind));
       gimple_bind_set_body (outer_bind, parm_stmts);
+
+      for (parm = DECL_ARGUMENTS (current_function_decl);
+          parm; parm = TREE_CHAIN (parm))
+       if (DECL_HAS_VALUE_EXPR_P (parm))
+         {
+           DECL_HAS_VALUE_EXPR_P (parm) = 0;
+           DECL_IGNORED_P (parm) = 0;
+         }
     }
 
   if (nonlocal_vlas)
This page took 0.070396 seconds and 5 git commands to generate.