+2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR middle-end/32813
+ * fold-const.c (omit_one_operand): Return only the ommitted expression
+ if the result is an empty statement.
+ (pedantic_omit_one_operand): Likewise.
+
2007-08-09 Daniel Berlin <dberlin@dberlin.org>
* c-typeck.c (readonly_error): Improve error for assignment.
{
tree t = fold_convert (type, result);
+ /* If the resulting operand is an empty statement, just return the ommited
+ statement casted to void. */
+ if (IS_EMPTY_STMT (t) && TREE_SIDE_EFFECTS (omitted))
+ return build1 (NOP_EXPR, void_type_node, fold_ignored_result (omitted));
+
if (TREE_SIDE_EFFECTS (omitted))
return build2 (COMPOUND_EXPR, type, fold_ignored_result (omitted), t);
{
tree t = fold_convert (type, result);
+ /* If the resulting operand is an empty statement, just return the ommited
+ statement casted to void. */
+ if (IS_EMPTY_STMT (t) && TREE_SIDE_EFFECTS (omitted))
+ return build1 (NOP_EXPR, void_type_node, fold_ignored_result (omitted));
+
if (TREE_SIDE_EFFECTS (omitted))
return build2 (COMPOUND_EXPR, type, fold_ignored_result (omitted), t);
+2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR middle-end/32813
+ * gfortran.fortran-torture/compile/emptyif-1.f90: New test.
+ * lib/fortran-torture.exp (fortran-torture): Use TORTURE_OPTIONS instead
+ of just -O.
+
2007-08-08 Richard Sandiford <richard@codesourcery.com>
* gcc.target/mips/code-readable-1.c: New test.
proc fortran-torture { args } {
global srcdir subdir
global compiler_conditional_xfail_data
+ global TORTURE_OPTIONS
set src [lindex $args 0]
if { [llength $args] > 1 } {
}
# loop through all the options
- set option_list [list { "-O" } ]
+ set option_list $TORTURE_OPTIONS
foreach option $option_list {
# torture_compile_xfail is set by the .x script (if present)