[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Driver / convert.f90
blobb2cf6c23efdb753772ae54da00c448c18179b75e
1 ! Ensure argument -fconvert=<value> accepts all relevant options and produces an
2 ! error if an invalid value is specified.
4 !--------------------------
5 ! FLANG DRIVER (flang)
6 !--------------------------
7 ! RUN: %flang -### -fconvert=unknown %s 2>&1 | FileCheck %s --check-prefix=VALID
8 ! RUN: %flang -### -fconvert=native %s 2>&1 | FileCheck %s --check-prefix=VALID
9 ! RUN: %flang -### -fconvert=little-endian %s 2>&1 | FileCheck %s --check-prefix=VALID
10 ! RUN: %flang -### -fconvert=big-endian %s 2>&1 | FileCheck %s --check-prefix=VALID
11 ! RUN: %flang -### -fconvert=swap %s 2>&1 | FileCheck %s --check-prefix=VALID
12 ! RUN: not %flang -fconvert=foobar %s 2>&1 | FileCheck %s --check-prefix=INVALID
14 !-----------------------------------------
15 ! FRONTEND FLANG DRIVER (flang-new -fc1)
16 !-----------------------------------------
17 ! RUN: %flang_fc1 -emit-mlir -fconvert=unknown %s -o - | FileCheck %s --check-prefix=VALID_FC1
18 ! RUN: %flang_fc1 -emit-mlir -fconvert=native %s -o - | FileCheck %s --check-prefix=VALID_FC1
19 ! RUN: %flang_fc1 -emit-mlir -fconvert=little-endian %s -o - | FileCheck %s --check-prefix=VALID_FC1
20 ! RUN: %flang_fc1 -emit-mlir -fconvert=big-endian %s -o - | FileCheck %s --check-prefix=VALID_FC1
21 ! RUN: %flang_fc1 -emit-mlir -fconvert=swap %s -o - | FileCheck %s --check-prefix=VALID_FC1
22 ! RUN: not %flang_fc1 -fconvert=foobar %s 2>&1 | FileCheck %s --check-prefix=INVALID
24 ! Only test that the command executes without error. Correct handling of each
25 ! option is handled in Lowering tests.
26 ! VALID: -fconvert
27 ! VALID_FC1: module
29 ! INVALID: error: invalid value 'foobar' in '-fconvert=foobar'