diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-07-18 14:48:11 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-07-19 10:07:53 -0400 |
commit | e8c07aa91f0f05816b455457e3781c247b7399ca (patch) | |
tree | 59d0c9c56fd1d54cea9846e0f584b8fc6cec28ec /testsuite/tests | |
parent | bd92182cd56140ffb2f68ec01492e5aa6333a8fc (diff) | |
download | haskell-e8c07aa91f0f05816b455457e3781c247b7399ca.tar.gz |
driver: Fix implementation of -S
We were failing to stop before running the assembler so the object file
was also created.
Fixes #21869
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/driver/Makefile | 6 | ||||
-rw-r--r-- | testsuite/tests/driver/T21869.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index 30ca61b8e5..085ca668a4 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -773,3 +773,9 @@ T21349: "$(TEST_HC)" $(TEST_HC_OPTS) -v0 Main -working-dir T21349 [ ! -f T21349/B.o ] || (echo "object file exists" && exit 2) [ ! -f T21349/B.hi ] || (echo "interface file exists" && exit 2) + +.PHONY: T21869 +T21869: + "$(TEST_HC)" $(TEST_HC_OPTS) -v0 T21869.hs -S + [ -f T21869.s ] || (echo "assembly file does not exist" && exit 2) + [ ! -f T21869.o ] || (echo "object file exists" && exit 2) diff --git a/testsuite/tests/driver/T21869.hs b/testsuite/tests/driver/T21869.hs new file mode 100644 index 0000000000..918e213f57 --- /dev/null +++ b/testsuite/tests/driver/T21869.hs @@ -0,0 +1,3 @@ +module Main where + +main = print () diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 624c8305dc..f38cb070db 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -309,3 +309,4 @@ test('T16476a', normal, makefile_test, []) test('T16476b', normal, makefile_test, []) test('T20569', extra_files(["T20569/"]), makefile_test, []) test('T21349', extra_files(['T21349']), makefile_test, []) +test('T21869', normal, makefile_test, []) |