[go: nahoru, domu]

Skip to content

Commit

Permalink
Disable non-conforming test (#135)
Browse files Browse the repository at this point in the history
* Disable non-conforming test

Replace it with our own similar test.

The gfortran/regression/assign_5.f90 writes to a constant value
which would cause that test to fail if constants are read-only.

A replacement test assign-goto.f90 is introduced to check that
this an assigned goto statement compiles and runs without issue.

* Update Fortran/gfortran/regression/DisabledFiles.cmake

Co-authored-by: Tom Eccles <t@freedommail.info>

---------

Co-authored-by: Tom Eccles <t@freedommail.info>
  • Loading branch information
Leporacanthicus and tblah committed Jun 13, 2024
1 parent 9144576 commit 6a38b29
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions Fortran/UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This file should only contain add_subdirectory(...) one for each test
add_subdirectory(hello)
add_subdirectory(assign-goto)
add_subdirectory(fcvs21_f95) # NIST Fortran Compiler Validation Suite
add_subdirectory(finalization)
3 changes: 3 additions & 0 deletions Fortran/UnitTests/assign-goto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
llvm_singlesource()

file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
11 changes: 11 additions & 0 deletions Fortran/UnitTests/assign-goto/assign-goto.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
subroutine s(x)
integer :: x
assign 222 to x
goto x
222 continue
end subroutine s

program test
integer :: a
call s(a)
end program test
2 changes: 2 additions & 0 deletions Fortran/UnitTests/assign-goto/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config.traditional_output = True
config.single_source = True
4 changes: 4 additions & 0 deletions Fortran/gfortran/regression/DisabledFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,10 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
directive_unroll_5.f90
# Tests "!GCC$ attributes weak :: x"
weak-3.f90
# Test is not conformant as it writes to a constant argument
# Similar test, that is conformant, added to UnitTests/assign-goto
assign_5.f90


# Probable bugs
# ["a", "ab"]
Expand Down

0 comments on commit 6a38b29

Please sign in to comment.