You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Flang][OpenMP] More elegantly handle declare target in unnamed program (#95834)
This PR is related to the following issue:
#63362
It tries to solve the crash (which is now slightly different, since the
issue has been languishing for a while sorry about that I missed the
original issue ping).
The crash occurs due to trying to access the symbol of an
undefined/unnamed main when trying to find a declare target symbol that
has not been specified (but can be assumed based on it's residence in a
function or interface).
The solution in this PR will check if we're trying to retrieve a main
symbol, and then if that is the case, we make sure it exists (due to
being named) before we attempt to retrieve it, this avoids the crash.
However, that's only part of the issue in the above example, the other
is the significant amount of nested directives, I think we are still a
little while away from handling this, I have added a reduced variation
of the test in the issue as a replicator which contains a lesser number
of nesting directives. To push the issue along further, it will likely
be a case of working through a number of variations of nested directives
in conjunction with target + parallel.
However, this PR pushes the issue above to the point where the issue
encountered is identical to the following:
#67231
0 commit comments