<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Actual argument 'transfer(msg,dat)' associated with dummy argument 'array=' is not a variable or typed expression"
href="https://bugs.llvm.org/show_bug.cgi?id=47548">47548</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Actual argument 'transfer(msg,dat)' associated with dummy argument 'array=' is not a variable or typed expression
</td>
</tr>
<tr>
<th>Product</th>
<td>flang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>riccardo.bertossa@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>David.Truby@arm.com, jperier@nvidia.com, kirankumartp@gmail.com, llvm-bugs@lists.llvm.org, sscalpone@nvidia.com
</td>
</tr></table>
<p>
<div>
<pre>this compiles under gfortran and ifort, but not flang
[rbertoss@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@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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>