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

    <tr>
        <th>Summary</th>
        <td>
            [flang] missing diagnostic message for automatic object in COMMON
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Consider the following test program:
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gfortran.dg/common_28.f90
```console
$ cat common_28.f90
! { dg-do compile }
! PR fortran/32986 - Improve diagnostic message for COMMON with automatic object

function a(n)
 real :: x(n) ! { dg-error "Automatic object" }
  common /c/ x ! { dg-error "cannot appear in COMMON" }
end function
```

When compiling this program with Flang, the compilation passes without any message.
```console
$ flang-new -c common_28.f90
$
```

FYI
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU0FvozoQ_jXmMgKRcSBw4JA2Quqhr0_v8rSnyhjHeNfYyDZNu79-ZaBKt8p2pSjI4_E333zzDfNeSSNEQ4o7UpwSNofBuuZHypyzF590tn9r7q3xqhcOwiDgbLW2F2UkBOEDTM5Kx0ZCjyQ_kfw4hDD5eMKWYCtVGOYu43aMB87TUTln3Xog2HbadgTbkfkgrtEI7GcVRIycrQuOmayXBFtux9GaZ6yyc52vBUmZrz9ujbdabFHcA2cBbj3AHZDDHfQy7W1MmJQWQA6n6_W__8FWlmBLsa5KSOFhnJx9EdArJo31QXEYhfdMRk0c3D89Pj79AxcVBmBzsCOLGbb7LnjYkJf_82x4UNYAI1gZgvUaBieYhigcPcLrdgUfuIooHBDE42dwxCt72DqGKBbBFl5vYnBmjA3ApkkwB8ps7H-DEqaHd7KfpP7Yz_-DMJuKiykG5d9NsYrRamYkwfvFPWsiWwSYmPfCL0l2DsDM27ug2d9Ge46YqREXSPntGe-_oNx-e7hpVs4zaebMumi1bpY_ldaMYOsHe3nuZplxqQhtVU_oaXFF0je0r2nNEtHsyprmtMJdkQxNUe3rfc3LqiuQ0u4geCdoVYrdGQ9izw6JajBHmldY5hVSWmQ7WvZ5de53vKdVUTKyz8XIlM60fhkjpUR5P4umLPKcJpp1QvtlaRGjDMslQYw77Jr4Ju1m6ck-18oHf0UJKuhl2xcJSXGCUXkfJ_cHX3_28tUtyex088W-x5rbJ52cXb3aLkw9wXbp5FcAAAD__xO_Yyo">