[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Driver / fixed-free-detection.f90
blobc2deef73f39a0bed49ea0305b9f8a036e3bf1cd7
1 ! Ensure the driver correctly switches between fixed and free form based on the file extension.
2 ! This test exploits the fact that the prescanner treats whitespace differently for free
3 ! and fixed form input files.
5 !--------------------------
6 ! FLANG DRIVER (flang)
7 !--------------------------
8 ! RUN: %flang -E -Xflang -fno-reformat %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FREEFORM
9 ! RUN: %flang -E -Xflang -fno-reformat %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM
10 ! RUN: %flang -E -Xflang -fno-reformat %S/Inputs/free-form-test.f90 %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=MULTIPLEFORMS
12 !-----------------------------------------
13 ! FRONTEND FLANG DRIVER (flang_fc1)
14 !-----------------------------------------
15 ! RUN: %flang_fc1 -E -fno-reformat %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FREEFORM
16 ! RUN: %flang_fc1 -E -fno-reformat %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM
17 ! RUN: %flang_fc1 -E -fno-reformat %S/Inputs/free-form-test.f90 %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=MULTIPLEFORMS
19 ! FREEFORM:program freeform
20 ! FREEFORM-NOT:programfixedform
22 ! FIXEDFORM:programfixedform
23 ! FIXEDFORM-NOT:program freeform
25 ! MULTIPLEFORMS:program freeform
26 ! MULTIPLEFORMS-NOT:programfixedform
27 ! MULTIPLEFORMS-NEXT:end
28 ! MULTIPLEFORMS-NEXT:programfixedform
29 ! MULTIPLEFORMS-NOT:program freeform