Skip to content

Commit 70c466f

Browse files
committed
Rebase onto main. Use the not tool to correctly detect crashes. Update the
disabled files list.
1 parent 3fbeaf9 commit 70c466f

File tree

2 files changed

+68
-82
lines changed

2 files changed

+68
-82
lines changed

Fortran/gfortran/CMakeLists.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ set(FLANG_ERRORING_FFLAGS
6868
-fcheck-array-temporaries
6969
-fcheck=bounds
7070
-fcheck=do
71+
-fcheck=mem
7172
-fcheck=recursion
7273
-fcoarray=lib
7374
-fcray-pointer
@@ -540,18 +541,12 @@ function(gfortran_add_execute_test expect_error main others fflags ldflags)
540541
get_filename_component(working_dir_name "${working_dir}" NAME)
541542

542543
llvm_test_executable_no_test(${target} ${main} ${others})
543-
544-
if (WIN32)
545-
# Probably need to check %errorlevel% here.
546-
message(FATAL_ERROR "Verification not implemented on Windows.")
544+
if (expect_error)
545+
llvm_test_run(
546+
EXECUTABLE "%b/not --crash %S/${target}"
547+
WORKDIR "%S/${working_dir_name}")
547548
else ()
548-
if (expect_error)
549-
llvm_test_run(
550-
EXECUTABLE "%b/not --crash ${target}"
551-
WORKDIR "%S/${working_dir_name}")
552-
else ()
553-
llvm_test_run(WORKDIR "%S/${working_dir_name}")
554-
endif ()
549+
llvm_test_run(WORKDIR "%S/${working_dir_name}")
555550
endif ()
556551
llvm_add_test_for_target(${target})
557552

Fortran/gfortran/regression/DisabledFiles.cmake

Lines changed: 62 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS
316316
allocate_with_source_14.f03
317317
allocate_with_source_17.f03
318318
allocate_with_source_21.f03
319+
allocate_with_source_22.f03
320+
allocate_with_source_23.f03
319321
allocate_with_source_25.f90
320322
allocate_with_source_8.f08
321323
associate_18.f08
@@ -534,6 +536,7 @@ file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS
534536
proc_ptr_comp_50.f90
535537
proc_ptr_comp_pass_3.f90
536538
proc_ptr_comp_pass_6.f90
539+
ptr_func_assign_1.f08
537540
ptr_func_assign_2.f08
538541
ptr_func_assign_3.f08
539542
realloc_on_assign_20.f90
@@ -1858,17 +1861,41 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
18581861
# require further analysis
18591862
Wall.f90 # no warning for missing & on continuation line in char constant
18601863
Wno-all.f90 # no warning for missing & on continuation line in char constant
1864+
allocate_error_1.f90
1865+
# flang throws a runtime error: "mismatching element counts in array
1866+
# assignment", but gfortran does not for associate_32.f03
1867+
associate_32.f03
18611868
auto_save_2.f90 # requires -fno-automatic -finit-local-zero
18621869
bessel_7.f90 # unclear
1870+
bounds_check_10.f90
1871+
bounds_check_7.f90
1872+
bounds_check_array_ctor_1.f90
1873+
bounds_check_array_ctor_2.f90
1874+
bounds_check_array_ctor_6.f90
1875+
bounds_check_array_ctor_7.f90
1876+
bounds_check_array_ctor_8.f90
1877+
bounds_check_fail_4.f90
1878+
bounds_check_strlen_1.f90
1879+
bounds_check_strlen_2.f90
1880+
bounds_check_strlen_3.f90
1881+
bounds_check_strlen_4.f90
1882+
bounds_check_strlen_5.f90
1883+
bounds_check_strlen_7.f90
1884+
char_bounds_check_fail_1.f90
1885+
char_pointer_assign_4.f90
1886+
char_pointer_assign_5.f90
18631887
check_bits_1.f90 # requires -fcheck=bits to catch ISHFTC runtime error
18641888
check_bits_2.f90 # requires -fcheck=bits to catch ISHFTC runtime error
18651889
cr_lf.f90
1890+
cshift_bounds_2.f90
18661891
cshift_bounds_3.f90
18671892
cshift_bounds_4.f90
18681893
cshift_large_1.f90
18691894
data_char_1.f90
18701895
data_char_3.f90
18711896
deallocate_alloc_opt_3.f90
1897+
deallocate_error_1.f90
1898+
deallocate_error_2.f90
18721899
deallocate_stat_2.f90
18731900
deallocate_stat.f90
18741901
dependency_45.f90
@@ -1877,9 +1904,15 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
18771904
dim_sum_3.f90
18781905
direct_io_7.f90
18791906
do_check_1.f90
1907+
do_check_11.f90
1908+
do_check_12.f90
1909+
do_check_2.f90
1910+
do_check_3.f90
1911+
do_check_4.f90
18801912
dollar_edit_descriptor_4.f
18811913
elemental_dependency_1.f90
18821914
endfile_3.f90
1915+
endfile_4.f90
18831916
eoshift_bounds_1.f90
18841917
eoshift_large_1.f90
18851918
error_format.f90
@@ -1891,6 +1924,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
18911924
fmt_f_default_field_width_1.f90
18921925
fmt_f_default_field_width_2.f90
18931926
fmt_g0_1.f08
1927+
fmt_g0_2.f08
18941928
fmt_g_default_field_width_1.f90
18951929
fmt_g_default_field_width_2.f90
18961930
fmt_g.f
@@ -1910,7 +1944,12 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
19101944
init_flag_6.f90
19111945
init_flag_7.f90
19121946
init_flag_9.f90
1947+
# flang throws a runtime error: "mismatching element counts in array
1948+
# assignment", but gfortran does not for inline_matmul_1.f90
1949+
inline_matmul_1.f90
19131950
inline_matmul_15.f90
1951+
inline_sum_bounds_check_1.f90
1952+
inline_sum_bounds_check_2.f90
19141953
inquire_13.f90
19151954
inquire_15.f90
19161955
inquire_5.f90
@@ -1924,7 +1963,10 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
19241963
internal_write_1.f90
19251964
intrinsic_std_4.f90
19261965
io_err_1.f90
1966+
io_real_boz2.f90
19271967
io_real_boz_3.f90
1968+
io_real_boz_4.f90
1969+
io_real_boz_5.f90
19281970
io_real_boz.f90
19291971
iostat_4.f90
19301972
iostat_5.f90
@@ -1936,10 +1978,16 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
19361978
literal_character_constant_1_z.F
19371979
masklr_2.F90
19381980
matmul_5.f90
1981+
matmul_bounds_10.f90
19391982
matmul_bounds_11.f90
19401983
matmul_bounds_13.f90
19411984
matmul_bounds_15.f
19421985
matmul_bounds_16.f
1986+
matmul_bounds_2.f90
1987+
matmul_bounds_3.f90
1988+
matmul_bounds_4.f90
1989+
matmul_bounds_5.f90
1990+
matmul_bounds_8.f90
19431991
matmul_bounds_7.f90
19441992
matmul_bounds_9.f90
19451993
maxloc_2.f90
@@ -1949,6 +1997,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
19491997
maxlocval_2.f90
19501998
maxlocval_4.f90
19511999
merge_bits_2.F90
2000+
merge_char_3.f90
19522001
minloc_1.f90
19532002
minlocval_1.f90
19542003
minlocval_4.f90
@@ -1993,6 +2042,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
19932042
negative_unit.f
19942043
negative_unit_int8.f
19952044
no_range_check_1.f90
2045+
no_unit_error_1.f90
19962046
norm2_1.f90
19972047
nosigned_zero_2.f90
19982048
open_access_append_2.f90
@@ -2005,6 +2055,8 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
20052055
pad_source_4.f
20062056
pad_source_5.f
20072057
pointer_check_6.f90
2058+
pointer_check_10.f90
2059+
pointer_remapping_6.f08
20082060
pr12884.f
20092061
pr17285.f90
20102062
pr17286.f90
@@ -2019,6 +2071,11 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
20192071
pr96436_3.f90
20202072
pr96436_4.f90
20212073
pr96436_5.f90
2074+
pr96436_6.f90
2075+
pr96436_7.f90
2076+
pr96436_8.f90
2077+
pr96436_9.f90
2078+
pr96436_10.f90
20222079
promotion_3.f90
20232080
promotion_4.f90
20242081
promotion.f90
@@ -2050,7 +2107,10 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
20502107
real8-4.f90
20512108
real_const_3.f90
20522109
realloc_on_assign_11.f90
2110+
recursive_check_11.f90
2111+
recursive_check_13.f90
20532112
recursive_check_7.f90
2113+
recursive_check_9.f90
20542114
repeat_1.f90
20552115
reshape_order_1.f90
20562116
reshape_order_2.f90
@@ -2065,10 +2125,12 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
20652125
streamio_17.f90
20662126
streamio_4.f90
20672127
system_clock_3.f08
2128+
transpose_2.f90
20682129
unf_io_convert_4.f90
20692130
unf_read_corrupted_1.f90
20702131
unf_short_record_1.f90
20712132
unformatted_subrecord_1.f90
2133+
unpack_bounds_1.f90
20722134
unpack_bounds_2.f90
20732135
unpack_bounds_3.f90
20742136
utf8_1.f03
@@ -2082,77 +2144,6 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
20822144
write_check.f90
20832145
zero_sized_1.f90
20842146

2085-
# ---------------------------------------------------------------------------
2086-
#
2087-
# These tests are expected to fail at runtime, but pass instead.
2088-
#
2089-
allocate_error_1.f90
2090-
bounds_check_7.f90
2091-
bounds_check_10.f90
2092-
all_bounds_1.f90
2093-
bounds_check_12.f90
2094-
bounds_check_array_ctor_1.f90
2095-
bounds_check_array_ctor_2.f90
2096-
bounds_check_array_ctor_4.f90
2097-
bounds_check_array_ctor_6.f90
2098-
bounds_check_array_ctor_7.f90
2099-
bounds_check_array_ctor_8.f90
2100-
bounds_check_fail_3.f90
2101-
bounds_check_fail_4.f90
2102-
bounds_check_strlen_1.f90
2103-
bounds_check_strlen_2.f90
2104-
bounds_check_strlen_3.f90
2105-
bounds_check_strlen_4.f90
2106-
bounds_check_strlen_5.f90
2107-
bounds_check_strlen_7.f90
2108-
char_bounds_check_fail_1.f90
2109-
char_pointer_assign_4.f90
2110-
char_pointer_assign_5.f90
2111-
cshift_bounds_2.f90
2112-
deallocate_error_1.f90
2113-
deallocate_error_2.f90
2114-
do_check_2.f90
2115-
do_check_3.f90
2116-
do_check_4.f90
2117-
do_check_11.f90
2118-
do_check_12.f90
2119-
endfile_4.f90
2120-
fmt_g0_2.f08
2121-
inline_sum_bounds_check_1.f90
2122-
inline_sum_bounds_check_2.f90
2123-
io_real_boz2.f90
2124-
io_real_boz_4.f90
2125-
io_real_boz_5.f90
2126-
matmul_bounds_2.f90
2127-
matmul_bounds_3.f90
2128-
matmul_bounds_4.f90
2129-
matmul_bounds_5.f90
2130-
matmul_bounds_8.f90
2131-
matmul_bounds_10.f90
2132-
maxloc_bounds_1.f90
2133-
maxloc_bounds_2.f90
2134-
maxloc_bounds_3.f90
2135-
maxloc_bounds_4.f90
2136-
maxloc_bounds_5.f90
2137-
maxloc_bounds_7.f90
2138-
maxloc_bounds_8.f90
2139-
merge_char_3.f90
2140-
no_unit_error_1.f90
2141-
pack_bounds_1.f90
2142-
pointer_check_10.f90
2143-
pointer_remapping_6.f08
2144-
pr96436_6.f90
2145-
pr96436_7.f90
2146-
pr96436_8.f90
2147-
pr96436_9.f90
2148-
pr96436_10.f90
2149-
recursive_check_9.f90
2150-
recursive_check_11.f90
2151-
recursive_check_13.f90
2152-
spread_bounds_1.f90
2153-
transpose_2.f90
2154-
unpack_bounds_1.f90
2155-
21562147
# ---------------------------------------------------------------------------
21572148
#
21582149
# This test fails with optimizations enabled, but succeeds when compiled

0 commit comments

Comments
 (0)