@@ -62,19 +62,70 @@ set(TEST_SUITE_FORTRAN_ISO_C_HEADER_DIR "" CACHE STRING
6262# The following cause errors if they are passed to flang via FFLAGS. This could
6363# be because they are currently unsupported and might eventually be supported
6464# or because they are GCC-specific and will never be supported.
65+ #
66+ # FIXME: The flags here necessarily include the value as well, not just the
67+ # flag itself. For instance, in the list are -fcheck=all, -fcheck=bits etc. In
68+ # principle, one only needs the -fcheck. The argument should not matter. The
69+ # problem is that the annotation parser currently does not parse the flag into
70+ # `flag-name` and `flag-value`. Once this is fixed, we need only have the
71+ # flag name here.
6572set (FLANG_ERRORING_FFLAGS
73+ # The "flags" that do not start with a hyphen (-) are actually arguments to
74+ # some other flag but use the "-flag value" syntax (as opposed to the
75+ # "-flag=value" syntax). Since we don't actually parse the command line, they
76+ # are treated as if they were "flags" .
77+ analyzer-max-svalue-depth=0
78+ ggc-min-expand=0
79+ ggc-min-heapsize=0
80+ iv-max-considered-uses=2
81+ large-stack-frame=4000
6682 max-completely-peel-loop-nest-depth=1
83+ max-completely-peeled-insns=0
84+ max-completely-peeled-insns=200
85+ max-cse-insns=0
86+ max-inline-insns-auto=0
87+ max-inline-insns-single=0
88+ parloops-chunk-size=2
89+ parloops-min-per-thread=5
90+ sccvn-max-alias-queries-per-access=1
91+ vect-epilogues-nomask=0
92+ vect-max-peeling-for-alignment=0
93+
94+ # This is an argument that should go with -idirafter which is not correctly
95+ # handled right now. Once that is fixed, this can be removed.
96+ fdaf
97+ "/fdaf/"
98+
99+ -dA
100+ -dH
101+ -dirafter
102+ -dp
103+ -faggressive-function-elimination
104+ -fall-intrinsics
105+ -fallow-argument-mismatch
67106 -fallow-invalid-boz
107+ -fautomatic
108+ -fblas-matmul-limit=1
109+ -fbounds-check
68110 -fcheck-array-temporaries
111+ -fcheck=all
112+ -fcheck=bits
69113 -fcheck=bounds
70114 -fcheck=do
115+ -fcheck=mem
116+ -fcheck=pointer
71117 -fcheck=recursion
118+ -fcompare-debug
72119 -fcoarray=lib
120+ -fcoarray=single
73121 -fcray-pointer
122+ -fd-lines-as-code
123+ -fd-lines-as-comments
74124 -fdec
75125 -fdec-format-defaults
76126 -fdec-static
77127 -fdec-structure
128+ -fdollar-ok
78129 -frecord-marker=4
79130 -fbounds-check
80131 -fcheck-bounds
@@ -84,140 +135,317 @@ set(FLANG_ERRORING_FFLAGS
84135 # form in which case, this will have to be modified to accommodate those.
85136 -fdefault-real-10
86137 -fdefault-real-16
138+ -fdiagnostics-format=json
139+ -fdiagnostics-show-option
140+ -fdollar-ok
87141 -fdump-ipa-cp-details
88142 -fdump-ipa-fnsummary-details
89143 -fdump-ipa-inline-details
144+ -fdump-ipa-sra-details
145+ -fdump-rtl-combine
90146 -fdump-rtl-expand
91147 -fdump-tree -all
92148 -fdump-tree -cunroll-details
93149 -fdump-tree -cunrolli-details
150+ -fdump-tree -dom2
151+ -fdump-tree -dom2-details
152+ -fdump-tree -forwprop2
94153 -fdump-tree -fre1
95154 -fdump-tree -gimple
96155 -fdump-tree -ifcvt
156+ -fdump-tree -ldist-all
157+ -fdump-tree -ldist-details
158+ -fdump-tree -lim2
159+ -fdump-tree -lim2-details
160+ -fdump-tree -linterchange-details
97161 -fdump-tree -lversion-details
98162 -fdump-tree -omplower
99163 -fdump-tree -optimized
164+ -fdump-tree -optimized-raw
100165 -fdump-tree -original
166+ -fdump-tree -original-lineno
167+ -fdump-tree -parloops2-details
101168 -fdump-tree -pcom-details
169+ -fdump-tree -pre
102170 -fdump-tree -pre-details
103- -fdump-tree -profile-estimate
171+ -fdump-tree -profile_estimate
104172 -fdump-tree -reassoc1
173+ -fdump-tree -slp-details
174+ -fdump-tree -slp2-details
105175 -fdump-tree -vect-details
176+ -fexceptions
106177 -fexpensive-optimizations
178+ -fexternal-blas
107179 -ff2c
180+ -ffixed-xmm1
181+ -ffixed-xmm10
182+ -ffixed-xmm11
183+ -ffixed-xmm12
184+ -ffixed-xmm13
185+ -ffixed-xmm14
186+ -ffixed-xmm15
187+ -ffixed-xmm2
188+ -ffixed-xmm3
189+ -ffixed-xmm4
190+ -ffixed-xmm5
191+ -ffixed-xmm6
192+ -ffixed-xmm7
193+ -ffixed-xmm8
194+ -ffixed-xmm9
195+ -ffloat-store
108196 -ffree-line-length -none
109197 -ffrontend-optimize
110198 -fgcse
199+ -fgcse-after-reload
200+ -fgnu-tm
201+ -findirect-inlining
202+ -finit-character=32
203+ -finit-derived
204+ -finit-local-zero
205+ -finit-integer=42
206+ -finit-integer=12345678
207+ -finit-logical=0
208+ -finit-logical=true
209+ -finit-real=inf
210+ -finline-functions
111211 -finline-matmul-limit=0
112212 -finline-matmul-limit=10
113213 -finline-matmul-limit=100
114214 -finline-matmul-limit=1000
115215 -finline-matmul-limit=2
116216 -finline-matmul-limit=30
217+ -finline-small-functions
218+ -finstrument-functions
117219 -fipa-cp
118220 -fipa-cp-clone
119221 -fipa-pta
120222 -fipa-reference
223+ -flinker-output =nolto-rel
224+ -floop-interchange
225+ -fmax-array-constructor=100000
226+ -fmax-stack-var-size=8
227+ -fmax-stack-var-size=100
228+ -fmodule-private
121229 -fmodulo-sched
122230 -fno-align-commons
123231 -fno-asynchronous-unwind-tables
124232 -fno-backtrace
125233 -fno-bounds-check
126234 -fno-check-array-temporaries
235+ -fno-code-hoisting
127236 -fno-dec
237+ -fno-dse
238+ -fno-early-inlining
128239 -fno-f2c
240+ -fno-frontend-loop-interchange
129241 -fno-frontend-optimize
130242 -fno-guess-branch-probability
243+ -fno-init-local-zero
131244 -fno-inline
245+ -fno-inline-arg-packing
246+ -fno-inline-functions-called-once
132247 -fno-ipa-cp
248+ -fno-ipa-icf
133249 -fno-ipa-modref
134250 -fno-ipa-sra
251+ -fno-move-loop-stores
252+ -fno-openacc
253+ -fno-openmp
135254 -fno-pad-source
255+ -fno-protect-parens
136256 -fno-range-check
137257 -fno-realloc-lhs
258+ -fno-schedule-insns
138259 -fno-sign-zero
139260 -fno-strict-aliasing
261+ -fno-trapping-math
140262 -fno-tree -ccp
263+ -fno-tree -ch
264+ -fno-tree -copy-prop
265+ -fno-tree -dce
266+ -fno-tree -dominator-opts
141267 -fno-tree -forwprop
142268 -fno-tree -fre
269+ -fno-tree -loop-ch
270+ -fno-tree -loop-distribute-patterns
271+ -fno-tree -loop-im
272+ -fno-tree -loop-ivcanon
143273 -fno-tree -loop-optimize
144274 -fno-tree -loop-vectorize
275+ -fno-tree -pre
276+ -fno-tree -scev-cprop
277+ -fno-tree -sink
278+ -fno-tree -slp-vectorize
279+ -fno-tree -vectorize
280+ -fno-tree -vrp
281+ -fnon-call-exceptions
282+ -fopenmp-simd
283+ -fopt-info-vec-optimized
145284 -fpad-source
146285 -fpeel-loops
286+ -fpre-include =simd-builtins-1.h
287+ -fpre-include =simd-builtins-3.h
288+ -fpre-include =simd-builtins-4.h
289+ -fpre-include =simd-builtins-7.h
290+ -fpre-include =simd-builtins-8.h
291+ -fpreprocessed
292+ -fpredictive-commoning
293+ -fprefetch-loop-arrays
294+ -fprofile-arcs
295+ -fprofile-generate
296+ -frecord-marker=4
147297 -frecursive
298+ -frepack-arrays
299+ -frounding-math
300+ -fsanitize=float-cast-overflow
301+ -fsanitize=null
302+ -fsanitize=signed-integer-overflow
148303 -fsanitize=undefined
149304 -fschedule-insns
305+ -fsecond-underscore
306+ -fsel-sched-pipelining
307+ -fsel-sched-pipelining-outer-loops
308+ -fselective-scheduling
309+ -fselective-scheduling2
150310 -fset-g77-defaults
151311 -fshort-enums
152312 -fstrict-aliasing
313+ -fsplit-loops
153314 -ftest-forall-temp
315+ -ftest-coverage
316+ -ftracer
317+ -ftrapv
154318 -ftree-loop-distribution
319+ -ftree-loop-if-convert
155320 -ftree-loop-vectorize
321+ -ftree-parallelize-loops
322+ -ftree-parallelize-loops=2
156323 -ftree-pre
157324 -ftree-slp-vectorize
158325 -ftree-tail-merge
159326 -ftree-vectorize
160327 -ftree-vrp
328+ -funconstrained-commons
329+ -funroll-all -loops
161330 -funroll-loops
331+ -funsafe-math-optimizations
332+ -fvect-cost -model=dynamic
333+ -fwhole-program
162334 -fwrapv
335+ -gno-strict-dwarf
336+ -idirafter
337+ -mavx
338+ -mavx2
339+ -mavx512f
340+ -mcmodel=medium
163341 -mdalign
164342 -mdejagnu-cpu=power4
343+ -mdejagnu-cpu=power7
344+ -mdejagnu-cpu=power10
165345 -mfpmath=387
166346 -mfpmath=sse
347+ -mlow-precision-sqrt
348+ -mno-avx
349+ -mno-power8-vector
350+ -mno-power9-vector
351+ -mprefer-avx128
352+ -msse
353+ -msse2
354+ -msse3
355+ -msse4.1
167356 -mtune=amdfam10
357+ -mtune=generic
358+ -mveclibabi=mass
359+ -mveclibabi=svml
360+ -mvsx
361+ -mvzeroupper
362+ -mzarch
363+ -nostdinc
364+ -nostdlib
168365 # -Os might eventually be supported, so this might also need to be removed
169366 # at some point
170367 -Og
171368 -Os
369+ -pedantic-errors
370+ # -pthread should be supported at some point.
371+ -pthread
372+ -r
172373 # At some point, if we ever support explicit standard flags, some of these
173374 # should be removed.
174375 -pedantic-errors
175376 -std=gnu
176377 -std=legacy
177378 -std=f95
379+ --std=f95
178380 -std=f2003
179381 -std=f2008
180382 -std=f2008ts
181383 # At the time of writing, -W warnings are not supported. flang errors out
182384 # saying that only -Werror is supported.
385+ -W
386+ -Waliasing
183387 -Wall
184388 -Wampersand
185389 -Wanalyzer-too-complex
186390 -Warray-bounds
187391 -Warray-temporaries
392+ -Wc-binding-type
393+ -Wcharacter-truncation
394+ -Wcompare-reals
188395 -Wconversion
189396 -Wconversion-extra
190- -Werner
397+ -Wdate-time
398+ -Wdo-subscript
191399 -Werror
192400 -Wextra
193401 -Wfunction-elimination
402+ -Wimplicit-interface
194403 -Wimplicit-procedure
404+ -Winteger-division
195405 -Wintrinsic-shadow
196406 -Wintrinsics-std
197407 -Wline-truncation
408+ -Wmaybe-uninitialized
409+ -Wmissing-include -dirs
198410 -Wno-all
411+ -Wno-analyzer-malloc-leak
412+ -Wno-analyzer-memory-leak
199413 -Wno-analyzer-null-dereference
200414 -Wno-analyzer-possible-null-dereference
201415 -Wno-analyzer-too-complex
202416 -Wno-analyzer-use-of-uninitialized-value
203417 -Wno-c-binding-type
204418 -Wno-complain-wrong-lang
419+ -Wno-cpp
205420 -Wno-error
421+ -Wno-error=cpp
206422 -Wno-intrinsic-shadow
207423 -Wno-intrinsics-std
424+ -Wno-line-truncation
208425 -Wno-lto-type -mismatch
426+ -Wno-missing-include -dirs
427+ -Wno-overwrite-recursive
428+ -Wno-pedantic
209429 -Wno-tabs
210430 -Wno-underflow
431+ -Wno-uninitialized
432+ -Wno-unused-dummy-argument
433+ -Wno-zerotrip
434+ -Wopenacc-parallelism
435+ -Wpadded
211436 -Wrealloc-lhs
212437 -Wrealloc-lhs-all
213438 -Wreturn-type
214439 -Wstringop-overflow
215440 -Wsurprising
216441 -Wtabs
442+ -Wtarget-lifetime
443+ -Wundefined-do-loop
217444 -Wuninitialized
218445 -Wunused
219446 -Wunused-dummy-argument
220447 -Wunused-function
448+ -Wunused-label
221449 -Wunused-parameter
222450 -Wunused-variable
223451 -Wzerotrip
0 commit comments