+2010-07-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/44828
+ * convert.c (convert_to_integer): Watch out for overflowing
+ MULT_EXPR as well.
+
2010-07-05 Jan Hubicka <jh@suse.cz>
* lto-streamer.c (write_symbol_vec): Rename to ...
|| ex_form == LSHIFT_EXPR
/* If we have !flag_wrapv, and either ARG0 or
ARG1 is of a signed type, we have to do
- PLUS_EXPR or MINUS_EXPR in an unsigned
- type. Otherwise, we would introduce
+ PLUS_EXPR, MINUS_EXPR or MULT_EXPR in an unsigned
+ type in case the operation in outprec precision
+ could overflow. Otherwise, we would introduce
signed-overflow undefinedness. */
|| ((!TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0))
|| !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg1)))
+ && ((TYPE_PRECISION (TREE_TYPE (arg0)) * 2u
+ > outprec)
+ || (TYPE_PRECISION (TREE_TYPE (arg1)) * 2u
+ > outprec))
&& (ex_form == PLUS_EXPR
- || ex_form == MINUS_EXPR)))
+ || ex_form == MINUS_EXPR
+ || ex_form == MULT_EXPR)))
typex = unsigned_type_for (typex);
else
typex = signed_type_for (typex);
+2010-07-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/44828
+ * gcc.c-torture/execute/pr44828.c: New testcase.
+
2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
* g++.dg/warn/noeffect2.C: Adjust expected warning.