* ifcvt.c (cond_exec_find_if_block): Don't try to optimize
if then_bb has no successors and else_bb is EXIT_BLOCK_PTR.
* gcc.c-torture/compile/pr56745.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197371
138bc75d-0d04-0410-961f-
82ee72b054a4
2013-04-02 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/56745
+ * ifcvt.c (cond_exec_find_if_block): Don't try to optimize
+ if then_bb has no successors and else_bb is EXIT_BLOCK_PTR.
+
PR c++/34949
* tree-ssa-alias.c (stmt_kills_ref_p_1): If base != ref->base
and both of them are MEM_REFs, just compare first argument for
code processing. ??? we should fix this in the future. */
if (EDGE_COUNT (then_bb->succs) == 0)
{
- if (single_pred_p (else_bb))
+ if (single_pred_p (else_bb) && else_bb != EXIT_BLOCK_PTR)
{
rtx last_insn = BB_END (then_bb);
-2013-04-02 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
+2013-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56745
+ * gcc.c-torture/compile/pr56745.c: New test.
+
+2013-04-02 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
* gcc.dg/tree-ssa/sra-13.c: Fix for 16 bit int.
--- /dev/null
+/* PR rtl-optimization/56745 */
+
+unsigned char a[6];
+
+void
+foo ()
+{
+ int i;
+ for (i = 5; i >= 0; i++)
+ {
+ if (++a[i] != 0)
+ break;
+ ++a[i];
+ }
+}