public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC, middlend] Fix for PR54218
@ 2013-01-11 16:17 George Thomas
  2013-01-11 16:23 ` Andrew Pinski
  0 siblings, 1 reply; 5+ messages in thread
From: George Thomas @ 2013-01-11 16:17 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

Hi,

I am sending a patch which solves the debugging issue (PR 54218).

The fix is to allocate stack space only once for parameters in expand pass.

The patch is attached. Could someone suggest if its right ?

Thanks,
George

[-- Attachment #2: 54218.patch --]
[-- Type: application/octet-stream, Size: 921 bytes --]

diff -Naurp gcc/cfgexpand.c gcc/cfgexpand.c
--- gcc/cfgexpand.c	2013-01-11 16:40:46.000000000 +0530
+++ gcc/cfgexpand.c	2013-01-11 16:50:21.000000000 +0530
@@ -1568,11 +1568,14 @@ expand_used_vars (void)
 	     we don't do anything here.  But those which don't contain the
 	     default def (representing a temporary based on the parm/result)
 	     we need to allocate space just like for normal VAR_DECLs.  */
-	  if (!bitmap_bit_p (SA.partition_has_default_def, i))
-	    {
-	      expand_one_var (var, true, true);
-	      gcc_assert (SA.partition_to_pseudo[i]);
-	    }
+         if (TREE_CODE (SSA_NAME_VAR (var)) != PARM_DECL)
+          {
+            if (!bitmap_bit_p (SA.partition_has_default_def, i))
+              {
+                expand_one_var (var, true, true);
+                gcc_assert (SA.partition_to_pseudo[i]);
+              }
+          }
 	}
     }
   pointer_map_destroy (ssa_name_decls);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-16 18:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11 16:17 [RFC, middlend] Fix for PR54218 George Thomas
2013-01-11 16:23 ` Andrew Pinski
2013-01-11 17:37   ` George Thomas
2013-01-14 14:42     ` Richard Biener
2013-01-16 18:36       ` George Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).