<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/83270>83270</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Preprocessing lower case .f## file should report on preprocessor directives unless -cpp is given (gfortran compability)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend,
flang,
flang:semantics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DominikAdamski
</td>
</tr>
</table>
<pre>
flang-new silently skips -DMACRO flag if it preprocesses lower case *.f## file unless -cpp flag is given. Proof:
Source file:
```
#ifdef TEST
#define A 1
#else
#define A 0
#endif
program main
print *, A
end program
```
compilation command:
` flang-new -DTEST file.f90`
Output:
```
> ./a.out
0 //Expected output 1, because of -DTEST
```
gfrotran reports that preprocessor macros are not handled:
```
gfortran -DTEST file.f90
1 | #ifdef TEST
| 1
Warning: Illegal preprocessor directive
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U0Fv8ygQ_TX4MoqFwUnsgw_epJH2sGq1rbRnbAaHLQYLcPv1338yddOkXytFsXgDw5v3eCIEPVjEhmz_IttjJuZ4dr45ulFb_dxKMYZnnXVOvjXKCDtsLL5C0AZtNG8QnvUUYHP8pz38ew_KiAG0Ah1h8jh512MIGMC4V_TQi4BAWJsrwjhhHJQ2CLM1GAJs-mlazwcY9AvaHB68c4rwltAjoe2jm32P6dAFIzv6_oN1zbhWEhU83T0-XSCJSluEFooLhCbgn3X6WbdSq3WV_ifvBi9GGIW27wjA5LWNy0SEHWDdh1bCuvd7ir0bJ21E1M5C78ZRWHk9DnyKvDkuU6SBc1WnLmnX_RynOf6sAb-DnLCTyN0c3yEKhJ0IO939mrCPKMGlFlAsxDvsxRwQnFpv_L7toLyLXljwODkfA8SzuLbZeRhF710A4RGsi3AWVhqUPxIdlPOp49dBr2QHACiA7A_wjbUJ_zD1P-GttgPhLfxtDA7C3JKT2mMf9Qt-JZPJhsua1yLDptjTuuDFvqyyc1PyuqBlpVhdc7Vj2Beq63hBq452O1bvMt0wykrKWFWUZU2rXOy7vpK433LkrKYdKSmOQpvcmJcxd37IdAgzNhVne5oZ0aEJKXeMJdsJb5V3NqKVhDHCDpfC7Yq3AUdho-7DUtkeM98sV2y6eQikpEaHGD4vjTqalO9TOr09wsNFGW2H63jeZjOc3Wzk6jg4-4Oi4SbEH_kFwqqLxcurF502Or4RVmezN805xiksjyM9zUHH89zlvRsJOy3M189m8u5_7CNhp6RdIOyU5PsdAAD__5gEblU">