[PATCH] D94228: [flang][driver] Support fixed form detection
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 07:45:01 PST 2021
awarzynski added a comment.
@FarisRehman , thank you for working on this!
I think that it would be useful to add a test like this:
Input name: `input.f:
program ShouldFail
end
Run line:
flang-new -E input.f
This should fail as `flang-new` will identify the input it as fixed-form, yet the actual file is free form.
================
Comment at: flang/test/Flang-Driver/Inputs/free-form-test.f90:1
+program A
+end
----------------
I think that `fixed-free-detection.f90` will be easier to read if you use different name here. Perhaps instead of A, you could use: `FixedForm` and `FreeForm`?
================
Comment at: flang/test/Flang-Driver/fixed-free-detection.f90:1
+! Ensure the driver behaves differently on a fixed form file, to a free form file, based on the file extension.
+
----------------
This tests verifies the driver correctly switches between the free and fixed forms (based on the file extension). This is tested by exploiting the fact that the preprocessor (more generally, the frontend, but not the driver itself) treats white-spaces differently for free and fixed form input files.
Would you mind clarifying this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94228/new/
https://reviews.llvm.org/D94228
More information about the llvm-commits
mailing list