Skip to content

[flang] Fix CFI_CDESC_T(rank) for C #66260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2023
Merged

[flang] Fix CFI_CDESC_T(rank) for C #66260

merged 1 commit into from
Sep 18, 2023

Conversation

klausler
Copy link
Contributor

The CFI_CDESC_T(rank) macro defined for C (not C++) in ISO_Fortran_binding.h incorporates a cdesc_t structure as a member, which works for data layout but doesn't allow for direct access to its members. (The C++ definition can use inheritance.)

Restructure the definitions in that header file so that CFI_CDESC_T(rank) for C defines a struct with the expected members.

The CFI_CDESC_T(rank) macro defined for C (not C++) in
ISO_Fortran_binding.h incorporates a cdesc_t structure as a
member, which works for data layout but doesn't allow for
direct access to its members.  (The C++ definition can use
inheritance.)

Restructure the definitions in that header file so that
CFI_CDESC_T(rank) for C defines a struct with the expected
members.

Pull request: llvm#66260
@klausler klausler requested a review from vdonaldson September 13, 2023 17:23
@llvmbot llvmbot added the flang Flang issues not falling into any other category label Sep 13, 2023
@klausler klausler merged commit fba474d into llvm:main Sep 18, 2023
@klausler klausler deleted the bug1366 branch September 18, 2023 20:00
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
The CFI_CDESC_T(rank) macro defined for C (not C++) in
ISO_Fortran_binding.h incorporates a cdesc_t structure as a member,
which works for data layout but doesn't allow for direct access to its
members. (The C++ definition can use inheritance.)

Restructure the definitions in that header file so that
CFI_CDESC_T(rank) for C defines a struct with the expected members.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants