- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel oneAPI erroneously flags the following code (cf. below) with the follwing error code:
qedtest_1_lib.f90(195): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [MD5SUM_TMP]
call copy (qedtest_1_lib_md5sum ())
I believe that this code is correct (it is an character array!!), and it compile with Intel 2021 and earlier, with gfortran, NAG and nvidia.
! Return the MD5 sum for the process configuration (as a C pointer to a character array)
subroutine qedtest_1_lib_get_md5sum_ptr (i, cptr, len) bind(C)
use iso_c_binding
use opr_qedtest_1_p1_i1, only: qedtest_1_p1_i1_md5sum => md5sum
implicit none
interface
function qedtest_1_lib_md5sum () result (md5sum)
character(32) :: md5sum
end function qedtest_1_lib_md5sum
end interface
integer(c_int), intent(in) :: i
type(c_ptr), intent(out) :: cptr
integer(c_int), intent(out) :: len
character(kind=c_char), dimension(32), target, save :: md5sum
select case (i)
case (0)
call copy (qedtest_1_lib_md5sum ())
cptr = c_loc (md5sum)
case (1)
call copy (qedtest_1_p1_i1_md5sum ())
cptr = c_loc (md5sum)
case default
cptr = c_null_ptr
end select
len = 32
contains
subroutine copy (md5sum_tmp)
character, dimension(32), intent(in) :: md5sum_tmp
md5sum = md5sum_tmp
end subroutine copy
end subroutine qedtest_1_lib_get_md5sum_ptr
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Somebody opened a support request, thanks for that!
Actually, putting the function call into parenthesis and forcing its exectution serves as a workaround:
select case (i)
case (0)
call copy ((template_me_1_lib_md5sum ()))
cptr = c_loc (md5sum)
case (1)
call copy ((template_me_1_p1_i1_md5sum ()))
cptr = c_loc (md5sum)
case default
cptr = c_null_ptr
end select
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is fixed in 2023.2 compiler

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page