<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/124201>124201</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Confusing error message on BOZ constant to complex type assignment.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DanielCChen
</td>
</tr>
</table>
<pre>
Consider the following code:
```
complex(4) :: z4
z4= (z'00000000', z'80000000')
end
```
Flang currently issues an error as
```
error: Semantic errors in t.f
./t.f:2:5: error: operands must be INTEGER, UNSIGNED, REAL, or BOZ
z4= (z'00000000', z'80000000')
^^^^^^^^^^^^^^^^^^^^^^^^^^
```
This is confusing as the operands is indeed BOZ.
Also, Flang has the extension to allow BOZ literal to real or integer. This seems a reasonable case that should be allowed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysU01v2zAM_TXyhaih0HacHHxQ81EUGDqg7S67yTYda5ClQJS7tr9-kBN03W4DJhCQQFEk3xOfZjYnR9SI6lZU-0zPcfSh2WtnyO52I7ms9f1bs_OOTU8B4kgweGv9T-NO0PmeRKGEXGwtryZV56ezpVeBm1LgFlJMoeC9FFK9l6LYg8DNu8BaXpfAWuAOkmvz2bUVUpHrP2eHS7Wj1amBOQRy0b6BYZ6JQTugEHwAzX-1tLhTF080aRdNdwlkMA5iPgipcoHHdCoUikJVKfbjkT9T0K5nmGaO0BLcPzwf7g6PqetvD0_3dw-HfTo_HtSXtPsAt1-_C6kA_hkwiOrwP-1PHoRUz6NhMAydd8PM6SM1Lz_7gTLdu56oTyhyIZWy7FPDF9rHazy9RnJsvIPoQaepSPFgTaSgbXIG0jaRYVykE4UcltpMNDHodMve6dYSdJoJ4qgj8Ohn2yeOl4zU51nfFP222OqMmlVd1Ota1ut1NjZUFZt20G2Ng9bVZrXqys3QYqvLouvroc9MgxIrucICcbXFdb4lWVCNWGlqi3KtRSlp0sbm1r5MuQ-nbBmkZoUlylVmdUuWF3UgDgm7KNQQvItpKhGTZkKT3t6084lFKa3hyL-zRRPtoq6FOFHtYfdB-mVQJ2LWJwLvFu467zhqFxN5VxVBfDsTXKQ6kYt5NgfbjDGeOQkLjwKPJxPHuc07Pwk8purX7eYc_A_qosDjRSECj1dsLw3-CgAA__9mgDEm">