+2017-05-01 Martin Sebor <msebor@redhat.com>
+
+ * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
+ known.
+
2017-05-01 Uros Bizjak <ubizjak@gmail.com>
PR target/68491
res.range.max = tree_digits (arg, base, dir.prec[1],
maybesign, maybebase);
res.range.likely = res.range.min;
+ res.knownrange = true;
}
res.range.unlikely = res.range.max;
+2017-05-01 Martin Sebor <msebor@redhat.com>
+
+ * tree-ssa/builtin-sprintf-warn-18.c: Adjust to avoid failures
+ on ILP32 targets.
+
2017-05-01 Tom de Vries <tom@codesourcery.com>
* gcc.dg/pr78768.c: Require linker plugin.
void test_width_and_precision_out_of_range (char *d)
{
-#if __LONG_MAX__ == 2147483647
-# define MAX_P1_STR "2147483648"
-#elif __LONG_MAX__ == 9223372036854775807
-# define MAX_P1_STR "9223372036854775808"
-#endif
-
- T ("%" MAX_P1_STR "i", 0); /* { dg-warning "width out of range" } */
- /* { dg-warning "result to exceed .INT_MAX. " "" { target *-*-* } .-1 } */
- T ("%." MAX_P1_STR "i", 0); /* { dg-warning "precision out of range" } */
+ /* The range here happens to be a property of the compiler, not
+ one of the target. */
+ T ("%9223372036854775808i", 0); /* { dg-warning "width out of range" } */
+ /* { dg-warning "result to exceed .INT_MAX." "" { target *-*-* } .-1 } */
+ T ("%.9223372036854775808i", 0); /* { dg-warning "precision out of range" } */
+ /* { dg-warning "causes result to exceed .INT_MAX." "" { target *-*-* } .-1 } */
/* The following is diagnosed by -Wformat (disabled here). */
- /* T ("%" MAX_P1_STR "$i", 0); */
+ /* T ("%9223372036854775808$i", 0); */
}
/* Verify that an excessively long directive is truncated and the truncation