PR debug/41232
* tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
in the middle block.
gcc/testsuite/ChangeLog:
PR debug/41232
* gcc.dg/pr41232.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151519
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41232
+ * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
+ in the middle block.
+
2009-09-08 Kai Tietz <kai.tietz@onevision.com>
* tree-ssa-reassoc.c (find_operand_rank): Cast pointer
+2009-09-08 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/41232
+ * gcc.dg/pr41232.c: New.
+
2009-09-08 Joseph Myers <joseph@codesourcery.com>
* gcc.misc-tests/i386-prefetch.exp: Skip tests when multilib flags
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O1 -g" } */
+extern int atoi (const char *);
+extern int sprintf (char *, const char *, ...);
+void malloc_init() {
+ char *cptr;
+ char buf[1];
+ int tmbd = atoi(cptr);
+ if (tmbd > 0)
+ tmbd = (tmbd <= 124) ? tmbd : 124;
+ else
+ tmbd = 0;
+ sprintf(buf, "%d\n", tmbd);
+}
/* Move the statement from the middle block. */
gsi = gsi_last_bb (cond_bb);
- gsi_from = gsi_last_bb (middle_bb);
+ gsi_from = gsi_last_nondebug_bb (middle_bb);
gsi_move_before (&gsi_from, &gsi);
}