--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-w" } */
+
+char slow_mul1_dst1, code_some_shards___gf_mulc__0, code_some_shards_lim;
+long slow_mul1_dst_max;
+long long code_some_shards_pos;
+void code_some_shards()
+{
+ char *dst = &slow_mul1_dst1;
+ for (; dst < &code_some_shards_lim; dst++)
+ {
+ if (code_some_shards_pos < slow_mul1_dst_max)
+ *dst = code_some_shards___gf_mulc__0;
+ code_some_shards_pos += 1;
+ }
+}
tree end = force_gimple_operand (niter->bound, &stmts2,
true, NULL_TREE);
gimple_seq_add_seq_without_update (stmts, stmts2);
- if (POINTER_TYPE_P (TREE_TYPE (enddiff)))
- {
- tree tem = gimple_convert (stmts, sizetype, enddiff);
- tem = gimple_build (stmts, NEGATE_EXPR, sizetype, tem);
- enddiff = gimple_build (stmts, POINTER_PLUS_EXPR,
- TREE_TYPE (enddiff),
- end, tem);
- }
+ if (POINTER_TYPE_P (TREE_TYPE (controlbase)))
+ enddiff = gimple_build (stmts, POINTER_DIFF_EXPR,
+ ssizetype, end, enddiff);
else
enddiff = gimple_build (stmts, MINUS_EXPR, TREE_TYPE (enddiff),
end, enddiff);
/* Compute guard_init + (end-beg). */
tree newbound;
- enddiff = gimple_convert (stmts, TREE_TYPE (guard_init), enddiff);
if (POINTER_TYPE_P (TREE_TYPE (guard_init)))
{
enddiff = gimple_convert (stmts, sizetype, enddiff);
guard_init, enddiff);
}
else
- newbound = gimple_build (stmts, PLUS_EXPR, TREE_TYPE (guard_init),
- guard_init, enddiff);
+ {
+ enddiff = gimple_convert (stmts, TREE_TYPE (guard_init), enddiff);
+ newbound = gimple_build (stmts, PLUS_EXPR, TREE_TYPE (guard_init),
+ guard_init, enddiff);
+ }
/* Depending on the direction of the IVs the new bound for the first
loop is the minimum or maximum of old bound and border.