[llvm-bugs] [Bug 47548] New: Actual argument 'transfer(msg, dat)' associated with dummy argument 'array=' is not a variable or typed expression
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 16 06:57:58 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47548
Bug ID: 47548
Summary: Actual argument 'transfer(msg,dat)' associated with
dummy argument 'array=' is not a variable or typed
expression
Product: flang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedbugs at nondot.org
Reporter: riccardo.bertossa at gmail.com
CC: David.Truby at arm.com, jperier at nvidia.com,
kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
sscalpone at nvidia.com
this compiles under gfortran and ifort, but not flang
[rbertoss at mugon bug_report]$ cat bug.f90
MODULE test
IMPLICIT NONE
INTERFACE
FUNCTION fletcher32( dat, dat_size ) BIND(C,name="fletcher32") RESULT(t)
USE ISO_C_BINDING
integer(kind=c_int16_t) :: dat(*)
integer(kind=c_int32_t) :: dat_size
integer(kind=c_int32_t) :: t
END FUNCTION fletcher32
END INTERFACE
CONTAINS
SUBROUTINE fletcher32_i1(msg, cksum) !!this compiles
IMPLICIT NONE
INTEGER, INTENT(IN) :: msg
INTEGER, INTENT(OUT) :: cksum
INTEGER(2) :: dat(1)
cksum = fletcher32(transfer(msg,dat),size(transfer(msg,dat)))
END SUBROUTINE fletcher32_i1
SUBROUTINE fletcher32_iv(msg, cksum) !! this does not
IMPLICIT NONE
INTEGER, INTENT(IN) :: msg(:) !!!!<<<==== the only difference wrt
previous subroutine
INTEGER, INTENT(OUT) :: cksum
INTEGER(2) :: dat(1)
cksum = fletcher32(transfer(msg,dat),size(transfer(msg,dat)))
END SUBROUTINE fletcher32_iv
END MODULE
[rbertoss at mugon bug_report]$
/scratch/rbertoss/llvm/llvm-project/OBJ_ROOT_2/bin/flang bug.f90 -c
bug.f90:27:18: error: Actual argument 'transfer(msg,dat)' associated with dummy
argument 'dat=' is not a variable or typed expression
cksum = fletcher32(transfer(msg,dat),size(transfer(msg,dat)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bug.f90:27:47: error: Actual argument 'transfer(msg,dat)' associated with dummy
argument 'array=' is not a variable or typed expression
cksum = fletcher32(transfer(msg,dat),size(transfer(msg,dat)))
^^^^^^^^^^^^^^^^^^^^^^^
/scratch/rbertoss/llvm/llvm-project/OBJ_ROOT_2/bin/f18: semantic errors in
bug.f90
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200916/dcef11d3/attachment.html>
More information about the llvm-bugs
mailing list