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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Initialization with DATA statement having forward reference errors with implicit none 
        </td>
    </tr>

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

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

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

<pre>
    Initialization with DATA statement having forward reference errors with implicit none. Error and reproducer, provided below.

**Error**
```
error: Semantic errors in pre.F
./pre.F:3:12: error: No explicit type declared for 'mess'
        DATA MESS/'RIGID BODY DEFINITION                   '/
 ^^^^
```

**Reproducer**
```
      subroutine sb
 implicit none
      DATA MESS/'RIGID BODY DEFINITION '/
      CHARACTER MESS*40
      end subroutine
```

Note 1: This is used in applications like OpenRadioss. https://github.com/OpenRadioss/OpenRadioss/blob/main/starter/source/model/sets/preread_rbody_set.F#L66
Note 2: Classic Flang, gfortran does not report errors
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VFGPozYQ_jXmZXQIDIHkgQcuCW2kNitl89Kn04AnwT1jI9vs9vrrKwPtZbXtqi9nWQm2Z8bfN_N50Dl510QV23xmm0OEk--Nrb5Ki7rrUQuLg-lRR60R36qTll6ikn-il0bDq_Q9HOprDc6jp4G0hx5fpL7DzdhXtAIs3ciS7gjIWmPd4iOHUclOetBGUwzHcASog_lojZg6sozvYbTmRQoS0JIyrzFLDiyp118e5uy4fK7bRbLOeTnfybIanmlA7WX3NwqpYbQUN4tZzHizLLM6Y1md8uDzj_PZAP2xAvbfRgJBnUJLIrAExsuBnGO8XILBOua8_Hp8fma8Yby8nH46HeDz0-E3OByb0_l0PT2d4f0IcfiKC9jm-H3-G8HHZFwecvefGVkucVNrzeSlJnDtevCmJo_G_4vIG9jz2P9cX-r99XhZfev8DQTS4gHGB-TOxhOkoQ7XXjqQDiZHIlQQx4B4lqIDJb8SPI2kLyikcS6G3vvRsayeYTd36fupjTszMN482L1btcq0jDcDSs144zxaHzLaODPZjsKJEaTCBnm3CMcSii82vJAvjnzcMJ79UhQP8Gc97VV4bB00CvU9yPt-M9Zb1CAMOdDGB_kb61eRRqLKxC7bYURVWmx3SVKm2zLqqy0WSDfMky0WuUi3W4EoiEpObZpjUkSy4gnPkjJN0iLb5UUssMA2zTkW6aYo8x3LExpQqliplyE29h5J5yaqiqzcZpHClpSbOwLntxltVt-s0Z60YJyHPmGr4Pqpne6O5YmSzrvvwbz0au4oC9XNAX5I44Bosqr6oMwB0Pr3abTmd-o8481MNVRuZvtXAAAA___H0YlD">