PR tree-optimization/21380
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
thread through a block with no preds.
* gcc.c-torture/compile/pr21380.c: New test.
From-SVN: r99324
+2005-05-06 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/21380
+ * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
+ thread through a block with no preds.
+
2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-operands.c (clobbered_v_may_defs, clobbered_vuses,
+2005-05-06 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/compile/pr21380.c: New test.
+
2005-05-06 Jakub Jelinek <jakub@redhat.com>
PR c++/20961
--- /dev/null
+void bar (void);
+
+void
+foo (int *diff)
+{
+ double deltay = 0.0;
+ int Stangent = 0;
+ int mindiff;
+ int Sflipped = 0;
+ int i;
+ int Sturn, Snofit;
+
+ Sturn = 1;
+ if (Sturn)
+ Stangent = 1;
+ if (Sturn)
+ {
+ Sflipped = 0;
+ Snofit = 1;
+ while (Snofit)
+ {
+ Snofit = 0;
+ mindiff = 0;
+ for (i = 0; i < 4; i++)
+ mindiff = diff[i];
+ while (!Snofit && (mindiff < 0.0))
+ {
+ deltay = (Stangent ? deltay : 0.0);
+ if (deltay < 0.0)
+ Snofit = 1;
+ for (i = 0; i < 4; i++)
+ {
+ }
+ }
+ if (Snofit)
+ if (Sflipped)
+ break;
+ }
+ if (Snofit)
+ bar ();
+ }
+}
FOR_EACH_BB (bb)
{
- if (bb_ann (bb)->incoming_edge_threaded)
+ if (bb_ann (bb)->incoming_edge_threaded
+ && EDGE_COUNT (bb->preds) > 0)
{
retval |= thread_block (bb);
bb_ann (bb)->incoming_edge_threaded = false;