[Git][ghc/ghc][master] Add regression test for #10531
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 915bba6f by Simon Jakobi at 2026-04-21T14:06:16-04:00 Add regression test for #10531 Closes #10531. - - - - - 5 changed files: - + testsuite/tests/driver/T10531/A.hs - + testsuite/tests/driver/T10531/B.hs - + testsuite/tests/driver/T10531/C.hs - + testsuite/tests/driver/T10531/Makefile - + testsuite/tests/driver/T10531/all.T Changes: ===================================== testsuite/tests/driver/T10531/A.hs ===================================== @@ -0,0 +1,4 @@ +module A where + +main :: IO () +main = putStrLn "A" ===================================== testsuite/tests/driver/T10531/B.hs ===================================== @@ -0,0 +1,6 @@ +module B where + +import A () + +main :: IO () +main = putStrLn "B" ===================================== testsuite/tests/driver/T10531/C.hs ===================================== @@ -0,0 +1,4 @@ +import B () + +main :: IO () +main = putStrLn "hi" ===================================== testsuite/tests/driver/T10531/Makefile ===================================== @@ -0,0 +1,14 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +# Test for #10531, a recompilation bug with '-main-is'. + +T10531: + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall A.hs -main-is A.main -o a + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall B.hs -main-is B.main -o b + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall C.hs -o c + rm -f A.o + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall A.hs -main-is A.main -o a + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall B.hs -main-is B.main -o b + ./b$(exeext) ===================================== testsuite/tests/driver/T10531/all.T ===================================== @@ -0,0 +1 @@ +test('T10531', [extra_files(['A.hs', 'B.hs', 'C.hs']), ignore_stdout], makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/915bba6f1ee0f0f3719fcb0f1570e0cb... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/915bba6f1ee0f0f3719fcb0f1570e0cb... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)