An error like err_omp_union_type_not_allowed for an implicit mapping
on a target directive produced an assert failure.
Details
Diff Detail
Event Timeline
r319774 works for my current use cases. Thanks.
While we're on this topic, do you happen to know the rationale behind the OpenMP restriction for which err_omp_union_type_not_allowed diagnoses violations? I googled but couldn't find the rationale. If you would prefer that I ask this in a different forum, would you please suggest one? Thanks.
You cannot map the member of the union, but you can map the whole union. Mapping of separate members is not allowed because you will definitely have troubles with overlapping memory for union members.
Ahh, and in your example, there is a problem in the compiler. We should map the whole union implicitly. I'll fix this
Thanks for that clarification. Is there any way to word the error message "mapped storage cannot be derived from a union" to make this point clearer? I'm thinking "an individual member of" instead of "derived from" would help. Does that work ok?
You can try it now, there should no more error messages
Yes. Thanks.
I agree, that error message does not sound quite good. Maybe, mapping of union members is not allowed?
Alexey: I see that you committed the error message change, so I think this issue is done. Is Abandon Revision correct in this scenario? Sorry, I'm new here.