From 2b7de35171e2b3555e59e60d9478e40ac6bf9f03 Mon Sep 17 00:00:00 2001 From: Nicholas Chaimov Date: Thu, 19 Dec 2024 18:00:24 -0800 Subject: [PATCH] Add test of return-only subroutine --- CMakeLists.txt | 3 ++- tests/fortran/return-only.f90 | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/fortran/return-only.f90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5101802..d6f1d21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -611,6 +611,7 @@ set(FORTRAN_TESTS_SOURCES_LIST hello.f90 loop_test.f90 trivial.f90 + return-only.f90 ) # Add a smoke test of the fparse-llvm script @@ -701,4 +702,4 @@ foreach(test_source IN LISTS FORTRAN_TESTS_SOURCES_LIST) DEPENDS run_${upper_comp}_${test_source} ) endforeach() -endforeach() \ No newline at end of file +endforeach() diff --git a/tests/fortran/return-only.f90 b/tests/fortran/return-only.f90 new file mode 100644 index 0000000..c185cca --- /dev/null +++ b/tests/fortran/return-only.f90 @@ -0,0 +1,7 @@ + subroutine foo + return + end subroutine foo + + program main + call foo + end program main