Ping.
On 2016/1/5 10:15 PM, Chung-Lin Tang wrote:
> Hi,
> we've been encountering an ICE for OpenACC host_data sections, which
> has a use_device() clause similar to OpenMP use_device_ptr.
>
> The ICE happens in make_decl_rtl() for scan-created variables, which IIUC,
> should not be entered at all for automatic variables.
>
> I believe the problem is, unlike other variable creation cases where the
> code is split out into an offloaded child function, a host_data section
> is actually host side code, so the child function local variable processing
> doesn't apply here; the use_device() referenced variable has to be added
> to the current host function.
>
> So here is the quite small fix. This fixed the ICE for OpenACC on trunk
> and gomp4. However when I tested it for OpenMP using the case that Julian
> provided here[1], the same ICE appeared to be already fixed. I'm not sure
> if some other interim change covered it up for OpenMP.
>
> This patch was tested on trunk without regressions. Okay for trunk?
>
> [1] https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00104.html
>
> Thanks,
> Chung-Lin
>
> * omp-low.c (scan_sharing_clauses): Call add_local_decl() for
> use_device/use_device_ptr variables.
>