On 1/7/19 3:42 PM, Jakub Jelinek wrote:
> Hi!
> 
> On Thu, May 31, 2018 at 01:34:19PM -0400, Jason Merrill wrote:
>> Returning error_mark_node from omp_copy_decl and then continuing seems
>> like the problem, then.  Would it really be that hard to return an
>> uninitialized variable instead?
> 
> The following patch does that, but not from omp_copy_decl, but only in the
> caller for the array bounds (the rest would be still errors).
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2019-01-07  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR middle-end/85956
>       PR lto/88733
>       * tree-inline.h (struct copy_body_data): Add adjust_array_error_bounds
>       field.
>       * tree-inline.c (remap_type_1): Formatting fix.  If TYPE_MAX_VALUE of
>       ARRAY_TYPE's TYPE_DOMAIN is newly error_mark_node, replace it with
>       a dummy "omp dummy var" variable if id->adjust_array_error_bounds.
>       * omp-low.c (new_omp_context): Set cb.adjust_array_error_bounds.
> fortran/
>       * trans-openmp.c: Include attribs.h.
>       (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
>       VAR_DECL max bound with "omp dummy var" attribute like NULL or
>       error_mark_node - recompute number of elts independently.
> testsuite/
>       * c-c++-common/gomp/pr85956.c: New test.
>       * g++.dg/gomp/pr88733.C: New test.
OK.
jeff

Reply via email to