summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-02-05 12:31:14 -0500
committerBen Gamari <ben@smart-cactus.org>2022-03-30 22:23:58 -0400
commit0b1b07c43deaf28a57319165d874ff5540b7f783 (patch)
tree62ffb54d0c0d11decc77b77b3d4520076c551645
parent12aa84798cff0d88bee2701e19c393143c1af619 (diff)
downloadhaskell-0b1b07c43deaf28a57319165d874ff5540b7f783.tar.gz
testsuite: Test that we can build bigobj PE objects
-rw-r--r--testsuite/tests/codeGen/should_compile/all.T3
-rw-r--r--testsuite/tests/codeGen/should_compile/mk-big-obj.py9
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T
index 9985580e78..0d1521bc5a 100644
--- a/testsuite/tests/codeGen/should_compile/all.T
+++ b/testsuite/tests/codeGen/should_compile/all.T
@@ -104,3 +104,6 @@ test('T15570',
# warning: integer constant is so large that it is unsigned
test('T18614', normal, compile, [''])
+test('mk-big-obj',
+ [unless(opsys('mingw32'), skip), pre_cmd('$PYTHON mk-big-obj.py > mk-big-obj.c')],
+ multimod_compile, ['mk-big-obj.c', '-v0'])
diff --git a/testsuite/tests/codeGen/should_compile/mk-big-obj.py b/testsuite/tests/codeGen/should_compile/mk-big-obj.py
new file mode 100644
index 0000000000..c03fdbf380
--- /dev/null
+++ b/testsuite/tests/codeGen/should_compile/mk-big-obj.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+for i in range(70000):
+ print(f'''
+ int __attribute__((section("text.test{i}")))
+ test{i}(void)
+ {{ return {i}; }}
+ ''')
+