On Sun, Apr 26, 2020 at 09:58:16AM -0400, Nathan Sidwell wrote: > > --- gcc/c-family/c-common.c.jj 2020-03-21 18:29:58.989160193 +0100 > > +++ gcc/c-family/c-common.c 2020-04-25 10:13:14.158722031 +0200 > > @@ -7402,9 +7402,11 @@ resolve_overloaded_builtin (location_t l > > enum built_in_function fncode > > = speculation_safe_value_resolve_call (function, params);; > > + if (fncode == BUILT_IN_NONE) > > + return error_mark_node; > > + > > first_param = (*params)[0]; > > - if (fncode == BUILT_IN_NONE > > - || !speculation_safe_value_resolve_params (loc, function, params)) > > + if (!speculation_safe_value_resolve_params (loc, function, params)) > > return error_mark_node; > > first_param isn't used in that conditional, can't you just move its > assinment afterwards?
I think I can't, because speculation_safe_value_resolve_params can modify the (*params)[0] and if there wasn't a reason to remember (*params)[0] before the call, why would the patch author add first_param var at all when it could just use (*params)[0]; it does use (*params)[1]... So my assumption is that where first_param is used, the code wants the value before promotions/conversions. Jakub