On 09/22/2015 08:29 AM, Nathan Sidwell wrote: > 1) Don't have a fake gang reduction outside of worker & vector loops. > Deal with the receiver object directly. I.e. 'ref_to_res' need not be a > null pointer for vector and worker loops.
What happens when there is no receiver object. E.g. a reduction inside a routine? Specifically, inside lower_oacc_reductions, your doing this: /* This is the outermost construct with this reduction, see if there's a mapping for it. */ if (maybe_lookup_field (orig, outer)) ref_to_res = build_receiver_ref (orig, false, outer); That's going to ICE inside a routine. > 2) Create a local private instance for all cases of reference var > reductions, not just those in vector & worker loops Good. I was about to make a similar change to fix a gang reduction bug. Cesar