[Bug middle-end/95499] ICE: during GIMPLE pass: ssa / segfault in verify_ssa / OpenMP target with deferred-length CHARACTER
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 6 12:36:21 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95499
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
For 'character(len=:),allocatable :: str' there is '_str' with the string
length.
One can map it explicitly when mapping 'from(str)' by also mapping
'firstprivate(_str)' but the compiler will later remove it as '_str' is
(initially) unused.
Later, gfc_omp_clause_default_ctor is called for 'private(str) – the generated
tree uses "malloc(max(1, _str))", but at that point is too late for the mapping
analysis – hence, '_str' is not mapped. Note: gfc_omp_finish_clause is not
called for 'str' and '_str' is not yet used at this point.
This has to be supported for a scalar 'str', an array str, and either as
derived-type component. (For the latter, see also PR95837 for kind=4 issues.)
More information about the Gcc-bugs
mailing list