[Patch, fortran] merge two gfc_trans_scalar_assign flags

Mikael Morin mikael.morin@sfr.fr
Sun Apr 19 14:55:00 GMT 2015


Hello,

while working on pr65792, I noticed that gfc_trans_scalar_assign's
l_is_temp and dealloc flags are used only once, and at the same place.
This patch merges them together.
The calls are changed from
	gfc_trans_scalar_assign (...blah..., foo, x, bar);
to
	gfc_trans_scalar_assign (...blah..., x, !foo && bar);
As foo is most of the time either true or false, this is a simplification.

regression tested on x86-64-unknown-linux-gnu.
OK for post 5.1 trunk?

Mikael

-------------- next part --------------
2015-04-19  Mikael Morin  <mikael@gcc.gnu.org>

	* trans.h (gfc_trans_scalar_assign): Remove fourth argument.
	* trans-expr.c (gfc_trans_scalar_assign): Merge fourth into sixth
	argument.
	(gfc_conv_subref_array_arg, gfc_trans_subarray_assign,
	 gfc_trans_subcomponent_assign, gfc_trans_assignment_1): Update callers.
	* trans-array.c (gfc_conv_expr_descriptor): Ditto.
	* trans-stmt.c (forall_make_variable_temp,
	generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
	gfc_trans_where_assign, gfc_trans_where_3): Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strip_gfc_scalar_assign.diff
Type: text/x-patch
Size: 7130 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150419/bfc31dff/attachment.bin>


More information about the Fortran mailing list