+2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/50615
+ * combine.c (distribute_notes) <REG_ARGS_SIZE>: Skip if I3 is a no-op.
+
2011-10-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/50596
break;
case REG_ARGS_SIZE:
- {
- /* ??? How to distribute between i3-i1. Assume i3 contains the
- entire adjustment. Assert i3 contains at least some adjust. */
- int old_size, args_size = INTVAL (XEXP (note, 0));
- old_size = fixup_args_size_notes (PREV_INSN (i3), i3, args_size);
- gcc_assert (old_size != args_size);
- }
+ /* ??? How to distribute between i3-i1. Assume i3 contains the
+ entire adjustment. Assert i3 contains at least some adjust. */
+ if (!noop_move_p (i3))
+ {
+ int old_size, args_size = INTVAL (XEXP (note, 0));
+ old_size = fixup_args_size_notes (PREV_INSN (i3), i3, args_size);
+ gcc_assert (old_size != args_size);
+ }
break;
case REG_NORETURN:
+2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/vla-23.c: New test.
+
2011-10-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/50596
--- /dev/null
+/* PR rtl-optimization/50615 */
+/* Testcase by Zdenek Sojka <zsojka@seznam.cz> */
+
+/* { dg-do compile } */
+/* { dg-options "-O --param max-cse-insns=1" } */
+
+int
+foo (int a)
+{
+ if (!a)
+ return 1;
+
+ {
+ int s[a];
+ return 0;
+ }
+}