<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62039>62039</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Incorrect execution result of initializing an array using vector subscript
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
Version of flang-new : 17.0.0(633146093c4ea78dc8f56a27006fe4eed84be370)
```
The character array a1(1) is initialized with uppercase letters, but printed with lowercase letters.
a2(1) and a3(1) are correct.
The following are the test program, results of flang-new, gfortran and ifort compilation and execution.
z01.f90:
```fortran
program main
character(len=30),parameter:: a1(1)=(/&
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"/)
character(len=30),parameter:: a2(1)=(/&
&"ABCDEFGHIJKLMNOPQRSTUVWXYZ"/)
character(len=30),parameter:: a3(1)=(/"ABCDEFGHIJKLMNOPQRSTUVWXYZ"/)
write(6,*) "a1(1) = ", a1(1)
write(6,*) "a2(1) = ", a2(1)
write(6,*) "a3(1) = ", a3(1)
end program main
```
```
$ flang-new -flang-experimental-exec z01.f90; ./a.out
a1(1) = abcdefghijklmnopqrstuvwxyz
a2(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
a3(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
$
```
```
$ gfortran z01.f90; ./a.out
a1(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
a2(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
a3(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
$
```
```
$ ifort z01.f90; ./a.out
a1(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
a2(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
a3(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUV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