<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98980>98980</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Execution error (Aborted) when the array size of the return value of pack intrinsic function is different from the array size of the assignment target
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:runtime
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
Version of flang-new : 19.0.0(73447a3302541c343525570222b318e7f94f9402)/AArch64
```
When the array size of the return value of `pack intrinsic function` is different from the array size of the assignment target, the execution terminates abnormally (Aborted).
When the value of a `logical` variable is changed from .false. to .true., the execution terminates normally.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
cv1035_22.f90:
```fortran
program main
integer*8 a(2),c(2)
logical*4 g
data a/2*1/,g/.false./
c = pack(a,g)
end program main
```
```
$ flang-new cv1035_22.f90; ./a.out
fatal Fortran runtime error(/work/home/ohno/CT/test/fort/tp/reproducerJ/Metro/CHMK23/cv1035_22.f90:5): Assign: mismatching element counts in array assignment (to 2, from 0)
Aborted (core dumped)
$
```
```
$ gfortran cv1035_22.f90; ./a.out
$
```
```
$ ifort -diag-disable=10448 cv1035_22.f90; ./a.out
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVUGTnDYT_TU9l66hoAUzcOCAdz--VFK-uZJjSkADsoU0JYndbH59SgyzXk_sxE7V1g7qaXU_Xr_XI71Xk2GuoXgHxeNBrmG2rrazscfx46Gzw0sNp3T_Sx8hbX5l55U1aEcctTTT0fAzgmgwq5I0SYHKs8jzsxQipSLPepGLgorinBJRJ7KSz2OVj1WeElAF1DaN6-dTfi1-1-v6_7eZDYaZUTonX9CrPzl2jxHHYXUGn6Retxic0ovsP6EywSnjVY_javqgrIFTisrjoMaRHZuAo7PLN6peWVliVpBu4gD0sH3Bf3C_xmoY2C3KyMA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