<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112279>112279</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] When there are multiple statements on a line, the preprocessor does not work correctly.
</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-new : 20.0.0(7f65377880ce6a0e5eaa4cb2591b86b8c8a24ee6)/AArch64
```
When building [EigenExa Version 2.12](https://www.r-ccs.riken.jp/labs/lpnctrt/projects/eigenexa/), the following error is detected.
When there are multiple statements on a line, the preprocessor does not work correctly.
The above program is `bisect2_short2.F`.
When there is one statement on a line, the preprocessor works correctly.
The above program is `bisect2_short22.F`.
The following are a self-made reproducer, Flang-new compilation result.
bisect2_short2.F:
```fortran
subroutine sub()
#define p(i,j) p_ i _ j
real(8) :: p_1_1
real(8) :: p_2_1, p_2_2
p(1,1) = 1.
p(2,1) = 0.; p(2,2) = 1.
end
```
```
$ flang-new bisect2_short2.F -E
#line "./bisect2_short2.F" 1
subroutine sub()
real(8) :: p_1_1
real(8) :: p_2_1, p_2_2
p_ 1 _1= 1.
p_ 2 _1= 0.; p_2_2 = 1.
end
$
```
bisect2_short22.F:
```fortran
subroutine sub()
#define p(i,j) p_ i _ j
real(8) :: p_1_1
real(8) :: p_2_1, p_2_2
p(1,1) = 1.
! p(2,1) = 0.; p(2,2) = 1.
p(2,1) = 0.
p(2,2) = 1.
end
```
```
$ flang-new bisect2_short22.F -E
#line "./bisect2_short22.F" 1
subroutine sub()
real(8) :: p_1_1
real(8) :: p_2_1, p_2_2
p_ 1 _1= 1.
p_ 2 _1= 0.
p_ 2 _2= 1.
end
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVt-O4roPfpr0xqJKXFrai14wy_AEq9_vEqWpS8OGpkr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