+2016-04-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/70336
+ * match.pd (nested int casts): Limit to GIMPLE.
+
2016-04-05 Jan Hubicka <hubicka@ucw.cz>
PR ipa/66223
/* A truncation to an unsigned type (a zero-extension) should be
canonicalized as bitwise and of a mask. */
- (if (final_int && inter_int && inside_int
+ (if (GIMPLE /* PR70366: doing this in GENERIC breaks -Wconversion. */
+ && final_int && inter_int && inside_int
&& final_prec == inside_prec
&& final_prec > inter_prec
&& inter_unsignedp)
+2016-04-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/70336
+ * c-c++-common/pr70336.c: New test.
+ * gcc.dg/torture/builtin-isinf_sign-1.c (foo): Guard tests
+ no longer optimized away at -O0 with #ifndef __OPTIMIZE__.
+
2016-04-05 Jan Hubicka <hubicka@ucw.cz>
PR ipa/66223
--- /dev/null
+/* PR c++/70336 */
+/* { dg-do compile } */
+/* { dg-options "-Wconversion" } */
+
+void
+f1 (unsigned char * x, int y, int z)
+{
+ x[z / 8] |= (unsigned char) (0x80 >> y); /* { dg-bogus "may alter its value" } */
+}
+
+unsigned char
+f2 (unsigned char x, int y)
+{
+ x = x | (unsigned char) (0x80 >> y); /* { dg-bogus "may alter its value" } */
+ return x;
+}
+
+unsigned char
+f3 (unsigned char x, int y)
+{
+ x = x | (unsigned char) (y & 255); /* { dg-bogus "may alter its value" } */
+ return x;
+}
+
+unsigned char
+f4 (unsigned char x, unsigned char y)
+{
+ x = x | (unsigned char) (y & 255); /* { dg-bogus "may alter its value" } */
+ return x;
+}
+
+unsigned char
+f5 (unsigned char x, int y)
+{
+ x = (unsigned char) (y & 255); /* { dg-bogus "may alter its value" } */
+ return x;
+}
!= (__builtin_isinf(ld) ? (__builtin_signbitl(ld) ? -1 : 1) : 0))
link_error (__LINE__);
+#ifdef __OPTIMIZE__
/* In boolean contexts, GCC will fold the inner conditional
expression to 1. So isinf_sign folds to plain isinf. */
link_error (__LINE__);
if ((_Bool)__builtin_isinf_sign(ld) != (__builtin_isinf(ld) != 0))
link_error (__LINE__);
+#endif
if ((__builtin_isinf_sign(f) != 0) != (__builtin_isinf(f) != 0))
link_error (__LINE__);