|
14 | 14 | ! RUN: %flang -### -S -fprofile-use=%S %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-DIR %s |
15 | 15 | ! CHECK-PROFILE-USE-DIR: "-fprofile-use={{.*}}" |
16 | 16 |
|
| 17 | +! ------------------------------------------------------------------------------ |
17 | 18 | ! RUN: %flang -### -fbuiltin %s 2>&1 \ |
18 | 19 | ! RUN: | FileCheck %s -check-prefix=WARN-BUILTIN |
19 | 20 | ! WARN-BUILTIN: warning: '-fbuiltin' is not valid for Fortran |
20 | | - |
| 21 | +! |
21 | 22 | ! RUN: %flang -### -fno-builtin %s 2>&1 \ |
22 | 23 | ! RUN: | FileCheck %s -check-prefix=WARN-NO-BUILTIN |
23 | 24 | ! WARN-NO-BUILTIN: warning: '-fno-builtin' is not valid for Fortran |
24 | | - |
| 25 | +! |
25 | 26 | ! RUN: %flang -### -fbuiltin -fno-builtin %s 2>&1 \ |
26 | 27 | ! RUN: | FileCheck %s -check-prefix=WARN-BUILTIN-MULTIPLE |
27 | 28 | ! WARN-BUILTIN-MULTIPLE: warning: '-fbuiltin' is not valid for Fortran |
28 | 29 | ! WARN-BUILTIN-MULTIPLE: warning: '-fno-builtin' is not valid for Fortran |
29 | | - |
| 30 | +! |
| 31 | +!------------------------------------------------------------------------------- |
30 | 32 | ! When emitting an error with a suggestion, ensure that the diagnostic message |
31 | 33 | ! uses '-Xflang' instead of '-Xclang'. This is typically emitted when an option |
32 | 34 | ! that is available for `flang -fc1` is passed to `flang`. We use -complex-range |
|
43 | 45 | ! RUN: | FileCheck %s -check-prefix UNKNOWN-NO-SUGGEST |
44 | 46 | ! |
45 | 47 | ! UNKNOWN-NO-SUGGEST: error: unknown argument: '-not-an-option'{{$}} |
| 48 | +! |
| 49 | +!------------------------------------------------------------------------------- |
| 50 | +! The options in the command below are gfortran-specific optimization flags that |
| 51 | +! are accepted by flang's driver but ignored. Check that the correct warning |
| 52 | +! message is displayed when these are used. |
| 53 | +! |
| 54 | +! RUN: %flang -### %s \ |
| 55 | +! RUN: -finline-limit=1000 \ |
| 56 | +! RUN: -finline-limit \ |
| 57 | +! RUN: -fexpensive-optimizations \ |
| 58 | +! RUN: -fno-expensive-optimizations \ |
| 59 | +! RUN: -fno-defer-pop \ |
| 60 | +! RUN: -fkeep-inline-functions \ |
| 61 | +! RUN: -fno-keep-inline-functions \ |
| 62 | +! RUN: -freorder-blocks \ |
| 63 | +! RUN: -ffloat-store \ |
| 64 | +! RUN: -fgcse \ |
| 65 | +! RUN: -fivopts \ |
| 66 | +! RUN: -fprefetch-loop-arrays \ |
| 67 | +! RUN: -fprofile-correction \ |
| 68 | +! RUN: -fprofile-values \ |
| 69 | +! RUN: -fschedule-insns \ |
| 70 | +! RUN: -fsignaling-nans \ |
| 71 | +! RUN: -fstrength-reduce \ |
| 72 | +! RUN: -ftracer \ |
| 73 | +! RUN: -funroll-all-loops \ |
| 74 | +! RUN: -funswitch-loops \ |
| 75 | +! RUN: -falign-labels \ |
| 76 | +! RUN: -falign-labels=100 \ |
| 77 | +! RUN: -falign-jumps \ |
| 78 | +! RUN: -falign-jumps=100 \ |
| 79 | +! RUN: -fbranch-count-reg \ |
| 80 | +! RUN: -fcaller-saves \ |
| 81 | +! RUN: -fno-default-inline \ |
| 82 | +! RUN: -fgcse-after-reload \ |
| 83 | +! RUN: -fgcse-las \ |
| 84 | +! RUN: -fgcse-sm \ |
| 85 | +! RUN: -fipa-cp \ |
| 86 | +! RUN: -finline-functions-called-once \ |
| 87 | +! RUN: -fmodulo-sched \ |
| 88 | +! RUN: -fmodulo-sched-allow-regmoves \ |
| 89 | +! RUN: -fpeel-loops \ |
| 90 | +! RUN: -frename-registers \ |
| 91 | +! RUN: -fschedule-insns2 \ |
| 92 | +! RUN: -fsingle-precision-constant \ |
| 93 | +! RUN: -funsafe-loop-optimizations \ |
| 94 | +! RUN: -fuse-linker-plugin \ |
| 95 | +! RUN: -fvect-cost-model \ |
| 96 | +! RUN: -fvariable-expansion-in-unroller \ |
| 97 | +! RUN: -fweb \ |
| 98 | +! RUN: -fwhole-program \ |
| 99 | +! RUN: -fcaller-saves \ |
| 100 | +! RUN: -freorder-blocks \ |
| 101 | +! RUN: -ffat-lto-objects \ |
| 102 | +! RUN: -fmerge-constants \ |
| 103 | +! RUN: -finline-small-functions \ |
| 104 | +! RUN: -ftree-dce \ |
| 105 | +! RUN: -ftree-ter \ |
| 106 | +! RUN: -ftree-vrp \ |
| 107 | +! RUN: -fno-devirtualize \ |
| 108 | +! RUN: -fno-devirtualize-speculatively 2>&1 \ |
| 109 | +! RUN: | FileCheck --check-prefix=CHECK-WARNING %s |
| 110 | +! CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported |
| 111 | +! CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported |
| 112 | +! CHECK-WARNING-DAG: optimization flag '-fexpensive-optimizations' is not supported |
| 113 | +! CHECK-WARNING-DAG: optimization flag '-fno-expensive-optimizations' is not supported |
| 114 | +! CHECK-WARNING-DAG: optimization flag '-fno-defer-pop' is not supported |
| 115 | +! CHECK-WARNING-DAG: optimization flag '-fkeep-inline-functions' is not supported |
| 116 | +! CHECK-WARNING-DAG: optimization flag '-fno-keep-inline-functions' is not supported |
| 117 | +! CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported |
| 118 | +! CHECK-WARNING-DAG: optimization flag '-ffloat-store' is not supported |
| 119 | +! CHECK-WARNING-DAG: optimization flag '-fgcse' is not supported |
| 120 | +! CHECK-WARNING-DAG: optimization flag '-fivopts' is not supported |
| 121 | +! CHECK-WARNING-DAG: optimization flag '-fprefetch-loop-arrays' is not supported |
| 122 | +! CHECK-WARNING-DAG: optimization flag '-fprofile-correction' is not supported |
| 123 | +! CHECK-WARNING-DAG: optimization flag '-fprofile-values' is not supported |
| 124 | +! CHECK-WARNING-DAG: optimization flag '-fschedule-insns' is not supported |
| 125 | +! CHECK-WARNING-DAG: optimization flag '-fsignaling-nans' is not supported |
| 126 | +! CHECK-WARNING-DAG: optimization flag '-fstrength-reduce' is not supported |
| 127 | +! CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported |
| 128 | +! CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported |
| 129 | +! CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported |
| 130 | +! CHECK-WARNING-DAG: optimization flag '-falign-labels' is not supported |
| 131 | +! CHECK-WARNING-DAG: optimization flag '-falign-labels=100' is not supported |
| 132 | +! CHECK-WARNING-DAG: optimization flag '-falign-jumps' is not supported |
| 133 | +! CHECK-WARNING-DAG: optimization flag '-falign-jumps=100' is not supported |
| 134 | +! CHECK-WARNING-DAG: optimization flag '-fbranch-count-reg' is not supported |
| 135 | +! CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported |
| 136 | +! CHECK-WARNING-DAG: optimization flag '-fno-default-inline' is not supported |
| 137 | +! CHECK-WARNING-DAG: optimization flag '-fgcse-after-reload' is not supported |
| 138 | +! CHECK-WARNING-DAG: optimization flag '-fgcse-las' is not supported |
| 139 | +! CHECK-WARNING-DAG: optimization flag '-fgcse-sm' is not supported |
| 140 | +! CHECK-WARNING-DAG: optimization flag '-fipa-cp' is not supported |
| 141 | +! CHECK-WARNING-DAG: optimization flag '-finline-functions-called-once' is not supported |
| 142 | +! CHECK-WARNING-DAG: optimization flag '-fmodulo-sched' is not supported |
| 143 | +! CHECK-WARNING-DAG: optimization flag '-fmodulo-sched-allow-regmoves' is not supported |
| 144 | +! CHECK-WARNING-DAG: optimization flag '-fpeel-loops' is not supported |
| 145 | +! CHECK-WARNING-DAG: optimization flag '-frename-registers' is not supported |
| 146 | +! CHECK-WARNING-DAG: optimization flag '-fschedule-insns2' is not supported |
| 147 | +! CHECK-WARNING-DAG: optimization flag '-fsingle-precision-constant' is not supported |
| 148 | +! CHECK-WARNING-DAG: optimization flag '-funsafe-loop-optimizations' is not supported |
| 149 | +! CHECK-WARNING-DAG: optimization flag '-fuse-linker-plugin' is not supported |
| 150 | +! CHECK-WARNING-DAG: optimization flag '-fvect-cost-model' is not supported |
| 151 | +! CHECK-WARNING-DAG: optimization flag '-fvariable-expansion-in-unroller' is not supported |
| 152 | +! CHECK-WARNING-DAG: optimization flag '-fweb' is not supported |
| 153 | +! CHECK-WARNING-DAG: optimization flag '-fwhole-program' is not supported |
| 154 | +! CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported |
| 155 | +! CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported |
| 156 | +! CHECK-WARNING-DAG: optimization flag '-fmerge-constants' is not supported |
| 157 | +! CHECK-WARNING-DAG: optimization flag '-finline-small-functions' is not supported |
| 158 | +! CHECK-WARNING-DAG: optimization flag '-ftree-dce' is not supported |
| 159 | +! CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported |
| 160 | +! CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported |
| 161 | +! CHECK-WARNING-DAG: optimization flag '-fno-devirtualize' is not supported |
| 162 | +! CHECK-WARNING-DAG: optimization flag '-fno-devirtualize-speculatively' is not supported |
| 163 | +! |
| 164 | +! ------------------------------------------------------------------------------ |
0 commit comments