+2009-06-19 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR C++/36607
+ * convert.c (convert_to_integer): Treat OFFSET_TYPE like INTEGER_TYPE.
+
+ 2009-05-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/40204
+ * fold-const.c (fold_binary) <case BIT_AND_EXPR>: Avoid infinite
+ recursion if build_int_cst_type returns the same INTEGER_CST as
+ arg1.
+
+ 2009-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/35318
+ * function.c (match_asm_constraints_1): Skip over
+ initial optional % in the constraint.
+
2009-06-19 Richard Guenther <rguenther@suse.de>
Backport from mainline:
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
+ case OFFSET_TYPE:
/* If this is a logical operation, which just returns 0 or 1, we can
change the type of the expression. */
if (prec < HOST_BITS_PER_WIDE_INT
|| newmask == ~(unsigned HOST_WIDE_INT) 0)
{
+ tree newmaskt;
+
if (shift_type != TREE_TYPE (arg0))
{
tem = fold_build2 (TREE_CODE (arg0), shift_type,
}
else
tem = op0;
- return fold_build2 (BIT_AND_EXPR, type, tem,
- build_int_cst_type (TREE_TYPE (op1),
- newmask));
+ newmaskt = build_int_cst_type (TREE_TYPE (op1), newmask);
+ if (!tree_int_cst_equal (newmaskt, arg1))
+ return fold_build2 (BIT_AND_EXPR, type, tem, newmaskt);
}
}
}
char *end;
int match, j;
+ if (*constraint == '%')
+ constraint++;
+
match = strtoul (constraint, &end, 10);
if (end == constraint)
continue;
+2009-06-19 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR C++/36607
+ * g++.dg/expr/cast10.C: New test.
+
+ 2009-05-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/40204
+ * gcc.c-torture/compile/pr40204.c: New test.
+
+ 2009-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/35318
+ * gcc.c-torture/compile/pr35318.c: New test.
+
2009-06-19 Richard Guenther <rguenther@suse.de>
Backport from mainline:
--- /dev/null
+// { dg-do compile }
+// This used to error out because we would try to convert m to a short.
+
+
+struct a {};
+void b() {
+ int a::*m;
+ a *c;
+ short p = reinterpret_cast<char*>(&(c->*m)) - reinterpret_cast<char*>(c);
+}
--- /dev/null
+/* PR target/35318 */
+
+void
+foo ()
+{
+ double x = 4, y;
+ __asm__ volatile ("" : "=r,r" (x), "=r,r" (y) : "%0,0" (x), "m,r" (8));
+}
--- /dev/null
+/* PR middle-end/40204 */
+
+struct S
+{
+ unsigned int a : 4;
+ unsigned int b : 28;
+} s;
+char c;
+
+void
+f (void)
+{
+ s.a = (c >> 4) & ~(1 << 4);
+}