Skip to content

Commit

Permalink
#2830 Added test case for issue 2830.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiker committed Dec 19, 2024
1 parent 22faed8 commit 70a72d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,16 @@ module module_with_var_mod
integer :: module_var_a, module_var_b
integer, parameter :: module_const = 123

type :: inner_user_type
integer :: inner_a, inner_b
end type inner_user_type

type :: user_type
! These names are just to indicate the usage of these
! variables in the kernel, which helps to understand
! the tests better.
integer member_read, member_write, member_read_write
type(inner_user_type) :: inner
end type user_type

type(user_type) :: user_var
Expand All @@ -58,5 +63,9 @@ subroutine module_subroutine()
module_var_b = module_var_b + 1
end subroutine module_subroutine

subroutine subroutine_taking_user_type(my_var)
type(user_type) :: my_var
end subroutine subroutine_taking_user_type


end module module_with_var_mod
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ integer function local_func(arg)
local_func = 1
end function

subroutine testkern_import_symbols_code(nlayers, ascalar, &
fld1, fld2, fld3, fld4, &
ndf_w1, undf_w1, map_w1, &
ndf_w2, undf_w2, map_w2, &
subroutine testkern_import_symbols_code(nlayers, ascalar, &
fld1, fld2, fld3, fld4, &
ndf_w1, undf_w1, map_w1, &
ndf_w2, undf_w2, map_w2, &
ndf_w3, undf_w3, map_w3)
use constants_mod, only: eps, i_def, r_def
use module_with_var_mod, only: module_subroutine, module_var_a, &
module_function, module_const, &
user_var
use module_with_var_mod, only: module_subroutine, module_var_a, &
module_function, module_const, &
subroutine_taking_user_type, user_var

implicit none

Expand Down Expand Up @@ -109,6 +109,7 @@ subroutine testkern_import_symbols_code(nlayers, ascalar, &
call module_subroutine()
call local_subroutine()
call unknown_subroutine()
call subroutine_taking_user_type(user_var)
module_var_a = 1

end subroutine testkern_import_symbols_code
Expand Down

0 comments on commit 70a72d0

Please sign in to comment.