1 ! Test that Clang can forward all of the flags which are documented as 2 ! being supported by gfortran to GCC when falling back to GCC for 3 ! a fortran input file. 4 ! 5 ! RUN: %clang -no-canonical-prefixes -target i386-linux -### %s -o %t 2>&1 \ 6 ! RUN: -Aquestion=answer \ 7 ! RUN: -A-question=answer \ 8 ! RUN: -C \ 9 ! RUN: -CC \ 10 ! RUN: -Dmacro \ 11 ! RUN: -Dmacro=value \ 12 ! RUN: -H \ 13 ! RUN: -Isome/directory \ 14 ! RUN: -Jsome/other/directory \ 15 ! RUN: -P \ 16 ! RUN: -Umacro \ 17 ! RUN: -Waliasing \ 18 ! RUN: -Walign-commons \ 19 ! RUN: -Wall \ 20 ! RUN: -Wampersand \ 21 ! RUN: -Warray-bounds \ 22 ! RUN: -Wc-binding-type \ 23 ! RUN: -Wcharacter-truncation \ 24 ! RUN: -Wconversion \ 25 ! RUN: -Wfunction-elimination \ 26 ! RUN: -Wimplicit-interface \ 27 ! RUN: -Wimplicit-procedure \ 28 ! RUN: -Wintrinsic-shadow \ 29 ! RUN: -Wintrinsics-std \ 30 ! RUN: -Wline-truncation \ 31 ! RUN: -Wreal-q-constant \ 32 ! RUN: -Wrealloc-lhs \ 33 ! RUN: -Wsurprising \ 34 ! RUN: -Wtabs \ 35 ! RUN: -Wtarget-lifetime \ 36 ! RUN: -Wunderflow \ 37 ! RUN: -Wunused-parameter \ 38 ! RUN: -cpp \ 39 ! RUN: -dD \ 40 ! RUN: -dI \ 41 ! RUN: -dM \ 42 ! RUN: -dN \ 43 ! RUN: -dU \ 44 ! RUN: -faggressive-function-elimination \ 45 ! RUN: -falign-commons \ 46 ! RUN: -fall-intrinsics \ 47 ! RUN: -fautomatic \ 48 ! RUN: -fbackslash \ 49 ! RUN: -fbacktrace \ 50 ! RUN: -fblas-matmul-limit=42 \ 51 ! RUN: -fbounds-check \ 52 ! RUN: -fcheck-array-temporaries \ 53 ! RUN: -fcheck=all \ 54 ! RUN: -fcoarray=none \ 55 ! RUN: -fconvert=foobar \ 56 ! RUN: -fcray-pointer \ 57 ! RUN: -fd-lines-as-code \ 58 ! RUN: -fd-lines-as-comments \ 59 ! RUN: -fdefault-double-8 \ 60 ! RUN: -fdefault-integer-8 \ 61 ! RUN: -fdefault-real-8 \ 62 ! RUN: -fdollar-ok \ 63 ! RUN: -fdump-fortran-optimized \ 64 ! RUN: -fdump-fortran-original \ 65 ! RUN: -fdump-parse-tree \ 66 ! RUN: -fexternal-blas \ 67 ! RUN: -ff2c \ 68 ! RUN: -ffixed-form \ 69 ! RUN: -ffixed-line-length-42 \ 70 ! RUN: -ffpe-trap=list \ 71 ! RUN: -ffree-form \ 72 ! RUN: -ffree-line-length-42 \ 73 ! RUN: -ffrontend-optimize \ 74 ! RUN: -fimplicit-none \ 75 ! RUN: -finit-character=n \ 76 ! RUN: -finit-integer=n \ 77 ! RUN: -finit-local-zero \ 78 ! RUN: -finit-logical=false \ 79 ! RUN: -finit-real=zero \ 80 ! RUN: -finteger-4-integer-8 \ 81 ! RUN: -fintrinsic-modules-path \ 82 ! RUN: -fmax-array-constructor=42 \ 83 ! RUN: -fmax-errors=42 \ 84 ! RUN: -fmax-identifier-length \ 85 ! RUN: -fmax-stack-var-size=42 \ 86 ! RUN: -fmax-subrecord-length=42 \ 87 ! RUN: -fmodule-private \ 88 ! RUN: -fopenmp \ 89 ! RUN: -fpack-derived \ 90 ! RUN: -fprotect-parens \ 91 ! RUN: -frange-check \ 92 ! RUN: -freal-4-real-10 \ 93 ! RUN: -freal-4-real-16 \ 94 ! RUN: -freal-4-real-8 \ 95 ! RUN: -freal-8-real-10 \ 96 ! RUN: -freal-8-real-16 \ 97 ! RUN: -freal-8-real-4 \ 98 ! RUN: -frealloc-lhs \ 99 ! RUN: -frecord-marker=42 \ 100 ! RUN: -frecursive \ 101 ! RUN: -frepack-arrays \ 102 ! RUN: -fsecond-underscore \ 103 ! RUN: -fshort-enums \ 104 ! RUN: -fsign-zero \ 105 ! RUN: -fstack-arrays \ 106 ! RUN: -fsyntax-only \ 107 ! RUN: -funderscoring \ 108 ! RUN: -fwhole-file \ 109 ! RUN: -fworking-directory \ 110 ! RUN: -imultilib \ 111 ! RUN: -iprefix \ 112 ! RUN: -iquote \ 113 ! RUN: -isysroot \ 114 ! RUN: -isystem \ 115 ! RUN: -nocpp \ 116 ! RUN: -nostdinc \ 117 ! RUN: -pedantic \ 118 ! RUN: -pedantic-errors \ 119 ! RUN: -static-libgfortran \ 120 ! RUN: -std=f90 \ 121 ! RUN: -undef \ 122 ! RUN: | FileCheck %s 123 ! 124 ! FIXME: Several of these shouldn't necessarily be rendered separately 125 ! when passing to GCC... Hopefully their driver handles this. 126 ! 127 ! CHECK: "-Aquestion=answer" 128 ! CHECK: "-A-question=answer" 129 ! CHECK: "-C" 130 ! CHECK: "-CC" 131 ! CHECK: "-D" "macro" 132 ! CHECK: "-D" "macro=value" 133 ! CHECK: "-H" 134 ! CHECK: "-I" "some/directory" 135 ! CHECK: "-Jsome/other/directory" 136 ! CHECK: "-P" 137 ! CHECK: "-U" "macro" 138 ! CHECK: "-Waliasing" 139 ! CHECK: "-Walign-commons" 140 ! CHECK: "-Wall" 141 ! CHECK: "-Wampersand" 142 ! CHECK: "-Warray-bounds" 143 ! CHECK: "-Wc-binding-type" 144 ! CHECK: "-Wcharacter-truncation" 145 ! CHECK: "-Wconversion" 146 ! CHECK: "-Wfunction-elimination" 147 ! CHECK: "-Wimplicit-interface" 148 ! CHECK: "-Wimplicit-procedure" 149 ! CHECK: "-Wintrinsic-shadow" 150 ! CHECK: "-Wintrinsics-std" 151 ! CHECK: "-Wline-truncation" 152 ! CHECK: "-Wreal-q-constant" 153 ! CHECK: "-Wrealloc-lhs" 154 ! CHECK: "-Wsurprising" 155 ! CHECK: "-Wtabs" 156 ! CHECK: "-Wtarget-lifetime" 157 ! CHECK: "-Wunderflow" 158 ! CHECK: "-Wunused-parameter" 159 ! CHECK: "-cpp" 160 ! CHECK: "-dD" 161 ! CHECK: "-dI" 162 ! CHECK: "-dM" 163 ! CHECK: "-dN" 164 ! CHECK: "-dU" 165 ! CHECK: "-faggressive-function-elimination" 166 ! CHECK: "-falign-commons" 167 ! CHECK: "-fall-intrinsics" 168 ! CHECK: "-fautomatic" 169 ! CHECK: "-fbackslash" 170 ! CHECK: "-fbacktrace" 171 ! CHECK: "-fblas-matmul-limit=42" 172 ! CHECK: "-fbounds-check" 173 ! CHECK: "-fcheck-array-temporaries" 174 ! CHECK: "-fcheck=all" 175 ! CHECK: "-fcoarray=none" 176 ! CHECK: "-fconvert=foobar" 177 ! CHECK: "-fcray-pointer" 178 ! CHECK: "-fd-lines-as-code" 179 ! CHECK: "-fd-lines-as-comments" 180 ! CHECK: "-fdefault-double-8" 181 ! CHECK: "-fdefault-integer-8" 182 ! CHECK: "-fdefault-real-8" 183 ! CHECK: "-fdollar-ok" 184 ! CHECK: "-fdump-fortran-optimized" 185 ! CHECK: "-fdump-fortran-original" 186 ! CHECK: "-fdump-parse-tree" 187 ! CHECK: "-fexternal-blas" 188 ! CHECK: "-ff2c" 189 ! CHECK: "-ffixed-form" 190 ! CHECK: "-ffixed-line-length-42" 191 ! CHECK: "-ffpe-trap=list" 192 ! CHECK: "-ffree-form" 193 ! CHECK: "-ffree-line-length-42" 194 ! CHECK: "-ffrontend-optimize" 195 ! CHECK: "-fimplicit-none" 196 ! CHECK: "-finit-character=n" 197 ! CHECK: "-finit-integer=n" 198 ! CHECK: "-finit-local-zero" 199 ! CHECK: "-finit-logical=false" 200 ! CHECK: "-finit-real=zero" 201 ! CHECK: "-finteger-4-integer-8" 202 ! CHECK: "-fintrinsic-modules-path" 203 ! CHECK: "-fmax-array-constructor=42" 204 ! CHECK: "-fmax-errors=42" 205 ! CHECK: "-fmax-identifier-length" 206 ! CHECK: "-fmax-stack-var-size=42" 207 ! CHECK: "-fmax-subrecord-length=42" 208 ! CHECK: "-fmodule-private" 209 ! CHECK: "-fopenmp" 210 ! CHECK: "-fpack-derived" 211 ! CHECK: "-fprotect-parens" 212 ! CHECK: "-frange-check" 213 ! CHECK: "-freal-4-real-10" 214 ! CHECK: "-freal-4-real-16" 215 ! CHECK: "-freal-4-real-8" 216 ! CHECK: "-freal-8-real-10" 217 ! CHECK: "-freal-8-real-16" 218 ! CHECK: "-freal-8-real-4" 219 ! CHECK: "-frealloc-lhs" 220 ! CHECK: "-frecord-marker=42" 221 ! CHECK: "-frecursive" 222 ! CHECK: "-frepack-arrays" 223 ! CHECK: "-fsecond-underscore" 224 ! CHECK: "-fshort-enums" 225 ! CHECK: "-fsign-zero" 226 ! CHECK: "-fstack-arrays" 227 ! CHECK: "-funderscoring" 228 ! CHECK: "-fwhole-file" 229 ! CHECK: "-fworking-directory" 230 ! CHECK: "-imultilib" 231 ! CHECK: "-iprefix" 232 ! CHECK: "-iquote" 233 ! CHECK: "-isysroot" 234 ! CHECK: "-isystem" 235 ! CHECK: "-nocpp" 236 ! CHECK: "-nostdinc" 237 ! CHECK: "-pedantic" 238 ! CHECK: "-pedantic-errors" 239 ! CHECK: "-static-libgfortran" 240 ! CHECK: "-std=f90" 241 ! CHECK: "-undef" 242 ! 243 ! Clang understands this one and orders it weirdly. 244 ! CHECK: "-fsyntax-only" 245