Index: Fortran/CMakeLists.txt =================================================================== --- Fortran/CMakeLists.txt +++ Fortran/CMakeLists.txt @@ -8,3 +8,4 @@ # directory add_subdirectory(UnitTests) add_subdirectory(SNAP) +add_subdirectory(gfortran) # Tests from the gfortran test suite Index: Fortran/gfortran/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/CMakeLists.txt @@ -0,0 +1,251 @@ +include(CompilerCheckFortran) + +# NOTE: flang does not currently (as of 2023/03/20) support the -w flag. If +# support for the flag is added, this should be removed. +remove_definitions(-w) + +# If the test suite was configured by adding -flang-experimental-exec, remove +# that flag from the default compilation flags. It is only needed at link-time +# anyway, and for that it is explicitly added to those targets that need it. +# +# NOTE: This should be removed once the -flang-experimental-exec flag is no +# longer needed. +string(REPLACE "-flang-experimental-exec" "" TMP_FFLAGS "${CMAKE_Fortran_FLAGS}") +set(CMAKE_Fortran_FLAGS "${TMP_FFLAGS}") + +# This option is added because as of 2023/03/20, several tests in this +# directory have been disabled because of unimplemented features in flang. At +# some point, those features will have been enabled and there will be no need +# to force all the tests to build. At that point, the tests will have been +# skipped because they exercise non-standard features that will not be +# supported. +option(TEST_SUITE_FORTRAN_FORCE_ALL_TESTS + "Build and run all Fortran even if they have been marked as 'to be skipped'." + OFF) + +# The following cause errors if they are passed to clang via CFLAGS +set(FLANG_ERRORING_FFLAGS + -fallow-invalid-boz + -fdec + -fdec-format-defaults + -fdec-static + -fdec-structure + # Not sure if the -fdefault-* options will be supported. Maybe in a different + # form in which case, this will have to be modified to accommodate those. + -fdefault-real-10 + -fdefault-real-16 + -fdump-ipa-cp-details + -fdump-ipa-fnsummary-details + -fdump-ipa-inline-details + -fdump-rtl-expand + -fdump-tree-all + -fdump-tree-cunroll-details + -fdump-tree-cunrolli-details + -fdump-tree-fre1 + -fdump-tree-gimple + -fdump-tree-ifcvt + -fdump-tree-lversion-details + -fdump-tree-omplower + -fdump-tree-optimized + -fdump-tree-original + -fdump-tree-pcom-details + -fdump-tree-pre-details + -fdump-tree-profile-estimate + -fdump-tree-reassoc1 + -fdump-tree-vect-details + -ff2c + -finline-matmul-limit=0 + -finline-matmul-limit=10 + -finline-matmul-limit=100 + -finline-matmul-limit=1000 + -finline-matmul-limit=2 + -finline-matmul-limit=30 + -fipa-cp + -fipa-cp-clone + -fipa-pta + -fipa-reference + -fno-dec + -fno-guess-branch-probability + -fno-ipa-cp + -fno-ipa-modref + -fno-ipa-sra + -fno-pad-source + -fno-tree-ccp + -fno-tree-forwprop + -fno-tree-fre + -fno-tree-loop-optimize + -fno-tree-loop-vectorize + -fpad-source + -fset-g77-defaults + -ftest-forall-temp + -ftree-loop-distribution + -ftree-loop-vectorize + -ftree-pre + -ftree-slp-vectorize + -ftree-tail-merge + -ftree-vectorize + -ftree-vrp + -mdejagnu-cpu=power4 + # -Os might eventually be supported, so this might also need to be removed + # at some point + -Og + -Os + # At some point, if we ever support explicit standard flags, some of these + # should be removed. + -std=gnu + -std=legacy + -std=f95 + -std=f2003 + -std=f2008 + -std=f2008ts + # At the time of writing, -W warnings are not supported. flang errors out + # saying that only -Werror is supported. This should probably go away at some + # point. + -Wall + -Wampersand + -Wanalyzer-too-complex + -Warray-bounds + -Warray-temporaries + -Wconversion + -Wconversion-extra + -Werner + -Werror + -Wextra + -Wfunction-elimination + -Wimplicit-procedure + -Wintrinsic-shadow + -Wintrinsics-std + -Wline-truncation + -Wno-all + -Wno-analyzer-null-dereference + -Wno-analyzer-possible-null-dereference + -Wno-analyzer-too-complex + -Wno-analyzer-use-of-uninitialized-value + -Wno-c-binding-type + -Wno-complain-wrong-lang + -Wno-error + -Wno-intrinsic-shadow + -Wno-intrinsics-std + -Wno-lto-type-mismatch + -Wno-tabs + -Wno-underflow + -Wrealloc-lhs + -Wrealloc-lhs-all + -Wreturn-type + -Wstringop-overflow + -Wsurprising + -Wtabs + -Wuninitialized + -Wunused + -Wunused-dummy-argument + -Wunused-function + -Wunused-parameter + -Wunused-variable + -Wzerotrip +) + +# This is the path to the include directory in the same prefix as flang. +get_filename_component(Fortran_BINDIR ${CMAKE_Fortran_COMPILER} DIRECTORY) +get_filename_component(Fortran_PREFIX ${Fortran_BINDIR} DIRECTORY) +find_file(ISO_FORTRAN_C_HEADER + ISO_Fortran_binding.h + PATHS ${Fortran_PREFIX}/include/flang + REQUIRED +) +get_filename_component(ISO_FORTRAN_C_HEADER_DIR + "${ISO_FORTRAN_C_HEADER}" + DIRECTORY) + +# 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() + endforeach() + + # Remove any flags that will make clang error + if (DG_FFLAGS) + list(REMOVE_ITEM DG_FFLAGS ${FLANG_ERRORING_FFLAGS}) + endif() + + # Set the parent scope variable + set(${Variable} ${DG_FFLAGS} PARENT_SCOPE) +endfunction() + +function(gfortran_execute_test File) + cmake_parse_arguments(GFORTRAN "" "PREFIX" "FFLAGS;LDFLAGS;DEPFILES" ${ARGN}) + # There are a few tests with duplicate filenames, and CMake wants all target + # names to be unique, so we add a disambiguator to the target name. The + # disambiguator uses the path of the file relative to the top-level directory + # containing all the tests from the gfortran test suite. + + # The ${File} argument is guaranteed to be the absolute path to the source + # file. + string(REPLACE "${PROJECT_SOURCE_DIR}/Fortran/gfortran/" "" Name "${File}") + + # 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. + # This test, and presumably others like it, are unrelated. + string(REPLACE "/" "__" Name "${Name}") + + # 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(_target "${GFORTRAN_PREFIX}-${Name}") + + gfortran_dg_options_fflags(DG_FFLAGS ${File}) + + # Add any flags that were requested + list(APPEND FFLAGS ${DG_FFLAGS} ${GFORTRAN_FFLAGS}) + list(APPEND LDFLAGS ${GFORTRAN_LDFLAGS}) + + llvm_test_executable_no_test(${_target} ${File} ${GFORTRAN_DEPFILES}) + llvm_test_run() + + llvm_add_test_for_target(${_target}) + target_include_directories(${_target} PRIVATE ${ISO_FORTRAN_C_HEADER_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) + endif() + endforeach() + + # NOTE: This should be removed when the -flang-experimental-exec flag is no + # longer needed. + target_link_options(${_target} PRIVATE -flang-experimental-exec) + set_target_properties(${_target} PROPERTIES LINKER_LANGUAGE Fortran) +endfunction() + +add_subdirectory(regression) +add_subdirectory(torture) Index: Fortran/gfortran/regression/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/CMakeLists.txt @@ -0,0 +1,1539 @@ +function(add_tests TestsToSkip) + # 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. + file(GLOB AllFiles CONFIGURE_DEPENDS LIST_DIRECTORIES false + *.f* + *.F* + ) + + # Since we already know that we need to skip some tests, might as well pare + # the list down right now. + if(NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS) + foreach(TestToSkip ${TestsToSkip}) + list(REMOVE_ITEM AllFiles ${TestToSkip}) + endforeach() + endif() + + # 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 are unsupported for one reason or another. +file(GLOB UnsupportedTests 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. + + # 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 + 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 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_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 + 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 + pr106731.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 + 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 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they result in a compile error. This may + # be the result of them exercising unsupported GNU 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 + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they test/use GNU extensions that are not + # currently supported by Flang. If any of these are supported, these tests + # should be renabled. + # + # 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 rely on the -ff2c flag in gfortran. + # This tests the ability of gfortran to emit code with calling conventions + # compatible with g77 and f2c. If this is ever supported by flang, these + # tests should be enabled. + f2c_4.f90 + value_4.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 +) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") + +file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + +add_subdirectory(analyzer) +add_subdirectory(asan) +add_subdirectory(c-interop) +add_subdirectory(coarray) +add_subdirectory(debug) +add_subdirectory(g77) +add_subdirectory(goacc) +add_subdirectory(goacc-gomp) +add_subdirectory(gomp) + +# The tests in graphite/ exercise the graphite polyhedral compiler. This is not +# relevant for us. +# add_subdirectory(graphite) + +# The tests in guality/ seem to check the interaction of the compiler with gdb. +# It is not clear how we can test that, so just disable it for now. +# add_subdirectory(guality) + +add_subdirectory(ieee) + +# The tests in prof/ seem to check profiling. For now, there is nothing +# useful that we can do with it, so just disable those tests. +# add_subdirectory(prof) + +add_subdirectory(lto) +add_subdirectory(ubsan) +add_subdirectory(vect) Index: Fortran/gfortran/regression/analyzer/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/analyzer/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/asan/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/asan/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/c-interop/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/c-interop/CMakeLists.txt @@ -0,0 +1,130 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests 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. + + # 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. + # + + # 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) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/coarray/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/coarray/CMakeLists.txt @@ -0,0 +1,118 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests 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. + + # 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 + + # -------------------------------------------------------------------------- + # + # 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 +) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/debug/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/debug/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/g77/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/g77/CMakeLists.txt @@ -0,0 +1,22 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS + # ---------------------------------------------------------------------------- + # These tests are disabled because they cause flang to crash. + # + + # error: 64-bit code requested on a subtarget that doesn't support it! + 20010216-1.f + + # ---------------------------------------------------------------------------- + # These tests are disabled because they use (currently) unsupported GNU + # extensions. + # + intrinsic-unix-bessel.f # bes(j|y)(0|1|n), + intrinsic-unix-erf.f # derf +) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/goacc-gomp/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/goacc-gomp/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/goacc/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/goacc/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/gomp/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/gomp/CMakeLists.txt @@ -0,0 +1,10 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") + +add_subdirectory(appendix-a) Index: Fortran/gfortran/regression/gomp/appendix-a/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/gomp/appendix-a/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/ieee/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/ieee/CMakeLists.txt @@ -0,0 +1,77 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests 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. + + # 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 skipped because they result in a compile error. This may + # be the result of them exercising unsupported GNU 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: 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 + + # --------------------------------------------------------------------------- + # + # These tests are skipped because they use (currently) unsupported GNU + # intrinsics. + # + dec_math_1.f90 # cotand, cotan + + # -------------------------------------------------------------------------- + # + # These tests are skipped because they trigger internal compiler errors. + # + + # 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 +) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/lto/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/lto/CMakeLists.txt @@ -0,0 +1,46 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests 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. + + # 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 skipped because they trigger internal compiler errors. + # + + # 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 +) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't.a +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/prof/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/prof/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/ubsan/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/ubsan/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/regression/vect/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/regression/vect/CMakeLists.txt @@ -0,0 +1,8 @@ +# Some tests in the suite may be unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS "") + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: Fortran/gfortran/torture/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/torture/CMakeLists.txt @@ -0,0 +1,29 @@ +function(add_tests TestsToSkip) + # All the tests here should be single-source. + file(GLOB AllFiles CONFIGURE_DEPENDS LIST_DIRECTORIES false + *.f* + *.F* + ) + + if(NOT TEST_SUITE_FORTRAN_FORCE_ALL_TESTS) + foreach(TestToSkip ${TestsToSkip}) + list(REMOVE_ITEM AllFiles ${TestToSkip}) + endforeach() + endif() + + # For now, only the execute tests are supported. Those have a "{ dg-do run }" + # or a "{ dg-lto-do run }" directive. + foreach(File ${AllFiles}) + gfortran_execute_test(${File} + PREFIX "gfortran-torture-execute" + FFLAGS "" + LDFLAGS "" + DEPFILES "") + endforeach() +endfunction() + +# For now, we only support the execute tests because it is not clear how we can +# use the compile tests within the test suite. But leave a reference to the +# directory here in case that ever changes. +# add_subdirectory(compile) +add_subdirectory(execute) Index: Fortran/gfortran/torture/execute/CMakeLists.txt =================================================================== --- /dev/null +++ Fortran/gfortran/torture/execute/CMakeLists.txt @@ -0,0 +1,53 @@ +# Some tests in the suite are unsupported for one reason or another. +file(GLOB UnsupportedTests CONFIGURE_DEPENDS + # -------------------------------------------------------------------------- + # + # These tests are skipped because they trigger internal compiler errors. + # + + # 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 + + # -------------------------------------------------------------------------- + # + # 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 +) + +# We need the tests to be skipped to be a list. The result of file(GLOB ...) +# isn't. +list(APPEND TestsToSkip ${UnsupportedTests}) + +add_tests("${TestsToSkip}") Index: cmake/modules/SingleMultiSource.cmake =================================================================== --- cmake/modules/SingleMultiSource.cmake +++ cmake/modules/SingleMultiSource.cmake @@ -33,7 +33,7 @@ if(DEFINED Source) set(sources ${Source}) else() - file(GLOB sources *.c *.cpp *.cc *.f *.F *.f90 *.F90) + file(GLOB sources *.c *.cpp *.cc *.f *.F *.f90 *.F90 *.f03 *.F03 *.f08 *.F08) endif() foreach(source ${sources}) basename(name ${source}) @@ -51,7 +51,7 @@ function(llvm_multisource target) set(sources ${ARGN}) if(NOT sources) - file(GLOB sources *.c *.cpp *.cc *.f *.F *.f90 *.F90) + file(GLOB sources *.c *.cpp *.cc *.f *.F *.f90 *.F90 *.f03 *.F03 *.f08 *.F08) endif() llvm_test_executable_no_test(${target} ${sources}) Index: cmake/modules/TestSuite.cmake =================================================================== --- cmake/modules/TestSuite.cmake +++ cmake/modules/TestSuite.cmake @@ -49,6 +49,7 @@ append_target_flags(COMPILE_FLAGS ${target} ${CFLAGS}) append_target_flags(COMPILE_FLAGS ${target} ${CPPFLAGS}) append_target_flags(COMPILE_FLAGS ${target} ${CXXFLAGS}) + append_target_flags(COMPILE_FLAGS ${target} ${FFLAGS}) # Note that we cannot use target_link_libraries() here because that one # only interprets inputs starting with '-' as flags. append_target_flags(LINK_LIBRARIES ${target} ${LDFLAGS}) @@ -70,9 +71,9 @@ endfunction() # Creates a new executable build target. Use this instead of `add_executable`. -# It applies CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS. Creates a .test file if -# necessary, registers the target with the TEST_SUITE_TARGETS list and makes -# sure we build the required dependencies for compiletime measurements +# It applies CFLAGS, CPPFLAGS, CXXFLAGS, FFLAGS and LDFLAGS. Creates a .test +# file if necessary, registers the target with the TEST_SUITE_TARGETS list and +# makes sure we build the required dependencies for compiletime measurements # and support the TEST_SUITE_PROFILE_USE mode. function(llvm_test_executable target) llvm_test_executable_no_test(${target} ${ARGN}) @@ -89,6 +90,7 @@ append_target_flags(COMPILE_FLAGS ${target} ${CFLAGS}) append_target_flags(COMPILE_FLAGS ${target} ${CPPFLAGS}) append_target_flags(COMPILE_FLAGS ${target} ${CXXFLAGS}) + append_target_flags(COMPILE_FLAGS ${target} ${FFLAGS}) # Note that we cannot use target_link_libraries() here because that one # only interprets inputs starting with '-' as flags. append_target_flags(LINK_LIBRARIES ${target} ${LDFLAGS})