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

    <tr>
        <th>Summary</th>
        <td>
            [flang] Flang should ignore C-style comments in included .h files
        </td>
    </tr>

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

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

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

<pre>
    With flang-new built from LLVM commit 748922b31f7f1f48af76efc66a7af0674b1c4c06, `flang` reports parse errors where `gfortran` 12.2.0 is happy when a C-style comment appears in an included header file:

```
$ echo "/* hello */" > t.h
$ echo '#include "t.h"' > u.f
$ gfortran -cpp -c u.f   # gfortran is happy with this program

$ ~/llvm-project/build/bin/flang-new -cpp -c u.f   # flang is not
error: Could not parse u.f
./t.h:1:1: warning: Character in fixed-form label field must be a digit
  /* hello */
  ^
./u.f:1:1: warning: included here
  #include "t.h"
  ^^^^^^^^^^^^^^
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUsly2zAM_RrpgrGGiyzGBx3cLKf02p4pCjLZUsuQVN38fUHFjtMmh85IpCAADw946Ob-pf3ukoXB6-m0m_AM3ep8giHMIzw_f_sKZh5Hl0DVdwchOskHNfChvtODanAwTaOVHlij6o6b2rCmEPdQNGzDoxsCLnNIERYdIgKGMIcIZ4sBc9hpIGfQU47kohIVAxfB6mV5yUETaLjfxfTiceOBUwLyIWGBI-dEp_Frjz1Y1D0GGJzHQh4L9lCw69mwy_NqihrQ2BkKIQrxVIgj5Xqf7eNmCyjkI6TKfohXhZCXgjk7h2QMtSWs1XBLuPYFO7MsdGQvACXJm-vWaBYgWbKXMJ-CHv9iT2iFeiRm3v8adxTxA00iM-vU59tNdN70-1hx8-Vy05xeQTcZaExwP6--z_8v-rw1URFm7k8e-eWFsw6TI1FzmtVBm0TzJhUG9xv7HXU1gtcdevqBBDquMUGHpGDvTu5SOBP6OPKra_94K56ZfF78neQBb7CfKPMO9z-fzxamxJY3jZKSCaHKvpX9QR50mVzy2Bb7L6-rvn-Ap23O0W4zdadpph3_Z3u3tX1roLLbvsZyDb61KS0xr24e0BNNzK5dRWkX5T8ugItxxUgf-zslm9K2ai8kGwZkRhgm-YH1rKuZYFyjkZyLcpMnZs5Et3StoI44Z5wfuGKqoq7woLSRWEujjSlqhqN2vsqFqzmcytBuHLr1FMnpXUzx5tQxUtOIV3y9JjuH1urzTzfFpdz4thvZP0dSVao">