re PR c++/53602 (Libre Office causes an internal compiler error)
authorRichard Henderson <rth@redhat.com>
Sat, 9 Jun 2012 06:17:12 +0000 (23:17 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 9 Jun 2012 06:17:12 +0000 (23:17 -0700)
PR c++/53602
        * combine-stack-adj.c (force_move_args_size_note): Add ARGS_SIZE
        note to a clobber insn when no other insn is available.

From-SVN: r188357

gcc/ChangeLog
gcc/combine-stack-adj.c

index 1026c9002cc8919f2273b81e20b5ba9c1b7e68df..62f67f441fda9fad6eab079de0607a4eedf56a9b 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-08  Richard Henderson  <rth@redhat.com>
+
+        PR c++/53602
+        * combine-stack-adj.c (force_move_args_size_note): Add ARGS_SIZE
+        note to a clobber insn when no other insn is available.
+
 2012-06-08  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr.c (avr_case_values_threshold): Return 7.
index b3ee785711a9a59ee778c2e6364914efc5fccf3a..b46fe3bcb38f77aa52726b10b06e62fe9d47c41d 100644 (file)
@@ -1,7 +1,7 @@
 /* Combine stack adjustments.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
    1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010 Free Software Foundation, Inc.
+   2010, 2012 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -414,9 +414,10 @@ force_move_args_size_note (basic_block bb, rtx prev, rtx insn)
     {
       /* ??? We *must* have a place, lest we ICE on the lost adjustment.
         Options are: dummy clobber insn, nop, or prevent the removal of
-        the sp += 0 insn.  Defer that decision until we can prove this
-        can actually happen.  */
-      gcc_unreachable ();
+        the sp += 0 insn.  */
+      /* TODO: Find another way to indicate to the dwarf2 code that we
+        have not in fact lost an adjustment.  */
+      test = emit_insn_before (gen_rtx_CLOBBER (VOIDmode, const0_rtx), insn);
     }
   add_reg_note (test, REG_ARGS_SIZE, XEXP (note, 0));
 }