Skip to content

[Fortran/gfortran] Better handling of unsupported gfortran options #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
420 changes: 1 addition & 419 deletions Fortran/gfortran/CMakeLists.txt

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions Fortran/gfortran/regression/DisabledFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,10 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
unsigned_38.f90
unsigned_41.f90

# This test requires the -fmax-array-constructor option which is not supported
# in flang (yet?)
spread_size_limit_2.f90

# This test seems to have been commented out entirely, and therefore
# compilation will succeed. However, there are still DejaGNU annotations in
# it, and one of them is xfail, so our framework registers this test as xfail.
Expand Down Expand Up @@ -1114,6 +1118,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
c_loc_test_21.f90
c_loc_tests_10.f03
c_loc_tests_4.f03
c_sizeof_2.f90
char_length_1.f90
coarray_5.f90
common_20.f90
Expand All @@ -1127,6 +1132,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
iall_iany_iparity_2.f90
intrinsic_std_5.f03
io_constraints_12.f90
line_length_13.f90
module_procedure_double_colon_3.f90
norm2_4.f90
parity_3.f90
Expand Down Expand Up @@ -1160,6 +1166,9 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
# Requires behaviour specific to -std=f2008 and fails with -std=f2018.
finalize_38a.f90

# -std=f2023 test to check for restrictions on arguments to SYSTEM_CLOCK
system_clock_4.f90

# Tests that use -std=... to enable checks that no longer apply in modern Fortran.
# Module variable with derived type default initialization requires explicit SAVE
default_initialization_1.f90
Expand Down Expand Up @@ -1529,6 +1538,17 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
# expected to succeed.
internal_dummy_1.f90

# This has a #warning directive alongside -Werror, but no dg-error annotation.
# As a result, the test does not get marked as 'xfail' but does raise a
# compile-time error.
# TODO: This test should be overridden permanently.
diagnostic-format-json-3.F90

# This has a #warning directive alongside -Werror and -Wno-error=cpp. Since
# -Wno-error is not supported, but -Werror is, the test raises a compile-time
# error when it should not.
warning-directive-3.F90

# This test has a #illegal preprocessor directive. I think this is expected to
# raise a warning in gfortran, but flang raises an error and fails to compile
# instead. This may be a policy difference between flang and gfortran but
Expand Down
14 changes: 7 additions & 7 deletions Fortran/gfortran/regression/analyzer/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
# disabled. Each element of the list will be a regular
# expression that is expected to match an LLVM target triple.
#
compile;deferred_character_25.f90;;-Wno-analyzer-too-complex;;
compile;malloc-example.f90;;-fcray-pointer;;
compile;malloc.f90;;-fcray-pointer -O0;;
compile;deferred_character_25.f90;;;;
compile;malloc-example.f90;;;;
compile;malloc.f90;;-O0;;
compile;pr107210.f90;;-O1;;
compile;pr108065.f90;;-fcheck=bounds -Wno-analyzer-malloc-leak;;
compile;pr108065.f90;;;;
compile;pr88304-2.f90;;;;
compile;pr93405.f90;;;;
compile;pr93777.f90;;-O0 -Wno-analyzer-possible-null-dereference -Wno-analyzer-null-dereference -Wno-analyzer-malloc-leak;;
compile;pr93777.f90;;-O0;;
compile;pr93778.f90;;;;
compile;pr93993.f90;;;;
compile;pr96949.f90;;-Wno-analyzer-too-complex --param analyzer-max-svalue-depth=0;;powerpc-.+-aix
compile;pr97668.f;;-std=legacy -Wno-analyzer-use-of-uninitialized-value -Wno-analyzer-too-complex;;
compile;pr96949.f90;;;;powerpc-.+-aix
compile;pr97668.f;;;;
compile;uninit-pr63311.f90;;-O0;;
42 changes: 21 additions & 21 deletions Fortran/gfortran/regression/c-interop/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ compile;c1255-1.f90;;;;
compile;c1255-2.f90;xfail;;;
compile;c1255a.f90;xfail;;;
compile;c407a-1.f90;;;;
compile;c407a-2.f90;xfail;-fcoarray=single;;
compile;c407a-2.f90;xfail;;;
compile;c407b-1.f90;;;;
compile;c407b-2.f90;xfail;;;
compile;c407c-1.f90;xfail;;;
compile;c516.f90;xfail;;;
compile;c524a.f90;xfail;-fcoarray=single;;
compile;c524a.f90;xfail;;;
compile;c535a-1.f90;;;;
compile;c535a-2.f90;xfail;-fcoarray=single;;
compile;c535b-1.f90;;-fcoarray=single;;
compile;c535b-2.f90;xfail;-fcoarray=single;;
compile;c535b-3.f90;xfail;-fcoarray=single;;
compile;c535a-2.f90;xfail;;;
compile;c535b-1.f90;;;;
compile;c535b-2.f90;xfail;;;
compile;c535b-3.f90;xfail;;;
compile;c535c-1.f90;xfail;;;
compile;c535c-2.f90;xfail;;;
compile;c535c-3.f90;xfail;;;
compile;c535c-4.f90;xfail;;;
compile;deferred-character-1.f90;xfail;;;
compile;explicit-interface.f90;xfail;;;
compile;fc-descriptor-pr108621.f90;;-fdump-tree-original;;
compile;fc-descriptor-pr108621.f90;;;;
compile;pr103287-1.f90;xfail;;;
compile;pr103287-2.f90;xfail;;;
compile;removed-restrictions-1.f90;;;;
Expand All @@ -65,7 +65,7 @@ compile;removed-restrictions-3.f90;;;;
compile;removed-restrictions-4.f90;;;;
compile;tkr.f90;xfail;;;
run;allocatable-dummy.f90 allocatable-dummy-c.c dump-descriptors.c;;-g;;
run;allocate-errors.f90 allocate-errors-c.c dump-descriptors.c;;-Wno-error -fcheck=all;;
run;allocate-errors.f90 allocate-errors-c.c dump-descriptors.c;;;;
run;allocate.f90 allocate-c.c dump-descriptors.c;;-g;;
run;argument-association-assumed-rank-1.f90;;;;
run;argument-association-assumed-rank-2.f90;;;;
Expand Down Expand Up @@ -93,7 +93,7 @@ run;contiguous-1.f90 contiguous-1-c.c dump-descriptors.c;;-g;;
run;contiguous-2.f90 contiguous-2-c.c dump-descriptors.c;;-g;;
run;contiguous-3.f90 contiguous-3-c.c dump-descriptors.c;;-g;;
run;deferred-character-2.f90;;;;
run;establish-errors.f90 establish-errors-c.c dump-descriptors.c;;-Wno-error -fcheck=all;;
run;establish-errors.f90 establish-errors-c.c dump-descriptors.c;;;;
run;establish.f90 establish-c.c dump-descriptors.c;;-g;;
run;fc-descriptor-1.f90 fc-descriptor-1-c.c dump-descriptors.c;;-g;;
run;fc-descriptor-2.f90 fc-descriptor-2-c.c dump-descriptors.c;;-g;;
Expand Down Expand Up @@ -121,15 +121,15 @@ run;ff-descriptor-7.f90;;;;
run;note-5-3.f90;;;;
run;note-5-4.f90 note-5-4-c.c;;;;
run;optional.f90 optional-c.c dump-descriptors.c;;-g;;
run;pr103390-1.f90;;-fdump-tree-original;;
run;pr103390-2.f90;;-fdump-tree-original;;
run;pr103390-3.f90;;-fdump-tree-original;;
run;pr103390-4.f90;;-fdump-tree-original;;
run;pr103390-5.f90;;-fdump-tree-original;;
run;pr103390-6.f90;;-fdump-tree-original;;
run;pr103390-7.f90;;-fdump-tree-original;;
run;pr103390-8.f90;;-fdump-tree-original;;
run;pr103390-9.f90;;-fdump-tree-original;;
run;pr103390-1.f90;;;;
run;pr103390-2.f90;;;;
run;pr103390-3.f90;;;;
run;pr103390-4.f90;;;;
run;pr103390-5.f90;;;;
run;pr103390-6.f90;;;;
run;pr103390-7.f90;;;;
run;pr103390-8.f90;;;;
run;pr103390-9.f90;;;;
run;rank-class.f90;;;;
run;rank.f90;;;;
run;section-1.f90 section-1-c.c dump-descriptors.c;;-g;;
Expand All @@ -139,10 +139,10 @@ run;section-2p.f90 section-2-c.c dump-descriptors.c;;-g;;
run;section-3.f90 section-3-c.c dump-descriptors.c;;-g;;
run;section-3p.f90 section-3-c.c dump-descriptors.c;;-g;;
run;section-4.f90 section-4-c.c dump-descriptors.c;;-g;;
run;section-errors.f90 section-errors-c.c dump-descriptors.c;;-Wno-error -fcheck=all;;
run;select-errors.f90 select-errors-c.c dump-descriptors.c;;-Wno-error -fcheck=all;;
run;section-errors.f90 section-errors-c.c dump-descriptors.c;;;;
run;select-errors.f90 select-errors-c.c dump-descriptors.c;;;;
run;select.f90 select-c.c dump-descriptors.c;;;;
run;setpointer-errors.f90 setpointer-errors-c.c dump-descriptors.c;;-Wno-error -fcheck=all;;
run;setpointer-errors.f90 setpointer-errors-c.c dump-descriptors.c;;;;
run;setpointer.f90 setpointer-c.c dump-descriptors.c;;;;
run;shape-bindc.f90;;;;
run;shape-poly.f90;;;;
Expand Down
8 changes: 4 additions & 4 deletions Fortran/gfortran/regression/coarray/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
compile;alloc_comp_2.f90;;;;
compile;alloc_comp_3.f90;;;;
compile;array_temporary-1.f90;;;;
compile;array_temporary.f90;;-Warray-temporaries;;
compile;array_temporary.f90;;;;
compile;class_1.f90;;;;
compile;coindexed_2.f90;xfail;;;
compile;coindexed_4.f08;xfail;-std=f2008;;
compile;coindexed_4.f08;xfail;;;
compile;data_1.f90;xfail;;;
compile;dummy_2.f90;;;;
compile;fail_image_1.f08;xfail;;;
Expand All @@ -62,7 +62,7 @@ run;allocate_errgmsg.f90;;;;
run;associate_1.f90;;;;
run;atomic_1.f90;;;;
run;atomic_2.f90;;;;
run;coarray_allocated.f90;;-fdump-tree-original;;
run;coarray_allocated.f90;;;;
run;codimension.f90;;;;
run;codimension_3.f90;;;;
run;coindexed_1.f90;;;;
Expand Down Expand Up @@ -123,6 +123,6 @@ run;submodule_1.f90 add_sources/submodule_1_sub.f90;;;;
run;subobject_1.f90;;;;
run;substring_1.f90;;;;
run;sync_1.f90;;;;
run;sync_3.f90;xfail;-fcheck=all;;
run;sync_3.f90;xfail;;;
run;this_image_1.f90;;;;
run;this_image_2.f90;;;;
6 changes: 3 additions & 3 deletions Fortran/gfortran/regression/debug/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
# disabled. Each element of the list will be a regular
# expression that is expected to match an LLVM target triple.
#
compile;pr35154-dwarf2.f;;-dA -gno-strict-dwarf;;
compile;pr37738.f;;-dA -gno-strict-dwarf;;
compile;pr35154-dwarf2.f;;;;
compile;pr37738.f;;;;
compile;pr43166.f;;-O;;
compile;pr46756.f;;-O -fcompare-debug;;
compile;pr46756.f;;-O;;
compile;trivial.f;;;;
6 changes: 3 additions & 3 deletions Fortran/gfortran/regression/f202y/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
# disabled. Each element of the list will be a regular
# expression that is expected to match an LLVM target triple.
#
compile;generic_assumed_rank_2.f90;xfail;-std=f2023 -Wsurprising;;
run;generic_assumed_rank_1.f90;;-fcheck=bounds;;
run;generic_assumed_rank_3.f90;;-std=f202y -Wsurprising;;
compile;generic_assumed_rank_2.f90;xfail;;;
run;generic_assumed_rank_1.f90;;;;
run;generic_assumed_rank_3.f90;;;;
54 changes: 27 additions & 27 deletions Fortran/gfortran/regression/g77/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
# expression that is expected to match an LLVM target triple.
#
compile;12002.f;;;;
compile;12632.f;;-fbounds-check;;
compile;12632.f;;;;
compile;13060.f;;;;
compile;19981216-0.f;;-std=legacy;;
compile;19981216-0.f;;;;
compile;19990218-0.f;xfail;;;
compile;19990218-1.f;xfail;;;
compile;19990305-0.f;;;;
compile;19990419-0.f;;;;
compile;19990502-0.f;;;;
compile;19990502-1.f;;;;
compile;19990525-0.f;;-std=legacy;;
compile;19990525-0.f;;;;
compile;19990826-1.f;;;;
compile;19990826-3.f;;-std=legacy;;
compile;19990826-3.f;;;;
compile;19990905-0.f;;;;
compile;19990905-1.f;xfail;;;
compile;19990905-2.f;;;;
Expand All @@ -56,27 +56,27 @@ compile;20000518.f;;;;
compile;20000601-1.f;;;;
compile;20000601-2.f;;;;
compile;20000629-1.f;;;;
compile;20000630-2.f;;-std=legacy;;
compile;20000630-2.f;;;;
compile;20010115.f;;;;
compile;20010321-1.f;;;;
compile;20010426.f;;;;
compile;20010519-1.f;;-std=legacy;;
compile;20020307-1.f;;-std=legacy;;
compile;20010519-1.f;;;;
compile;20020307-1.f;;;;
compile;20030326-1.f;xfail;-pedantic;;
compile;8485.f;;;;
compile;9263.f;xfail;;;
compile;960317-1.f;;;;
compile;970125-0.f;xfail;-w;;
compile;970125-0.f;xfail;;;
compile;970625-2.f;xfail;;;
compile;970915-0.f;;;;
compile;980310-1.f;;;;
compile;980310-2.f;;;;
compile;980310-3.f;;-std=legacy;;
compile;980310-3.f;;;;
compile;980310-4.f;;;;
compile;980310-6.f;;;;
compile;980310-7.f;;;;
compile;980310-8.f;;;;
compile;980419-2.f;;-std=legacy;;
compile;980419-2.f;;;;
compile;980424-0.f;;;;
compile;980427-0.f;;;;
compile;980519-2.f;;;;
Expand All @@ -86,7 +86,7 @@ compile;980729-0.f;;;;
compile;981117-1.f;;;;
compile;990115-1.f;;;;
compile;alpha1.f;;;;
compile;check0.f;xfail;-std=legacy;;
compile;check0.f;xfail;;;
compile;cpp.F;;;;
compile;cpp2.F;;;;
compile;cpp6.f;;;;
Expand All @@ -101,60 +101,60 @@ compile;ffree-form-2.f;;-ffree-form;;
compile;ffree-form-3.f;;-ffree-form;;
compile;fno-underscoring.f;;-fno-underscoring;;
compile;funderscoring.f;;-funderscoring;;
compile;pr105203.f;;-O2 -fcompare-debug -ftracer -w;;
compile;pr105203.f;;-O2;;
compile;pr9258.f;;;;
compile;toon_1.f;;;;
compile;xformat.f;;;;
run;13037.f;;;;
run;1832.f;;-std=legacy;;
run;1832.f;;;;
run;19981119-0.f;;;;
run;19990313-0.f;;;;
run;19990313-1.f;;;;
run;19990313-2.f;;;;
run;19990313-3.f;;;;
run;19990419-1.f;;;;
run;19990826-0.f;;;;
run;19990826-2.f;;-std=legacy;;
run;19990826-2.f;;;;
run;20000503-1.f;;;;
run;20001111.f;;;;
run;20010116.f;;-std=legacy;;
run;20010116.f;;;;
run;20010216-1.f;;-ffast-math -march=pentiumpro;;
run;20010426-1.f;;;;
run;20010430.f;;;;
run;20010610.f;;;;
run;6177.f;;;;
run;7388.f;;-fbounds-check;;
run;7388.f;;;;
run;947.f;;;;
run;970816-3.f;;;;
run;971102-1.f;;;;
run;980520-1.f;;-std=legacy;;
run;980520-1.f;;;;
run;980628-0.f;;;;
run;980628-1.f;;;;
run;980628-10.f;;-std=gnu;;
run;980628-2.f;;-std=gnu;;
run;980628-3.f;;-std=gnu;;
run;980628-10.f;;;;
run;980628-2.f;;;;
run;980628-3.f;;;;
run;980628-7.f;;;;
run;980628-8.f;;;;
run;980628-9.f;;-std=gnu;;
run;980628-9.f;;;;
run;980701-0.f;;;;
run;980701-1.f;;;;
run;cabs.f;;;;
run;claus.f;;;;
run;complex_1.f;;;;
run;cpp3.F;;-std=legacy;;
run;cpp3.F;;;;
run;cpp4.F;;;;
run;cpp5.F;;;;
run;dcomplex.f;;;;
run;dnrm2.f;;-fno-bounds-check;;
run;dnrm2.f;;;;
run;erfc.f;;;;
run;f77-edit-apostrophe-out.f;;;;
run;f77-edit-colon-out.f;;;;
run;f77-edit-h-out.f;;;;
run;f77-edit-i-in.f;;-std=legacy;;
run;f77-edit-i-in.f;;;;
run;f77-edit-i-out.f;;;;
run;f77-edit-s-out.f;;;;
run;f77-edit-slash-out.f;;;;
run;f77-edit-t-in.f;;-std=legacy;;
run;f77-edit-t-in.f;;;;
run;f77-edit-t-out.f;;;;
run;f77-edit-x-out.f;;;;
run;f90-intrinsic-bit.f;;;;
Expand All @@ -166,5 +166,5 @@ run;intrinsic-unix-erf.f;;;;
run;labug1.f;;;;
run;large_vec.f;;;;
run;le.f;;;;
run;short.f;;-std=legacy;;
run;strlen0.f;;-fbounds-check;;
run;short.f;;;;
run;strlen0.f;;;;
10 changes: 5 additions & 5 deletions Fortran/gfortran/regression/goacc-gomp/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
# disabled. Each element of the list will be a regular
# expression that is expected to match an LLVM target triple.
#
compile;atomic.f90;;-fdump-tree-original;;
compile;atomic.f90;;;;
compile;depobj.f90;xfail;;;
compile;fixed-1.f;;-fdump-tree-original -Wunused-variable;;
compile;free-1.f90;;-fdump-tree-original -Wunused-variable;;
compile;mixed-1.f;xfail;-fdump-tree-original;;
compile;pr102330-1.f90;;-fopt-info-omp-note --param=openacc-privatization=noisy;;
compile;fixed-1.f;;;;
compile;free-1.f90;;;;
compile;mixed-1.f;xfail;;;
compile;pr102330-1.f90;;;;
Loading