<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/76889>76889</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Exponentiation by (1.0,0.0) of COMPLEX is not identity.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          harishch4
      </td>
    </tr>
</table>

<pre>
    Complex exponentiation by real/complex 1.0 is not the identity.
GNU compiler & classic-flang perturbs the argument. Intel compiler does not. : https://godbolt.org/z/xTo9K1ceE

```
Program test_complex_expt
 Complex :: x(3),y(3),xpt(3)
    Real :: rpt(3)
    x(:) = (1234.0, 2345.0)
    xpt = [ 1, 2, 0]
    y = x ** xpt
    Print *,y(1)-x(1)
    rpt = [ 1, 2, 0]
    y = x ** rpt
    Print *,y(1)-x(1)
  End Program test_complex_expt
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk9-L2zAMx_8a5UU0OHLaJA956LXNGPt1jA32duSHm3i4cbCdke6vH3Zz17ENxkFwbPSRv5Il1dbKfhSihO0DbI9RPbtBm3KojbRDO6RRo7tredCXSYkFxTLpUYxO1k7qEZsrGlEroKpdgSRmKC2O2qEbBMrOw-4aAzsC27_5-BU9KZUwCLTDVnn9dnNW9djjJIybTWODa236-SJGF-Pb0Ql19-u0CAIxAt_j4Nxkge-BKqCq112jlYu16YGqn0DV8kUX75JWnG4RrOuOrV84Phrdm_qCTlj3tGbyJJbJ3cz4nL2X4XtcgHIOVAAdrvetx9fDzQsRP4taPXuZf9j9TSH2AoEfEShPiKcxAzog8XTrd7_jk7tx2wdMAuMXBtvjnbkGYkGgPdAe70kg4qORo7tZQuQJULFZ1s0dM6-XMa-WOY0d_ufdX6oUdSXvCl7UkSiTjKWc51m2i4YyoS3Li6wl6pI2TTqen5vivKWkKdJzklEkS2KUsoSljNMu2cVnUbfEU5bnTcs4zyBl4lJLFSv14-LbJpLWzqLMdnleRKpuhLJhNIhCjwKRnxJTen7TzL2FlClpnb3f4KRTojz9NSr-BUJtWagr6jMePn14fH_69jwyL-MSzUaVf7S2dMPcxK2-AFVea_1tJqO_i9YBVSF0C1SF6H8FAAD__2NfGl4">