+2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
+
+ PR c/31339
+ * c-typeck.c (build_unary_op <case PREINCREMENT_EXPR,
+ case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
+ case POSTDECREMENT_EXPR>): Return the error_mark_node
+ if either the real or imaginary parts would an
+ error_mark_node.
+
2007-05-28 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Release LHS SSA
arg = stabilize_reference (arg);
real = build_unary_op (REALPART_EXPR, arg, 1);
imag = build_unary_op (IMAGPART_EXPR, arg, 1);
+ real = build_unary_op (code, real, 1);
+ if (real == error_mark_node || imag == error_mark_node)
+ return error_mark_node;
return build2 (COMPLEX_EXPR, TREE_TYPE (arg),
- build_unary_op (code, real, 1), imag);
+ real, imag);
}
/* Report invalid types. */
+2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
+
+ PR c++/31339
+ * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
+ case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
+ case POSTDECREMENT_EXPR>): Return the error_mark_node
+ if either the real or imaginary parts would an
+ error_mark_node.
+
2007-05-25 Simon Martin <simartin@users.sourceforge.net>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
arg = stabilize_reference (arg);
real = build_unary_op (REALPART_EXPR, arg, 1);
imag = build_unary_op (IMAGPART_EXPR, arg, 1);
+ real = build_unary_op (code, real, 1);
+ if (real == error_mark_node || imag == error_mark_node)
+ return error_mark_node;
return build2 (COMPLEX_EXPR, TREE_TYPE (arg),
- build_unary_op (code, real, 1), imag);
+ real, imag);
}
/* Report invalid types. */
+2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR c/31339
+ * gcc.dg/boolcomplex-1.c: New test.
+
+ PR c++/31339
+ * g++.dg/ext/boolcomplex-1.c: New test.
+
2007-05-28 Tobias Burnus <burnus@net-b.de>
PR fortran/32124
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "" } */
+bool b = --0i == 0; /* { dg-error "lvalue required as decrement operand" } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "" } */
+_Bool b = --0i == 0; /* { dg-error "lvalue required as decrement operand" } */