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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Incorrect execution result when F edit descriptor with decimal places set to 0
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          ohno-fj
      </td>
    </tr>
</table>

<pre>
    ```
Version of flang-new : 18.0.0(770dc47659d41a5ca7b7daf5b3134c900ca8c33d)
```

The result of setting the number of decimal places to zero in `F edit descriptor` is different when the variable is initialized to `real literal constant` with `_kind` than when it is initialized to `real literal constant` without `_kind`.


The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.


d12_34.f95:
```fortran
program main
 real(kind=8),parameter::a1=1.618033988749895_8
 real(kind=8),parameter::b1=-0.618033988749895_8
 real(kind=8),parameter::c1=2.23606797749978969641_8
 real(kind=8),parameter::a2=1.618033988749895
 real(kind=8),parameter::b2=-0.618033988749895
 real(kind=8),parameter::c2=2.23606797749978969641
  integer::N=2
 write(6,*) "(a1**N-b1**N)/c1 = ", (a1**N-b1**N)/c1
 write(*,"(f20.0)") (a1**N-b1**N)/c1
  write(*,"(f20.1)") (a1**N-b1**N)/c1

  write(6,*) "(a2**N-b2**N)/c2 = ", (a2**N-b2**N)/c2
  write(*,"(f20.0)") (a2**N-b2**N)/c2
 write(*,"(f20.1)") (a2**N-b2**N)/c2
end program main
```

```
$ flang-new d12_34.f90; ./a.out
 (a1**N-b1**N)/c1 =  .9999999999999998
                  0.
 1.0
 (a2**N-b2**N)/c2 =  1.
                  1.
 1.0
$
```

```
$ gfortran d12_34.f90; ./a.out
 (a1**N-b1**N)/c1 =   0.99999999999999978
                  1.
 1.0
 (a2**N-b2**N)/c2 =    1.0000000000000000
 1.
                 1.0
$
```

```
$ ifort d12_34.f90; ./a.out
 (a1**N-b1**N)/c1 =    1.00000000000000
 1.
                 1.0
 (a2**N-b2**N)/c2 =    1.00000000000000
 1.
                 1.0
$
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysls-S4yYQxp8GXSiroNE_Djp4x6VULntK5TqFBLLYYHAB2kn26VPI9uysPM6MZ6Jy2QKhX_f3YbVahKD3VqkWlV9QucvEHCfnWzdZtxm_Zb2T_7SoIucP2SGy_VP5oJ3FbsSjEXa_seoJI7bFtMlJThA0dU3kUNRVyWVBRTmIuq-lGMueUVYMnJBBNANjEgE_IVcRTt9_TAp7FWYTU6igYtR2j-OksJ0PvfJpVqpBH4TBRyMGFXB0-IfyDmuLUUU6rKSOWKoweH2MzqOKYB2w1OOovLIRP03KLsTvwmvRG5Uua6ujFkb_UDIBUUW8EgYbHZUXBg_OhihsTLAnHae04PEvbWWaiJOwJ6qOH2C5Ob7E5S_t-GnK6IxxT8kM4dWSflQh4qN3ey8OCB5wd9mXNPhtdD56YbGwEus0wIM7HLURUTuLoFN_q2FO52e7XwkrKTyyIh95idh2tWdn_Gn2nAQ-CH2ewUkxgmbRxHZN2nR4OAovDioqn3hsKyhiO5pXtCGM8aapC97w8rG5A9EnxIZ8ijEkBuTAKlLVvK4LzuuGV7wq6F0cAa_JuUcMvCrmHilwU8qZgrWNan9Z_zUtP1958joqBE2F4AHBFgHHCABBI-gy3H7d9JezJXg3UIzY7rTqAf_3ylWQ5erDiT_CUkD4MuLv49wE0ftAa9y1eHgmwK8EWIu_vfKtpFfq3wS9U_xbHGUlvn50Xy3L60koXrwGnusEQewLzhF0IndzPCf7jn8Qzvmvx-Wxuzou1RHTnLzgv7FJmOa3gPQKiKC4z4j9pdR-3gdM1k7UN624zvxdVqQbyep4Bt2I9XFvTm-e_8GYq6zfnfMHXfm0J5lsmeSMi0y1tCa0qhgnNJtayWkzSlmWDakBBjaW5dgMhI1QUU4JyXQLBBgFUpACSkLzRrCioKQgwCWteYEKog5Cm9yY74fc-X2mQ5hVWxdQF5kRvTJh6e0AlqcUse3onY3KylQeyl3m23Trpp_3ARXE6BDDT1jU0Sy94dJRoHKHf7eD814NEa_bhlPfc9V0nZqkVaMWVEz9EMlmb9opxmNIbyHoEHR7Hae5zwd3QNClRM4_m6N339QQEXSLxICgW1T-GwAA___TG8Nr">