2 !--------------------------
3 ! FLANG DRIVER (flang-new)
4 !--------------------------
5 ! RUN: %flang --help-hidden 2>&1 | FileCheck %s
6 ! RUN: not %flang -help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG
8 !----------------------------------------
9 ! FLANG FRONTEND DRIVER (flang-new -fc1)
10 !----------------------------------------
11 ! RUN: not %flang_fc1 --help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG-FC1
12 ! RUN: not %flang_fc1 -help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG-FC1
14 !----------------------------------------------------
15 ! EXPECTED OUTPUT FOR FLANG DRIVER (flang-new)
16 !----------------------------------------------------
17 ! CHECK:USAGE: flang-new
20 ! CHECK-NEXT: -### Print (but do not run) the commands to run for this compilation
21 ! CHECK-NEXT: -cpp Enable predefined and command line preprocessor macros
22 ! CHECK-NEXT: -c Only run preprocess, compile, and assemble steps
23 ! CHECK-NEXT: -D <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted)
24 ! CHECK-NEXT: -emit-llvm Use the LLVM representation for assembler and object files
25 ! CHECK-NEXT: -E Only run the preprocessor
26 ! CHECK-NEXT: -falternative-parameter-statement
27 ! CHECK-NEXT: Enable the old style PARAMETER statement
28 ! CHECK-NEXT: -fbackslash Specify that backslash in string introduces an escape character
29 ! CHECK-NEXT: -fcolor-diagnostics Enable colors in diagnostics
30 ! CHECK-NEXT: -fdefault-double-8 Set the default double precision kind to an 8 byte wide type
31 ! CHECK-NEXT: -fdefault-integer-8 Set the default integer kind to an 8 byte wide type
32 ! CHECK-NEXT: -fdefault-real-8 Set the default real kind to an 8 byte wide type
33 ! CHECK-NEXT: -ffixed-form Process source files in fixed form
34 ! CHECK-NEXT: -ffixed-line-length=<value>
35 ! CHECK-NEXT: Use <value> as character line width in fixed mode
36 ! CHECK-NEXT: -ffree-form Process source files in free form
37 ! CHECK-NEXT: -fimplicit-none No implicit typing allowed unless overridden by IMPLICIT statements
38 ! CHECK-NEXT: -finput-charset=<value> Specify the default character set for source files
39 ! CHECK-NEXT: -fintrinsic-modules-path <dir>
40 ! CHECK-NEXT: Specify where to find the compiled intrinsic modules
41 ! CHECK-NEXT: -flarge-sizes Use INTEGER(KIND=8) for the result type in size-related intrinsics
42 ! CHECK-NEXT: -flogical-abbreviations Enable logical abbreviations
43 ! CHECK-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE
44 ! CHECK-NEXT: -fno-color-diagnostics Disable colors in diagnostics
45 ! CHECK-NEXT: -fopenacc Enable OpenACC
46 ! CHECK-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code.
47 ! CHECK-NEXT: -fxor-operator Enable .XOR. as a synonym of .NEQV.
48 ! CHECK-NEXT: -help Display available options
49 ! CHECK-NEXT: -I <dir> Add directory to the end of the list of include search paths
50 ! CHECK-NEXT: -module-dir <dir> Put MODULE files in <dir>
51 ! CHECK-NEXT: -nocpp Disable predefined and command line preprocessor macros
52 ! CHECK-NEXT: -o <file> Write output to <file>
53 ! CHECK-NEXT: -pedantic Warn on language extensions
54 ! CHECK-NEXT: -print-effective-triple Print the effective target triple
55 ! CHECK-NEXT: -print-target-triple Print the normalized target triple
56 ! CHECK-NEXT: -P Disable linemarker output in -E mode
57 ! CHECK-NEXT: -std=<value> Language standard to compile for
58 ! CHECK-NEXT: -S Only run preprocess and compilation steps
59 ! CHECK-NEXT: --target=<value> Generate code for the given target
60 ! CHECK-NEXT: -U <macro> Undefine macro <macro>
61 ! CHECK-NEXT: --version Print version information
62 ! CHECK-NEXT: -W<warning> Enable the specified warning
63 ! CHECK-NEXT: -Xflang <arg> Pass <arg> to the flang compiler
65 !-------------------------------------------------------------
66 ! EXPECTED OUTPUT FOR FLANG DRIVER (flang-new)
67 !-------------------------------------------------------------
68 ! ERROR-FLANG: error: unknown argument '-help-hidden'; did you mean '--help-hidden'?
70 !-------------------------------------------------------------
71 ! EXPECTED OUTPUT FOR FLANG FRONTEND DRIVER (flang-new -fc1)
72 !-------------------------------------------------------------
73 ! Frontend driver -help-hidden is not supported
74 ! ERROR-FLANG-FC1: error: unknown argument: '{{.*}}'