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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Preprocessor does not work correctly when C old-style comments immediately precedes a continuation line.
        </td>
    </tr>

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

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

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

<pre>
    ```
Version of flang : 21.0.0(c8b40867d144395ad3c306a3cf87f970e0f97f07)/AArch64
```

`C old-style comments` specified in the program are removed by the preprocessor.  
When `C old-style comments` is specified on the line immediately preceding a continuation line, the continuation of the statement is not successful.

The following are the test program, Flang, Gfortran and ifx compilation/execution result.

flang snggo770_2.F90:
```fortran
integer &
i(1)
/* \\\*/
i(1)&
/* \\\*/
=1
/* \*/
if (i(1)/=1)write(6,*)'error',i(1)
print *,'pass'
end
```

```
$ flang snggo770_2.F90
error: Could not parse snggo770_2.F90
./snggo770_2.F90:4:3: error: expected ')'
  i(1)&
    ^
./snggo770_2.F90:4:1: in the context: statement function definition
  i(1)&
  ^
./snggo770_2.F90:4:1: in the context: declaration construct
  i(1)&
  ^
./snggo770_2.F90:1:1: in the context: specification part
  integer &
  ^
./snggo770_2.F90:1:1: in the context: main program
  integer &
  ^
./snggo770_2.F90:6:2: error: expected declaration construct
  =1
   ^
./snggo770_2.F90:1:1: in the context: specification part
  integer &
  ^
./snggo770_2.F90:1:1: in the context: main program
  integer &
  ^
$
```

```
$ flang snggo770_2.F90 -E
#line "./snggo770_2.F90" 1
      integer i(1)


 i(1)

      =1

      if(i(1)/=1)write(6,*)'error',i(1)
      print *,'pass'
      end
$
```

```
$ gfortran snggo770_2.F90; ./a.out
 pass
$
```

```
$ gfortran snggo770_2.F90 -E
# 1 "snggo770_2.F90"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "snggo770_2.F90"
integer &
i(1)

i(1)&

=1

if (i(1)/=1)write(6,*)'error',i(1)
print *,'pass'
end
$
```

```
$ ifx snggo770_2.F90; ./a.out
 pass
$
```

```
$ ifx snggo770_2.F90 -E
# 1 "snggo770_2.F90"
integer &
i(1)

i(1)&

=1

if (i(1)/=1)write(6,*)'error',i(1)
print *,'pass'
end
```


</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVs2O4zYMfhrlQsRQ6MSODzl4M5teeyjaY6FIdKKtIhmSPD9vX0j2TDKbzHR2t1gsYCCRRH4kP1IURQj6YIk2bPWJre5mYohH5zfuaN28-zLbO_W0YRWfPt7-ST5oZ8F10BlhD8DKFnBR8IIzXMv1fsnXVa0Wy2XZrIQqZckrUcpuXXdNzYl3Td3xmmHDcNe2Xh6rJePtpYVxuQVn1DzEJ0Mg3elENgZWcQg9Sd1pUqAtxCNB793BixMIT-Dp5O5Jwf5pOqLeO0khOF8AMN7-dSQL76DrcGHAjQaMtgT6dCKlRSTzlGAlKW0PIEA6G7UdREycJEmG26z16sB1eS9EESnZSnasixAGmbzrBlOMgf9xJOicMe4hw3vKepFCfI4z4e8S8enPb53z0QsLwirQ3WOKpdcmG2W4o0eSQ3bAUxhMnIyMeQv2cHB1zf_GYtdwVraXaZhwGW-1jXQgDwyrtGK4XqTk8ZbhjmELbLWdPsxbFzJZ400xVt4tXp-_AHTAcH2G2WVRbB68jsRwXTEchRuGNXnvPMOa4fbCud5rGyELbRnWvQghyfCWrLpZbuclLuEmQbwdTZUtbN1gVE5gL3yga8mC4e6K3yUr2zKpv-DQY08ykoLsfzN6CPCaQAAAtvr8HuoigU3XIdUdPca0cy63brAy14GiTludy-OWpe-zo0ga4cdKl86G6AcZvxV_8U4c442Uo4Ve-An8VWV-L_hJaPtyt74RtmJli7cz-jYnU92_n9VfnA2Gt5v2f94imI_qZW6qDPGGg4gwEQRn-5eNJ39f7YzSzz3lRbv70UYy4rzZTsbjqal8hJTDc8f-OiufIFEhCjfkf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