re PR rtl-optimization/49982 (ICE in fixup_args_size_notes, at expr.c:3625)
authorKaz Kojima <kkojima@gcc.gnu.org>
Fri, 5 Aug 2011 16:12:16 +0000 (16:12 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 5 Aug 2011 16:12:16 +0000 (09:12 -0700)
PR rtl-opt/49982
        * expr.c (fixup_args_size_notes): Look through no-op moves.

Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r177464

gcc/ChangeLog
gcc/expr.c

index 1b5cd35bc30263585f903e5a43885ec1ec270082..74f634a444d81c0c909d89503fe9c7409a6e33d5 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-05  Kaz Kojima  <kkojima@gcc.gnu.org>
+           Richard Henderson  <rth@redhat.com>
+
+       PR rtl-opt/49982
+       * expr.c (fixup_args_size_notes): Look through no-op moves.
+
 2011-08-05  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*push<mode>2): Use "o" constraint instead
index e5bec34e78c5775636fc057b68c1f2e14cad7f00..f170596d330a4f32eb648ac925a4fe017b94b772 100644 (file)
@@ -3631,6 +3631,10 @@ fixup_args_size_notes (rtx prev, rtx last, int end_args_size)
              && XEXP (SET_SRC (set), 0) == stack_pointer_rtx
              && CONST_INT_P (XEXP (SET_SRC (set), 1)))
            this_delta = INTVAL (XEXP (SET_SRC (set), 1));
+         /* ??? Reload can generate no-op moves, which will be cleaned
+            up later.  Recognize it and continue searching.  */
+         else if (rtx_equal_p (dest, SET_SRC (set)))
+           this_delta = 0;
          else
            saw_unknown = true;
        }