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

    <tr>
        <th>Summary</th>
        <td>
            [Flang][OpenMP] Compilation error when continuation lines of OpenMP (free source form conditional compilation sentinel) and Fortran `free source form` are mixed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            flang
      </td>
    </tr>

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

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

<pre>
    ```
Version of flang-new : 19.0.0(4f19f15a601a5761b12c9c66d99d97dbc89ef90d)/AArch64
```

When the following `free form statement continuation` are mixed, a compilation error occurs.
- Continuation line of OpenMP (`free source form conditional compilation sentinel`)
- Continuation line of Fortran `free source form`

When there is no mixing, a compilation terminates normally.

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

ompc_066_.f90:
```fortran
program main
!$ i = 0
 i = 1&
   !$ +10 &
!$+100&
!$&+ 1000&
 &+ 10000&
!$& +100000&
 & +1000000

if(i .eq. 1111111) then
  print *, 'OK'
else
  print *, 'NG'
endif
end program main
```

```
$ flang-new -fopenmp ompc_066_.f90
error: Could not scan ompc_066_.f90
./ompc_066_.f90:3:7: error: bad character ('&') in Fortran token
   i = 1&
        ^
./ompc_066_.f90:6:10: error: bad character ('&') in Fortran token
  !$&+ 1000&
 ^
./ompc_066_.f90:7:2: error: bad character ('&') in Fortran token
 &+ 10000&
   ^
./ompc_066_.f90:7:10: error: bad character ('&') in Fortran token
   &+ 10000&
           ^
./ompc_066_.f90:8:3: error: bad character ('&') in Fortran token
  !$& +100000&
 ^
./ompc_066_.f90:8:12: error: bad character ('&') in Fortran token
 !$& +100000&
             ^
$
```

```
$ gfortran -fopenmp ompc_066_.f90; ./a.out
 OK
$
```

```
$ ifort -qopenmp -diag-disable=10448 ompc_066_.f90; ./a.out
 OK
$
```

</pre>
<img width="1px" height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