Skip to content

Conversation

@kkwli
Copy link
Collaborator

@kkwli kkwli commented Jan 13, 2025

Filter out the recently add __builtin_c_devptr type when generating packed type on AIX.

@kkwli kkwli requested a review from jeanPerier January 13, 2025 22:35
@kkwli kkwli self-assigned this Jan 13, 2025
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jan 13, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 13, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Kelvin Li (kkwli)

Changes

Filter out the recently add __builtin_c_devptr type when generating packed type on AIX.


Full diff: https://github.com/llvm/llvm-project/pull/122812.diff

1 Files Affected:

  • (modified) flang/lib/Lower/ConvertType.cpp (+1-1)
diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp
index 31b85ef2b5476c..037d4335fedf13 100644
--- a/flang/lib/Lower/ConvertType.cpp
+++ b/flang/lib/Lower/ConvertType.cpp
@@ -392,7 +392,7 @@ struct TypeBuilderImpl {
     // Always generate packed FIR struct type for bind(c) derived type for AIX
     if (targetTriple.getOS() == llvm::Triple::OSType::AIX &&
         tySpec.typeSymbol().attrs().test(Fortran::semantics::Attr::BIND_C) &&
-        !IsIsoCType(&tySpec)) {
+        !IsIsoCType(&tySpec) && !fir::isa_builtin_cdevptr_type(rec)) {
       rec.pack(true);
     }
 

@kkwli
Copy link
Collaborator Author

kkwli commented Jan 14, 2025

@kkwli kkwli requested a review from madanial0 January 14, 2025 15:18
Copy link
Contributor

@madanial0 madanial0 left a comment

Choose a reason for hiding this comment

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

LGTM!

@kkwli kkwli merged commit d305fd0 into llvm:main Jan 14, 2025
9 of 11 checks passed
@kkwli kkwli deleted the filter-cdevptr branch January 14, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants