Issue 83270
Summary [Flang] Preprocessing lower case .f## file should report on preprocessor directives unless -cpp is given (gfortran compability)
Labels flang:frontend, flang, flang:semantics
Assignees
Reporter DominikAdamski
    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
``` 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to