Early ping – and minor post script:

+         hidden_typelist = TREE_CHAIN (hidden_typelist);

This change is to avoid running into the ICE:

  gcc_assert (hidden_typelist == NULL_TREE
              || TREE_VALUE (hidden_typelist) == void_type_node);

The purpose of this assert is to check that the TREE_TYPE (fndecl)
arg list and the one created by
  create_function_arglist (gfc_symbol * sym)
are the same (at least in terms of the number of arguments). Namely:
   typelist = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
...
  hidden_typelist = typelist;

Tobias


On 11.03.21 18:15, Tobias Burnus wrote:
This fixes an ICE with OpenMP 'omp decare simd' but is a generic bug.

Namely TREE_TYPE(fndecl) has a mismatch to the arglist chain,
missing some hidden arguments with -fcoarray=lib.

OK for mainline and GCC 10?

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf

Reply via email to