+2012-02-03 Jakub Jelinek <jakub@redhat.com>
+ Zdenek Dvorak <ook@ucw.cz>
+
+ PR rtl-optimization/52092
+ * loop-unswitch.c (unswitch_single_loop): Call copy_rtx_if_shared
+ on get_iv_value result.
+
2012-02-02 Andrew Pinski <apinski@cavium.com>
PR middle-end/47982
/* Loop unswitching for GNU compiler.
- Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+ Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of GCC.
fprintf (dump_file, ";; Unswitching loop\n");
/* Unswitch the loop on this condition. */
- nloop = unswitch_loop (loop, bbs[i], cond, cinsn);
+ nloop = unswitch_loop (loop, bbs[i], copy_rtx_if_shared (cond), cinsn);
gcc_assert (nloop);
/* Invoke itself on modified loops. */
+2012-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/52092
+ * gcc.c-torture/compile/pr52092.c: New test.
+
2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/41587
--- /dev/null
+/* PR rtl-optimization/52092 */
+
+int a, b, c, d, e, f, g;
+
+void
+foo (void)
+{
+ for (;;)
+ {
+ int *h = 0;
+ int i = 3;
+ int **j = &h;
+ if (e)
+ {
+ c = d || a;
+ g = c ? a : b;
+ if ((char) (i * g))
+ {
+ h = &f;
+ *h = 0;
+ }
+ **j = 0;
+ }
+ }
+}