http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60438

--- Comment #23 from linzj <manjian2006 at gmail dot com> ---
(In reply to Richard Henderson from comment #19)
> Created attachment 32311 [details]
> proposed patch
> 
> Running full tests on this overnight, but it fixes the ICE.

I try to remove the following hunk from you patch,it compiles Jakub's testcase
right.Not run the full tests yet.
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index 69fd5ea..5abec30 100644
--- a/gcc/combine-stack-adj.c
+++ b/gcc/combine-stack-adj.c
@@ -454,6 +454,14 @@ combine_stack_adjustments_for_block (basic_block bb)
            {
              HOST_WIDE_INT this_adjust = INTVAL (XEXP (src, 1));

+              /* It's quite tricky to adjust the notes associated
+                with frame related insns.  */
+             if (RTX_FRAME_RELATED_P (insn))
+               {
+                 last2_sp_set = last_sp_set = NULL;
+                 continue;
+               }
+
              /* If we've not seen an adjustment previously, record
                 it now and continue.  */
              if (! last_sp_set)

Reply via email to