-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[flang][acc] Ensure fir.class is handled in type categorization #146174
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module mm | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test should probably go in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I just saw that you added another test like that in this folder as well. No strong opinion on this. |
||
type, public :: polyty | ||
real :: field | ||
end type | ||
contains | ||
subroutine init(this) | ||
class(polyty), intent(inout) :: this | ||
!$acc enter data copyin(this, this%field) | ||
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you check if it works as well with an unlimited polymorphic dummy?
|
||
end subroutine | ||
end module | ||
|
||
! RUN: bbc -fopenacc -emit-hlfir %s -o - | fir-opt -pass-pipeline='builtin.module(test-fir-openacc-interfaces)' --mlir-disable-threading 2>&1 | FileCheck %s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to not add the run line at the top? |
||
! CHECK: Visiting: {{.*}} acc.copyin {{.*}} {name = "this", structured = false} | ||
! CHECK: Mappable: !fir.class<!fir.type<_QMmmTpolyty{field:f32}>> | ||
! CHECK: Type category: composite | ||
! CHECK: Visiting: {{.*}} acc.copyin {{.*}} {name = "this%field", structured = false} | ||
! CHECK: Pointer-like: !fir.ref<f32> | ||
! CHECK: Type category: composite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make a distinction for unlimited polymorphic that can be smth else than a composite?