Commit bd7e4636 by Roger Sayle Committed by Roger Sayle

fold-const.c (fold_convert): When casting an expression to void...


	* fold-const.c (fold_convert): When casting an expression to void,
	fold_ignored_result may discover a GIMPLE_MODIFY_STMT which doesn't
	have a type.  Instead of attempting to build a NOP_EXPR, return
	these "special" trees directly.

From-SVN: r120451
parent 7fd453b4
2007-01-04 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold_convert): When casting an expression to void,
fold_ignored_result may discover a GIMPLE_MODIFY_STMT which doesn't
have a type. Instead of attempting to build a NOP_EXPR, return
these "special" trees directly.
2007-01-04 Joseph Myers <joseph@codesourcery.com> 2007-01-04 Joseph Myers <joseph@codesourcery.com>
* config/rs6000/rs6000.c (rs6000_rtx_costs): Make adjustment for * config/rs6000/rs6000.c (rs6000_rtx_costs): Make adjustment for
......
...@@ -2144,7 +2144,10 @@ fold_convert (tree type, tree arg) ...@@ -2144,7 +2144,10 @@ fold_convert (tree type, tree arg)
return fold_build1 (VIEW_CONVERT_EXPR, type, arg); return fold_build1 (VIEW_CONVERT_EXPR, type, arg);
case VOID_TYPE: case VOID_TYPE:
return fold_build1 (NOP_EXPR, type, fold_ignored_result (arg)); tem = fold_ignored_result (arg);
if (TREE_CODE (tem) == GIMPLE_MODIFY_STMT)
return tem;
return fold_build1 (NOP_EXPR, type, tem);
default: default:
gcc_unreachable (); gcc_unreachable ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment