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

    <tr>
        <th>Summary</th>
        <td>
            Confusing error message for "goto" jump over variably modified type
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    The following C code:

```
int foo() {
   int n = 42;
   typedef char T[n];
   goto label;
   T *a;
label:
   return sizeof a;
}
```

fails to compile with an error:

```
<source>:4:4: error: cannot jump from this goto statement to its label
   goto label;
   ^
<source>:5:7: note: jump bypasses initialization of variable length array
   T *a;
```

The second note is invalid. There is no initialization there. There is even no declaration of VLA.
The note should be:
```
note: jump over declaration of an identifier with variably modified type
```

The other question is why such declarations are disallowed because the type of `a` is fully established. Nothing needs to be evaluated there.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVE2P4jgQ_TXOpTQosUNIDjnQzXBa7am190pSTjxybNbl0GJ-_cqBBWbE9kpgRFW53nv1YWQ2oyNqxfZNbA8ZLnHyoY0c0Rm2WeeHS_sxEWhvrf80boR36P1AQu1FfhD5v2eV3z7rX-MiaO-FrIVsQOzermYASB4HQh2glEI97PFyooE09BMG-BDbNye2h-eA0UcPFjuyz9YPEHKPd8vNv7_7A8UlOGDzk7yGR6DYHV4Sv54ajWWIHno_n4wl-DRxAnRAIfjwtXSh3tkvoSehvgu1L2_f-1Xo0Tkf4ccyn0AHP0OcDF_lccRIM7mYsE3km96vSyC2318ib4Xa7xKg8zG164rYXU7ITAzGmWjQmp8YjXfgNZwxGOwsgSU3Jr0h4OW_Kv2ybmlQmHrvhhUUTII5ozXDBj4mCqvF-d-xY3I9RdCZXAobqLcY7vz--mO_eeCsADz5xQ7QPY3jr7x-0e7PFH5Pig7MQC4abShc-3yrwwVmPyTzsA7n_8j2SQT8vRCvmQ3D53QBXvrpGZEBA8FgGNM2UWLe48KUSrCiJEqiylFUecqhF2svQByxs4YnGjbwp49TWkNHNKwz2hHQGe2CMTFdS5kNrRoa1WBGbVHVRa1q2RTZ1Kqyp0rrstI7iVqVfS53Fam8op0uVbPNTCtzqfKyqItdURfFBqu6qWWl64ZkKUmJMqcZjd1Ye543PoyZYV6oraQsmmwdTl4fEykdfcLqFFKmtyW06c63bhlZlLk1HPmRJZpoqX33Ti-c5K3rAjMx45henwBCyrQAQsqnbr7uVbYE204xnjjNhTwKeRxNnJZu0_tZyGNCvf18OwX_g_oo5HHlykIeVy3_BAAA__-ya5Q2">