Skip to content

Conversation

@dmikushin
Copy link
Contributor

This works around the crash due to the NULL value of module->debug_info.

@bryanpkc
Copy link
Collaborator

Can you provide a test case or a simple reproducer? I suspect that we haven't seen this problem previously, thanks to the short-circuit evaluation of LL_MDREF_IS_NULL(instrs->dbg_line_op). I'm curious how instrs->dbg_line_op is non-null when no -g flag is specified on the flang command line.

@dmikushin
Copy link
Contributor Author

I'll try to remember the details. For now I can tell that the crash occurred when testing openmp target offloading. Maybe code generation for offloading goes with some different options?

Copy link
Collaborator

@pawosm-arm pawosm-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't hurt, so I'm fine with it.

If a test case can't be worked out, a commit message could be extended at least, with the description how this problem was encountered.

@bryanpkc
Copy link
Collaborator

@dmikushin gentle ping

@dmikushin
Copy link
Contributor Author

dmikushin commented Oct 18, 2023

I will try to reproduce it again. This happens when I try to perform openmp offloading. It has some code extraction mechanics that the loop goes into a separate compilation unit, but the debug info remains attached to the main object, so the offloaded object does not inherit it, hence is the unexpectedly missing pointer value.

So for the current state of Flang, this scenario is purely theoretical, as long as openmp offload support is not officially endorsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants