}
-/* Move all statements in the sequence before I to a new sequence.
- Return this new sequence. I is set to the head of the new list. */
+/* Move all statements in the sequence starting at I to a new sequence.
+ Set *PNEW_SEQ to this sequence. I is set to the head of the new list. */
void
gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
gsi_replace_with_seq (gimple_stmt_iterator *gsi, gimple_seq seq,
bool update_eh_info)
{
- gimple_stmt_iterator seqi;
- gimple *last;
if (gimple_seq_empty_p (seq))
{
gsi_remove (gsi, true);
return;
}
- seqi = gsi_last (seq);
- last = gsi_stmt (seqi);
- gsi_remove (&seqi, false);
+ gimple_seq tail;
+ gimple_stmt_iterator lasti = gsi_last (seq);
+ gsi_split_seq_before (&lasti, &tail);
gsi_insert_seq_before (gsi, seq, GSI_SAME_STMT);
- gsi_replace (gsi, last, update_eh_info);
+ gsi_replace (gsi, gsi_stmt (lasti), update_eh_info);
}
--- /dev/null
+// { dg-do compile }
+// { dg-additional-options "-g" }
+
+struct QPointF {
+ QPointF(double xpos, double ypos) : xp(xpos), yp(ypos) {}
+ double xp;
+ double yp;
+};
+double xp, yp, w, h;
+struct QRectF {
+ QRectF(QPointF, int);
+ QPointF center() { return QPointF(xp + w / 2, yp + h / 2); }
+};
+void clientArea(QPointF &);
+int workspace_size;
+void workspace() {
+ QRectF geom(QPointF(0, 0), workspace_size);
+ xp = 0 - w / 2;
+ yp = -h;
+ QPointF __trans_tmp_2 = geom.center();
+ clientArea(__trans_tmp_2);
+}