On Mon, Jan 03, 2022 at 10:51:49PM +0800, Chung-Lin Tang wrote:
> After the PR90030 patch, which removes the universal casting of all Fortran 
> array pointers to 'c_char*',
> a Fortran descriptor based array passed into an affinity() clause now looks 
> like:
> 
> -     #pragma omp task private(i) shared(b) affinity(*(c_char *) a.data)
> +     #pragma omp task private(i) shared(b) affinity(*(integer(kind=4)[0:] * 
> restrict) a.data)
> 
> The 'integer(kind=4)[0:]' incomplete type appears to be causing ICE during 
> gimplify_expr() due to
> is_gimple_val, fb_rvalue. The ICE appears to be fixed just by adjusting to 
> 'is_gimple_lvalue, fb_lvalue'.
> Considering the use of the affinity() clause, which should be specifying the 
> location of a particular
> object in memory, this probably makes sense.
> 
> Tested without regressions, seeking approval for trunk.
> 
> Thanks,
> Chung-Lin
> 
> 2022-01-03  Chung-Lin Tang  <clt...@codesourcery.com>
> 
> gcc/ChangeLog:
> 
>       PR middle-end/103643
>       * gimplify.c (gimplify_omp_affinity): Adjust gimplify_expr of entire
>       OMP_CLAUSE_DECL to use 'is_gimple_lvalue, fb_lvalue'
> 
> gcc/testsuite/ChangeLog:
> 
>       * gfortran.dg/gomp/pr103643.f90: New test.

Ok, thanks.

        Jakub

Reply via email to