diff --git a/Fortran/gfortran/CMakeLists.txt b/Fortran/gfortran/CMakeLists.txt --- a/Fortran/gfortran/CMakeLists.txt +++ b/Fortran/gfortran/CMakeLists.txt @@ -68,7 +68,9 @@ set(TEST_SUITE_FORTRAN_ISO_C_HEADER_DIR "" CACHE STRING "Path to the directory containing ISO_Fortran_bindings.h header file.") -# The following cause errors if they are passed to flang via FFLAGS +# The following cause errors if they are passed to flang via FFLAGS. This could +# be because they are currently unsupported and might eventually be supported +# or because they are GCC-specific and will never be supported. set(FLANG_ERRORING_FFLAGS -fallow-invalid-boz -fdec @@ -130,7 +132,10 @@ -ftree-tail-merge -ftree-vectorize -ftree-vrp + -mdalign -mdejagnu-cpu=power4 + -mfpmath=387 + -mfpmath=sse # -Os might eventually be supported, so this might also need to be removed # at some point -Og @@ -188,133 +193,468 @@ -Wzerotrip ) -set(HEADER_SEARCH_PATH "${TEST_SUITE_FORTRAN_ISO_C_HEADER_DIR}") -if (NOT HEADER_SEARCH_PATH) - get_filename_component(Fortran_BINDIR ${CMAKE_Fortran_COMPILER} DIRECTORY) - get_filename_component(Fortran_PREFIX ${Fortran_BINDIR} DIRECTORY) +# Find all the Fortran files in the current source directory that may be test +# files. This will filter out those files that have been explicitly disabled +# for any reason. The returned files will be consist of the main file for +# "execute" and "compile" tests as well as any dependencies for multi-file +# tests. +function(gfortran_find_test_files unsupported unimplemented skipped failing out) + # This will just get all the Fortran source files in the directory. Since + # the tests may be a mix of single-source and multi-source tests, this will + # include files that are dependencies of some "main" test file as well. + file(GLOB files CONFIGURE_DEPENDS LIST_DIRECTORIES false + *.f* + *.F* + ) + + set(ignore "") + + # There is still a chance that some of the unsupported tests may need to be + # enabled, for instance if the non-standard extensions that they exercise are + # supported due to user demand. + if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND + NOT TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) + list(APPEND ignore ${unsupported}) + endif() - set(HEADER_SEARCH_PATH "${Fortran_PREFIX}/include/flang") -endif() + # For the remaining tests, there is cause to build and run the skipped, failing + # and unimplemented tests since some could be enabled once some feature is + # implemented. Eventually, all the TEST_SUITE_FORTRAN_FORCE_* options (perhaps + # with the exception of TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) should + # become redundant and removed. + if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND + NOT TEST_SUITE_FORTRAN_FORCE_UNIMPLEMENTED_TESTS) + list(APPEND ignore ${unimplemented}) + endif() -find_file(ISO_FORTRAN_C_HEADER - ISO_Fortran_binding.h - PATHS ${HEADER_SEARCH_PATH} - REQUIRED) + if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND + NOT TEST_SUITE_FORTRAN_FORCE_SKIPPED_TESTS) + list(APPEND ignore ${skipped}) + endif() -get_filename_component(ISO_FORTRAN_C_HEADER_DIR - "${ISO_FORTRAN_C_HEADER}" - DIRECTORY) + if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND + NOT TEST_SUITE_FORTRAN_FORCE_FAILING_TESTS) + list(APPEND ignore ${failing}) + endif() -# This pulls out options in dg-options into `${Variable}` -function(gfortran_dg_options_fflags Variable File) - # Some files have dg-options which we need to pick up. These should be in - # the first line but often aren't. - # - # We also need to be careful not to pick up target-specific dg-options. - set(DG_FFLAGS) - - file(STRINGS ${File} FileLines) - foreach(FileLine ${FileLines}) - # Looking for `dg-options "..."` or `dg-additional-options "..."` without - # `{ target` afterwards (ignoring spaces). - if(FileLine MATCHES "dg-(additional-)?options [{]?[ ]*\"([^\"]*)\"[ ]*[}]?(.*)") - # This is needed to turn the string into a list of FFLAGS - separate_arguments(FILE_FFLAGS UNIX_COMMAND ${CMAKE_MATCH_2}) - # This does the negative lookahead for `{ target` anywhere in the rest of - # the line - if(NOT "${CMAKE_MATCH_3}" MATCHES "{ +target") - list(APPEND DG_FFLAGS ${FILE_FFLAGS}) - endif() - endif() + foreach(file ${ignore}) + list(REMOVE_ITEM files ${file}) endforeach() - # Remove any flags that will cause flang to raise an error. - if (DG_FFLAGS) - list(REMOVE_ITEM DG_FFLAGS ${FLANG_ERRORING_FFLAGS}) - endif() - - # Set the parent scope variable - set(${Variable} ${DG_FFLAGS} PARENT_SCOPE) + set(${out} ${files} PARENT_SCOPE) endfunction() -function(gfortran_execute_test File) - cmake_parse_arguments(GFORTRAN "" "PREFIX" "FFLAGS;LDFLAGS;DEPFILES" ${ARGN}) +# Populate the tests from the files in the subdirectory. This macro will be +# called from each subdirectory containing tests. It is expected that the +# subdirectory will contain a fail named "DisabledFiles.cmake" which will +# provide the list of files that are disabled in that subdirectory for various +# reasons. A list named TESTS is expected to be in scope before this macro is +# called. +macro(gfortran_populate_tests TESTS) + string(REPLACE "${CMAKE_SOURCE_DIR}/" "" DIR "${CMAKE_CURRENT_SOURCE_DIR}") + message(STATUS "Adding directory ${DIR}") + + set(UNSUPPORTED "") + set(UNIMPLEMENTED "") + set(SKIPPED "") + set(FAILING "") + + # This will provide the lists of unsupported, unimplemented, skipped and + # failing files. + include(${CMAKE_CURRENT_SOURCE_DIR}/DisabledFiles.cmake) + + list(APPEND UNSUPPORTED ${UNSUPPORTED_FILES}) + list(APPEND UNIMPLEMENTED ${UNIMPLEMENTED_FILES}) + list(APPEND SKIPPED ${SKIPPED_FILES}) + list(APPEND FAILING ${FAILING_FILES}) + + # The TESTS variable is expected to be set before the macro is called. + gfortran_find_test_files( + "${UNSUPPORTED}" "${UNIMPLEMENTED}" "${SKIPPED}" "${FAILING}" "${TESTS}") +endmacro() + +# Generate a unique target name from the given base and prepend it with the +# given prefix. +function(gfortran_unique_target_name prefix base out) # There are a few tests - in different directories - with duplicate filenames. # CMake requires all target names to be unique, so we add a disambiguator. The # disambiguator uses the path of the file relative to the top-level directory # containing all the tests from the gfortran test suite to ensure that # targets in different directories will have distinct names. + set(result "") - # The ${File} argument is guaranteed to be the absolute path to the source - # file. - string(REPLACE "${PROJECT_SOURCE_DIR}/Fortran/gfortran/" "" Name "${File}") + # The ${BASE} argument is guaranteed to be the absolute path to a source file. + string(REPLACE "${PROJECT_SOURCE_DIR}/Fortran/gfortran/" "" result "${base}") # Replace any '/' separators with 2 underscores. Just replacing it by a single # underscore results in conflicts. For instance, there is a conflict between # regression/coarray_ptr_comp_2.f08 and regression/coarray/ptr_comp_2.f08 # which are unrelated tests. Other such conflicts are probably also unrelated. - string(REPLACE "/" "__" Name "${Name}") + string(REPLACE "/" "__" result "${result}") # Retain the extension of the source file in the final target name because # there are cases where two source files with the same basename but different # extensions and they, too, represent completely different and unrelated # tests. - string(REPLACE "." "_" Name "${Name}") - - set(test_target "${GFORTRAN_PREFIX}-${Name}") - set(working_dir_name "${test_target}.wd") - set(working_dir "${CMAKE_CURRENT_BINARY_DIR}/${working_dir_name}") - - # Several tests in the suite build modules with the same name at build-time. - # Others create/write/read files with the same name at test-time. In either - # case, these are race conditions which can lead to non-deterministic failures - # at build and/or test time. To work around this, have each test run in its - # own directory. - # - # This directory is also used as module directory at build-time. - # - # It may be "cleaner" to have separate directories - one that serves as the - # module directory and the other as the working directory, but that is - # probably unnecessary. + string(REPLACE "." "_" result "${result}") + + set(${out} "${prefix}-${result}" PARENT_SCOPE) +endfunction() + +# Several tests in the suite build modules with the same name at build-time. +# Others create/write/read files with the same name at test-time. In either +# case, these are race conditions which can lead to non-deterministic failures +# at build and/or test time. To work around this, have each test run in its +# own directory. +# +# This directory is also used as module directory at build-time. +# +# It may be "cleaner" to have separate directories - one that serves as the +# module directory and the other as the working directory, but that is +# probably unnecessary. +# +# Make a working directory for the given target and return the full path of +# the resulting directory. +function(gfortran_make_working_dir tgt out) + set(working_dir "${CMAKE_CURRENT_BINARY_DIR}/${tgt}.wd") + file(MAKE_DIRECTORY ${working_dir}) - # Parse the dg-options annotations in the file and add it to DG_FFLAGS. - gfortran_dg_options_fflags(DG_FFLAGS ${File}) + set("${out}" "${working_dir}" PARENT_SCOPE) +endfunction() + +# Setup a "compile" test. EXPECT_ERROR will be ON if the compile test is +# expected to fail, OFF otherwise. MAIN is the main test file. In the case of +# multi-file tests, OTHERS will be the remaining files needed by the test. +# FFLAGS are compiler flags needed by the test. LDFLAGS are linker flags needed +# by the test. +function(gfortran_add_compile_test expect_error main others fflags ldflags) + # The test-suite expects an executable to be produced at build time and for + # that executable to be run at test time. The result (in the form of the + # return code or the output written to stdout/stderr) is used to determine + # whether the test has succeeded. The "compile" tests are intended to exercise + # the behavior of the compiler itself. There isn't a clean way of having the + # compiler be executed at test time. Instead, the compiler is run at + # build time and the diagnostics/errors saved to a file as needed. This file is + # compared to a reference output at test time to determine success/failure of + # the test. A dummy executable is also built. This does nothing, but provides + # something that the test suite can "run" at test time. + + # PREFIX_COMPILE will have been defined in the subdirectory from which this + # function is called. + gfortran_unique_target_name("${PREFIX_COMPILE}" "${main}" target) + gfortran_make_working_dir("${target}" working_dir) + + # The output of the compilation of the test file. This may contain warnings + # and error messages. If the compilation succeeded without any warnings or + # other diagnostics, it will be empty. + set(out ${target}.out) + + add_custom_command( + OUTPUT ${out} + COMMAND ${CMAKE_COMMAND} + -DCMD="${CMAKE_Fortran_COMPILER};-c;${fflags};${ldflags};${others};${main}" + -DALWAYS_SAVE_DIAGS=OFF + -DWORKING_DIRECTORY=${working_dir} + -DOUTPUT_FILE=${out} + -P ${COMPILE_SCRIPT_BIN} + USES_TERMINAL + COMMENT "Compiling ${main}") + + add_custom_target(${target} + ALL + DEPENDS ${out} + SOURCES ${main} ${others}) + + # The dummy and empty reference output files are in + # ${CMAKE_BINARY_DIR}/Fortran/gfortran. This function could be called from + # any of the subdirectories under ${CMAKE_BINARY_DIR}/Fortran/gfortran. The + # tests need paths relative to the directory containing the test, so calculate + # the relative path back to ${CMAKE_BINARY_DIR}/Fortran/gfortran. + file(RELATIVE_PATH relpath + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/Fortran/gfortran) + + # The test suite expects an executable to run, so give it the dummy (see + # comments above). + llvm_test_run(EXECUTABLE %S/${relpath}/${DUMMY_EXE}) + + # The verification compares the saved diagnostics file against what is + # expected. For the test. The reference output may have been extracted from + # the DejaGNU annotations in the test file, or it may be an empty file if the + # compilation of the test file was expected to be successful and without any + # diagnostics. + if (expect_error) + # Since we don't check for any particular error, we expect "some" error. + # In that case, the compiler's diagnostic output will be non-empty. + llvm_test_verify(${TESTCMD} -s %S/${out}) + else () + llvm_test_verify(${DIFFPROG} %S/${relpath}/${EMPTY_FILE} %S/${out}) + endif () + + llvm_add_test(${target}.test %S/${relpath}/${DUMMY_EXE}) +endfunction() + +# Look for "compile" tests in TESTS and create a test for each "main" file that +# is found. +function(gfortran_add_compile_tests_from tests) + cmake_parse_arguments(GFORTRAN "" "" "FFLAGS;LDFLAGS" ${ARGN}) + + foreach (file ${tests}) + # Whether this test is expected to pass or fail. + set(expect_error OFF) + + # For multi-file tests, these are the other files needed. For the "compile" + # tests, there don't seem to be any multi-file tests at the time of writing, + # but leave it general in case that ever changes. + set(others "") + + set(fflags "") + set(ldflags "") + list(APPEND fflags ${GFORTRAN_FFLAGS}) + list(APPEND ldflags ${GFORTRAN_LDFLAGS}) + + file(STRINGS ${file} lines) + foreach (line ${lines}) + # The "compile" tests have a { dg-do compile } directive. + if (line MATCHES "^.*[{][ ]*dg-do[ ]*compile(.*)[}].*$") + # TODO: We completely ignore any target directives that may be attached + # to the run directives. For now, it seems to be ok, but as these tests + # are enabled on more platforms, the target directives might need to be + # handled. + elseif (line MATCHES "dg-additional-sources[ ]*[\"]?(.+)[\"]?[ ]*[}]") + separate_arguments(others UNIX_COMMAND ${CMAKE_MATCH_1}) + list(TRANSFORM others STRIP) + elseif (LINE MATCHES "dg-(additional-)?options [{]?[ ]*\"([^\"]*)\"[ ]*[}]?(.*)") + # TODO: We completely ignore any target directives that may be attached + # to the run directives. For now, it seems to be ok, but as these tests + # are enabled on more platforms, the target directives might need to be + # handled. + separate_arguments(file_fflags UNIX_COMMAND ${CMAKE_MATCH_2}) + list(REMOVE_ITEM file_fflags ${FLANG_ERRORING_FFLAGS}) + list(APPEND fflags ${file_fflags}) + elseif (line MATCHES "[{][ ]*dg-error[ ]*") + # Currently, we don't try to match gfortran's expected errors with + # flang's expected error messages. Instead, if gfortran expects an + # error, we test that flang produces "some" error. + # TODO: It may be more useful to match gfortran's error messages to + # flang's in which case we should do something more sophisticated here, + # but as a first pass, the more basic approach should do. + set(expect_error ON) + endif() + endforeach() + + # Some files look like they ought to be "compile" tests but they don't + # contain a DejaGNU compile directive. Some have an error or other + # directive that could be used to infer that they are actually compile tests + # but for those that are intended to succeed, there may be no directives + # at all. So just treat all files as if they were "compile" tests (even + # those that are the main files of execute tests and ones that are + # dependencies in multi-file tests). + gfortran_add_compile_test(${expect_error} ${file} "${others}" "${fflags}" "${ldflags}") + endforeach() +endfunction() + +# Creates a "compile" test from each file in TESTS. It is assumed that the +# compilation is intended to succeed. Any compile/link flags that the test needs +# must be passed explicitly. +function(gfortran_add_compile_tests tests) + cmake_parse_arguments(GFORTRAN "" "" "FFLAGS;LDFLAGS" ${ARGN}) - # Add any flags that were requested. - list(APPEND FFLAGS ${DG_FFLAGS} ${GFORTRAN_FFLAGS}) - list(APPEND LDFLAGS ${GFORTRAN_LDFLAGS}) + list(APPEND fflags ${GFORTRAN_FFLAGS}) + list(APPEND ldflags ${GFORTRAN_LDFLAGS}) - llvm_test_executable_no_test(${test_target} ${File} ${GFORTRAN_DEPFILES}) + foreach (file ${tests}) + gfortran_add_compile_test(OFF ${file} "" "${fflags}" "${ldflags}") + endforeach() +endfunction() + +# Setup an "execute" test. In the case of multi-file tests, MAIN will be the +# main file. For multi-file tests, OTHERS will be the remaining files needed by +# the test. FFLAGS are additional compiler flags needed by the test. LDFLAGS +# are the other linker flags needed by the test. +function(gfortran_add_execute_test main others fflags ldflags) + # PREFIX_EXECUTE will have been defined in the subdirectory from which this + # function is called. + gfortran_unique_target_name("${PREFIX_EXECUTE}" "${main}" target) + gfortran_make_working_dir("${target}" working_dir) + get_filename_component(working_dir_name "${working_dir}" NAME) + + llvm_test_executable_no_test(${target} ${main} ${others}) llvm_test_run(WORKDIR "%S/${working_dir_name}") - llvm_add_test_for_target(${test_target}) + llvm_add_test_for_target(${target}) - target_include_directories(${test_target} + target_include_directories(${target} PRIVATE ${ISO_FORTRAN_C_HEADER_DIR} ${working_dir}) - set_target_properties(${test_target} PROPERTIES + target_compile_options(${target} PRIVATE "${fflags}") + target_link_options(${target} PRIVATE "${ldflags}") + set_target_properties(${target} PROPERTIES Fortran_MODULE_DIRECTORY ${working_dir}) # This is a workaround because cmake does not currently recognize the .f03 # and .f08 extensions. A patch to fix cmake has been accepted and the fix # should be available in CMake 3.27. It might be better to check the CMake - # CMake version and do this conditionally. - list(APPEND SOURCES ${File}) - list(APPEND SOURCES ${GFORTRAN_DEPFILES}) - foreach(Source ${SOURCES}) - get_filename_component(Ext ${Source} LAST_EXT) - if("${Ext}" STREQUAL ".f03" OR - "${Ext}" STREQUAL ".F03" OR - "${Ext}" STREQUAL ".f08" OR - "${Ext}" STREQUAL ".F08") - set_source_files_properties(${Source} PROPERTIES LANGUAGE Fortran) + # version and do this conditionally. + list(APPEND sources ${main}) + list(APPEND sources ${others}) + foreach(source ${sources}) + get_filename_component(ext ${source} LAST_EXT) + if("${ext}" STREQUAL ".f03" OR + "${ext}" STREQUAL ".F03" OR + "${ext}" STREQUAL ".f08" OR + "${ext}" STREQUAL ".F08") + set_source_files_properties(${source} PROPERTIES LANGUAGE Fortran) endif() endforeach() # NOTE: This should be removed when the -flang-experimental-exec flag is no # longer needed. - target_link_options(${test_target} PRIVATE -flang-experimental-exec) - set_target_properties(${test_target} PROPERTIES LINKER_LANGUAGE Fortran) + target_link_options(${target} PRIVATE -flang-experimental-exec) + set_target_properties(${target} PROPERTIES LINKER_LANGUAGE Fortran) +endfunction() + +# Look for "execute" tests in TESTS and create a test for each "main" file that +# is found. In the case of multi-file tests, other files may be needed for the +# test. Those will be obtained by parsing the DejaGNU directives in the "main" +# file. +function(gfortran_add_execute_tests_from tests) + cmake_parse_arguments(GFORTRAN "" "" "FFLAGS;LDFLAGS" ${ARGN}) + + foreach(file ${tests}) + # The file containing the "run" directive will be the main file. + set(main "") + + # For multi-file tests, these are the other files needed. + set(others "") + + # Any flags needed to compile the test. These will be flang-specific flags. + # Directives in the test files may specify additional flags needed by the + # test. Those will be parsed in gfortran_add_execute_test. + set(fflags "") + set(ldflags "") + list(APPEND fflags ${GFORTRAN_FFLAGS}) + list(APPEND ldflags ${GFORTRAN_LDFLAGS}) + + file(STRINGS ${file} lines) + foreach (line ${lines}) + # The "execute" tests have a { dg-do run }, or a { dg-lto-do run } + # directive. + if (line MATCHES "^.*[{][ ]*dg-(lto-)?do[ ]*run (.*)[}]$") + # TODO: We completely ignore any target directives that may be attached + # to the run directives. For now, it seems to be ok, but as these tests + # are enabled on more platforms, the target directives might need to be + # handled. + set(main "${file}") + elseif (line MATCHES "dg-additional-sources[ ]*[\"]?(.+)[\"]?[ ]*[}]") + separate_arguments(others UNIX_COMMAND ${CMAKE_MATCH_1}) + list(TRANSFORM others STRIP) + elseif (line MATCHES "dg-(additional-)?options [{]?[ ]*\"([^\"]*)\"[ ]*[}]?(.*)") + # TODO: We completely ignore any target-specific options that may be + # present. These are usually in the form of target directives. For now, + # it seems to be ok, but as these tests are enabled on more platforms, + # target directives might need to be handled. + separate_arguments(file_fflags UNIX_COMMAND ${CMAKE_MATCH_2}) + list(REMOVE_ITEM file_fflags ${FLANG_ERRORING_FFLAGS}) + list(APPEND fflags ${file_fflags}) + endif() + endforeach() + + # Since any dependent files could also be processed by this function, there + # is no guarantee that main will have been set. + if (main) + gfortran_add_execute_test(${main} "${others}" "${fflags}" "${ldflags}") + endif() + endforeach() endfunction() +# Creates an "execute" test from each file in TESTS. The tests are assumed to +# not contain any additional DejaGNU directives. Any compiler/linker flags +# needed by the test must be passed explicitly. +function(gfortran_add_execute_tests tests) + cmake_parse_arguments(GFORTRAN "" "" "FFLAGS;LDFLAGS" ${ARGN}) + + list(APPEND fflags ${GFORTRAN_FFLAGS}) + list(APPEND ldflags ${GFORTRAN_LDFLAGS}) + + foreach(file ${tests}) + gfortran_add_execute_test(${file} "" "${fflags}" "${ldflags}") + endforeach() +endfunction() + +set(HEADER_SEARCH_PATH "${TEST_SUITE_FORTRAN_ISO_C_HEADER_DIR}") +if (NOT HEADER_SEARCH_PATH) + get_filename_component(Fortran_BINDIR ${CMAKE_Fortran_COMPILER} DIRECTORY) + get_filename_component(Fortran_PREFIX ${Fortran_BINDIR} DIRECTORY) + + set(HEADER_SEARCH_PATH "${Fortran_PREFIX}/include/flang") +endif() + +find_file(ISO_FORTRAN_C_HEADER + ISO_Fortran_binding.h + PATHS ${HEADER_SEARCH_PATH} + REQUIRED) + +get_filename_component(ISO_FORTRAN_C_HEADER_DIR + "${ISO_FORTRAN_C_HEADER}" + DIRECTORY) + +# The program to be used to verify the results. The programs here should take +# two files as arguments, return 0 if the files are identical, non-zero +# otherwise. +set(DIFFPROG) +if (WIN32) + # Windows support has been disabled earlier anyway, but at some point, we + # should find a way to check if a file is non-empty on windows. + message(FATAL_ERROR "No way to check file size in Windows.") + find_program(DIFFPROG + NAMES fc.exe + REQUIRED) +else () + # FIXME: For the moment, check if a file is not empty, by using the test + # command/shell built-in on *nix. But it is not clear that all systems will + # have this. What we really need is to invert the result of DIFFPROG. LLVM has + # a not utility that will do just this. But it needs LLVM's build directory + # to be present unless it is installed on the system already. It is not clear + # if we can depend on this. + find_program(TESTCMD + NAMES test + REQUIRED) + find_program(DIFFPROG + NAMES diff cmp + REQUIRED) +endif () + +# The test suite expects to be able to run something at test-time. For the +# compile tests, there is nothing to be run. While a better solution will be +# to modify the test suite to allow for cases like this, for the moment, just +# create an empty executable that will be run for each test. +set(DUMMY_SRC ${CMAKE_CURRENT_BINARY_DIR}/dummy.f90) +file(WRITE ${DUMMY_SRC} "program test\nend program test") + +set(DUMMY_EXE "dummy") +add_executable(${DUMMY_EXE} ${DUMMY_SRC}) +# NOTE: This should be removed once the -flang-experimental-exec flag is no +# longer needed. +target_link_options(${DUMMY_EXE} PRIVATE "-flang-experimental-exec") + +# This script compiles the files that are "compile" tests. It may save the +# diagnostics to file as needed (see the options that the script accepts). There +# should be no dependence on the source files at test-time, so copy the compile +# script over to the build directory. For the moment, nothing is compiled at +# test-time, but that might change. +set(COMPILE_SCRIPT compile-save-diags.cmake) +set(COMPILE_SCRIPT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${COMPILE_SCRIPT}) +set(COMPILE_SCRIPT_BIN ${CMAKE_CURRENT_BINARY_DIR}/${COMPILE_SCRIPT}) + +file(COPY + ${CMAKE_CURRENT_SOURCE_DIR}/${COMPILE_SCRIPT} + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +# In some case, the "compile" tests are expected to pass. Since diagnostics are +# only saved on failure, the diagnostics file produced when compiling the test +# should be empty. An empty file can, therefore, be used as reference output. +set(EMPTY_FILE "gfortran-compile-empty.reference.out") +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/${EMPTY_FILE}) + add_subdirectory(regression) add_subdirectory(torture) diff --git a/Fortran/gfortran/README.md b/Fortran/gfortran/README.md --- a/Fortran/gfortran/README.md +++ b/Fortran/gfortran/README.md @@ -4,8 +4,8 @@ [GCC](https://github.com/gcc-mirror/gcc). The test files are contained within two subdirectories: - - `regression`: Contains the gfortran [tests](https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite/gfortran.dg). - - `torture`: Contains the gfortran [torture tests](https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite/gfortran.fortran-torture). +- `regression`: Contains the gfortran [tests](https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite/gfortran.dg). +- `torture`: Contains the gfortran [torture tests](https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite/gfortran.fortran-torture). The tests in both `regression` (and its subdirectories) and `torture` can be classified roughly as _compile_ tests and _execute_ tests. The _compile_ tests @@ -13,27 +13,32 @@ optimization logs. The _execute_ tests are end-to-end tests that check the behavior of the binary produced by the compiler. -Currently, only the _execute_ tests are supported in `regression`. Both +Currently, only the _execute_ tests are supported in `regression`. Both `compile` and `execute` tests have been enabled in `torture`. Of the supported tests, a number of tests have been disabled. There are four categories of such tests: - - *Unsupported*: These are tests that use non-standard extensions/intrinsics - that are not currently supported by flang. Unless those non-standard - features are supported in the future, these tests will never be enabled. +- *Unsupported*: These are tests that use non-standard extensions/intrinsics +that are not currently supported by flang. Unless those non-standard +features are supported in the future, these tests will never be enabled. - - *Unimplemented*: These tests hit a "not yet implemented" assertion within - flang. +- *Unimplemented*: These tests hit a "not yet implemented" assertion within +flang. - - *Skipped*: These tests cause some form of compiler error. Some trigger an - assertion within the compiler. Others are legal Fortran programs, but - nevertheless cause a semantic error, most likely due to unimplemented - features. +- *Skipped*: These tests cause some form of compiler error. Some trigger an +assertion within the compiler. Others are legal Fortran programs, but +nevertheless cause a semantic error, most likely due to unimplemented +features. - - *Failing*: These tests fail at runtime - some crash on execution, others - produce incorrect/unexpected output. This could be a result of a bug in the - compiler/code generator or the runtime. +- *Failing*: These tests fail at test-time. + + - For "execute" tests, some crash on execution, others produce + incorrect/unexpected output. This could be a result of a bug in the + compiler/code generator or the runtime. + + - For "compile" tests, this could be because the compilation succeeds when it + is expected to fail, or vice versa. Over time, the number of tests in the *unimplemented*, *skipped*, and *failing* categories should decrease. Eventually, only the *unsupported* category should @@ -42,15 +47,14 @@ ### _Compile_ tests ### -The _compile_ tests are "built" when the whole test suite is built at which -time a compilation log is saved. At testing time, the log is checked to +The _compile_ tests are "built" when the whole test suite is built at which +time a compilation log is saved. At testing time, the log is checked to determine whether the test should pass or fail. If the test is expected to pass, but the compilation log contains errors, the test will be deemed to have failed -and vice versa. The _compile_ test are supported in `torture`, but not in -`regression`. - +and vice versa. The _compile_ test are supported in `torture`, and +`regression/gomp` but not elsewhere. -### _Execute tests_ ### +### _Execute_ tests ### The _execute_ tests are built when the whole test suite is built and executed when the tests are run. The *unsupported*, *unimplemented*, and *skipped* tests @@ -70,11 +74,11 @@ In order to enable the disabled tests, one or more of the following options can be passed to `cmake`: - - `TEST_SUITE_FORTRAN_FORCE_ALL_TESTS`: Enable all disabled tests. - - `TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS`: Enable only the *unsupported* tests. - - `TEST_SUITE_FORTRAN_FORCE_UNIMPLEMENTED_TESTS`: Enable only the *unimplemented* tests. - - `TEST_SUITE_FORTRAN_FORCE_SKIPPED_TESTS`: Enable only the *skipped* tests. - - `TEST_SUITE_FORTRAN_FORCE_FAILING_TESTS`: Enable only the *failing* tests. +- `TEST_SUITE_FORTRAN_FORCE_ALL_TESTS`: Enable all disabled tests. +- `TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS`: Enable only the *unsupported* tests. +- `TEST_SUITE_FORTRAN_FORCE_UNIMPLEMENTED_TESTS`: Enable only the *unimplemented* tests. +- `TEST_SUITE_FORTRAN_FORCE_SKIPPED_TESTS`: Enable only the *skipped* tests. +- `TEST_SUITE_FORTRAN_FORCE_FAILING_TESTS`: Enable only the *failing* tests. Some of the tests require the `ISO_Fortran_binding.h` header file. `cmake` will look for this file in the `include` directory of the `flang` installation @@ -121,3 +125,56 @@ The test files in `regression` and `torture` *must not* be modified. + +### TODO's ### + +If some of the items listed here are implemented, even in part, it should +allows us to make better use of the test-suite. + +As it currently stands, many DejaGNU directives from the test files are ignored. +In some cases, those directives actually check that the language +feature/optimization being exercised by the tests is actually handled correctly. +By ignoring those, we are often simply checking that `flang` (or the code +produced by it) does not crash at build/test time. We might end up not checking +that `flang` actually handles the feature/optimization correctly. + +While this is not strictly incorrect, it does mean the suite is, in a manner of +speaking, "underutilized". + +However, it is not clear how difficult it will be to handle the DejaGNU +directives. Some will almost certainly be irrelevant to `flang` while it may be +infeasible to handle some of the others. + +### `dg-error` directive ### + +The `dg-error` directive indicates that the test should fail to compile with a +particular error. Obviously, this is a `gfortran`-specific error. `flang` may +not have a direct equivalent i.e. it may produce a more general error message +(or maybe even a more specific one if `gfortran` is the one with the more +general error message). For now, when a`dg-error` is encountered, the test is +marked as `expect-error`. At test time, we only check if "some" error (that was +not a crash) occurred. This can cause false-negatives, particularly in the +OpenMP (and perhaps even OpenACC) tests. This is where some directives/clauses +are currently not implemented which results in a parse error (as opposed to the +triggering of a "not-yet-implemented" assertion) which is also deemed an "error", +thereby causing the test to pass. + +#### `scan-tree-dump` directive #### + +In the _compile_ tests, the `dg-final { scan-tree-dump* ...}` directives are +ignored. The `scan-tree-dump*` checks GCC's internal tree structure to ensure +that the specific language feature/optimization the test was meant to exercise +was handled correctly (see, for example, `regression/volatile_7.f90`). + +The tests instruct GCC to write out the internal representation to file and scan +the file for the presence of absence of certain text. The tests in LLVM's main +code repository behave in the same way, and it may be possible to borrow some +of that functionality. + +### `target` directive ### + +The `target` directive is used to restrict tests to run on certain +platforms/systems. Currently, the target directive is ignored entirely and the +tests are always run. This seems to be ok on *nix on x86-64 and aarch64 - the +only platforms currently supported. As more platforms are added, we may need to +handle the target directives properly. diff --git a/Fortran/gfortran/compile-save-diags.cmake b/Fortran/gfortran/compile-save-diags.cmake --- a/Fortran/gfortran/compile-save-diags.cmake +++ b/Fortran/gfortran/compile-save-diags.cmake @@ -8,17 +8,15 @@ # Run the compiler and save the compiler diagnostics to file. The diagnostics # are simply the messages printed to stdout and stderr. This is intended to be -# used for the "compile" tests in this test. The "compile" tests exercise the -# compiler's parser and semantic analyzer as well as the diagnostics. +# used for the "compile" tests in this suite. # Required parameters # -# COMPILER: STRING Path to the compiler. -# COMPILER_FLAGS: STRING Compiler flags. -# INPUT_FILES: STRING Space separated list of files to compile. -# OUTPUT_FILE: STRING The output diagnostics file. -# OBJECT_FILE: STRING The object file produced by the compiler. This -# will be deleted before this script exits. +# CMD: STRING Most of the compilation command. This excludes +# the module directory flag (-J). +# +# OUTPUT_FILE: STRING The output file containing any compiler +# diagnostics. # # Optional parameters # @@ -28,18 +26,30 @@ # failed for any reason. # -execute_process(COMMAND ${COMPILER} ${COMPILER_FLAGS} ${INPUT_FILES} -o ${OBJECT_FILE} +separate_arguments(COMMAND NATIVE_COMMAND "${CMD} -J${WORKING_DIRECTORY}") + +# There are race conditions on .mod (due to different tests compiling modules +# having the same name). At the time of writing, there don't seem to be any +# multi-file "compile" tests, let alone any pairs of tests which might generate +# object files having the same name. In case any do show up, set the working +# directory to be the module directory. This ensures that any object files are +# written to the dedicated working directory for the test. +execute_process(COMMAND ${COMMAND} + WORKING_DIRECTORY ${WORKING_DIRECTORY} RESULT_VARIABLE RETVAR OUTPUT_VARIABLE OUTVAR ERROR_VARIABLE ERRVAR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) +# An output file will always be written because one is expected to exists at +# test-time. file(WRITE "${OUTPUT_FILE}" "") + +# Only save diagnostics if the compilation return a non-zero (error) code unless +# instructed to always save diagnostics. if (ALWAYS_SAVE_DIAGS OR NOT "${RETVAR}" EQUAL "0") file(APPEND "${OUTPUT_FILE}" "${ERRVAR}") file(APPEND "${OUTPUT_FILE}" "") file(APPEND "${OUTPUT_FILE}" "${OUTVAR}") endif() - -file(REMOVE ${OBJECT_FILE}) diff --git a/Fortran/gfortran/regression/CMakeLists.txt b/Fortran/gfortran/regression/CMakeLists.txt --- a/Fortran/gfortran/regression/CMakeLists.txt +++ b/Fortran/gfortran/regression/CMakeLists.txt @@ -6,1856 +6,16 @@ # #===------------------------------------------------------------------------===# -# Creates a test from each valid test file in the current source directory. Each -# argument to a function is a list. If a test file is in any of the lists, a -# test will not be created from it. -function(add_tests UnsupportedTests UnimplementedTests SkippedTests FailingTests) - # This will just get all the Fortran source files in the directory. Since - # the tests here are a mix of single-source and multi-source tests, this will - # include files that are dependencies of some "main" test file as well. Those - # will be filtered out later. - file(GLOB AllFiles CONFIGURE_DEPENDS LIST_DIRECTORIES false - *.f* - *.F* - ) +# PREFIX_EXECUTE and PREFIX_COMPILE are used in gfortran_add_execute_test and +# gfortran_add_compile_test respectively. +set(PREFIX_EXECUTE "gfortran-regression-execute") +set(PREFIX_COMPILE "gfortran-regression-compile") - set(TestsToSkip) - - # There is still a chance that some of the unsupported tests may need to be - # enabled, for instance if the non-standard extensions that they exercise are - # supported due to user demand. - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) - list(APPEND TestsToSkip ${UnsupportedTests}) - endif() - - # For the remaining tests, there is cause to build and run the skipped, failing - # and unimplemented tests since some could be enabled once some feature is - # implemented. Eventually, all the TEST_SUITE_FORTRAN_FORCE_* options (perhaps - # with the exception of TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) should - # become redundant and removed. - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_UNIMPLEMENTED_TESTS) - list(APPEND TestsToSkip ${UnimplementedTests}) - endif() - - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_FAILING_TESTS) - list(APPEND TestsToSkip ${FailingTests}) - endif() - - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_SKIPPED_TESTS) - list(APPEND TestsToSkip ${SkippedTests}) - endif() - - foreach(TestToSkip ${TestsToSkip}) - list(REMOVE_ITEM AllFiles ${TestToSkip}) - endforeach() - - # For now, only the execute tests are supported. Those have a "{ dg-do run }" - # or a "{ dg-lto-do run }" directive. - foreach(File ${AllFiles}) - set(MAIN) - set(ADDITIONAL_SOURCES) - set(ADDITIONAL_FFLAGS) - set(ADDITIONAL_LDFLAGS) - - file(STRINGS ${File} FileLines) - foreach(FileLine ${FileLines}) - if(FileLine MATCHES "^.*[{][ ]*dg-(lto-)?do[ ]*([A-Za-z0-9]+).*[}].*$") - # If this is not a main file for an execute test, just move on to the - # next file. - if (NOT ${CMAKE_MATCH_2} MATCHES "run") - break() - else() - set(MAIN "${File}") - endif() - elseif(FileLine MATCHES "dg-additional-sources[ ]*[\"]?(.+)[\"]?[ ]*[}]") - separate_arguments(ADDITIONAL_SOURCES UNIX_COMMAND ${CMAKE_MATCH_1}) - list(TRANSFORM ADDITIONAL_SOURCES STRIP) - endif() - endforeach() - - if (MAIN) - gfortran_execute_test(${MAIN} - PREFIX "gfortran-regression-execute" - FFLAGS ${ADDITIONAL_FFLAGS} - LDFLAGS ${ADDITIONAL_LDFLAGS} - DEPFILES ${ADDITIONAL_SOURCES}) - endif() - endforeach() -endfunction() - -# Some tests in the suite use non-standard features that are supported in -# gfortran but are not (and might never be) supported by flang. But if they are, -# they should be moved out of here. -file(GLOB Unsupported CONFIGURE_DEPENDS - # -------------------------------------------------------------------------- - # - # This tests the ability of gfortran to emit code with calling conventions - # compatible with g77 and f2c. These will probably never be relevant to - # flang. - f2c_4.f90 - value_4.f90 - - # -------------------------------------------------------------------------- - # - # These test/use GNU extensions that are not currently supported by Flang. - # - # TODO: Some of the tests may actually just use a GNU intrinsic during the - # process of testing some other functionality. It may be worthwhile to - # include a version elsewhere in this repo which tests that same functionality - # but without using any GNU extensions. - # - backtrace_1.f90 # backtrace - complex_intrinsic_1.f90 # complex - dec_io_2.f90 # fseek - dec_io_2a.f90 # fseek - fgetc_1.f90 # fgetc, fputc - fgetc_2.f90 # fgetc, fputc - fseek.f90 # fseek - ftell_1.f90 # ftell - ftell_2.f90 # ftell - ftell_3.f90 # ftell - inquire_10.f90 # getcwd - int_conv_1.f90 # int2, int8 - itime_idate_1.f # itime, idate - itime_idate_2.f # itime, idate - list_read_9.f90 # fputc - ltime_gmtime_1.f90 # time, ltime, gmtime - ltime_gmtime_2.f90 # time, ltime, gmtime - malloc_free_1.f90 # malloc, free - mclock.f90 # mclock, mclock8 - open_errors.f90 # chmod, getuid - open_new.f90 # unlink - secnds.f # secnds - secnds-1.f # secnds - stat_1.f90 # stat, fstat, lstat, getuid, getgid - stat_2.f90 # stat, fstat, lstat, getuid, getgid - transfer_array_intrinsic_2.f90 # rand -) - -# These tests are skipped because they hit a 'not yet implemented' assertion -# in flang and thus fail to compile. They should be removed from here when the -# corresponding feature is implemented. Eventually, this variable should be -# removed altogether once all the missing features are implemented. -file(GLOB Unimplemented CONFIGURE_DEPENDS - # unimplemented: assumed rank in procedure interface. - ISO_Fortran_binding_1.f90 - ISO_Fortran_binding_13.f90 - ISO_Fortran_binding_14.f90 - ISO_Fortran_binding_16.f90 - ISO_Fortran_binding_3.f90 - ISO_Fortran_binding_6.f90 - ISO_Fortran_binding_9.f90 - PR100029.f90 - PR100097.f90 - PR100098.f90 - PR100915.f90 - PR93963.f90 - PR94022.f90 - PR95196.f90 - PR96726.f90 - PR96727.f90 - PR96728.f90 - PR97046.f90 - assumed_rank_12.f90 - assumed_rank_18.f90 - assumed_rank_19.f90 - assumed_rank_20.f90 - assumed_type_9.f90 - interface_49.f90 - is_contiguous_2.f90 - pr84088.f90 - select_rank_5.f90 - sizeof_4.f90 - sizeof_6.f90 - - # unimplemented: procedure pointers - dummy_procedure_7.f90 - elemental_dependency_4.f90 - internal_dummy_3.f08 - optional_absent_7.f90 - optional_absent_8.f90 - pointer_check_1.f90 - pointer_check_2.f90 - pointer_check_3.f90 - pointer_check_4.f90 - pointer_init_10.f90 - pointer_init_4.f90 - pointer_init_5.f90 - pr78719_1.f90 - proc_ptr_1.f90 - proc_ptr_18.f90 - proc_ptr_21.f90 - proc_ptr_22.f90 - proc_ptr_23.f90 - proc_ptr_25.f90 - proc_ptr_26.f90 - proc_ptr_3.f90 - proc_ptr_5.f90 - proc_ptr_51.f90 - proc_ptr_comp_8.f90 - proc_ptr_comp_9.f90 - proc_ptr_result_3.f90 - - # unimplemented: procedure pointer results - pointer_check_5.f90 - proc_ptr_12.f90 - proc_ptr_result_7.f90 - - # unimplemented: procedure pointer arguments - proc_ptr_10.f90 - proc_ptr_19.f90 - proc_ptr_20.f90 - proc_ptr_36.f90 - proc_ptr_6.f90 - proc_ptr_7.f90 - proc_ptr_comp_2.f90 - submodule_30.f08 - - # unimplemented: procedure components - proc_ptr_48.f90 - proc_ptr_comp_1.f90 - proc_ptr_comp_11.f90 - proc_ptr_comp_13.f90 - proc_ptr_comp_14.f90 - proc_ptr_comp_18.f90 - proc_ptr_comp_19.f90 - proc_ptr_comp_29.f90 - proc_ptr_comp_34.f90 - proc_ptr_comp_5.f90 - structure_constructor_11.f90 - - # unimplemented: support for polymorphic types. - ISO_Fortran_binding_17.f90 - PR100120.f90 - PR100245.f90 - PR95331.f90 - alloc_comp_deep_copy_1.f03 - allocate_with_source_18.f03 - allocate_with_source_8.f08 - associate_18.f08 - associate_20.f03 - associate_8.f03 - alloc_comp_class_2.f90 - allocate_alloc_opt_10.f90 - allocate_with_source_26.f90 - associate_13.f90 - associate_48.f90 - associated_6.f90 - associated_target_4.f90 - character_workout_1.f90 - character_workout_4.f90 - class_1.f03 - class_18.f03 - class_26.f03 class_35.f90 - class_48.f90 - class_46.f03 - class_6.f03 - class_62.f90 - class_63.f90 - class_66.f90 - class_allocate_1.f03 - class_allocate_13.f90 - class_allocate_18.f90 - class_allocate_19.f03 - class_allocate_21.f90 - class_allocate_22.f90 - class_allocate_23.f08 - class_allocate_25.f90 - class_allocate_3.f03 - class_allocate_4.f03 - class_allocate_5.f90 - class_allocate_6.f03 - class_array_1.f03 - class_array_15.f03 - class_array_14.f90 - class_array_2.f03 - class_array_20.f03 - class_array_3.f03 - class_array_8.f03 - class_dummy_1.f03 - class_nameclash.f90 - class_result_5.f90 - class_result_6.f90 - class_to_type_1.f03 - class_to_type_4.f90 - coarray_allocate_2.f08 - coarray_allocate_3.f08 - coarray_allocate_5.f08 - dependency_53.f90 - dependency_60.f90 - dynamic_dispatch_10.f03 - elemental_optional_args_5.f03 - exit_3.f08 - extends_type_of_1.f03 - extends_type_of_2.f03 - finalize_37.f90 - implicit_class_1.f90 - move_alloc_13.f90 - move_alloc_14.f90 - move_alloc_2.f90 - move_alloc_5.f90 - pointer_array_5.f90 - pointer_array_8.f90 - pointer_array_component_3.f90 - pointer_check_14.f90 - pointer_intent_4.f90 - pr100551.f90 - pr108010.f90 - pr48958.f90 - pr78092.f90 - pr86328.f90 - pr86760.f90 - pr94397.F90 - proc_ptr_52.f90 - proc_ptr_comp_pass_3.f90 - realloc_on_assign_27.f08 - realloc_on_assign_31.f90 - same_type_as_2.f03 - select_type_13.f03 - select_type_14.f03 - select_type_19.f03 - select_type_2.f03 - select_type_26.f03 - select_type_27.f03 - select_type_3.f03 - select_type_35.f03 - select_type_37.f03 - select_type_39.f03 - select_type_5.f03 - select_type_6.f03 - select_type_7.f03 - select_type_8.f03 - select_type_4.f90 - select_type_42.f90 - select_type_44.f90 - select_type_48.f90 - select_type_49.f90 - select_type_50.f90 - storage_size_1.f08 - storage_size_3.f08 - structure_constructor_13.f03 - transfer_class_3.f90 - type_to_class_1.f03 - type_to_class_2.f03 - type_to_class_3.f03 - type_to_class_5.f03 - unlimited_polymorphic_14.f90 - unlimited_polymorphic_17.f90 - unlimited_polymorphic_20.f90 - unlimited_polymorphic_21.f90 - unlimited_polymorphic_22.f90 - unlimited_polymorphic_24.f03 - unlimited_polymorphic_3.f03 - unlimited_polymorphic_30.f03 - unlimited_polymorphic_32.f03 - unlimited_polymorphic_5.f90 - unlimited_polymorphic_6.f90 - - # unimplemented: BIND (C) internal procedure. - ISO_Fortran_binding_19.f90 - PR93308.f90 - array_reference_3.f90 - bind_c_char_2.f90 - bind_c_char_3.f90 - bind_c_char_4.f90 - bind_c_char_5.f90 - internal_dummy_4.f08 - - # unimplemented: BIND(C) module variable linkage - bind_c_dts.f90 - bind_c_vars.f90 - global_vars_c_init.f90 - implicit_pure_5.f90 - proc_ptr_8.f90 - - # unimplemented: character array expression temp with dynamic length. - actual_array_constructor_2.f90 - array_constructor_17.f90 - associate_35.f90 - assumed_charlen_arg_1.f90 - assumed_charlen_sharing.f90 - char_length_7.f90 - char_result_13.f90 - deferred_character_36.f90 - mapping_3.f90 - transfer_resolve_1.f90 - - # unimplemented: allocatable component in structure constructor - alloc_comp_constructor_7.f90 - - # unimplemented: gather rhs LEN parameters in assignment to allocatable - allocate_assumed_charlen_4.f90 - allocate_error_5.f90 - char_length_20.f90 - char_length_21.f90 - deferred_character_1.f90 - deferred_character_14.f90 - deferred_character_2.f90 - deferred_character_22.f90 - deferred_character_34.f90 - deferred_character_4.f90 - deferred_character_7.f90 - dependency_50.f90 - dependency_51.f90 - elemental_function_3.f90 - widechar_11.f90 - - # unimplemented: passing dynamically optional argument to elemental procedures - bounds_check_9.f90 - bounds_check_fail_2.f90 - elemental_optional_args_2.f90 - elemental_optional_args_3.f90 - elemental_optional_args_4.f90 - elemental_optional_args_6.f90 - elemental_optional_args_7.f90 - generic_31.f90 - optional_absent_2.f90 - - # unimplemented: BOZ - boz_bge.f90 - - # unimplemented: coarray allocation - associate_37.f90 - - # unimplemented: coarray in procedure interface - coarray_allocate_4.f08 - class_optional_1.f90 - class_optional_2.f90 - coarray_41.f90 - - # unimplemented: coarray reference - coarray_lib_comm_1.f90 - - # unimplemented: CriticalConstruct implementation - coarray_2.f90 - - # unimplemented: intrinsic: this_image - coarray_40.f90 - coarray_stat_2.f90 - random_init_3.f90 - random_init_4.f90 - random_init_5.f90 - random_init_6.f90 - - # unimplemented: intrinsic: co_broadcast - coarray_collectives_17.f90 - - # unimplemented: intrinsic: atan - atan2_1.f90 - - # unimplemented: intrinsic: erfc_scaled - erfc_scaled_1.f90 - - # unimplemented: intrinsic: execute_command_line - execute_command_line_2.f90 - execute_command_line_3.f90 - - # unimplemented: intrinsic: failed_images - coarray_failed_images_1.f08 - - # unimplemented: intrinsic: image_status - coarray_image_status_1.f08 - - # unimplemented: intrinsic: stopped_images - coarray_stopped_images_1.f08 - - # unimplemented: assignment to pointer result of function reference - ptr-func-3.f90 - ptr_func_assign_5.f08 - - # unimplemented: intrinsic: selected_char_kind - selected_char_kind_1.f90 - selected_char_kind_4.f90 - - # unimplemented: intrinsic: min and max for CHARACTER - minmax_char_1.f90 - widechar_intrinsics_9.f90 - zero_length_2.f90 - - # unimplemented: %VAL() intrinsic for arguments - c_by_val_1.f - c_by_val_5.f90 - pointer_check_12.f90 - - # unimplemented: parameterized derived types - dec_type_print_2.f03 - pdt_1.f03 - pdt_10.f03 - pdt_22.f03 - pdt_25.f03 - pdt_7.f03 - - # unimplemented: host associated derived type with length parameters - pdt_31.f03 - - # unimplemented: derived type components with non default lower bounds - structure_constructor_1.f03 - - # unimplemented: asynchronous transfers not implemented in runtime - f2003_inquire_1.f03 - f2003_io_1.f03 - - # unimplemented: support for UNION - dec_init_1.f90 - dec_init_3.f90 - dec_init_4.f90 - dec_structure_22.f90 - dec_union_1.f90 - dec_union_2.f90 - dec_union_3.f90 - dec_union_4.f90 - dec_union_5.f90 - dec_union_6.f90 - - # unimplemented: no math runtime available for '[SYM]' - large_integer_kind_2.f90 - large_real_kind_2.F90 - large_real_kind_3.F90 - large_real_kind_3.F90 - large_real_kind_form_io_1.f90 - norm2_3.f90 - pr96711.f90 -) - -# These tests are skipped because they cannot be compiled. Unlike the -# UnimplementedTests list, they do not fail with a "not yet implemented" -# assertion. The root cause for the failure could very well be one of those, -# but with the specific failure mode that is observed, it is not clear what -# missing feature is causing the compile-failure for these tests. -# If any of these tests use features that will never be supported, they should -# be moved to the UnsupportedTests list. If the cause of the failure of any -# tests in this list is addressed, they should be removed from here. -# -file(GLOB Skipped CONFIGURE_DEPENDS - # -------------------------------------------------------------------------- - # - # These tests are skipped because they trigger internal compiler errors. - # - - # error: Unexpected typeless constant value - actual_array_constructor_1.f90 - actual_array_offset_1.f90 - actual_pointer_function_1.f90 - aliasing_dummy_1.f90 - aliasing_dummy_4.f90 - allocatable_function_10.f90 - allocatable_function_9.f90 - allocatable_scalar_10.f90 - allocatable_scalar_13.f90 - allocatable_scalar_3.f90 - allocatable_scalar_9.f90 - allocate_alloc_opt_6.f90 - allocate_class_3.f90 - allocate_derived_5.f90 - allocate_error_6.f90 - allocate_with_mold_1.f90 - allocate_with_mold_3.f90 - allocate_with_source_15.f03 - allocate_with_source_16.f90 - allocate_with_source_22.f03 - allocate_with_source_23.f03 - allocate_with_source_24.f90 - allocate_with_source_5.f90 - allocate_with_source_6.f90 - allocate_with_source_7.f08 - allocate_with_source_9.f08 - alloc_comp_assign_10.f90 - alloc_comp_assign_11.f90 - alloc_comp_assign_12.f03 - alloc_comp_assign_13.f08 - alloc_comp_assign_14.f08 - alloc_comp_assign_15.f03 - alloc_comp_assign_16.f03 - alloc_comp_assign_1.f90 - alloc_comp_assign_2.f90 - alloc_comp_assign_3.f90 - alloc_comp_assign_4.f90 - alloc_comp_assign_5.f90 - alloc_comp_assign_6.f90 - alloc_comp_assign_7.f90 - alloc_comp_assign_8.f90 - alloc_comp_assign_9.f90 - alloc_comp_auto_array_1.f90 - alloc_comp_auto_array_2.f90 - alloc_comp_basics_1.f90 - alloc_comp_basics_2.f90 - alloc_comp_basics_5.f90 - alloc_comp_bounds_1.f90 - alloc_comp_class_1.f90 - alloc_comp_class_3.f03 - alloc_comp_class_4.f03 - alloc_comp_class_5.f03 - alloc_comp_constructor_1.f90 - alloc_comp_constructor_2.f90 - alloc_comp_constructor_3.f90 - alloc_comp_constructor_4.f90 - alloc_comp_constructor_5.f90 - alloc_comp_constructor_6.f90 - alloc_comp_deep_copy_2.f03 - alloc_comp_deep_copy_3.f03 - alloc_comp_default_init_1.f90 - alloc_comp_default_init_2.f90 - alloc_comp_initializer_1.f90 - alloc_comp_initializer_4.f03 - alloc_comp_misc_1.f90 - alloc_comp_optional_1.f90 - alloc_comp_result_1.f90 - alloc_comp_result_3.f90 - alloc_comp_scalar_1.f90 - alloc_comp_transformational_1.f90 - alloc_deferred_comp_1.f90 - array_constructor_32.f90 - array_constructor_type_14.f03 - array_constructor_type_8.f03 - arrayio_11.f90 - arrayio_derived_1.f90 - array_memcpy_5.f90 - array_reference_2.f90 - assign_func_dtcomp_1.f90 - associate_1.f03 - associate_24.f90 - associate_27.f90 - associate_28.f90 - associate_32.f03 - associate_38.f90 - associate_43.f90 - associate_46.f90 - associate_47.f90 - associate_60.f90 - associate_9.f03 - associated_target_3.f90 - associated_target_6.f03 - associated_target_7.f90 - assumed_rank_21.f90 - bind_c_coms.f90 - bind_c_dts_2.f03 - bind_c_usage_10.f03 - bind_c_usage_16.f03 - bind_c_usage_24.f90 - bind_c_usage_33.f90 - binding_c_table_15_1.f03 - binding_label_tests_16.f03 - binding_label_tests_33.f90 - block_13.f08 - blockdata_11.f90 - bound_1.f90 - bound_5.f90 - bounds_check_17.f90 - bounds_check_5.f90 - bounds_check_8.f90 - c_char_tests_2.f03 - c_char_tests_3.f90 - c_f_pointer_shape_tests_5.f90 - c_f_pointer_tests_4.f90 - c_f_pointer_tests.f90 - c_funloc_tests_3.f03 - c_funloc_tests_4.f03 - c_funloc_tests.f03 - c_funptr_1.f90 - c_funptr_1_mod.f90 - char4-subscript.f90 - character_array_constructor_1.f90 - char_array_structure_constructor.f90 - char_assign_1.f90 - char_length_15.f90 - char_pointer_comp_assign.f90 - char_result_5.f90 - char_result_6.f90 - char_type_len.f90 - c_kind_int128_test2.f03 - c_kind_params.f90 - class_19.f03 - class_25.f03 - class_40.f03 - class_65.f90 - class_67.f90 - class_70.f03 - class_alias.f90 - class_allocate_11.f03 - class_allocate_12.f90 - class_allocate_14.f90 - class_allocate_15.f90 - class_allocate_20.f90 - class_array_16.f90 - class_array_21.f03 - class_array_23.f03 - class_array_7.f03 - class_array_9.f03 - class_assign_4.f90 - class_defined_operator_1.f03 - class_defined_operator_2.f03 - class_dummy_2.f03 - class_result_10.f90 - class_result_1.f03 - class_result_9.f90 - class_to_type_3.f03 - c_loc_test_20.f90 - c_loc_test.f90 - c_loc_tests_2.f03 - coarray_allocate_10.f08 - coarray_allocate_6.f08 - coarray_allocate_7.f08 - coarray_allocate_8.f08 - coarray_allocate_9.f08 - coarray_alloc_comp_1.f08 - coarray_alloc_comp_2.f08 - coarray_alloc_comp_3.f08 - coarray_alloc_comp_6.f08 - coarray_alloc_comp_7.f08 - coarray_alloc_comp_8.f08 - coarray_lib_alloc_4.f90 - coarray_poly_9.f90 - coarray_ptr_comp_1.f08 - coarray_ptr_comp_2.f08 - coarray_send_by_ref_1.f08 - com_block_driver.f90 - constructor_2.f90 - contained_module_proc_1.f90 - c_ptr_tests_10.f03 - c_ptr_tests_14.f90 - c_ptr_tests_19.f90 - c_ptr_tests_7.f03 - c_ptr_tests_8.f03 - c_ptr_tests_9.f03 - c_ptr_tests.f03 - cshift_2.f90 - cshift_nan_1.f90 - c_sizeof_1.f90 - c_sizeof_5.f90 - c_size_t_test.f03 - data_derived_1.f90 - data_stmt_pointer.f90 - dec_init_2.f90 - dec_structure_18.f90 - dec_structure_1.f90 - dec_structure_2.f90 - dec_structure_25.f90 - dec_structure_3.f90 - dec_structure_4.f90 - default_initialization_5.f90 - deferred_character_10.f90 - deferred_character_11.f90 - deferred_character_12.f90 - deferred_character_13.f90 - deferred_character_23.f90 - deferred_character_25.f90 - deferred_character_28.f90 - deferred_character_3.f90 - deferred_character_5.f90 - deferred_character_6.f90 - deferred_type_component_1.f90 - deferred_type_component_2.f90 - deferred_type_component_3.f90 - dependency_22.f90 - dependency_23.f90 - dependency_24.f90 - dependency_39.f90 - dependency_55.f90 - der_array_1.f90 - der_array_io_1.f90 - der_array_io_2.f90 - derived_comp_array_ref_1.f90 - derived_comp_array_ref_2.f90 - derived_comp_array_ref_3.f90 - derived_comp_array_ref_4.f90 - derived_comp_array_ref_7.f90 - derived_constructor_comps_1.f90 - derived_constructor_comps_4.f90 - derived_constructor_comps_5.f90 - derived_constructor_comps_6.f90 - derived_constructor_comps_7.f90 - derived_external_function_1.f90 - derived_init_3.f90 - derived_init_5.f90 - der_ptr_component_2.f90 - dtio_10.f90 - dtio_12.f90 - dtio_14.f90 - dtio_15.f90 - dtio_16.f90 - dtio_17.f90 - dtio_19.f90 - dtio_1.f90 - dtio_24.f90 - dtio_25.f90 - dtio_26.f03 - dtio_27.f90 - dtio_28.f03 - dtio_2.f90 - dtio_30.f03 - dtio_31.f03 - dtio_32.f03 - dtio_33.f90 - dtio_34.f90 - dtio_3.f90 - dtio_4.f90 - dtio_7.f90 - dtio_8.f90 - dtio_9.f90 - dynamic_dispatch_11.f03 - dynamic_dispatch_4.f03 - dynamic_dispatch_5.f03 - dynamic_dispatch_6.f03 - dynamic_dispatch_7.f03 - dynamic_dispatch_8.f03 - dynamic_dispatch_9.f03 - elemental_assignment_1.f90 - elemental_dependency_5.f90 - elemental_dependency_6.f90 - elemental_subroutine_10.f90 - elemental_subroutine_11.f90 - elemental_subroutine_2.f90 - elemental_subroutine_3.f90 - entry_13.f90 - entry_16.f90 - equiv_constraint_4.f90 - extends_4.f03 - finalize_13.f90 - finalize_17.f90 - finalize_25.f90 - finalize_31.f90 - finalize_33.f90 - finalize_36.f90 - finalize_38.f90 - finalize_38a.f90 - finalize_50.f90 - finalize_52.f90 - fmt_nonchar_2.f90 - forall_1.f90 - func_assign_3.f90 - func_derived_1.f90 - func_derived_2.f90 - func_derived_3.f90 - func_derived_4.f90 - func_result_6.f90 - function_kinds_1.f90 - generic_15.f90 - generic_23.f03 - implied_do_io_1.f90 - import4.f90 - import.f90 - init_flag_15.f03 - inline_matmul_1.f90 - inline_matmul_9.f90 - inquiry_type_ref_5.f90 - intent_optimize_10.f90 - intent_out_14.f90 - interface_assignment_2.f90 - internal_pack_13.f90 - internal_pack_14.f90 - internal_pack_1.f90 - internal_pack_8.f90 - intrinsic_pack_1.f90 - intrinsic_spread_1.f90 - intrinsic_unpack_1.f90 - iso_c_binding_rename_2.f03 - ISO_Fortran_binding_10.f90 - ISO_Fortran_binding_11.f90 - ISO_Fortran_binding_12.f90 - ISO_Fortran_binding_18.f90 - ISO_Fortran_binding_5.f90 - ISO_Fortran_binding_7.f90 - ISO_Fortran_binding_8.f90 - iso_fortran_binding_uint8_array.f90 - logical_temp_io.f90 - logical_temp_io_kind8.f90 - module_procedure_6.f90 - module_read_2.f90 - move_alloc_15.f90 - move_alloc_16.f90 - move_alloc_4.f90 - multiple_allocation_2.f90 - mvbits_7.f90 - mvbits_8.f90 - namelist_14.f90 - namelist_52.f90 - namelist_54.f90 - namelist_55.f90 - namelist_58.f90 - namelist_60.f90 - namelist_66.f90 - namelist_69.f90 - namelist_70.f90 - namelist_71.f90 - namelist_77.f90 - namelist_79.f90 - namelist_82.f90 - namelist_85.f90 - nested_allocatables_1.f90 - nested_modules_3.f90 - null_9.f90 - nullify_3.f90 - optional_class_1.f90 - overload_1.f90 - parameter_array_init_8.f90 - pdt_11.f03 - pdt_12.f03 - pdt_13.f03 - pdt_14.f03 - pdt_27.f03 - pdt_28.f03 - pointer_array_11.f90 - pointer_array_1.f90 - pointer_array_3.f90 - pointer_array_4.f90 - pointer_array_6.f90 - pointer_array_7.f90 - pointer_array_component_1.f90 - pointer_assign_14.f90 - pointer_assign_15.f90 - pointer_check_11.f90 - pointer_init_1.f90 - pointer_init_8.f90 - pointer_remapping_10.f90 - PR100132.f90 - PR100136.f90 - PR100911.f90 - pr100950.f90 - pr105205.f90 - pr106731.f90 - pr106918.f90 - pr107872.f90 - pr16938.f90 - pr17612.f90 - pr18392.f90 - pr19928-2.f90 - pr32627.f03 - pr35983.f90 - pr43808.f90 - pr43866.f90 - pr47008.f03 - pr55086_aliasing_dummy_4_tfat.f90 - pr62125.f90 - pr64230.f90 - pr65504.f90 - pr69955.f90 - pr71764.f90 - pr84155.f90 - pr84523.f90 - pr86322_3.f90 - pr88611.f90 - pr92050.f90 - pr93685_1.f90 - pr99602b.f90 - print_c_kinds.f90 - proc_decl_17.f90 - proc_decl_2.f90 - proc_ptr_comp_12.f90 - proc_ptr_comp_15.f90 - proc_ptr_comp_16.f90 - proc_ptr_comp_17.f90 - proc_ptr_comp_23.f90 - proc_ptr_comp_47.f90 - proc_ptr_comp_pass_1.f90 - proc_ptr_comp_pass_5.f90 - ptr_func_assign_1.f08 - ptr_func_assign_3.f08 - read_dir.f90 - realloc_on_assign_16.f90 - realloc_on_assign_17.f90 - realloc_on_assign_23.f90 - realloc_on_assign_28.f90 - realloc_on_assign_2.f03 - realloc_on_assign_32.f90 - realloc_on_assign_3.f03 - realloc_on_assign_9.f90 - recursive_alloc_comp_1.f08 - recursive_alloc_comp_2.f08 - recursive_alloc_comp_3.f08 - recursive_alloc_comp_4.f08 - recursive_check_16.f90 - repack_arrays_1.f90 - reshape.f90 - reshape_transpose_1.f90 - reshape_zerosize_3.f90 - same_type_as_3.f03 - select_type_15.f03 - select_type_36.f03 - select_type_43.f90 - simplify_cshift_1.f90 - sizeof.f90 - spread_scalar_source.f90 - spread_simplify_1.f90 - structure_constructor_14.f90 - structure_constructor_2.f03 - submodule_18.f08 - submodule_32.f08 - submodule_6.f08 - submodule_7.f08 - subref_array_pointer_1.f90 - subref_array_pointer_2.f90 - subref_array_pointer_4.f90 - substr_alloc_string_comp_1.f90 - transfer_assumed_size_1.f90 - transfer_simplify_10.f90 - transfer_simplify_1.f90 - transfer_simplify_2.f90 - trim_optimize_5.f90 - typebound_assignment_5a.f03 - typebound_assignment_6.f03 - typebound_assignment_7.f90 - typebound_call_10.f03 - typebound_call_13.f03 - typebound_call_17.f03 - typebound_call_18.f03 - typebound_call_19.f03 - typebound_call_1.f03 - typebound_call_20.f03 - typebound_call_2.f03 - typebound_call_3.f03 - typebound_call_6.f03 - typebound_generic_3.f03 - typebound_generic_4.f03 - typebound_generic_5.f03 - typebound_generic_6.f03 - typebound_generic_9.f03 - typebound_operator_12.f03 - typebound_operator_13.f03 - typebound_operator_20.f90 - typebound_operator_21.f03 - typebound_operator_3.f03 - typebound_operator_6.f03 - typebound_operator_7.f03 - typebound_operator_8.f03 - typebound_operator_9.f03 - typebound_proc_20.f90 - typebound_proc_23.f90 - typebound_proc_27.f03 - typebound_proc_35.f90 - typebound_proc_36.f90 - type_to_class_4.f03 - unlimited_polymorphic_18.f90 - unlimited_polymorphic_19.f90 - unlimited_polymorphic_1.f03 - unlimited_polymorphic_23.f90 - unlimited_polymorphic_25.f90 - unlimited_polymorphic_26.f90 - unlimited_polymorphic_29.f90 - use_24.f90 - use_27.f90 - used_dummy_types_1.f90 - value_1.f90 - value_tests_f03.f90 - where_2.f90 - whole_file_13.f90 - whole_file_14.f90 - winapi.f90 - zero_array_components_1.f90 - - # error: 'fir.convert' op invalid type conversion - achar_4.f90 - c_char_tests_4.f90 - c_char_tests_5.f90 - widechar_6.f90 - widechar_intrinsics_6.f90 - widechar_intrinsics_7.f90 - widechar_select_1.f90 - - # error: a function must have a type - proc_decl_9.f90 - - # error: not a constant derived type expression - allocate_with_source_10.f08 - allocate_with_source_11.f08 - arrayio_12.f90 - associate_25.f90 - associated_4.f90 - associated_target_5.f03 - automatic_default_init_1.f90 - char_component_initializer_1.f90 - char_component_initializer_2.f90 - char_length_8.f90 - charlen_15.f90 - charlen_16.f90 - class_9.f03 - class_allocate_10.f03 - class_allocate_7.f03 - class_allocate_8.f03 - class_allocate_9.f03 - class_array_4.f03 - class_to_type_2.f90 - coarray_42.f90 - constructor_3.f90 - dec_structure_6.f90 - default_initialization_3.f90 - default_initialization_4.f90 - deferred_character_26.f90 - defined_assignment_1.f90 - defined_assignment_10.f90 - defined_assignment_11.f90 - defined_assignment_2.f90 - defined_assignment_3.f90 - defined_assignment_4.f90 - defined_assignment_5.f90 - defined_assignment_9.f90 - dependency_25.f90 - der_array_io_3.f90 - derived_init_1.f90 - derived_init_2.f90 - derived_init_4.f90 - derived_pointer_recursion_2.f90 - dtio_22.f90 - dynamic_dispatch_1.f03 - dynamic_dispatch_12.f90 - dynamic_dispatch_2.f03 - dynamic_dispatch_3.f03 - extends_1.f03 - extends_16.f90 - extends_3.f03 - finalize_15.f90 - finalize_29.f08 - finalize_39.f90 - finalize_40.f90 - finalize_41.f90 - finalize_42.f90 - finalize_43.f90 - finalize_44.f90 - finalize_45.f90 - finalize_46.f90 - finalize_47.f90 - finalize_48.f90 - forall_19.f90 - init_flag_10.f90 - initialization_11.f90 - initialization_19.f90 - initialization_27.f90 - inquiry_type_ref_1.f08 - intent_out_13.f90 - intent_out_2.f90 - intent_out_5.f90 - interface_assignment_1.f90 - internal_pack_10.f90 - internal_pack_6a.f90 - intrinsic_pack_5.f90 - intrinsic_pack_6.f90 - move_alloc_10.f90 - move_alloc_6.f90 - namelist_13.f90 - namelist_15.f90 - namelist_40.f90 - namelist_47.f90 - namelist_64.f90 - namelist_78.f90 - namelist_96.f90 - no-automatic.f90 - optional_assumed_charlen_2.f90 - pointer_array_component_2.f90 - pointer_assign_10.f90 - pointer_assign_11.f90 - pointer_assign_8.f90 - pointer_assign_9.f90 - pointer_init_3.f90 - pr19926.f90 - pr51434.f90 - pr68078.f90 - pr69739.f90 - pr78290.f90 - pr83864.f90 - pr85786.f90 - result_default_init_1.f90 - structure_constructor_5.f03 - submodule_1.f08 - submodule_2.f08 - temporary_3.f90 - transfer_class_2.f90 - typebound_call_32.f90 - typebound_operator_15.f90 - - # error: unemittable constant value - namelist_utf8.f90 - - # error: cannot be converted to LLVM IR: missing - # `LLVMTranslationDialectInterface` registration for dialect for op: func.func - leadz_trailz_1.f90 - leadz_trailz_2.f90 - - # error: failed to legalize operation 'math.ctlz' that was explicitly marked - # illegal - leadz_trailz_3.f90 - - # -------------------------------------------------------------------------- - # - # These tests are skipped because they result in a compile error. This may - # be the result of them exercising unsupported extensions that are not - # supported in flang or some other reason. If there are multiple errors - # in a single file, each unique error message will be provided. - - # error: Entity in ALLOCATE statement must have the ALLOCATABLE or POINTER - # attribute - ISO_Fortran_binding_15.f90 - - # error: Left-hand side of assignment may not be polymorphic unless - # assignment is to an entire allocatable - PR100040.f90 - PR100103.f90 - - # error: The left-hand side of a pointer assignment is not definable - PR100094.f90 - associate_42.f90 - - # error: Assumed-rank array cannot be forwarded to '[var]=' argument - PR100906.f90 - PR100914.f90 - assumed_rank_10.f90 - assumed_rank_24.f90 - assumed_rank_9.f90 - associated_assumed_rank.f90 - assumed_rank_16.f90 - assumed_rank_8.f90 - - # error: Pointer has rank 0 but target has rank [n] - PR94331.f90 - PR94327.f90 - assumed_rank_1.f90 - - # error: Actual argument variable length '1' does not match the expected - # length '77' - PR95214.f90 - - # error: Dimension 1 of left operand has extent [m], but right operand has - # extent [n] - PR94289.f90 - assumed_rank_2.f90 - assumed_rank_22.f90 - assumed_rank_bounds_2.f90 - assumed_rank_bounds_3.f90 - assumed_rank_17.f90 - assumed_rank_bounds_1.f90 - - # error: DIM=3 dimension is out of range for rank-1 array - assumed_rank_3.f90 - assumed_rank_7.f90 - - # error: Subscript [m] is less than lower bound [n] for dimension [d] of - # array - bounds_check_11.f90 - bounds_check_fail_1.f90 - - # error: Assumed-size polymorphic array may not be associated with a - # monomorphic dummy argument - class_dummy_7.f90 - - # error: '[var]' is an external procedure without the EXTERNAL attribute in - # a scope with IMPLICIT NONE(EXTERNAL) - assumed_type_13.f90 - bind-c-contiguous-3.f90 - bind-c-intent-out.f90 - - # error: '[SYM]' may not appear in NULLIFY because '[SYM2]' is an INTENT(IN) - # dummy argument - pointer_intent_1.f90 - - # error: Assumed type argument requires an explicit interface - assumed_type_2a.f90 - - # error: No intrinsic or user-defined ASSIGNMENT(=) matches operand types - # 'TYPE 1' and 'TYPE 2' - dec-comparison-complex_1.f90 - dec-comparison-complex_2.f90 - dec-comparison-int_1.f90 - dec-comparison-int_2.f90 - dec-comparison-real_1.f90 - dec-comparison-real_2.f90 - dec_char_conversion_in_assignment_1.f90 - dec_char_conversion_in_assignment_2.f90 - dec_char_conversion_in_assignment_3.f90 - dec_char_conversion_in_assignment_5.f90 - dec_char_conversion_in_assignment_6.f90 - dec_char_conversion_in_assignment_7.f90 - hollerith2.f90 - hollerith4.f90 - hollerith6.f90 - pdt_23.f03 - - # error: Operands of .AND. must be LOGICAL; have 'TYPE 1' and 'TYPE 2' - dec_bitwise_ops_1.f90 - dec_bitwise_ops_2.f90 - - # error: A BIND(C) object must have an interoperable type - bind-c-contiguous-1.f90 - bind-c-contiguous-4.f90 - bind-c-contiguous-5.f90 - bind_c_char_10.f90 - char4_decl-2.f90 - - # error: A dim= argument is required for 'size' when the array is - # assumed-size - class_dummy_6.f90 - - # error: No explicit type declared for '[sym]' - PR49268.f90 - boz_complex_3.f90 - char_result_19.f90 - chmod_1.f90 - chmod_2.f90 - chmod_3.f90 - coarray_16.f90 - cray_pointers_7.f90 - dec_math.f90 - dec_math_5.f90 - fmt_en.f90 - fmt_en_rd.f90 - fmt_en_rn.f90 - fmt_en_ru.f90 - fmt_en_rz.f90 - fmt_f0_2.f90 - fmt_f0_3.f90 - fmt_g0_6.f08 - fmt_g0_7.f08 - fmt_pf.f90 - interface_12.f90 - result_in_spec_1.f90 - round_4.f90 - unlimited_polymorphic_13.f90 - - # error: Shape of initialized object 'foo' must be constant - pdt_26.f03 - - # error: Kind type parameters of allocatable object must be the same as the - # corresponding ones of SOURCE or MOLD expression - pdt_3.f03 - - # error: [sym] is not a variable - cray_pointers_8.f90 - - # error: Typeless (BOZ) not allowed for 'a=' argument - boz_float_3.f90 - - # error: Actual argument for 'i=' has bad type 'LOGICAL(1)' - and_or_xor.f90 - - # error: Argument of ALLOCATED() must be an ALLOCATABLE object or component - select_rank_1.f90 - - # error: 'coarray=' argument must have corank > 0 for intrinsic 'lcobound' - bound_simplification_4.f90 - bound_simplification_5.f90 - - # error: Coarray argument requires an explicit interface - coarray_15.f90 - - # error: 'mask=' argument has unacceptable rank 0 - coarray_13.f90 - - # error: 'a' has corank 0, but coindexed reference has 1 cosubscripts - coindexed_1.f90 - - # error: 'temp_node_t' is PRIVATE in 'temp_node' - constructor_6.f90 - - # error: Invalid CONVERT value 'swap' - convert_2.f90 - - # error: Type of Cray pointee 'dpte1' is a non-sequence derived type - cray_pointers_2.f90 - - # error: DATA statement value could not be converted to the type '[TYPE]' - dec_char_conversion_in_data_1.f90 - dec_char_conversion_in_data_2.f90 - dec_char_conversion_in_data_4.f90 - dec_char_conversion_in_data_5.f90 - dec_char_conversion_in_data_6.f90 - hollerith.f90 - - # error: Duplicate UNIT specifier - dec_io_5.f90 - dec_io_6.f90 - - # error: cannot process subprogram that was already processed - binding_label_tests_12.f03 - - # error: Value of named constant cannot be computed as a constant value - array_initializer_1.f90 - pr83874.f90 - - # error: In an elemental procedure reference with at least one array argument, - # actual argument that corresponds to an INTENT(OUT) or INTENT(INOUT) dummy - # argument must be an array - impure_1.f08 - - # error: Invalid STATUS value - iomsg_1.f90 - iostat_2.f90 - pr20163-2.f - - # error: '[SYM]' was not declared a separate module procedure - class_assign_1.f08 - submodule_31.f08 - - # error: No operator .XOR. defined for LOGICAL(4) and LOGICAL(4) - dec_logical_xor_1.f90 - - # error: Value in structure constructor of type 'education' is incompatible - # with component - extends_2.f03 - - # error: If a POINTER or ALLOCATABLE dummy or actual argument is polymorphic, - # both must be so - finalize_12.f90 - - # error: Must be a scalar value, but is a rank-1 array - impl_do_var_data.f90 - - # error: Unlimited format item list must contain a data edit descriptor - fmt_error_11.f03 - - # error: Expected '[FMT]' edit descriptor '.[SOMETHING]' value - fmt_missing_period.f - fmt_missing_period_2.f - - # error: Positive scale factor k (from kP) and width d in a 'E' edit - # descriptor must satisfy 'k < d+2' - fmt_zero_digits.f90 - - # error: '[SYM]' is not a known intrinsic procedure - gamma_1.f90 - specifics_1.f90 - - # error: Keyword may not appear in a reference to a procedure with an implicit - # interface - getenv_1.f90 - - # error: Cannot use-associate 'x'; it is already declared in this scope - iso_fortran_env_3.f90 - - # error: Must be a constant value - matmul_17.f90 - matmul_8.f03 - pr67140.f90 - pr89077.f90 - substr_simplify.f90 - transfer_simplify_12.f90 - zero_sized_9.f90 - - # error: Subscript 3 is greater than upper bound 2 for dimension 1 of array - module_procedure_4.f90 - - # error: '[SYM]' is not an object that can appear in an expression - namelist_print_1.f - - # error: '[SYM]' is already declared in this scoping unit - namelist_use.f90 - - # error: Actual argument type '[TYPE1]' is not compatible with dummy argument - # type '[TYPE2]' - no_arg_check_2a.f90 - pdt_2.f03 - - # error: '[SYM]' not found in module 'iso_fortran_env' - overload_3.f90 - pr66311.f90 - proc_ptr_comp_6.f90 - proc_ptr_comp_pass_2.f90 - quad_2.f90 - quad_3.f90 - team_change_1.f90 - team_end_1.f90 - team_form_1.f90 - team_number_1.f90 - unlimited_polymorphic_31.f03 - - # error: VOLATILE attribute was already specified - volatile10.f90 - - # error: 'mask=' argument has unacceptable rank 0 - pdt_20.f03 - - # error: literal is too large - pr92629.f90 - - # error: In assignment to procedure pointer 'funct', the target is not a - # procedure or procedure pointer - proc_ptr_47.f90 - - # error: '[SYM]' may not be a procedure as it is in a COMMON block - proc_ptr_common_1.f90 - - # error: Procedure pointer may not be ELEMENTAL - proc_ptr_comp_45.f90 - - # error: Procedure pointer associated with result of reference to function - # that is an incompatible procedure pointer - proc_ptr_result_1.f90 - - # error: Actual argument associated with procedure pointer dummy argument - # must be a POINTER unless INTENT(IN) - proc_ptr_result_6.f90 - - # error: Must have '[TYPE1]' type, but is '[TYPE2]' - real_index_1.f90 - - # error: error: Invalid CONVERT value - record_marker_1.f90 - record_marker_3.f90 - unf_io_convert_1.f90 - unf_io_convert_2.f90 - unf_io_convert_3.f90 - - # error: Implicit declaration of function has a different result type than in - # previous declaration - recursive_check_14.f90 - - # error: Result of pure function may not have an impure FINAL subroutine - finalize_51.f90 - - # -------------------------------------------------------------------------- - # - # These tests are skipped for a variety of reasons that don't fit well in - # any of the previous categories - - # The file char_result_mod_19.f90 has the { dg-do run } annotation, but it is - # not actually the main test file. That would be char_result_19.f90 which is - # listed as a dependency of char_result_mod_19.f90. This seems to be - # backwards. - char_result_mod_19.f90 - - # The test calls the subroutine should_not_fail(). The intention seems to be - # for the call to should_not_fail() to be dead-code eliminated. It is guarded - # by a conditional with a call to selected_real_kind() that should evaluate - # to false at compile-time. This is not being eliminated resulting in an - # "undefined symbol" error at link time. - # - selected_real_kind_2.f90 - - # For some reason, when building these tests, LLVM-IR is generated instead of - # of an object file. - save_6.f90 - shape_9.f90 - - # These tests seem to hang at runtime. Not sure if this indicates a problem - # with flang or with the tests themselves. - # - # FIXME: This should be checked and this comment should either be updated to - # reflect what the actual problem is with the tests or the tests should be - # removed from this list. - namelist_42.f90 - namelist_43.f90 - - # -------------------------------------------------------------------------- - # - # These tests are skipped because flang cannot parse these files. This could - # be because of the use of non-standard syntax, but they will need to be - # checked to be sure. - # - auto_in_equiv_1.f90 - auto_in_equiv_2.f90 - automatic_1.f90 - dec-comparison-character_1.f90 - dec-comparison-character_2.f90 - dec_exp_1.f90 - dec_format_empty_item_1.f - dec_format_empty_item_2.f - dec_io_1.f90 - dec_parameter_1.f - dec_parameter_2.f90 - dec_static_1.f90 - dec_static_2.f90 - dec_structure_10.f90 - dec_structure_5.f90 - dec_structure_7.f90 - fmt_error_10.f - fmt_error_9.f - fmt_t_9.f - substr_9.f90 - - # -------------------------------------------------------------------------- - # - # These tests are skipped because they cause flang to crash. - - # Assertion `ty.isa()' failed - c_assoc.f90 - c_f_pointer_complex.f03 - c_f_pointer_logical.f03 - c_f_pointer_shape_tests_2.f03 - c_f_pointer_shape_tests_4.f03 - deferred_character_8.f90 - equiv_7.f90 - iso_c_binding_rename_1.f03 - test_only_clause.f90 -) - -# These tests fail at runtime when they should pass. are likely a result of -# unimplemented features in the runtime, but they could also be bugs. If any -# will never pass with flang (if they use unsupported extensions for instance), -# they should be added to the Unsupported list. These are not enabled by default -# to ensure that the default configuration of the test suite does not fail. -# Tests should be removed from this list when the cause of their failure is -# addressed. -file(GLOB Failing CONFIGURE_DEPENDS - Wall.f90 - Wno-all.f90 - abort_shouldfail.f90 - achar_6.F90 - advance_5.f90 - advance_6.f90 - aliasing_dummy_5.f90 - allocate_alloc_opt_15.f90 - allocate_alloc_opt_3.f90 - allocate_deferred_char_scalar_1.f03 - allocate_zerosize_3.f - arrayio_1.f90 - arrayio_3.f90 - arrayio_5.f90 - arrayio_6.f90 - assign_2.f90 - auto_save_2.f90 - backslash_2.f90 - backslash_3.f - backspace_2.f - backspace_6.f - bessel_7.f90 - bounds_check_19.f90 - boz_15.f90 - c_char_tests.f03 - char4_iunit_1.f03 - char4_iunit_2.f03 - check_bits_1.f90 - check_bits_2.f90 - continuation_12.f90 - continuation_13.f90 - continuation_1.f90 - cr_lf.f90 - cray_pointers_10.f90 - cray_pointers_5.f90 - cshift_bounds_3.f90 - cshift_bounds_4.f90 - cshift_large_1.f90 - data_char_1.f90 - data_char_3.f90 - deallocate_alloc_opt_3.f90 - deallocate_stat_2.f90 - deallocate_stat.f90 - dependency_45.f90 - dim_sum_1.f90 - dim_sum_2.f90 - dim_sum_3.f90 - direct_io_7.f90 - do_check_1.f90 - dollar_edit_descriptor_4.f - elemental_dependency_1.f90 - endfile_3.f90 - eoshift_bounds_1.f90 - eoshift_large_1.f90 - error_format.f90 - error_stop_1.f08 - f2003_io_5.f03 - findloc_6.f90 - fmt_error_4.f90 - fmt_error_5.f90 - fmt_f_default_field_width_1.f90 - fmt_f_default_field_width_2.f90 - fmt_g0_1.f08 - fmt_g_default_field_width_1.f90 - fmt_g_default_field_width_2.f90 - fmt_g.f - fmt_i_default_field_width_1.f90 - fmt_i_default_field_width_2.f90 - fmt_l.f90 - fmt_zero_width.f90 - fold_nearest.f90 - forall_12.f90 - goto_2.f90 - hollerith8.f90 - init_flag_1.f90 - init_flag_2.f90 - init_flag_3.f90 - init_flag_4.f90 - init_flag_5.f90 - init_flag_6.f90 - init_flag_7.f90 - init_flag_9.f90 - inline_matmul_15.f90 - inquire_13.f90 - inquire_15.f90 - inquire_5.f90 - inquire_9.f90 - inquire_internal.f90 - inquire_recl_f2018.f90 - inquire_size.f90 - integer_exponentiation_2.f90 - internal_dummy_2.f08 - internal_pack_3.f90 - internal_write_1.f90 - intrinsic_std_4.f90 - io_err_1.f90 - io_real_boz_3.f90 - io_real_boz.f90 - iostat_4.f90 - iostat_5.f90 - is_contiguous_3.f90 - large_real_kind_1.f90 - large_unit_1.f90 - list_directed_large.f90 - list_read_11.f90 - list_read_4.f90 - literal_character_constant_1_z.F - masklr_2.F90 - matmul_5.f90 - matmul_bounds_11.f90 - matmul_bounds_13.f90 - matmul_bounds_15.f - matmul_bounds_16.f - matmul_bounds_7.f90 - matmul_bounds_9.f90 - maxloc_2.f90 - maxloc_bounds_3.f90 - maxloc_bounds_6.f90 - maxloc_string_1.f90 - maxlocval_2.f90 - maxlocval_4.f90 - merge_bits_2.F90 - minloc_1.f90 - minlocval_1.f90 - minlocval_4.f90 - minmaxloc_10.f90 - minmaxloc_1.f90 - minmaxloc_3.f90 - minval_char_1.f90 - minval_char_3.f90 - minval_parameter_1.f90 - missing_optional_dummy_6.f90 - mod_large_1.f90 - mod_sign0_1.f90 - module_nan.f90 - multiple_allocation_1.f90 - multiple_allocation_3.f90 - mvbits_4.f90 - namelist_18.f90 - namelist_19.f90 - namelist_21.f90 - namelist_22.f90 - namelist_24.f90 - namelist_37.f90 - namelist_38.f90 - namelist_41.f90 - namelist_51.f90 - namelist_56.f90 - namelist_57.f90 - namelist_61.f90 - namelist_65.f90 - namelist_72.f - namelist_73.f90 - namelist_80.f90 - namelist_81.f90 - namelist_84.f90 - namelist_87.f90 - namelist_89.f90 - namelist_97.f90 - namelist_char_only.f90 - nan_2.f90 - nearest_1.f90 - nearest_3.f90 - negative_unit.f - negative_unit_int8.f - no_range_check_1.f90 - norm2_1.f90 - nosigned_zero_2.f90 - open_access_append_2.f90 - open_errors_2.f90 - open_errors_3.f90 - open_negative_unit_1.f90 - open_new_segv.f90 - open_status_2.f90 - pad_source_3.f - pad_source_4.f - pad_source_5.f - pointer_check_6.f90 - pr12884.f - pr17285.f90 - pr17286.f90 - pr17706.f90 - pr18210.f90 - pr19657.f - pr47757-3.f90 - pr47878.f90 - pr50069_1.f90 - pr59700.f90 - pr71523_2.f90 - pr96436_3.f90 - pr96436_4.f90 - pr96436_5.f90 - promotion_3.f90 - promotion_4.f90 - promotion.f90 - random_3.f90 - random_5.f90 - random_init_2.f90 - read_5.f90 - read_bang4.f90 - read_bang.f90 - read_comma.f - read_eof_3.f90 - read_eof_7.f90 - read_eof_all.f90 - read_legacy_comma.f90 - real4-10-real8-10.f90 - real4-10-real8-16.f90 - real4-10-real8-4.f90 - real4-10.f90 - real4-16-real8-10.f90 - real4-16-real8-16.f90 - real4-16-real8-4.f90 - real4-16.f90 - real4-8-real8-10.f90 - real4-8-real8-16.f90 - real4-8-real8-4.f90 - real4-8.f90 - real8-10.f90 - real8-16.f90 - real8-4.f90 - real_const_3.f90 - realloc_on_assign_11.f90 - recursive_check_7.f90 - repeat_1.f90 - reshape_order_1.f90 - reshape_order_2.f90 - reshape_order_3.f90 - reshape_order_4.f90 - round_3.f08 - selected_kind_1.f90 - short_circuiting_3.f90 - stop_shouldfail.f90 - streamio_11.f90 - streamio_13.f90 - streamio_17.f90 - streamio_4.f90 - system_clock_3.f08 - unf_io_convert_4.f90 - unf_read_corrupted_1.f90 - unf_short_record_1.f90 - unformatted_subrecord_1.f90 - unpack_bounds_2.f90 - unpack_bounds_3.f90 - utf8_1.f03 - utf8_2.f03 - widechar_5.f90 - widechar_8.f90 - widechar_IO_4.f90 - widechar_intrinsics_4.f90 - widechar_intrinsics_5.f90 - widechar_intrinsics_8.f90 - write_check.f90 - zero_sized_1.f90 - - # These tests fail at runtime on AArch64 (but pass on x86). Disable them - # anyway so the test-suite passes by default on AArch64. - entry_23.f - findloc_8.f90 -) - -list(APPEND UnsupportedTests "${Unsupported}") -list(APPEND UnimplementedTests "${Unimplemented}") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "${Failing}") - -# add_tests will find all files with known Fortran extensions, pick out the ones -# that correspond to the "main" file of the test and filter out the tests that -# are in TestsToSkip. -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests +# gfortran_add_compile_tests_from("${TESTS}") add_subdirectory(analyzer) add_subdirectory(asan) @@ -1866,11 +26,12 @@ add_subdirectory(goacc) add_subdirectory(goacc-gomp) add_subdirectory(gomp) +add_subdirectory(gomp/appendix-a) add_subdirectory(graphite) add_subdirectory(guality) add_subdirectory(ieee) -add_subdirectory(prof) add_subdirectory(lto) +add_subdirectory(prof) add_subdirectory(ubsan) add_subdirectory(vect) diff --git a/Fortran/gfortran/regression/DisabledFiles.cmake b/Fortran/gfortran/regression/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/DisabledFiles.cmake @@ -0,0 +1,1767 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# Some tests in the suite use non-standard features that are supported in +# gfortran but are not (and might never be) supported by flang. But if they are, +# they should be moved out of here. +file(GLOB UNSUPPORTED_FILES CONFIGURE_DEPENDS + # -------------------------------------------------------------------------- + # + # This tests the ability of gfortran to emit code with calling conventions + # compatible with g77 and f2c. These will probably never be relevant to + # flang. + f2c_4.f90 + value_4.f90 + + # -------------------------------------------------------------------------- + # + # These test/use GNU extensions that are not currently supported by Flang. + # + # TODO: Some of the tests may actually just use a GNU intrinsic during the + # process of testing some other functionality. It may be worthwhile to + # include a version elsewhere in this repo which tests that same functionality + # but without using any GNU extensions. + # + backtrace_1.f90 # backtrace + complex_intrinsic_1.f90 # complex + dec_io_2.f90 # fseek + dec_io_2a.f90 # fseek + fgetc_1.f90 # fgetc, fputc + fgetc_2.f90 # fgetc, fputc + fseek.f90 # fseek + ftell_1.f90 # ftell + ftell_2.f90 # ftell + ftell_3.f90 # ftell + inquire_10.f90 # getcwd + int_conv_1.f90 # int2, int8 + itime_idate_1.f # itime, idate + itime_idate_2.f # itime, idate + list_read_9.f90 # fputc + ltime_gmtime_1.f90 # time, ltime, gmtime + ltime_gmtime_2.f90 # time, ltime, gmtime + malloc_free_1.f90 # malloc, free + mclock.f90 # mclock, mclock8 + open_errors.f90 # chmod, getuid + open_new.f90 # unlink + secnds.f # secnds + secnds-1.f # secnds + stat_1.f90 # stat, fstat, lstat, getuid, getgid + stat_2.f90 # stat, fstat, lstat, getuid, getgid + transfer_array_intrinsic_2.f90 # rand +) + +# These tests are skipped because they hit a 'not yet implemented' assertion +# in flang and thus fail to compile. They should be removed from here when the +# corresponding feature is implemented. Eventually, this variable should be +# removed altogether once all the missing features are implemented. +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: assumed rank in procedure interface. + ISO_Fortran_binding_1.f90 + ISO_Fortran_binding_13.f90 + ISO_Fortran_binding_14.f90 + ISO_Fortran_binding_16.f90 + ISO_Fortran_binding_3.f90 + ISO_Fortran_binding_6.f90 + ISO_Fortran_binding_9.f90 + PR100029.f90 + PR100097.f90 + PR100098.f90 + PR100915.f90 + PR93963.f90 + PR94022.f90 + PR95196.f90 + PR96726.f90 + PR96727.f90 + PR96728.f90 + PR97046.f90 + assumed_rank_12.f90 + assumed_rank_18.f90 + assumed_rank_19.f90 + assumed_rank_20.f90 + assumed_type_9.f90 + interface_49.f90 + is_contiguous_2.f90 + pr84088.f90 + select_rank_5.f90 + sizeof_4.f90 + sizeof_6.f90 + + # unimplemented: procedure pointers + dummy_procedure_7.f90 + elemental_dependency_4.f90 + internal_dummy_3.f08 + optional_absent_7.f90 + optional_absent_8.f90 + pointer_check_1.f90 + pointer_check_2.f90 + pointer_check_3.f90 + pointer_check_4.f90 + pointer_init_10.f90 + pointer_init_4.f90 + pointer_init_5.f90 + pr78719_1.f90 + proc_ptr_1.f90 + proc_ptr_18.f90 + proc_ptr_21.f90 + proc_ptr_22.f90 + proc_ptr_23.f90 + proc_ptr_25.f90 + proc_ptr_26.f90 + proc_ptr_3.f90 + proc_ptr_5.f90 + proc_ptr_51.f90 + proc_ptr_comp_8.f90 + proc_ptr_comp_9.f90 + proc_ptr_result_3.f90 + + # unimplemented: procedure pointer results + pointer_check_5.f90 + proc_ptr_12.f90 + proc_ptr_result_7.f90 + + # unimplemented: procedure pointer arguments + proc_ptr_10.f90 + proc_ptr_19.f90 + proc_ptr_20.f90 + proc_ptr_36.f90 + proc_ptr_6.f90 + proc_ptr_7.f90 + proc_ptr_comp_2.f90 + submodule_30.f08 + + # unimplemented: procedure components + proc_ptr_48.f90 + proc_ptr_comp_1.f90 + proc_ptr_comp_11.f90 + proc_ptr_comp_13.f90 + proc_ptr_comp_14.f90 + proc_ptr_comp_18.f90 + proc_ptr_comp_19.f90 + proc_ptr_comp_29.f90 + proc_ptr_comp_34.f90 + proc_ptr_comp_5.f90 + structure_constructor_11.f90 + + # unimplemented: support for polymorphic types. + ISO_Fortran_binding_17.f90 + PR100120.f90 + PR100245.f90 + PR95331.f90 + alloc_comp_deep_copy_1.f03 + allocate_with_source_18.f03 + allocate_with_source_8.f08 + associate_18.f08 + associate_20.f03 + associate_8.f03 + alloc_comp_class_2.f90 + allocate_alloc_opt_10.f90 + allocate_with_source_26.f90 + associate_13.f90 + associate_48.f90 + associated_6.f90 + associated_target_4.f90 + character_workout_1.f90 + character_workout_4.f90 + class_1.f03 + class_18.f03 + class_26.f03 class_35.f90 + class_48.f90 + class_46.f03 + class_6.f03 + class_62.f90 + class_63.f90 + class_66.f90 + class_allocate_1.f03 + class_allocate_13.f90 + class_allocate_18.f90 + class_allocate_19.f03 + class_allocate_21.f90 + class_allocate_22.f90 + class_allocate_23.f08 + class_allocate_25.f90 + class_allocate_3.f03 + class_allocate_4.f03 + class_allocate_5.f90 + class_allocate_6.f03 + class_array_1.f03 + class_array_15.f03 + class_array_14.f90 + class_array_2.f03 + class_array_20.f03 + class_array_3.f03 + class_array_8.f03 + class_dummy_1.f03 + class_nameclash.f90 + class_result_5.f90 + class_result_6.f90 + class_to_type_1.f03 + class_to_type_4.f90 + coarray_allocate_2.f08 + coarray_allocate_3.f08 + coarray_allocate_5.f08 + dependency_53.f90 + dependency_60.f90 + dynamic_dispatch_10.f03 + elemental_optional_args_5.f03 + exit_3.f08 + extends_type_of_1.f03 + extends_type_of_2.f03 + finalize_37.f90 + implicit_class_1.f90 + move_alloc_13.f90 + move_alloc_14.f90 + move_alloc_2.f90 + move_alloc_5.f90 + pointer_array_5.f90 + pointer_array_8.f90 + pointer_array_component_3.f90 + pointer_check_14.f90 + pointer_intent_4.f90 + pr100551.f90 + pr108010.f90 + pr48958.f90 + pr78092.f90 + pr86328.f90 + pr86760.f90 + pr94397.F90 + proc_ptr_52.f90 + proc_ptr_comp_pass_3.f90 + realloc_on_assign_27.f08 + realloc_on_assign_31.f90 + same_type_as_2.f03 + select_type_13.f03 + select_type_14.f03 + select_type_19.f03 + select_type_2.f03 + select_type_26.f03 + select_type_27.f03 + select_type_3.f03 + select_type_35.f03 + select_type_37.f03 + select_type_39.f03 + select_type_5.f03 + select_type_6.f03 + select_type_7.f03 + select_type_8.f03 + select_type_4.f90 + select_type_42.f90 + select_type_44.f90 + select_type_48.f90 + select_type_49.f90 + select_type_50.f90 + storage_size_1.f08 + storage_size_3.f08 + structure_constructor_13.f03 + transfer_class_3.f90 + type_to_class_1.f03 + type_to_class_2.f03 + type_to_class_3.f03 + type_to_class_5.f03 + unlimited_polymorphic_14.f90 + unlimited_polymorphic_17.f90 + unlimited_polymorphic_20.f90 + unlimited_polymorphic_21.f90 + unlimited_polymorphic_22.f90 + unlimited_polymorphic_24.f03 + unlimited_polymorphic_3.f03 + unlimited_polymorphic_30.f03 + unlimited_polymorphic_32.f03 + unlimited_polymorphic_5.f90 + unlimited_polymorphic_6.f90 + + # unimplemented: BIND (C) internal procedure. + ISO_Fortran_binding_19.f90 + PR93308.f90 + array_reference_3.f90 + bind_c_char_2.f90 + bind_c_char_3.f90 + bind_c_char_4.f90 + bind_c_char_5.f90 + internal_dummy_4.f08 + + # unimplemented: BIND(C) module variable linkage + bind_c_dts.f90 + bind_c_vars.f90 + global_vars_c_init.f90 + implicit_pure_5.f90 + proc_ptr_8.f90 + + # unimplemented: character array expression temp with dynamic length. + actual_array_constructor_2.f90 + array_constructor_17.f90 + associate_35.f90 + assumed_charlen_arg_1.f90 + assumed_charlen_sharing.f90 + char_length_7.f90 + char_result_13.f90 + deferred_character_36.f90 + mapping_3.f90 + transfer_resolve_1.f90 + + # unimplemented: allocatable component in structure constructor + alloc_comp_constructor_7.f90 + + # unimplemented: gather rhs LEN parameters in assignment to allocatable + allocate_assumed_charlen_4.f90 + allocate_error_5.f90 + char_length_20.f90 + char_length_21.f90 + deferred_character_1.f90 + deferred_character_14.f90 + deferred_character_2.f90 + deferred_character_22.f90 + deferred_character_34.f90 + deferred_character_4.f90 + deferred_character_7.f90 + dependency_50.f90 + dependency_51.f90 + elemental_function_3.f90 + widechar_11.f90 + + # unimplemented: passing dynamically optional argument to elemental procedures + bounds_check_9.f90 + bounds_check_fail_2.f90 + elemental_optional_args_2.f90 + elemental_optional_args_3.f90 + elemental_optional_args_4.f90 + elemental_optional_args_6.f90 + elemental_optional_args_7.f90 + generic_31.f90 + optional_absent_2.f90 + + # unimplemented: BOZ + boz_bge.f90 + + # unimplemented: coarray allocation + associate_37.f90 + + # unimplemented: coarray in procedure interface + coarray_allocate_4.f08 + class_optional_1.f90 + class_optional_2.f90 + coarray_41.f90 + + # unimplemented: coarray reference + coarray_lib_comm_1.f90 + + # unimplemented: CriticalConstruct implementation + coarray_2.f90 + + # unimplemented: intrinsic: this_image + coarray_40.f90 + coarray_stat_2.f90 + random_init_3.f90 + random_init_4.f90 + random_init_5.f90 + random_init_6.f90 + + # unimplemented: intrinsic: co_broadcast + coarray_collectives_17.f90 + + # unimplemented: intrinsic: atan + atan2_1.f90 + + # unimplemented: intrinsic: erfc_scaled + erfc_scaled_1.f90 + + # unimplemented: intrinsic: execute_command_line + execute_command_line_2.f90 + execute_command_line_3.f90 + + # unimplemented: intrinsic: failed_images + coarray_failed_images_1.f08 + + # unimplemented: intrinsic: image_status + coarray_image_status_1.f08 + + # unimplemented: intrinsic: stopped_images + coarray_stopped_images_1.f08 + + # unimplemented: assignment to pointer result of function reference + ptr-func-3.f90 + ptr_func_assign_5.f08 + + # unimplemented: intrinsic: selected_char_kind + selected_char_kind_1.f90 + selected_char_kind_4.f90 + + # unimplemented: intrinsic: min and max for CHARACTER + minmax_char_1.f90 + widechar_intrinsics_9.f90 + zero_length_2.f90 + + # unimplemented: %VAL() intrinsic for arguments + c_by_val_1.f + c_by_val_5.f90 + pointer_check_12.f90 + + # unimplemented: parameterized derived types + dec_type_print_2.f03 + pdt_1.f03 + pdt_10.f03 + pdt_22.f03 + pdt_25.f03 + pdt_7.f03 + + # unimplemented: host associated derived type with length parameters + pdt_31.f03 + + # unimplemented: derived type components with non default lower bounds + structure_constructor_1.f03 + + # unimplemented: asynchronous transfers not implemented in runtime + f2003_inquire_1.f03 + f2003_io_1.f03 + + # unimplemented: support for UNION + dec_init_1.f90 + dec_init_3.f90 + dec_init_4.f90 + dec_structure_22.f90 + dec_union_1.f90 + dec_union_2.f90 + dec_union_3.f90 + dec_union_4.f90 + dec_union_5.f90 + dec_union_6.f90 + + # unimplemented: no math runtime available for '[SYM]' + large_integer_kind_2.f90 + large_real_kind_2.F90 + large_real_kind_3.F90 + large_real_kind_3.F90 + large_real_kind_form_io_1.f90 + norm2_3.f90 + pr96711.f90 +) + +# These tests are skipped because they cannot be compiled. Unlike the +# UnimplementedTests list, they do not fail with a "not yet implemented" +# assertion. The root cause for the failure could very well be one of those, +# but with the specific failure mode that is observed, it is not clear what +# missing feature is causing the compile-failure for these tests. +# If any of these tests use features that will never be supported, they should +# be moved to the UnsupportedTests list. If the cause of the failure of any +# tests in this list is addressed, they should be removed from here. +# +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # -------------------------------------------------------------------------- + # + # These tests are skipped because they trigger internal compiler errors. + # + + # error: Unexpected typeless constant value + actual_array_constructor_1.f90 + actual_array_offset_1.f90 + actual_pointer_function_1.f90 + aliasing_dummy_1.f90 + aliasing_dummy_4.f90 + allocatable_function_10.f90 + allocatable_function_9.f90 + allocatable_scalar_10.f90 + allocatable_scalar_13.f90 + allocatable_scalar_3.f90 + allocatable_scalar_9.f90 + allocate_alloc_opt_6.f90 + allocate_class_3.f90 + allocate_derived_5.f90 + allocate_error_6.f90 + allocate_with_mold_1.f90 + allocate_with_mold_3.f90 + allocate_with_source_15.f03 + allocate_with_source_16.f90 + allocate_with_source_22.f03 + allocate_with_source_23.f03 + allocate_with_source_24.f90 + allocate_with_source_5.f90 + allocate_with_source_6.f90 + allocate_with_source_7.f08 + allocate_with_source_9.f08 + alloc_comp_assign_10.f90 + alloc_comp_assign_11.f90 + alloc_comp_assign_12.f03 + alloc_comp_assign_13.f08 + alloc_comp_assign_14.f08 + alloc_comp_assign_15.f03 + alloc_comp_assign_16.f03 + alloc_comp_assign_1.f90 + alloc_comp_assign_2.f90 + alloc_comp_assign_3.f90 + alloc_comp_assign_4.f90 + alloc_comp_assign_5.f90 + alloc_comp_assign_6.f90 + alloc_comp_assign_7.f90 + alloc_comp_assign_8.f90 + alloc_comp_assign_9.f90 + alloc_comp_auto_array_1.f90 + alloc_comp_auto_array_2.f90 + alloc_comp_basics_1.f90 + alloc_comp_basics_2.f90 + alloc_comp_basics_5.f90 + alloc_comp_bounds_1.f90 + alloc_comp_class_1.f90 + alloc_comp_class_3.f03 + alloc_comp_class_4.f03 + alloc_comp_class_5.f03 + alloc_comp_constructor_1.f90 + alloc_comp_constructor_2.f90 + alloc_comp_constructor_3.f90 + alloc_comp_constructor_4.f90 + alloc_comp_constructor_5.f90 + alloc_comp_constructor_6.f90 + alloc_comp_deep_copy_2.f03 + alloc_comp_deep_copy_3.f03 + alloc_comp_default_init_1.f90 + alloc_comp_default_init_2.f90 + alloc_comp_initializer_1.f90 + alloc_comp_initializer_4.f03 + alloc_comp_misc_1.f90 + alloc_comp_optional_1.f90 + alloc_comp_result_1.f90 + alloc_comp_result_3.f90 + alloc_comp_scalar_1.f90 + alloc_comp_transformational_1.f90 + alloc_deferred_comp_1.f90 + array_constructor_32.f90 + array_constructor_type_14.f03 + array_constructor_type_8.f03 + arrayio_11.f90 + arrayio_derived_1.f90 + array_memcpy_5.f90 + array_reference_2.f90 + assign_func_dtcomp_1.f90 + associate_1.f03 + associate_24.f90 + associate_27.f90 + associate_28.f90 + associate_32.f03 + associate_38.f90 + associate_43.f90 + associate_46.f90 + associate_47.f90 + associate_60.f90 + associate_9.f03 + associated_target_3.f90 + associated_target_6.f03 + associated_target_7.f90 + assumed_rank_21.f90 + bind_c_coms.f90 + bind_c_dts_2.f03 + bind_c_usage_10.f03 + bind_c_usage_16.f03 + bind_c_usage_24.f90 + bind_c_usage_33.f90 + binding_c_table_15_1.f03 + binding_label_tests_16.f03 + binding_label_tests_33.f90 + block_13.f08 + blockdata_11.f90 + bound_1.f90 + bound_5.f90 + bounds_check_17.f90 + bounds_check_5.f90 + bounds_check_8.f90 + c_char_tests_2.f03 + c_char_tests_3.f90 + c_f_pointer_shape_tests_5.f90 + c_f_pointer_tests_4.f90 + c_f_pointer_tests.f90 + c_funloc_tests_3.f03 + c_funloc_tests_4.f03 + c_funloc_tests.f03 + c_funptr_1.f90 + c_funptr_1_mod.f90 + char4-subscript.f90 + character_array_constructor_1.f90 + char_array_structure_constructor.f90 + char_assign_1.f90 + char_length_15.f90 + char_pointer_comp_assign.f90 + char_result_5.f90 + char_result_6.f90 + char_type_len.f90 + c_kind_int128_test2.f03 + c_kind_params.f90 + class_19.f03 + class_25.f03 + class_40.f03 + class_65.f90 + class_67.f90 + class_70.f03 + class_alias.f90 + class_allocate_11.f03 + class_allocate_12.f90 + class_allocate_14.f90 + class_allocate_15.f90 + class_allocate_20.f90 + class_array_16.f90 + class_array_21.f03 + class_array_23.f03 + class_array_7.f03 + class_array_9.f03 + class_assign_4.f90 + class_defined_operator_1.f03 + class_defined_operator_2.f03 + class_dummy_2.f03 + class_result_10.f90 + class_result_1.f03 + class_result_9.f90 + class_to_type_3.f03 + c_loc_test_20.f90 + c_loc_test.f90 + c_loc_tests_2.f03 + coarray_allocate_10.f08 + coarray_allocate_6.f08 + coarray_allocate_7.f08 + coarray_allocate_8.f08 + coarray_allocate_9.f08 + coarray_alloc_comp_1.f08 + coarray_alloc_comp_2.f08 + coarray_alloc_comp_3.f08 + coarray_alloc_comp_6.f08 + coarray_alloc_comp_7.f08 + coarray_alloc_comp_8.f08 + coarray_lib_alloc_4.f90 + coarray_poly_9.f90 + coarray_ptr_comp_1.f08 + coarray_ptr_comp_2.f08 + coarray_send_by_ref_1.f08 + com_block_driver.f90 + constructor_2.f90 + contained_module_proc_1.f90 + c_ptr_tests_10.f03 + c_ptr_tests_14.f90 + c_ptr_tests_19.f90 + c_ptr_tests_7.f03 + c_ptr_tests_8.f03 + c_ptr_tests_9.f03 + c_ptr_tests.f03 + cshift_2.f90 + cshift_nan_1.f90 + c_sizeof_1.f90 + c_sizeof_5.f90 + c_size_t_test.f03 + data_derived_1.f90 + data_stmt_pointer.f90 + dec_init_2.f90 + dec_structure_18.f90 + dec_structure_1.f90 + dec_structure_2.f90 + dec_structure_25.f90 + dec_structure_3.f90 + dec_structure_4.f90 + default_initialization_5.f90 + deferred_character_10.f90 + deferred_character_11.f90 + deferred_character_12.f90 + deferred_character_13.f90 + deferred_character_23.f90 + deferred_character_25.f90 + deferred_character_28.f90 + deferred_character_3.f90 + deferred_character_5.f90 + deferred_character_6.f90 + deferred_type_component_1.f90 + deferred_type_component_2.f90 + deferred_type_component_3.f90 + dependency_22.f90 + dependency_23.f90 + dependency_24.f90 + dependency_39.f90 + dependency_55.f90 + der_array_1.f90 + der_array_io_1.f90 + der_array_io_2.f90 + derived_comp_array_ref_1.f90 + derived_comp_array_ref_2.f90 + derived_comp_array_ref_3.f90 + derived_comp_array_ref_4.f90 + derived_comp_array_ref_7.f90 + derived_constructor_comps_1.f90 + derived_constructor_comps_4.f90 + derived_constructor_comps_5.f90 + derived_constructor_comps_6.f90 + derived_constructor_comps_7.f90 + derived_external_function_1.f90 + derived_init_3.f90 + derived_init_5.f90 + der_ptr_component_2.f90 + dtio_10.f90 + dtio_12.f90 + dtio_14.f90 + dtio_15.f90 + dtio_16.f90 + dtio_17.f90 + dtio_19.f90 + dtio_1.f90 + dtio_24.f90 + dtio_25.f90 + dtio_26.f03 + dtio_27.f90 + dtio_28.f03 + dtio_2.f90 + dtio_30.f03 + dtio_31.f03 + dtio_32.f03 + dtio_33.f90 + dtio_34.f90 + dtio_3.f90 + dtio_4.f90 + dtio_7.f90 + dtio_8.f90 + dtio_9.f90 + dynamic_dispatch_11.f03 + dynamic_dispatch_4.f03 + dynamic_dispatch_5.f03 + dynamic_dispatch_6.f03 + dynamic_dispatch_7.f03 + dynamic_dispatch_8.f03 + dynamic_dispatch_9.f03 + elemental_assignment_1.f90 + elemental_dependency_5.f90 + elemental_dependency_6.f90 + elemental_subroutine_10.f90 + elemental_subroutine_11.f90 + elemental_subroutine_2.f90 + elemental_subroutine_3.f90 + entry_13.f90 + entry_16.f90 + equiv_constraint_4.f90 + extends_4.f03 + finalize_13.f90 + finalize_17.f90 + finalize_25.f90 + finalize_31.f90 + finalize_33.f90 + finalize_36.f90 + finalize_38.f90 + finalize_38a.f90 + finalize_50.f90 + finalize_52.f90 + fmt_nonchar_2.f90 + forall_1.f90 + func_assign_3.f90 + func_derived_1.f90 + func_derived_2.f90 + func_derived_3.f90 + func_derived_4.f90 + func_result_6.f90 + function_kinds_1.f90 + generic_15.f90 + generic_23.f03 + implied_do_io_1.f90 + import4.f90 + import.f90 + init_flag_15.f03 + inline_matmul_1.f90 + inline_matmul_9.f90 + inquiry_type_ref_5.f90 + intent_optimize_10.f90 + intent_out_14.f90 + interface_assignment_2.f90 + internal_pack_13.f90 + internal_pack_14.f90 + internal_pack_1.f90 + internal_pack_8.f90 + intrinsic_pack_1.f90 + intrinsic_spread_1.f90 + intrinsic_unpack_1.f90 + iso_c_binding_rename_2.f03 + ISO_Fortran_binding_10.f90 + ISO_Fortran_binding_11.f90 + ISO_Fortran_binding_12.f90 + ISO_Fortran_binding_18.f90 + ISO_Fortran_binding_5.f90 + ISO_Fortran_binding_7.f90 + ISO_Fortran_binding_8.f90 + iso_fortran_binding_uint8_array.f90 + logical_temp_io.f90 + logical_temp_io_kind8.f90 + module_procedure_6.f90 + module_read_2.f90 + move_alloc_15.f90 + move_alloc_16.f90 + move_alloc_4.f90 + multiple_allocation_2.f90 + mvbits_7.f90 + mvbits_8.f90 + namelist_14.f90 + namelist_52.f90 + namelist_54.f90 + namelist_55.f90 + namelist_58.f90 + namelist_60.f90 + namelist_66.f90 + namelist_69.f90 + namelist_70.f90 + namelist_71.f90 + namelist_77.f90 + namelist_79.f90 + namelist_82.f90 + namelist_85.f90 + nested_allocatables_1.f90 + nested_modules_3.f90 + null_9.f90 + nullify_3.f90 + optional_class_1.f90 + overload_1.f90 + parameter_array_init_8.f90 + pdt_11.f03 + pdt_12.f03 + pdt_13.f03 + pdt_14.f03 + pdt_27.f03 + pdt_28.f03 + pointer_array_11.f90 + pointer_array_1.f90 + pointer_array_3.f90 + pointer_array_4.f90 + pointer_array_6.f90 + pointer_array_7.f90 + pointer_array_component_1.f90 + pointer_assign_14.f90 + pointer_assign_15.f90 + pointer_check_11.f90 + pointer_init_1.f90 + pointer_init_8.f90 + pointer_remapping_10.f90 + PR100132.f90 + PR100136.f90 + PR100911.f90 + pr100950.f90 + pr105205.f90 + pr106731.f90 + pr106918.f90 + pr107872.f90 + pr16938.f90 + pr17612.f90 + pr18392.f90 + pr19928-2.f90 + pr32627.f03 + pr35983.f90 + pr43808.f90 + pr43866.f90 + pr47008.f03 + pr55086_aliasing_dummy_4_tfat.f90 + pr62125.f90 + pr64230.f90 + pr65504.f90 + pr69955.f90 + pr71764.f90 + pr84155.f90 + pr84523.f90 + pr86322_3.f90 + pr88611.f90 + pr92050.f90 + pr93685_1.f90 + pr99602b.f90 + print_c_kinds.f90 + proc_decl_17.f90 + proc_decl_2.f90 + proc_ptr_comp_12.f90 + proc_ptr_comp_15.f90 + proc_ptr_comp_16.f90 + proc_ptr_comp_17.f90 + proc_ptr_comp_23.f90 + proc_ptr_comp_47.f90 + proc_ptr_comp_pass_1.f90 + proc_ptr_comp_pass_5.f90 + ptr_func_assign_1.f08 + ptr_func_assign_3.f08 + read_dir.f90 + realloc_on_assign_16.f90 + realloc_on_assign_17.f90 + realloc_on_assign_23.f90 + realloc_on_assign_28.f90 + realloc_on_assign_2.f03 + realloc_on_assign_32.f90 + realloc_on_assign_3.f03 + realloc_on_assign_9.f90 + recursive_alloc_comp_1.f08 + recursive_alloc_comp_2.f08 + recursive_alloc_comp_3.f08 + recursive_alloc_comp_4.f08 + recursive_check_16.f90 + repack_arrays_1.f90 + reshape.f90 + reshape_transpose_1.f90 + reshape_zerosize_3.f90 + same_type_as_3.f03 + select_type_15.f03 + select_type_36.f03 + select_type_43.f90 + simplify_cshift_1.f90 + sizeof.f90 + spread_scalar_source.f90 + spread_simplify_1.f90 + structure_constructor_14.f90 + structure_constructor_2.f03 + submodule_18.f08 + submodule_32.f08 + submodule_6.f08 + submodule_7.f08 + subref_array_pointer_1.f90 + subref_array_pointer_2.f90 + subref_array_pointer_4.f90 + substr_alloc_string_comp_1.f90 + transfer_assumed_size_1.f90 + transfer_simplify_10.f90 + transfer_simplify_1.f90 + transfer_simplify_2.f90 + trim_optimize_5.f90 + typebound_assignment_5a.f03 + typebound_assignment_6.f03 + typebound_assignment_7.f90 + typebound_call_10.f03 + typebound_call_13.f03 + typebound_call_17.f03 + typebound_call_18.f03 + typebound_call_19.f03 + typebound_call_1.f03 + typebound_call_20.f03 + typebound_call_2.f03 + typebound_call_3.f03 + typebound_call_6.f03 + typebound_generic_3.f03 + typebound_generic_4.f03 + typebound_generic_5.f03 + typebound_generic_6.f03 + typebound_generic_9.f03 + typebound_operator_12.f03 + typebound_operator_13.f03 + typebound_operator_20.f90 + typebound_operator_21.f03 + typebound_operator_3.f03 + typebound_operator_6.f03 + typebound_operator_7.f03 + typebound_operator_8.f03 + typebound_operator_9.f03 + typebound_proc_20.f90 + typebound_proc_23.f90 + typebound_proc_27.f03 + typebound_proc_35.f90 + typebound_proc_36.f90 + type_to_class_4.f03 + unlimited_polymorphic_18.f90 + unlimited_polymorphic_19.f90 + unlimited_polymorphic_1.f03 + unlimited_polymorphic_23.f90 + unlimited_polymorphic_25.f90 + unlimited_polymorphic_26.f90 + unlimited_polymorphic_29.f90 + use_24.f90 + use_27.f90 + used_dummy_types_1.f90 + value_1.f90 + value_tests_f03.f90 + where_2.f90 + whole_file_13.f90 + whole_file_14.f90 + winapi.f90 + zero_array_components_1.f90 + + # error: 'fir.convert' op invalid type conversion + achar_4.f90 + c_char_tests_4.f90 + c_char_tests_5.f90 + widechar_6.f90 + widechar_intrinsics_6.f90 + widechar_intrinsics_7.f90 + widechar_select_1.f90 + + # error: a function must have a type + proc_decl_9.f90 + + # error: not a constant derived type expression + allocate_with_source_10.f08 + allocate_with_source_11.f08 + arrayio_12.f90 + associate_25.f90 + associated_4.f90 + associated_target_5.f03 + automatic_default_init_1.f90 + char_component_initializer_1.f90 + char_component_initializer_2.f90 + char_length_8.f90 + charlen_15.f90 + charlen_16.f90 + class_9.f03 + class_allocate_10.f03 + class_allocate_7.f03 + class_allocate_8.f03 + class_allocate_9.f03 + class_array_4.f03 + class_to_type_2.f90 + coarray_42.f90 + constructor_3.f90 + dec_structure_6.f90 + default_initialization_3.f90 + default_initialization_4.f90 + deferred_character_26.f90 + defined_assignment_1.f90 + defined_assignment_10.f90 + defined_assignment_11.f90 + defined_assignment_2.f90 + defined_assignment_3.f90 + defined_assignment_4.f90 + defined_assignment_5.f90 + defined_assignment_9.f90 + dependency_25.f90 + der_array_io_3.f90 + derived_init_1.f90 + derived_init_2.f90 + derived_init_4.f90 + derived_pointer_recursion_2.f90 + dtio_22.f90 + dynamic_dispatch_1.f03 + dynamic_dispatch_12.f90 + dynamic_dispatch_2.f03 + dynamic_dispatch_3.f03 + extends_1.f03 + extends_16.f90 + extends_3.f03 + finalize_15.f90 + finalize_29.f08 + finalize_39.f90 + finalize_40.f90 + finalize_41.f90 + finalize_42.f90 + finalize_43.f90 + finalize_44.f90 + finalize_45.f90 + finalize_46.f90 + finalize_47.f90 + finalize_48.f90 + forall_19.f90 + init_flag_10.f90 + initialization_11.f90 + initialization_19.f90 + initialization_27.f90 + inquiry_type_ref_1.f08 + intent_out_13.f90 + intent_out_2.f90 + intent_out_5.f90 + interface_assignment_1.f90 + internal_pack_10.f90 + internal_pack_6a.f90 + intrinsic_pack_5.f90 + intrinsic_pack_6.f90 + move_alloc_10.f90 + move_alloc_6.f90 + namelist_13.f90 + namelist_15.f90 + namelist_40.f90 + namelist_47.f90 + namelist_64.f90 + namelist_78.f90 + namelist_96.f90 + no-automatic.f90 + optional_assumed_charlen_2.f90 + pointer_array_component_2.f90 + pointer_assign_10.f90 + pointer_assign_11.f90 + pointer_assign_8.f90 + pointer_assign_9.f90 + pointer_init_3.f90 + pr19926.f90 + pr51434.f90 + pr68078.f90 + pr69739.f90 + pr78290.f90 + pr83864.f90 + pr85786.f90 + result_default_init_1.f90 + structure_constructor_5.f03 + submodule_1.f08 + submodule_2.f08 + temporary_3.f90 + transfer_class_2.f90 + typebound_call_32.f90 + typebound_operator_15.f90 + + # error: unemittable constant value + namelist_utf8.f90 + + # error: cannot be converted to LLVM IR: missing + # `LLVMTranslationDialectInterface` registration for dialect for op: func.func + leadz_trailz_1.f90 + leadz_trailz_2.f90 + + # error: failed to legalize operation 'math.ctlz' that was explicitly marked + # illegal + leadz_trailz_3.f90 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they result in a compile error. This may + # be the result of them exercising unsupported extensions that are not + # supported in flang or some other reason. If there are multiple errors + # in a single file, each unique error message will be provided. + + # error: Entity in ALLOCATE statement must have the ALLOCATABLE or POINTER + # attribute + ISO_Fortran_binding_15.f90 + + # error: Left-hand side of assignment may not be polymorphic unless + # assignment is to an entire allocatable + PR100040.f90 + PR100103.f90 + + # error: The left-hand side of a pointer assignment is not definable + PR100094.f90 + associate_42.f90 + + # error: Assumed-rank array cannot be forwarded to '[var]=' argument + PR100906.f90 + PR100914.f90 + assumed_rank_10.f90 + assumed_rank_24.f90 + assumed_rank_9.f90 + associated_assumed_rank.f90 + assumed_rank_16.f90 + assumed_rank_8.f90 + + # error: Pointer has rank 0 but target has rank [n] + PR94331.f90 + PR94327.f90 + assumed_rank_1.f90 + + # error: Actual argument variable length '1' does not match the expected + # length '77' + PR95214.f90 + + # error: Dimension 1 of left operand has extent [m], but right operand has + # extent [n] + PR94289.f90 + assumed_rank_2.f90 + assumed_rank_22.f90 + assumed_rank_bounds_2.f90 + assumed_rank_bounds_3.f90 + assumed_rank_17.f90 + assumed_rank_bounds_1.f90 + + # error: DIM=3 dimension is out of range for rank-1 array + assumed_rank_3.f90 + assumed_rank_7.f90 + + # error: Subscript [m] is less than lower bound [n] for dimension [d] of + # array + bounds_check_11.f90 + bounds_check_fail_1.f90 + + # error: Assumed-size polymorphic array may not be associated with a + # monomorphic dummy argument + class_dummy_7.f90 + + # error: '[var]' is an external procedure without the EXTERNAL attribute in + # a scope with IMPLICIT NONE(EXTERNAL) + assumed_type_13.f90 + bind-c-contiguous-3.f90 + bind-c-intent-out.f90 + + # error: '[SYM]' may not appear in NULLIFY because '[SYM2]' is an INTENT(IN) + # dummy argument + pointer_intent_1.f90 + + # error: Assumed type argument requires an explicit interface + assumed_type_2a.f90 + + # error: No intrinsic or user-defined ASSIGNMENT(=) matches operand types + # 'TYPE 1' and 'TYPE 2' + dec-comparison-complex_1.f90 + dec-comparison-complex_2.f90 + dec-comparison-int_1.f90 + dec-comparison-int_2.f90 + dec-comparison-real_1.f90 + dec-comparison-real_2.f90 + dec_char_conversion_in_assignment_1.f90 + dec_char_conversion_in_assignment_2.f90 + dec_char_conversion_in_assignment_3.f90 + dec_char_conversion_in_assignment_5.f90 + dec_char_conversion_in_assignment_6.f90 + dec_char_conversion_in_assignment_7.f90 + hollerith2.f90 + hollerith4.f90 + hollerith6.f90 + pdt_23.f03 + + # error: Operands of .AND. must be LOGICAL; have 'TYPE 1' and 'TYPE 2' + dec_bitwise_ops_1.f90 + dec_bitwise_ops_2.f90 + + # error: A BIND(C) object must have an interoperable type + bind-c-contiguous-1.f90 + bind-c-contiguous-4.f90 + bind-c-contiguous-5.f90 + bind_c_char_10.f90 + char4_decl-2.f90 + + # error: A dim= argument is required for 'size' when the array is + # assumed-size + class_dummy_6.f90 + + # error: No explicit type declared for '[sym]' + PR49268.f90 + boz_complex_3.f90 + char_result_19.f90 + chmod_1.f90 + chmod_2.f90 + chmod_3.f90 + coarray_16.f90 + cray_pointers_7.f90 + dec_math.f90 + dec_math_5.f90 + fmt_en.f90 + fmt_en_rd.f90 + fmt_en_rn.f90 + fmt_en_ru.f90 + fmt_en_rz.f90 + fmt_f0_2.f90 + fmt_f0_3.f90 + fmt_g0_6.f08 + fmt_g0_7.f08 + fmt_pf.f90 + interface_12.f90 + result_in_spec_1.f90 + round_4.f90 + unlimited_polymorphic_13.f90 + + # error: Shape of initialized object 'foo' must be constant + pdt_26.f03 + + # error: Kind type parameters of allocatable object must be the same as the + # corresponding ones of SOURCE or MOLD expression + pdt_3.f03 + + # error: [sym] is not a variable + cray_pointers_8.f90 + + # error: Typeless (BOZ) not allowed for 'a=' argument + boz_float_3.f90 + + # error: Actual argument for 'i=' has bad type 'LOGICAL(1)' + and_or_xor.f90 + + # error: Argument of ALLOCATED() must be an ALLOCATABLE object or component + select_rank_1.f90 + + # error: 'coarray=' argument must have corank > 0 for intrinsic 'lcobound' + bound_simplification_4.f90 + bound_simplification_5.f90 + + # error: Coarray argument requires an explicit interface + coarray_15.f90 + + # error: 'mask=' argument has unacceptable rank 0 + coarray_13.f90 + + # error: 'a' has corank 0, but coindexed reference has 1 cosubscripts + coindexed_1.f90 + + # error: 'temp_node_t' is PRIVATE in 'temp_node' + constructor_6.f90 + + # error: Invalid CONVERT value 'swap' + convert_2.f90 + + # error: Type of Cray pointee 'dpte1' is a non-sequence derived type + cray_pointers_2.f90 + + # error: DATA statement value could not be converted to the type '[TYPE]' + dec_char_conversion_in_data_1.f90 + dec_char_conversion_in_data_2.f90 + dec_char_conversion_in_data_4.f90 + dec_char_conversion_in_data_5.f90 + dec_char_conversion_in_data_6.f90 + hollerith.f90 + + # error: Duplicate UNIT specifier + dec_io_5.f90 + dec_io_6.f90 + + # error: cannot process subprogram that was already processed + binding_label_tests_12.f03 + + # error: Value of named constant cannot be computed as a constant value + array_initializer_1.f90 + pr83874.f90 + + # error: In an elemental procedure reference with at least one array argument, + # actual argument that corresponds to an INTENT(OUT) or INTENT(INOUT) dummy + # argument must be an array + impure_1.f08 + + # error: Invalid STATUS value + iomsg_1.f90 + iostat_2.f90 + pr20163-2.f + + # error: '[SYM]' was not declared a separate module procedure + class_assign_1.f08 + submodule_31.f08 + + # error: No operator .XOR. defined for LOGICAL(4) and LOGICAL(4) + dec_logical_xor_1.f90 + + # error: Value in structure constructor of type 'education' is incompatible + # with component + extends_2.f03 + + # error: If a POINTER or ALLOCATABLE dummy or actual argument is polymorphic, + # both must be so + finalize_12.f90 + + # error: Must be a scalar value, but is a rank-1 array + impl_do_var_data.f90 + + # error: Unlimited format item list must contain a data edit descriptor + fmt_error_11.f03 + + # error: Expected '[FMT]' edit descriptor '.[SOMETHING]' value + fmt_missing_period.f + fmt_missing_period_2.f + + # error: Positive scale factor k (from kP) and width d in a 'E' edit + # descriptor must satisfy 'k < d+2' + fmt_zero_digits.f90 + + # error: '[SYM]' is not a known intrinsic procedure + gamma_1.f90 + specifics_1.f90 + + # error: Keyword may not appear in a reference to a procedure with an implicit + # interface + getenv_1.f90 + + # error: Cannot use-associate 'x'; it is already declared in this scope + iso_fortran_env_3.f90 + + # error: Must be a constant value + matmul_17.f90 + matmul_8.f03 + pr67140.f90 + pr89077.f90 + substr_simplify.f90 + transfer_simplify_12.f90 + zero_sized_9.f90 + + # error: Subscript 3 is greater than upper bound 2 for dimension 1 of array + module_procedure_4.f90 + + # error: '[SYM]' is not an object that can appear in an expression + namelist_print_1.f + + # error: '[SYM]' is already declared in this scoping unit + namelist_use.f90 + + # error: Actual argument type '[TYPE1]' is not compatible with dummy argument + # type '[TYPE2]' + no_arg_check_2a.f90 + pdt_2.f03 + + # error: '[SYM]' not found in module 'iso_fortran_env' + overload_3.f90 + pr66311.f90 + proc_ptr_comp_6.f90 + proc_ptr_comp_pass_2.f90 + quad_2.f90 + quad_3.f90 + team_change_1.f90 + team_end_1.f90 + team_form_1.f90 + team_number_1.f90 + unlimited_polymorphic_31.f03 + + # error: VOLATILE attribute was already specified + volatile10.f90 + + # error: 'mask=' argument has unacceptable rank 0 + pdt_20.f03 + + # error: literal is too large + pr92629.f90 + + # error: In assignment to procedure pointer 'funct', the target is not a + # procedure or procedure pointer + proc_ptr_47.f90 + + # error: '[SYM]' may not be a procedure as it is in a COMMON block + proc_ptr_common_1.f90 + + # error: Procedure pointer may not be ELEMENTAL + proc_ptr_comp_45.f90 + + # error: Procedure pointer associated with result of reference to function + # that is an incompatible procedure pointer + proc_ptr_result_1.f90 + + # error: Actual argument associated with procedure pointer dummy argument + # must be a POINTER unless INTENT(IN) + proc_ptr_result_6.f90 + + # error: Must have '[TYPE1]' type, but is '[TYPE2]' + real_index_1.f90 + + # error: error: Invalid CONVERT value + record_marker_1.f90 + record_marker_3.f90 + unf_io_convert_1.f90 + unf_io_convert_2.f90 + unf_io_convert_3.f90 + + # error: Implicit declaration of function has a different result type than in + # previous declaration + recursive_check_14.f90 + + # error: Result of pure function may not have an impure FINAL subroutine + finalize_51.f90 + + # -------------------------------------------------------------------------- + # + # These tests are skipped for a variety of reasons that don't fit well in + # any of the previous categories + + # The file char_result_mod_19.f90 has the { dg-do run } annotation, but it is + # not actually the main test file. That would be char_result_19.f90 which is + # listed as a dependency of char_result_mod_19.f90. This seems to be + # backwards. + char_result_mod_19.f90 + + # The test calls the subroutine should_not_fail(). The intention seems to be + # for the call to should_not_fail() to be dead-code eliminated. It is guarded + # by a conditional with a call to selected_real_kind() that should evaluate + # to false at compile-time. This is not being eliminated resulting in an + # "undefined symbol" error at link time. + # + selected_real_kind_2.f90 + + # For some reason, when building these tests, LLVM-IR is generated instead of + # of an object file. + save_6.f90 + shape_9.f90 + + # These tests seem to hang at runtime. Not sure if this indicates a problem + # with flang or with the tests themselves. + # + # FIXME: This should be checked and this comment should either be updated to + # reflect what the actual problem is with the tests or the tests should be + # removed from this list. + namelist_42.f90 + namelist_43.f90 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because flang cannot parse these files. This could + # be because of the use of non-standard syntax, but they will need to be + # checked to be sure. + # + auto_in_equiv_1.f90 + auto_in_equiv_2.f90 + automatic_1.f90 + dec-comparison-character_1.f90 + dec-comparison-character_2.f90 + dec_exp_1.f90 + dec_format_empty_item_1.f + dec_format_empty_item_2.f + dec_io_1.f90 + dec_parameter_1.f + dec_parameter_2.f90 + dec_static_1.f90 + dec_static_2.f90 + dec_structure_10.f90 + dec_structure_5.f90 + dec_structure_7.f90 + fmt_error_10.f + fmt_error_9.f + fmt_t_9.f + substr_9.f90 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they cause flang to crash. + + # Assertion `ty.isa()' failed + c_assoc.f90 + c_f_pointer_complex.f03 + c_f_pointer_logical.f03 + c_f_pointer_shape_tests_2.f03 + c_f_pointer_shape_tests_4.f03 + deferred_character_8.f90 + equiv_7.f90 + iso_c_binding_rename_1.f03 + test_only_clause.f90 +) + +# These tests fail at runtime when they should pass. are likely a result of +# unimplemented features in the runtime, but they could also be bugs. If any +# will never pass with flang (if they use unsupported extensions for instance), +# they should be added to the Unsupported list. These are not enabled by default +# to ensure that the default configuration of the test suite does not fail. +# Tests should be removed from this list when the cause of their failure is +# addressed. +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + Wall.f90 + Wno-all.f90 + abort_shouldfail.f90 + achar_6.F90 + advance_5.f90 + advance_6.f90 + aliasing_dummy_5.f90 + allocate_alloc_opt_15.f90 + allocate_alloc_opt_3.f90 + allocate_deferred_char_scalar_1.f03 + allocate_zerosize_3.f + arrayio_1.f90 + arrayio_3.f90 + arrayio_5.f90 + arrayio_6.f90 + assign_2.f90 + auto_save_2.f90 + backslash_2.f90 + backslash_3.f + backspace_2.f + backspace_6.f + bessel_7.f90 + bounds_check_19.f90 + boz_15.f90 + c_char_tests.f03 + char4_iunit_1.f03 + char4_iunit_2.f03 + check_bits_1.f90 + check_bits_2.f90 + continuation_12.f90 + continuation_13.f90 + continuation_1.f90 + cr_lf.f90 + cray_pointers_10.f90 + cray_pointers_5.f90 + cshift_bounds_3.f90 + cshift_bounds_4.f90 + cshift_large_1.f90 + data_char_1.f90 + data_char_3.f90 + deallocate_alloc_opt_3.f90 + deallocate_stat_2.f90 + deallocate_stat.f90 + dependency_45.f90 + dim_sum_1.f90 + dim_sum_2.f90 + dim_sum_3.f90 + direct_io_7.f90 + do_check_1.f90 + dollar_edit_descriptor_4.f + elemental_dependency_1.f90 + endfile_3.f90 + eoshift_bounds_1.f90 + eoshift_large_1.f90 + error_format.f90 + error_stop_1.f08 + f2003_io_5.f03 + findloc_6.f90 + fmt_error_4.f90 + fmt_error_5.f90 + fmt_f_default_field_width_1.f90 + fmt_f_default_field_width_2.f90 + fmt_g0_1.f08 + fmt_g_default_field_width_1.f90 + fmt_g_default_field_width_2.f90 + fmt_g.f + fmt_i_default_field_width_1.f90 + fmt_i_default_field_width_2.f90 + fmt_l.f90 + fmt_zero_width.f90 + fold_nearest.f90 + forall_12.f90 + goto_2.f90 + hollerith8.f90 + init_flag_1.f90 + init_flag_2.f90 + init_flag_3.f90 + init_flag_4.f90 + init_flag_5.f90 + init_flag_6.f90 + init_flag_7.f90 + init_flag_9.f90 + inline_matmul_15.f90 + inquire_13.f90 + inquire_15.f90 + inquire_5.f90 + inquire_9.f90 + inquire_internal.f90 + inquire_recl_f2018.f90 + inquire_size.f90 + integer_exponentiation_2.f90 + internal_dummy_2.f08 + internal_pack_3.f90 + internal_write_1.f90 + intrinsic_std_4.f90 + io_err_1.f90 + io_real_boz_3.f90 + io_real_boz.f90 + iostat_4.f90 + iostat_5.f90 + is_contiguous_3.f90 + large_real_kind_1.f90 + large_unit_1.f90 + list_directed_large.f90 + list_read_11.f90 + list_read_4.f90 + literal_character_constant_1_z.F + masklr_2.F90 + matmul_5.f90 + matmul_bounds_11.f90 + matmul_bounds_13.f90 + matmul_bounds_15.f + matmul_bounds_16.f + matmul_bounds_7.f90 + matmul_bounds_9.f90 + maxloc_2.f90 + maxloc_bounds_3.f90 + maxloc_bounds_6.f90 + maxloc_string_1.f90 + maxlocval_2.f90 + maxlocval_4.f90 + merge_bits_2.F90 + minloc_1.f90 + minlocval_1.f90 + minlocval_4.f90 + minmaxloc_10.f90 + minmaxloc_1.f90 + minmaxloc_3.f90 + minval_char_1.f90 + minval_char_3.f90 + minval_parameter_1.f90 + missing_optional_dummy_6.f90 + mod_large_1.f90 + mod_sign0_1.f90 + module_nan.f90 + multiple_allocation_1.f90 + multiple_allocation_3.f90 + mvbits_4.f90 + namelist_18.f90 + namelist_19.f90 + namelist_21.f90 + namelist_22.f90 + namelist_24.f90 + namelist_37.f90 + namelist_38.f90 + namelist_41.f90 + namelist_51.f90 + namelist_56.f90 + namelist_57.f90 + namelist_61.f90 + namelist_65.f90 + namelist_72.f + namelist_73.f90 + namelist_80.f90 + namelist_81.f90 + namelist_84.f90 + namelist_87.f90 + namelist_89.f90 + namelist_97.f90 + namelist_char_only.f90 + nan_2.f90 + nearest_1.f90 + nearest_3.f90 + negative_unit.f + negative_unit_int8.f + no_range_check_1.f90 + norm2_1.f90 + nosigned_zero_2.f90 + open_access_append_2.f90 + open_errors_2.f90 + open_errors_3.f90 + open_negative_unit_1.f90 + open_new_segv.f90 + open_status_2.f90 + pad_source_3.f + pad_source_4.f + pad_source_5.f + pointer_check_6.f90 + pr12884.f + pr17285.f90 + pr17286.f90 + pr17706.f90 + pr18210.f90 + pr19657.f + pr47757-3.f90 + pr47878.f90 + pr50069_1.f90 + pr59700.f90 + pr71523_2.f90 + pr96436_3.f90 + pr96436_4.f90 + pr96436_5.f90 + promotion_3.f90 + promotion_4.f90 + promotion.f90 + random_3.f90 + random_5.f90 + random_init_2.f90 + read_5.f90 + read_bang4.f90 + read_bang.f90 + read_comma.f + read_eof_3.f90 + read_eof_7.f90 + read_eof_all.f90 + read_legacy_comma.f90 + real4-10-real8-10.f90 + real4-10-real8-16.f90 + real4-10-real8-4.f90 + real4-10.f90 + real4-16-real8-10.f90 + real4-16-real8-16.f90 + real4-16-real8-4.f90 + real4-16.f90 + real4-8-real8-10.f90 + real4-8-real8-16.f90 + real4-8-real8-4.f90 + real4-8.f90 + real8-10.f90 + real8-16.f90 + real8-4.f90 + real_const_3.f90 + realloc_on_assign_11.f90 + recursive_check_7.f90 + repeat_1.f90 + reshape_order_1.f90 + reshape_order_2.f90 + reshape_order_3.f90 + reshape_order_4.f90 + round_3.f08 + selected_kind_1.f90 + short_circuiting_3.f90 + stop_shouldfail.f90 + streamio_11.f90 + streamio_13.f90 + streamio_17.f90 + streamio_4.f90 + system_clock_3.f08 + unf_io_convert_4.f90 + unf_read_corrupted_1.f90 + unf_short_record_1.f90 + unformatted_subrecord_1.f90 + unpack_bounds_2.f90 + unpack_bounds_3.f90 + utf8_1.f03 + utf8_2.f03 + widechar_5.f90 + widechar_8.f90 + widechar_IO_4.f90 + widechar_intrinsics_4.f90 + widechar_intrinsics_5.f90 + widechar_intrinsics_8.f90 + write_check.f90 + zero_sized_1.f90 + + # These tests fail at runtime on AArch64 (but pass on x86). Disable them + # anyway so the test-suite passes by default on AArch64. + entry_23.f + findloc_8.f90 +) diff --git a/Fortran/gfortran/regression/analyzer/CMakeLists.txt b/Fortran/gfortran/regression/analyzer/CMakeLists.txt --- a/Fortran/gfortran/regression/analyzer/CMakeLists.txt +++ b/Fortran/gfortran/regression/analyzer/CMakeLists.txt @@ -6,5 +6,9 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") + diff --git a/Fortran/gfortran/regression/analyzer/DisabledFiles.cmake b/Fortran/gfortran/regression/analyzer/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/analyzer/DisabledFiles.cmake @@ -0,0 +1,19 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/asan/CMakeLists.txt b/Fortran/gfortran/regression/asan/CMakeLists.txt --- a/Fortran/gfortran/regression/asan/CMakeLists.txt +++ b/Fortran/gfortran/regression/asan/CMakeLists.txt @@ -6,15 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests trigger internal compiler errors. -file(GLOB Skipped CONFIGURE_DEPENDS - # error: unexpected typeless constant value - pointer_assign_16.f90 -) +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/asan/DisabledFiles.cmake b/Fortran/gfortran/regression/asan/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/asan/DisabledFiles.cmake @@ -0,0 +1,22 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# These tests trigger internal compiler errors. +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: unexpected typeless constant value + pointer_assign_16.f90 +) + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/c-interop/CMakeLists.txt b/Fortran/gfortran/regression/c-interop/CMakeLists.txt --- a/Fortran/gfortran/regression/c-interop/CMakeLists.txt +++ b/Fortran/gfortran/regression/c-interop/CMakeLists.txt @@ -6,126 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests trigger "not yet implemented" assertions in flang. -file(GLOB Unimplemented CONFIGURE_DEPENDS - # unimplemented: assumed rank in procedure interface - argument-association-assumed-rank-1.f90 - argument-association-assumed-rank-2.f90 - argument-association-assumed-rank-3.f90 - argument-association-assumed-rank-4.f90 - argument-association-assumed-rank-5.f90 - argument-association-assumed-rank-6.f90 - argument-association-assumed-rank-7.f90 - argument-association-assumed-rank-8.f90 - cf-out-descriptor-6.f90 - contiguous-1.f90 - contiguous-2.f90 - contiguous-3.f90 - fc-descriptor-6.f90 - fc-out-descriptor-6.f90 - note-5-3.f90 - note-5-4.f90 - rank.f90 - shape-bindc.f90 - shape.f90 - size-bindc.f90 - size.f90 - ubound-bindc.f90 - ubound.f90 +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") - # unimplemented: BIND(C) internal procedures - deferred-character-2.f90 - fc-out-descriptor-5.f90 - ff-descriptor-5.f90 - ff-descriptor-6.f90 - ff-descriptor-7.f90 - pr103390-1.f90 - pr103390-2.f90 - pr103390-3.f90 - pr103390-4.f90 - pr103390-5.f90 - pr103390-6.f90 - pr103390-7.f90 - pr103390-8.f90 - pr103390-9.f90 -) - -# These tests are skipped because they trigger internal compiler errors. -file(GLOB Skipped CONFIGURE_DEPENDS - # error: Unexpected typeless constant value - allocatable-dummy.f90 - allocate-errors.f90 - allocate.f90 - cf-descriptor-1.f90 - cf-descriptor-2.f90 - cf-descriptor-3.f90 - cf-descriptor-4.f90 - cf-descriptor-5.f90 - cf-descriptor-6.f90 - cf-descriptor-7.f90 - cf-descriptor-8.f90 - cf-out-descriptor-1.f90 - cf-out-descriptor-2.f90 - cf-out-descriptor-3.f90 - cf-out-descriptor-4.f90 - cf-out-descriptor-5.f90 - establish-errors.f90 - establish.f90 - fc-descriptor-1.f90 - fc-descriptor-2.f90 - fc-descriptor-3.f90 - fc-descriptor-4.f90 - fc-descriptor-5.f90 - fc-descriptor-8.f90 - fc-descriptor-9.f90 - fc-out-descriptor-1.f90 - fc-out-descriptor-2.f90 - fc-out-descriptor-3.f90 - fc-out-descriptor-4.f90 - fc-out-descriptor-7.f90 - ff-descriptor-1.f90 - ff-descriptor-2.f90 - ff-descriptor-3.f90 - ff-descriptor-4.f90 - optional.f90 - rank-class.f90 - section-2.f90 - section-2p.f90 - section-3.f90 - section-3p.f90 - section-4.f90 - section-errors.f90 - select-errors.f90 - select.f90 - setpointer-errors.f90 - setpointer.f90 - shape-poly.f90 - size-poly.f90 - typecodes-array-basic.f90 - typecodes-array-float128.f90 - typecodes-array-int128.f90 - typecodes-array-longdouble.f90 - typecodes-sanity.f90 - typecodes-scalar-basic.f90 - typecodes-scalar-float128.f90 - typecodes-scalar-int128.f90 - typecodes-scalar-longdouble.f90 - ubound-poly.f90 - - # error: '[SYM]' is an external procedure without the EXTERNAL attribute in a - # scope with IMPLICIT NONE(EXTERNAL) - fc-descriptor-7.f90 - - # error: A BIND(C) object must have an interoperable type - typecodes-array-char.f90 - - # error: No explicit type declared for '[SYM]' - section-1.f90 - section-1p.f90) - -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "${Unimplemented}") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/c-interop/DisabledFiles.cmake b/Fortran/gfortran/regression/c-interop/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/c-interop/DisabledFiles.cmake @@ -0,0 +1,131 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# These tests trigger "not yet implemented" assertions in flang. +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: assumed rank in procedure interface + argument-association-assumed-rank-1.f90 + argument-association-assumed-rank-2.f90 + argument-association-assumed-rank-3.f90 + argument-association-assumed-rank-4.f90 + argument-association-assumed-rank-5.f90 + argument-association-assumed-rank-6.f90 + argument-association-assumed-rank-7.f90 + argument-association-assumed-rank-8.f90 + cf-out-descriptor-6.f90 + contiguous-1.f90 + contiguous-2.f90 + contiguous-3.f90 + fc-descriptor-6.f90 + fc-out-descriptor-6.f90 + note-5-3.f90 + note-5-4.f90 + rank.f90 + shape-bindc.f90 + shape.f90 + size-bindc.f90 + size.f90 + ubound-bindc.f90 + ubound.f90 + + # unimplemented: BIND(C) internal procedures + deferred-character-2.f90 + fc-out-descriptor-5.f90 + ff-descriptor-5.f90 + ff-descriptor-6.f90 + ff-descriptor-7.f90 + pr103390-1.f90 + pr103390-2.f90 + pr103390-3.f90 + pr103390-4.f90 + pr103390-5.f90 + pr103390-6.f90 + pr103390-7.f90 + pr103390-8.f90 + pr103390-9.f90 +) + +# These tests are skipped because they trigger internal compiler errors. +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: Unexpected typeless constant value + allocatable-dummy.f90 + allocate-errors.f90 + allocate.f90 + cf-descriptor-1.f90 + cf-descriptor-2.f90 + cf-descriptor-3.f90 + cf-descriptor-4.f90 + cf-descriptor-5.f90 + cf-descriptor-6.f90 + cf-descriptor-7.f90 + cf-descriptor-8.f90 + cf-out-descriptor-1.f90 + cf-out-descriptor-2.f90 + cf-out-descriptor-3.f90 + cf-out-descriptor-4.f90 + cf-out-descriptor-5.f90 + establish-errors.f90 + establish.f90 + fc-descriptor-1.f90 + fc-descriptor-2.f90 + fc-descriptor-3.f90 + fc-descriptor-4.f90 + fc-descriptor-5.f90 + fc-descriptor-8.f90 + fc-descriptor-9.f90 + fc-out-descriptor-1.f90 + fc-out-descriptor-2.f90 + fc-out-descriptor-3.f90 + fc-out-descriptor-4.f90 + fc-out-descriptor-7.f90 + ff-descriptor-1.f90 + ff-descriptor-2.f90 + ff-descriptor-3.f90 + ff-descriptor-4.f90 + optional.f90 + rank-class.f90 + section-2.f90 + section-2p.f90 + section-3.f90 + section-3p.f90 + section-4.f90 + section-errors.f90 + select-errors.f90 + select.f90 + setpointer-errors.f90 + setpointer.f90 + shape-poly.f90 + size-poly.f90 + typecodes-array-basic.f90 + typecodes-array-float128.f90 + typecodes-array-int128.f90 + typecodes-array-longdouble.f90 + typecodes-sanity.f90 + typecodes-scalar-basic.f90 + typecodes-scalar-float128.f90 + typecodes-scalar-int128.f90 + typecodes-scalar-longdouble.f90 + ubound-poly.f90 + + # error: '[SYM]' is an external procedure without the EXTERNAL attribute in a + # scope with IMPLICIT NONE(EXTERNAL) + fc-descriptor-7.f90 + + # error: A BIND(C) object must have an interoperable type + typecodes-array-char.f90 + + # error: No explicit type declared for '[SYM]' + section-1.f90 + section-1p.f90 +) + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/coarray/CMakeLists.txt b/Fortran/gfortran/regression/coarray/CMakeLists.txt --- a/Fortran/gfortran/regression/coarray/CMakeLists.txt +++ b/Fortran/gfortran/regression/coarray/CMakeLists.txt @@ -6,130 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests trigger "not yet implemented" assertions in flang. -file(GLOB Unimplemented CONFIGURE_DEPENDS - # unimplemented: support for polymorphic types - poly_run_3.f90 +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") - # unimplemented: coarray allocation - allocate_errgmsg.f90 - get_array.f90 - lock_2.f90 - move_alloc_1.f90 - send_array.f90 - send_char_array_1.f90 - sendget_array.f90 - - # unimplemented: coarray reference - get_to_indirect_array.f90 - - # unimplemented: coarray in procedure interface - dummy_1.f90 - poly_run_1.f90 - pr107441-caf.f90 - ptr_comp_1.f08 - ptr_comp_2.f08 - scalar_alloc_1.f90 - - # unimplemented: intrinsic: '[SYM]' - coindexed_1.f90 - collectives_1.f90 - collectives_2.f90 - cosubscript_1.f90 - failed_images_2.f08 - image_status_2.f08 - stopped_images_2.f08 - this_image_1.f90 - - # unimplemented: EVENT POST runtime - event_4.f08 - - # unimplemented: LOCK runtime - lock_1.f90 - - # unimplemented: CriticalConstruct implementation - sync_1.f90 - sync_3.f90) - -# Some tests in the suite may be unsupported for one reason or another. -file(GLOB Skipped CONFIGURE_DEPENDS - # ------------------------------------------------------------------------ - # - # These tests are skipped because they hit a 'not yet implemented' assertion - # in flang. They should be removed from here when the corresponding feature - # is implemented. - - - # -------------------------------------------------------------------------- - # - # These tests are skipped because they trigger internal compiler errors. - # - - # error: Unexpected typeless constant value - alloc_comp_4.f90 - coarray_allocated.f90 - collectives_3.f90 - get_to_indexed_array_1.f90 - lib_realloc_1.f90 - pr93671.f90 - ptr_comp_3.f08 - scalar_alloc_2.f90 - - # error: not a constant derived type expression - alloc_comp_5.f90 - ptr_comp_4.f08 - - # error: No explicit type declared for '[SYM]' - image_index_1.f90 - image_index_2.f90 - image_index_3.f90 - this_image_2.f90 - - # -------------------------------------------------------------------------- - # - # These tests are skipped because they trigger semantic errors. It may be - # because they use non-standard features that are currently not supported, or - # it could be unimplemented features that are not tagged as such. - # - - # error: 'coarray=' argument must have corank > 0 for intrinsic '[SYM]' - alloc_comp_1.f90 - subobject_1.f90 - - # error: 'atom=' argument must be a scalar coarray or coindexed object for - # intrinsic '[SYM]' - atomic_1.f90 - - # error: '[SYM]' is not a known intrinsic procedure - atomic_2.f90 - collectives_4.f90 - - # error: Actual argument associated with coarray dummy argument must be - # a coarray - codimension.f90 - codimension_3.f90 - - # error: Coarray argument requires an explicit interface - event_1.f90 - event_3.f08 - - # error: Keyword 'stat=' may not appear in a reference to a procedure with an - # implicit interface - event_2.f90 - - # error: '[SYM]' is a non-ALLOCATABLE coarray and must have an explicit - # coshape - poly_run_2.f90 -) - -# These tests fail at runtime when they should pass. -file(GLOB Failing CONFIGURE_DEPENDS - fail_image_2.f08 -) - -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "${Unimplemented}") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "${Failing}") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/coarray/DisabledFiles.cmake b/Fortran/gfortran/regression/coarray/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/coarray/DisabledFiles.cmake @@ -0,0 +1,132 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# These tests trigger "not yet implemented" assertions in flang. +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: support for polymorphic types + poly_run_3.f90 + + # unimplemented: coarray allocation + allocate_errgmsg.f90 + get_array.f90 + lock_2.f90 + move_alloc_1.f90 + send_array.f90 + send_char_array_1.f90 + sendget_array.f90 + + # unimplemented: coarray reference + get_to_indirect_array.f90 + + # unimplemented: coarray in procedure interface + dummy_1.f90 + poly_run_1.f90 + pr107441-caf.f90 + ptr_comp_1.f08 + ptr_comp_2.f08 + scalar_alloc_1.f90 + + # unimplemented: intrinsic: '[SYM]' + coindexed_1.f90 + collectives_1.f90 + collectives_2.f90 + cosubscript_1.f90 + failed_images_2.f08 + image_status_2.f08 + stopped_images_2.f08 + this_image_1.f90 + + # unimplemented: EVENT POST runtime + event_4.f08 + + # unimplemented: LOCK runtime + lock_1.f90 + + # unimplemented: CriticalConstruct implementation + sync_1.f90 + sync_3.f90 +) + +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # ------------------------------------------------------------------------ + # + # These tests are skipped because they hit a 'not yet implemented' assertion + # in flang. They should be removed from here when the corresponding feature + # is implemented. + + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they trigger internal compiler errors. + # + + # error: Unexpected typeless constant value + alloc_comp_4.f90 + coarray_allocated.f90 + collectives_3.f90 + get_to_indexed_array_1.f90 + lib_realloc_1.f90 + pr93671.f90 + ptr_comp_3.f08 + scalar_alloc_2.f90 + + # error: not a constant derived type expression + alloc_comp_5.f90 + ptr_comp_4.f08 + + # error: No explicit type declared for '[SYM]' + image_index_1.f90 + image_index_2.f90 + image_index_3.f90 + this_image_2.f90 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they trigger semantic errors. It may be + # because they use non-standard features that are currently not supported, or + # it could be unimplemented features that are not tagged as such. + # + + # error: 'coarray=' argument must have corank > 0 for intrinsic '[SYM]' + alloc_comp_1.f90 + subobject_1.f90 + + # error: 'atom=' argument must be a scalar coarray or coindexed object for + # intrinsic '[SYM]' + atomic_1.f90 + + # error: '[SYM]' is not a known intrinsic procedure + atomic_2.f90 + collectives_4.f90 + + # error: Actual argument associated with coarray dummy argument must be + # a coarray + codimension.f90 + codimension_3.f90 + + # error: Coarray argument requires an explicit interface + event_1.f90 + event_3.f08 + + # error: Keyword 'stat=' may not appear in a reference to a procedure with an + # implicit interface + event_2.f90 + + # error: '[SYM]' is a non-ALLOCATABLE coarray and must have an explicit + # coshape + poly_run_2.f90 +) + +# These tests fail at runtime when they should pass. +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + fail_image_2.f08 +) diff --git a/Fortran/gfortran/regression/debug/CMakeLists.txt b/Fortran/gfortran/regression/debug/CMakeLists.txt --- a/Fortran/gfortran/regression/debug/CMakeLists.txt +++ b/Fortran/gfortran/regression/debug/CMakeLists.txt @@ -6,5 +6,9 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") + diff --git a/Fortran/gfortran/regression/debug/DisabledFiles.cmake b/Fortran/gfortran/regression/debug/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/debug/DisabledFiles.cmake @@ -0,0 +1,19 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/g77/CMakeLists.txt b/Fortran/gfortran/regression/g77/CMakeLists.txt --- a/Fortran/gfortran/regression/g77/CMakeLists.txt +++ b/Fortran/gfortran/regression/g77/CMakeLists.txt @@ -6,26 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests use (currently) unsupported GNU extensions. -file(GLOB Unsupported CONFIGURE_DEPENDS - intrinsic-unix-bessel.f # bes(j|y)(0|1|n), - intrinsic-unix-erf.f # derf -) +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") -# These tests are skipped because they cause flang to crash -file(GLOB Skipped CONFIGURE_DEPENDS - # error: 64-bit code requested on a subtarget that doesn't support it! - 20010216-1.f -) - -# These tests fail at runtime. -file(GLOB Failing CONFIGURE_DEPENDS - complex_1.f -) - -list(APPEND UnsupportedTests "${Unsupported}") -list(APPEND UnimplementedTests "") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "${Failing}") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/g77/DisabledFiles.cmake b/Fortran/gfortran/regression/g77/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/g77/DisabledFiles.cmake @@ -0,0 +1,27 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# These tests use (currently) unsupported GNU extensions. +file(GLOB UNSUPPORTED_FILES CONFIGURE_DEPENDS + intrinsic-unix-bessel.f # bes(j|y)(0|1|n), + intrinsic-unix-erf.f # derf +) + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# These tests are skipped because they cause flang to crash +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: 64-bit code requested on a subtarget that doesn't support it! + 20010216-1.f +) + +# These tests fail at runtime. +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + complex_1.f +) diff --git a/Fortran/gfortran/regression/goacc-gomp/CMakeLists.txt b/Fortran/gfortran/regression/goacc-gomp/CMakeLists.txt --- a/Fortran/gfortran/regression/goacc-gomp/CMakeLists.txt +++ b/Fortran/gfortran/regression/goacc-gomp/CMakeLists.txt @@ -6,5 +6,9 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}" FFLAGS "-fopenacc;-fopenmp") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}" FFLAGS "-fopenacc;-fopenmp") + diff --git a/Fortran/gfortran/regression/goacc-gomp/DisabledFiles.cmake b/Fortran/gfortran/regression/goacc-gomp/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/goacc-gomp/DisabledFiles.cmake @@ -0,0 +1,19 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/goacc/CMakeLists.txt b/Fortran/gfortran/regression/goacc/CMakeLists.txt --- a/Fortran/gfortran/regression/goacc/CMakeLists.txt +++ b/Fortran/gfortran/regression/goacc/CMakeLists.txt @@ -6,5 +6,9 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") + diff --git a/Fortran/gfortran/regression/goacc/DisabledFiles.cmake b/Fortran/gfortran/regression/goacc/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/goacc/DisabledFiles.cmake @@ -0,0 +1,19 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/gomp/CMakeLists.txt b/Fortran/gfortran/regression/gomp/CMakeLists.txt --- a/Fortran/gfortran/regression/gomp/CMakeLists.txt +++ b/Fortran/gfortran/regression/gomp/CMakeLists.txt @@ -6,7 +6,8 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}" FFLAGS "-fopenmp") +gfortran_add_compile_tests_from("${TESTS}" FFLAGS "-fopenmp") -add_subdirectory(appendix-a) diff --git a/Fortran/gfortran/regression/gomp/DisabledFiles.cmake b/Fortran/gfortran/regression/gomp/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/gomp/DisabledFiles.cmake @@ -0,0 +1,452 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: procedure pointers + atomic-10.f90 + declare-variant-19.f90 + proc_ptr_1.f90 + proc_ptr_2.f90 + + # unimplemented: procedure pointer arguments + pr44036-1.f90 + pr44036-2.f90 + + # unimplemented: coarray in procedure interface + declare-simd-coarray-lib.f90 + + # unimplemented: gather rhs LEN parameters in assignment to allocatable + atomic-28.f90 + defaultmap-2.f90 + defaultmap-3.f90 + defaultmap-4.f90 + defaultmap-5.f90 + defaultmap-6.f90 + + # unimplemented: support for polymorphic types + associate2.f90 + class-firstprivate-1.f90 + class-firstprivate-2.f90 + class-firstprivate-3.f90 + class-firstprivate-4.f90 + omp_parallel_1.f90 + pr102621.f90 + pr52531.f90 + pr56052.f90 + pr86470.f90 + + # unimplemented: derived type components with non default lower bounds + depend-iterator-1.f90 + depend-iterator-2.f90 + + # unimplemented: assumed rank in procedure interface + pr94672.f90 + + # unimplemented: Construct enclosing do loop + allocate-3.f90 + combined-if.f90 + order-4.f90 + openmp-simd-5.f90 + openmp-simd-6.f90 + pr107214-7.f90 + pr79154-2.f90 + pr82568.f90 + pr87752.f90 + pr99226.f90 + schedule-modifiers-1.f90 + target3.f90 + teams1.f90 + + # unimplemented: array sections not supported for task depend + depend-4.f90 + + # unimplemented: Missing symbol, possible case of currently unsupported use of + # a program local variable in declare target or erroneous symbol information + implicit-save.f90 + + # unimplemented: OMPD_target_data for Array Expressions or Structure + # Components. + map-2.f90 + map-5.f90 + map-9.f90 + ref_inquiry.f90 + substring.f90 + + # unimplemented: OMPD_target_update + pr71705.f90 + + # unimplemented: Do Concurrent in Worksharing loop construct + omp_do_concurrent.f90 + + # unimplemented: OpenMP Block construct clause + pr107214-5.f90 + pr71758.f90 + pr77352.f90 + pr81887.f90 + target-device-2.f90 + + # unimplemented: OMPD_target_data MapOperand BoxType + pr107214.f90 + target-exit-data.f90 + + # unimplemented: Unhandled block directive + pr39152.f90 + pr69128.f90 + pr69281.f90 + pr70855.f90 + pr95869.f90 + target-parallel1.f90 + teams-4.f90 + workshare2.f90 + workshare3.f90 + + # unimplemented: Reduction in OpenMP parallel construct + pr45172.f90 + pr48794.f90 + pr48611.f90 + pr48794-2.f90 + reduction2.f90 + + # unimplemented: Array references as atomic update variable + pr62131.f90 + + # unimplemented: OpenMPDeclareSimdConstruct + pr79154-1.f90 + pr93555.f90 + declare-simd-6.f90 + + # unimplemented: OpenMPRequiresConstruct + requires-1.f90 + requires-5.f90 + requires-7.f90 + requires-8.f90 + requires-9.f90 + target-device-ancestor-3.f90 + target-device-ancestor-5.f90 + target-device-ancestor-6.f90 +) + +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: not a memory reference type + associate1.f90 + + # error: the update operation inside the region must be a binary operation and + # that update operation must have the region argument as an operand + atomic-12.f90 + + # error: address must dereference to value type + omp_atomic2.f90 + + # error: symbol must have a type + pr35786-1.f90 + + # error: expr was not lowered to MutableBoxValue + pr36726.f90 + pr77666.f90 + + # error: exactly two operations are allowed inside an atomic update region + # while lowering to LLVM IR + pr39354.f90 + + # error: unhandled clauses for translation to LLVM IR + pr43337.f90 + pr44085.f90 + + # error: operand #0 does not dominate this use + pr89651.f90 + + # error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/optional:484: + # const _Tp &std::_Optional_base_impl>::_M_get() const [_Tp = Fortran::parser::OmpMapType, _Dp = std::_Optional_base]: Assertion 'this->_M_is_engaged()' failed. + nesting-1.f90 + pr78260-2.f90 + + # error: Operation *mlir::Block::getTerminator(): Assertion `!empty() && back().mightHaveTrait()' failed. + pr45597.f90 + + # error: SemanticsContext::FindScope(): invalid source location + target-device-ancestor-4.f90 + taskwait.f90 + + # Crash in: Fortran::semantics::AnalyzeKindSelector + openmp-simd-1.f90 + openmp-simd-2.f90 + openmp-simd-3.f90 + pr71704.f90 +) + +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + # + # These tests are marked as failing because they fail to compile when the + # compilation is expected to succeed. + # + + # expected end of line + affinity-1.f90 + cancel-3.f90 + clauses-1.f90 + declare-simd-4.f90 + declare-target-4.f90 + if-1.f90 + lastprivate-conditional-2.f90 + lastprivate-conditional-3.f90 + lastprivate-conditional-4.f90 + linear-2.f90 + linear-4.f90 + pr99928-1.f90 + pr99928-2.f90 + pr99928-3.f90 + pr99928-4.f90 + pr99928-5.f90 + pr99928-6.f90 + pr99928-8.f90 + scan-5.f90 + taskloop-1.f90 + workshare-reduction-10.f90 + workshare-reduction-11.f90 + workshare-reduction-12.f90 + workshare-reduction-13.f90 + workshare-reduction-14.f90 + workshare-reduction-15.f90 + workshare-reduction-16.f90 + workshare-reduction-17.f90 + workshare-reduction-18.f90 + workshare-reduction-19.f90 + workshare-reduction-1.f90 + workshare-reduction-20.f90 + workshare-reduction-21.f90 + workshare-reduction-22.f90 + workshare-reduction-23.f90 + workshare-reduction-24.f90 + workshare-reduction-25.f90 + workshare-reduction-26.f90 + workshare-reduction-27.f90 + workshare-reduction-28.f90 + workshare-reduction-29.f90 + workshare-reduction-2.f90 + workshare-reduction-30.f90 + workshare-reduction-31.f90 + workshare-reduction-32.f90 + workshare-reduction-33.f90 + workshare-reduction-34.f90 + workshare-reduction-35.f90 + workshare-reduction-36.f90 + workshare-reduction-37.f90 + workshare-reduction-38.f90 + workshare-reduction-39.f90 + workshare-reduction-3.f90 + workshare-reduction-40.f90 + workshare-reduction-41.f90 + workshare-reduction-42.f90 + workshare-reduction-43.f90 + workshare-reduction-44.f90 + workshare-reduction-45.f90 + workshare-reduction-46.f90 + workshare-reduction-47.f90 + workshare-reduction-48.f90 + workshare-reduction-49.f90 + workshare-reduction-4.f90 + workshare-reduction-50.f90 + workshare-reduction-51.f90 + workshare-reduction-52.f90 + workshare-reduction-53.f90 + workshare-reduction-54.f90 + workshare-reduction-55.f90 + workshare-reduction-56.f90 + workshare-reduction-57.f90 + workshare-reduction-58.f90 + workshare-reduction-5.f90 + workshare-reduction-6.f90 + workshare-reduction-7.f90 + workshare-reduction-8.f90 + workshare-reduction-9.f90 + + # expected 'TASKYIELD' + affinity-clause-1.f90 + affinity-clause-5.f90 + depend-5.f90 + pr103643.f90 + + # expected 'THREADPRIVATE' + affinity-clause-3.f90 + all-memory-2.f90 + masked-1.f90 + masked-combined-1.f90 + masked-taskloop.f90 + nothing-1.f90 + num-teams-1.f90 + num-teams-2.f90 + openmp-simd-7.f90 + parallel-master-1.f90 + pr103695.f90 + pr99928-11.f90 + reduction-task-3.f90 + scan-2.f90 + scope-6.f90 + + # expected 'DO' + all-memory-3.f90 + + # expected 'ALLOCATE' + assume-1.f90 + assume-3.f90 + assume-4.f90 + atomic-25.f90 + atomic.f90 + openmp-simd-8.f90 + + # expected 'END ATOMIC' + atomic-16.f90 + atomic-17.f90 + + # expected '!$OMP ' + atomic-19.f90 + atomic-20.f90 + atomic-21.f90 + strictly-structured-block-3.f90 + + # expected 'DECLARE TARGET' + depend-6.f90 + depobj-1.f90 + lastprivate-conditional-5.f90 + reduction-task-1.f90 + scan-3.f90 + scan-4.f90 + + # expected 'END' + error-2.f90 + omp_parse1.f90 + + # expected 'CRITICAL' + loop-1.f90 + loop-3.f90 + loop-5.f90 + + # expected 'TARGET UPDATE' + map-6.f90 + map-7.f90 + target-has-device-addr-2.f90 + + # expected 'MASTER' + nowait-2.f90 + nowait-5.f90 + strictly-structured-block-1.f90 + + # expected 'SINGLE' + nowait-3.f90 + nowait-7.f90 + scope-1.f90 + scope-2.f90 + + # IMPORT statements must follow any USE statements and precede all other + # declarations + order-1.f90 + + # expected 'PARALLEL DO' + pr102431.f90 + + # expected 'TARGET TEAMS DISTRIBUTE' + pr107214-4.f90 + + # expected 'TYPE' + pr77665.f90 + + # 'b1' appears in more than one data-sharing clause on the same OpenMP + # directive + allocate-1.f90 + + # COPYPRIVATE variable is not PRIVATE or THREADPRIVATE in outer context + copyprivate-1.f90 + pr26224.f + + # The DEFAULT(NONE) clause requires that 'a' must be listed in a data-sharing + # attribute clause + crayptr4.f90 + + # Implied-shape array must be a named constant or a dummy argument + crayptr5.f90 + + # Internal: no symbol found for + declare-simd-2.f90 + declare-simd-3.f90 + is_device_ptr-1.f90 + is_device_ptr-3.f90 + pr83977.f90 + + # The type of 'var_1' has already been implicitly declared + declare-target-1.f90 + + # SEQ_CST clause is not allowed on the FLUSH directive + flush-1.f90 + + # At least one of MAP clause must appear on the TARGET DATA directive + is_device_ptr-2.f90 + map-3.f90 + use_device_ptr-1.f90 + + # ORDER clause is not allowed on the TEAMS DISTRIBUTE directive + order-5.f90 + order-7.f90 + + # `DISTRIBUTE` region has to be strictly nested inside `TEAMS` region. + pr104757.f90 + + # The parameter of the SAFELEN clause must be a constant positive integer + # expression + pr77516.f90 + + # Subscript 9 is greater than upper bound 8 for dimension 1 of array + pr78299.f90 + + # The chunk size of the SCHEDULE clause must be a positive integer expression + schedule-1.f90 + + # Only the TO, ALLOC map types are permitted for MAP clauses on the TARGET + # ENTER DATA directive + target-data-1.f90 + + # DEFAULT clause is not allowed on the TARGET TEAMS DISTRIBUTE SIMD directive + target1.f90 + + # Must be a constant value + target2.f90 + + # bad character ('{') in Fortran token + declare-variant-10.f90 + declare-variant-11.f90 + declare-variant-12.f90 + declare-variant-13.f90 + declare-variant-14.f90 + declare-variant-15.f90 + declare-variant-16.f90 + declare-variant-1.f90 + declare-variant-3.f90 + declare-variant-4.f90 + declare-variant-5.f90 + declare-variant-8.f90 + declare-variant-9.f90 + free-2.f90 + + # Incomplete character literal + include_1.f + include_2.f90 + + # + # These tests are marked as failing because the compilation succeeds when it + # is expected to fail. + # + canonical-loop-2.f90 + crayptr2.f90 + map-alloc-comp-1.f90 + pr33439.f90 + pr44036-3.f90 + pr78866-2.f90 + sharing-3.f90 +) diff --git a/Fortran/gfortran/regression/gomp/appendix-a/CMakeLists.txt b/Fortran/gfortran/regression/gomp/appendix-a/CMakeLists.txt --- a/Fortran/gfortran/regression/gomp/appendix-a/CMakeLists.txt +++ b/Fortran/gfortran/regression/gomp/appendix-a/CMakeLists.txt @@ -6,5 +6,8 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}" FFLAGS "-fopenmp") +gfortran_add_compile_tests_from("${TESTS}" FFLAGS "-fopenmp") + diff --git a/Fortran/gfortran/regression/gomp/appendix-a/DisabledFiles.cmake b/Fortran/gfortran/regression/gomp/appendix-a/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/gomp/appendix-a/DisabledFiles.cmake @@ -0,0 +1,53 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: Unhandled block directive + a.11.1.f90 + a.11.2.f90 + a.11.3.f90 + a.11.4.f90 + a.11.5.f90 + a.11.6.f90 + a.11.7.f90 + + # unimplemented: Common Block in privatization clause + a.23.1.f90 + a.23.3.f90 +) + +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # + # These tests fail when they should pass. + # + + # error: 't' appears in more than one data-sharing clause on the same OpenMP + # directive + a.22.6.f90 + + # error: COMMON block must be declared in the same scoping unit in which the + # OpenMP directive or clause appears + a.23.2.f90 + + # error: COPYPRIVATE variable is not PRIVATE or THREADPRIVATE in outer + # context + a.33.1.f90 + a.33.2.f90 + a.33.4.f90 + + # + # These tests pass when they should fail. + # + a.31.3.f90 +) + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/graphite/CMakeLists.txt b/Fortran/gfortran/regression/graphite/CMakeLists.txt --- a/Fortran/gfortran/regression/graphite/CMakeLists.txt +++ b/Fortran/gfortran/regression/graphite/CMakeLists.txt @@ -6,5 +6,7 @@ # #===------------------------------------------------------------------------===# +message(STATUS "Adding directory Fortran/gfortran/regression/graphite") + # The tests in this directory exercise the graphite polyhedral compiler that is # part of the GNU compiler collection. This is not relevant for flang. diff --git a/Fortran/gfortran/regression/guality/CMakeLists.txt b/Fortran/gfortran/regression/guality/CMakeLists.txt --- a/Fortran/gfortran/regression/guality/CMakeLists.txt +++ b/Fortran/gfortran/regression/guality/CMakeLists.txt @@ -6,5 +6,7 @@ # #===------------------------------------------------------------------------===# +message(STATUS "Adding directory Fortran/gfortran/regression/guality") + # The tests in this directory seem to check the interaction of the compiler with # gdb. It is not clear how we can test that - or if we even want to. diff --git a/Fortran/gfortran/regression/ieee/CMakeLists.txt b/Fortran/gfortran/regression/ieee/CMakeLists.txt --- a/Fortran/gfortran/regression/ieee/CMakeLists.txt +++ b/Fortran/gfortran/regression/ieee/CMakeLists.txt @@ -6,74 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests are disabled because they use unsupported extensions. -file(GLOB Unsupported CONFIGURE_DEPENDS - dec_math_1.f90 # cotand, cotan -) +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") -# These tests are disabled because they trigger "not yet implemented" -# assertions in flang. -file(GLOB Unimplemented CONFIGURE_DEPENDS - # unimplemented: assumed rank in procedure interface - ieee_1.F90 - large_3.F90 - modes_1.f90 - - # unimplemented: intrinsic module procedure: [SYM] - fma_1.f90 - ieee_11.F90 - ieee_12.f90 - ieee_2.f90 - ieee_3.f90 - ieee_4.f90 - large_2.f90 - rounding_1.f90 - rounding_2.f90 - rounding_3.f90 - signaling_1.f90 - signaling_2.f90 - signaling_3.f90 - signbit_1.f90 - - # unimplemented: no math runtime available for 'sqrt(f80)' - large_1.f90 -) - -# These tests are disabled because they cause flang to crash. -file(GLOB Skipped CONFIGURE_DEPENDS - # error: No specific subroutine of generic '[SYM]' matches the actual - # arguments - ieee_6.f90 - - # error: missing mandatory 'p=' argument - ieee_7.f90 - - # error: Must be a constant value - ieee_8.f90 - - # error: No specific subroutine of generic '[SYM]' matches the actual - # arguments - ieee_6.f90 - - # error: missing mandatory 'p=' argument - ieee_7.f90 - - # error: Must be a constant value - ieee_8.f90 - - # error: unexpected typeless constant value - ieee_10.f90 - ieee_5.f90 - ieee_9.f90 - intrinsics_1.f90 - intrinsics_2.F90 - large_4.f90 - underflow_1.f90 -) - -list(APPEND UnsupportedTests "${Unsupported}") -list(APPEND UnimplementedTests "${Unimplemented}") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/ieee/DisabledFiles.cmake b/Fortran/gfortran/regression/ieee/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/ieee/DisabledFiles.cmake @@ -0,0 +1,75 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# These tests are disabled because they use unsupported extensions. +file(GLOB UNSUPPORTED_FILES CONFIGURE_DEPENDS + dec_math_1.f90 # cotand, cotan +) + +# These tests are disabled because they trigger "not yet implemented" +# assertions in flang. +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: assumed rank in procedure interface + ieee_1.F90 + large_3.F90 + modes_1.f90 + + # unimplemented: intrinsic module procedure: [SYM] + fma_1.f90 + ieee_11.F90 + ieee_12.f90 + ieee_2.f90 + ieee_3.f90 + ieee_4.f90 + large_2.f90 + rounding_1.f90 + rounding_2.f90 + rounding_3.f90 + signaling_1.f90 + signaling_2.f90 + signaling_3.f90 + signbit_1.f90 + + # unimplemented: no math runtime available for 'sqrt(f80)' + large_1.f90 +) + +# These tests are disabled because they cause flang to crash. +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: No specific subroutine of generic '[SYM]' matches the actual + # arguments + ieee_6.f90 + + # error: missing mandatory 'p=' argument + ieee_7.f90 + + # error: Must be a constant value + ieee_8.f90 + + # error: No specific subroutine of generic '[SYM]' matches the actual + # arguments + ieee_6.f90 + + # error: missing mandatory 'p=' argument + ieee_7.f90 + + # error: Must be a constant value + ieee_8.f90 + + # error: unexpected typeless constant value + ieee_10.f90 + ieee_5.f90 + ieee_9.f90 + intrinsics_1.f90 + intrinsics_2.F90 + large_4.f90 + underflow_1.f90 +) + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/lto/CMakeLists.txt b/Fortran/gfortran/regression/lto/CMakeLists.txt --- a/Fortran/gfortran/regression/lto/CMakeLists.txt +++ b/Fortran/gfortran/regression/lto/CMakeLists.txt @@ -6,43 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests are disabled because they trigger a "not yet implemented" -# assertion in flang. -file(GLOB Unimplemented CONFIGURE_DEPENDS - # unimplemented: BIND(C) module variable linkage - bind_c-1_0.f90 - bind_c-2_0.f90 - bind_c-2b_0.f90 - bind_c-3_0.f90 - bind_c-4_0.f90 - bind_c-5_0.f90 - bind_c-6_0.f90 -) +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") -# These tests are disabled because they cause flang to crash -file(GLOB Skipped CONFIGURE_DEPENDS - # error: Unexpected typeless constant value - 20100222-1_0.f03 - - # -------------------------------------------------------------------------- - # - # These tests are skipped because of "odd" reasons. - - # This test seems to depend on pr87689_1.f but that is not declared in the - # main file, pr87689_0.f. Because of the missing dependency, attempting to - # build it results in an undefined reference at link time. - pr87689_0.f - - # pr41576_1.f90 seems to be the main file, but there are no dg directives in - # it. Instead, there is a run directive in pr41576_0.f90 which consists of a - # single subroutine foo that is called in pr41576_1.f90. Obviously, the dg - # directive is in the wrong place and it ought to be fixed. - pr41576_0.f90 -) - -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "${Unimplemented}") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/lto/DisabledFiles.cmake b/Fortran/gfortran/regression/lto/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/lto/DisabledFiles.cmake @@ -0,0 +1,47 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# These tests are disabled because they trigger a "not yet implemented" +# assertion in flang. +file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS + # unimplemented: BIND(C) module variable linkage + bind_c-1_0.f90 + bind_c-2_0.f90 + bind_c-2b_0.f90 + bind_c-3_0.f90 + bind_c-4_0.f90 + bind_c-5_0.f90 + bind_c-6_0.f90 +) + +# These tests are disabled because they cause flang to crash +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: Unexpected typeless constant value + 20100222-1_0.f03 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because of "odd" reasons. + + # This test seems to depend on pr87689_1.f but that is not declared in the + # main file, pr87689_0.f. Because of the missing dependency, attempting to + # build it results in an undefined reference at link time. + pr87689_0.f + + # pr41576_1.f90 seems to be the main file, but there are no dg directives in + # it. Instead, there is a run directive in pr41576_0.f90 which consists of a + # single subroutine foo that is called in pr41576_1.f90. Obviously, the dg + # directive is in the wrong place and it ought to be fixed. + pr41576_0.f90 +) + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/prof/CMakeLists.txt b/Fortran/gfortran/regression/prof/CMakeLists.txt --- a/Fortran/gfortran/regression/prof/CMakeLists.txt +++ b/Fortran/gfortran/regression/prof/CMakeLists.txt @@ -6,5 +6,7 @@ # #===------------------------------------------------------------------------===# +message(STATUS "Adding directory Fortran/gfortran/regression/prof") + # The tests in this directory seem to check profiling. For now, there is nothing # useful that we can do with it. diff --git a/Fortran/gfortran/regression/ubsan/CMakeLists.txt b/Fortran/gfortran/regression/ubsan/CMakeLists.txt --- a/Fortran/gfortran/regression/ubsan/CMakeLists.txt +++ b/Fortran/gfortran/regression/ubsan/CMakeLists.txt @@ -6,5 +6,9 @@ # #===------------------------------------------------------------------------===# -# There are currently no tests in this directory to be disabled for any reason. -add_tests("" "" "" "") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") + diff --git a/Fortran/gfortran/regression/ubsan/DisabledFiles.cmake b/Fortran/gfortran/regression/ubsan/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/ubsan/DisabledFiles.cmake @@ -0,0 +1,19 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# There are currently no failing files. +set(FAILING_FILES "") diff --git a/Fortran/gfortran/regression/vect/CMakeLists.txt b/Fortran/gfortran/regression/vect/CMakeLists.txt --- a/Fortran/gfortran/regression/vect/CMakeLists.txt +++ b/Fortran/gfortran/regression/vect/CMakeLists.txt @@ -6,14 +6,9 @@ # #===------------------------------------------------------------------------===# -# These tests fail at runtime. -file(GLOB Failing CONFIGURE_DEPENDS - pr60510.f -) +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests_from("${TESTS}") +# TODO: Enable the "compile" tests. +# gfortran_add_compile_tests_from("${TESTS}") -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "") -list(APPEND SkippedTests "") -list(APPEND FailingTests "${Failing}") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") diff --git a/Fortran/gfortran/regression/vect/DisabledFiles.cmake b/Fortran/gfortran/regression/vect/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/regression/vect/DisabledFiles.cmake @@ -0,0 +1,21 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# These tests fail at runtime. +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + pr60510.f +) diff --git a/Fortran/gfortran/torture/CMakeLists.txt b/Fortran/gfortran/torture/CMakeLists.txt --- a/Fortran/gfortran/torture/CMakeLists.txt +++ b/Fortran/gfortran/torture/CMakeLists.txt @@ -6,6 +6,13 @@ # #===------------------------------------------------------------------------===# +message(STATUS "Adding directory Fortran/gfortran/torture") + +# PREFIX_EXECUTE and PREFIX_COMPILE are used in gfortran_add_execute_test and +# gfortran_add_compile_test respectively. +set(PREFIX_EXECUTE "gfortran-torture-execute") +set(PREFIX_COMPILE "gfortran-torture-compile") + add_subdirectory(compile) add_subdirectory(execute) diff --git a/Fortran/gfortran/torture/compile/CMakeLists.txt b/Fortran/gfortran/torture/compile/CMakeLists.txt --- a/Fortran/gfortran/torture/compile/CMakeLists.txt +++ b/Fortran/gfortran/torture/compile/CMakeLists.txt @@ -6,159 +6,6 @@ # #===------------------------------------------------------------------------===# -# The test-suite expects an executable to be produced at build time and for -# that executable to be run at test time. The result (in the form of the -# return code or the output written to stdout/stderr) is used to determine -# whether the test has succeeded. The "compile" tests are intended to exercise -# the behavior of the compiler itself. There isn't a clean way of having the -# compiler be executed at test time. Instead, the compiler is run at -# build time and the diagnostics/errors saved to a file as needed. This file is -# compared to a reference output at test time to determine success/failure of -# the test. A dummy executable is also built. This does nothing, but provides -# something that the test suite can "run" at test time. - -# Creates a test from each valid test file in the current source directory. Each -# argument to a function is a list. If a test file is in any of the lists, a -# test will not be created from it. -function(add_tests UnsupportedTests UnimplementedTests SkippedTests FailingTests) - # This will just get all the Fortran source files in the directory. The tests - # in this directory are all single-source. - file(GLOB AllFiles CONFIGURE_DEPENDS LIST_DIRECTORIES false - *.f* - *.F* - ) - - set(TestsToSkip) - - # There is still a chance that some of the unsupported tests may need to be - # enabled, for instance if the non-standard extensions that they exercise are - # supported due to user demand. - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) - list(APPEND TestsToSkip ${UnsupportedTests}) - endif() - - # For the remaining tests, there is cause to build and run the skipped, failing - # and unimplemented tests since some could be enabled once some feature is - # implemented. Eventually, all the TEST_SUITE_FORTRAN_FORCE_* options (perhaps - # with the exception of TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) should - # become redundant and removed. - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_UNIMPLEMENTED_TESTS) - list(APPEND TestsToSkip ${UnimplementedTests}) - endif() - - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_FAILING_TESTS) - list(APPEND TestsToSkip ${FailingTests}) - endif() - - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_SKIPPED_TESTS) - list(APPEND TestsToSkip ${SkippedTests}) - endif() - - foreach(TestToSkip ${TestsToSkip}) - list(REMOVE_ITEM AllFiles ${TestToSkip}) - endforeach() - - # The program to be used to verify the results. The programs here should take - # two files as arguments, return 0 if the files are identical, non-zero - # otherwise. - set(DIFFPROG) - if (WIN32) - find_program(DIFFPROG - NAMES fc.exe - REQUIRED) - else () - find_program(DIFFPROG - NAMES diff cmp - REQUIRED) - endif () - - # The file prefix is needed because there are several tests with the same - # file name across the gfortran test suite. cmake prefers all targets to be - # unique, so they get prefixed with this. - set(FilePrefix "gfortran-torture-compile") - - # The test suite expects to be able to run something at testing time. For the - # compile tests, there is nothing to be run. While a better solution will be - # to modify the test suite to allow for cases like this, as a temporary - # measure, just create an empty executable that will be run for each test. - set(DummySrc ${CMAKE_CURRENT_BINARY_DIR}/dummy.f90) - set(Dummy "dummy") - - file(WRITE ${DummySrc} "program test\nend program test") - add_executable(${Dummy} ${DummySrc}) - # At some point, the -flang-experimental-exec flag will be removed. - target_link_options(${Dummy} PUBLIC "-flang-experimental-exec") - - # All the "compile" tests in the gfortran torture tests are expected to - # pass. Since diagnostics are only saved on failure, the diagnostics - # file produced when compiling the test should be empty. An empty file can, - # therefore, be used as reference output. - set(Reference "${FilePrefix}-empty.reference.out") - add_custom_command( - OUTPUT ${Reference} - COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${Reference} - VERBATIM - USES_TERMINAL - COMMENT "Creating reference output file" - ) - - # The compile script compiles the files and may save the diagnostics to file - # as needed (see the options that the script accepts). - set(COMPILE_SCRIPT - ${CMAKE_SOURCE_DIR}/Fortran/gfortran/compile-save-diags.cmake) - - foreach(File ${AllFiles}) - get_filename_component(FileName ${File} NAME) - - set(Out ${FileName}.out) - set(Obj ${FileName}.o) - - # ${Exe} is just used as a custom target name. Nevertheless, it needs to be - # unique. There are multiple files with the same name but different - # extensions in this directory. Retain the extension, but replace the - # final '.' with an '_'. - string(REPLACE "." "_" Exe "${FilePrefix}_${FileName}") - - set(Compiler -DCOMPILER=${CMAKE_Fortran_COMPILER}) - set(CompilerFlags -DCOMPILER_FLAGS=-c) - set(InputFiles -DINPUT_FILES=${File}) - set(ObjFile -DOBJECT_FILE=${Obj}) - set(OutputFile -DOUTPUT_FILE=${Out}) - set(AlwaysSaveDiags -DALWAYS_SAVE_DIAGS=OFF) - - add_custom_command( - OUTPUT ${Out} - COMMAND ${CMAKE_COMMAND} ${Compiler} ${CompilerFlags} ${InputFiles} ${ObjFile} ${OutputFile} ${AlwaysSaveDiags} -P ${COMPILE_SCRIPT} - VERBATIM - USES_TERMINAL - COMMENT "Compiling ${File}") - - add_custom_target(${Exe} - ALL - DEPENDS ${Out} ${Reference} ${Dummy} - SOURCES ${File}) - - llvm_test_run(EXECUTABLE %S/${Dummy}) - llvm_test_verify(${DIFFPROG} %S/${Reference} %S/${Out}) - llvm_add_test(${Exe}.test %S/${Dummy}) - endforeach() -endfunction() - -# These tests are disabled because they fail, when they should pass. -file(GLOB Failing CONFIGURE_DEPENDS - # For this, gfortran issues a warning while flang fails to compile. This is - # potentially an "unsupported" test if the reason for this difference in - # is because the standard allows for implementation-dependent behavior. - pr37236.f -) - -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "") -list(APPEND SkippedTests "") -list(APPEND FailingTests "${Failing}") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_compile_tests("${TESTS}") diff --git a/Fortran/gfortran/torture/compile/DisabledFiles.cmake b/Fortran/gfortran/torture/compile/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/torture/compile/DisabledFiles.cmake @@ -0,0 +1,24 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# There are currently no skipped files. +set(SKIPPED_FILES "") + +# These tests are disabled because they fail, when they should pass. +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + # For this, gfortran issues a warning while flang fails to compile. This is + # potentially an "unsupported" test if the reason for this difference in + # is because the standard allows for implementation-dependent behavior. + pr37236.f +) diff --git a/Fortran/gfortran/torture/execute/CMakeLists.txt b/Fortran/gfortran/torture/execute/CMakeLists.txt --- a/Fortran/gfortran/torture/execute/CMakeLists.txt +++ b/Fortran/gfortran/torture/execute/CMakeLists.txt @@ -6,121 +6,6 @@ # #===------------------------------------------------------------------------===# -# Creates a test from each valid test file in the current source directory. Each -# argument to a function is a list. If a test file is in any of the lists, a -# test will not be created from it. -function(add_tests UnsupportedTests UnimplementedTests SkippedTests FailingTests) - # All the tests here are single-source. - file(GLOB AllFiles CONFIGURE_DEPENDS LIST_DIRECTORIES false - *.f* - *.F* - ) - - set(TestsToSkip) - - # There is still a chance that some of the unsupported tests may need to be - # enabled, for instance if the non-standard extensions that they exercise are - # supported due to user demand. - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) - list(APPEND TestsToSkip ${UnsupportedTests}) - endif() - - # For the remaining tests, there is cause to build and run the skipped, failing - # and unimplemented tests since some could be enabled once some feature is - # implemented. Eventually, all the TEST_SUITE_FORTRAN_FORCE_* options (perhaps - # with the exception of TEST_SUITE_FORTRAN_FORCE_UNSUPPORTED_TESTS) should - # become redundant and removed. - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_UNIMPLEMENTED_TESTS) - list(APPEND TestsToSkip ${UnimplementedTests}) - endif() - - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_FAILING_TESTS) - list(APPEND TestsToSkip ${FailingTests}) - endif() - - if (NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS AND - NOT TEST_SUITE_FORTRAN_FORCE_SKIPPED_TESTS) - list(APPEND TestsToSkip ${SkippedTests}) - endif() - - foreach(TestToSkip ${TestsToSkip}) - list(REMOVE_ITEM AllFiles ${TestToSkip}) - endforeach() - - foreach(File ${AllFiles}) - gfortran_execute_test(${File} - PREFIX "gfortran-torture-execute" - FFLAGS "" - LDFLAGS "" - DEPFILES "") - endforeach() -endfunction() - -# These tests are disabled because they cause internal compiler errors. -file(GLOB Skipped CONFIGURE_DEPENDS - # error: not a constant derived type expression - der_init_2.f90 - der_init_3.f90 - der_init_4.f90 - der_init_5.f90 - der_type.f90 - - # error: unexpected typeless constant value - data.f90 - data_2.f90 - dep_fails.f90 - der_init.f90 - der_io.f90 - der_point.f90 - entry_8.f90 - equiv_3.f90 - forall_3.f90 - forall_5.f90 - forall_6.f90 - intrinsic_associated.f90 - intrinsic_len.f90 - iolength_2.f90 - pr32604.f90 - st_function.f90 - where_7.f90 - where_8.f90 - - # error: failed to legalize operation 'math.ctlz' that was explicitly marked - # illegal - intrinsic_leadz.f90 - - # -------------------------------------------------------------------------- - # - # These tests are skipped because they trigger semantic errors. It may be - # because they use non-standard features that are currently not supported, or - # it could be unimplemented features that are not tagged as such. - # - - # error: Result of ENTRY is not compatible with result of containing function - entry_2.f90 - - # error: '[SYM]' is not a known intrinsic procedure - specifics.f90 -) - -# These tests are disabled because they fail at runtime when they should pass. -file(GLOB Failing CONFIGURE_DEPENDS - data_3.f90 - elemental.f90 - forall_7.f90 - intrinsic_fraction_exponent.f90 - intrinsic_nearest.f90 - intrinsic_sr_kind.f90 - nan_inf_fmt.f90 - random_2.f90 -) - -list(APPEND UnsupportedTests "") -list(APPEND UnimplementedTests "") -list(APPEND SkippedTests "${Skipped}") -list(APPEND FailingTests "${Failing}") - -add_tests("${UnsupportedTests}" "${UnimplementedTests}" "${SkippedTests}" "${FailingTests}") +set(TESTS) +gfortran_populate_tests(TESTS) +gfortran_add_execute_tests("${TESTS}") diff --git a/Fortran/gfortran/torture/execute/DisabledFiles.cmake b/Fortran/gfortran/torture/execute/DisabledFiles.cmake new file mode 100644 --- /dev/null +++ b/Fortran/gfortran/torture/execute/DisabledFiles.cmake @@ -0,0 +1,72 @@ +#===------------------------------------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# There are currently no unsupported files. +set(UNSUPPORTED_FILES "") + +# There are currently no unimplemented files. +set(UNIMPLEMENTED_FILES "") + +# These tests are disabled because they cause internal compiler errors. +file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS + # error: not a constant derived type expression + der_init_2.f90 + der_init_3.f90 + der_init_4.f90 + der_init_5.f90 + der_type.f90 + + # error: unexpected typeless constant value + data.f90 + data_2.f90 + dep_fails.f90 + der_init.f90 + der_io.f90 + der_point.f90 + entry_8.f90 + equiv_3.f90 + forall_3.f90 + forall_5.f90 + forall_6.f90 + intrinsic_associated.f90 + intrinsic_len.f90 + iolength_2.f90 + pr32604.f90 + st_function.f90 + where_7.f90 + where_8.f90 + + # error: failed to legalize operation 'math.ctlz' that was explicitly marked + # illegal + intrinsic_leadz.f90 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they trigger semantic errors. It may be + # because they use non-standard features that are currently not supported, or + # it could be unimplemented features that are not tagged as such. + # + + # error: Result of ENTRY is not compatible with result of containing function + entry_2.f90 + + # error: '[SYM]' is not a known intrinsic procedure + specifics.f90 +) + +# These tests are disabled because they fail at runtime when they should pass. +file(GLOB FAILING_FILES CONFIGURE_DEPENDS + data_3.f90 + elemental.f90 + forall_7.f90 + intrinsic_fraction_exponent.f90 + intrinsic_nearest.f90 + intrinsic_sr_kind.f90 + nan_inf_fmt.f90 + random_2.f90 +)