summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen
diff options
context:
space:
mode:
authorTuan Le <ihnaut.if@gmail.com>2020-05-04 16:40:01 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-21 12:16:46 -0400
commit0004ccb885e534c386ceae21580fc59ec7ad0ede (patch)
treeeb377eaf30ed7e5e02d02005210b515b869bd88d /testsuite/tests/codeGen
parentcf5663300c3d8b8b3c7dc2cd0dce2c923ec68987 (diff)
downloadhaskell-0004ccb885e534c386ceae21580fc59ec7ad0ede.tar.gz
llvmGen: Consider Relocatable read-only data as not constantReferences: #18137
Diffstat (limited to 'testsuite/tests/codeGen')
-rw-r--r--testsuite/tests/codeGen/should_gen_asm/T18137.asm1
-rw-r--r--testsuite/tests/codeGen/should_gen_asm/T18137.hs6
-rw-r--r--testsuite/tests/codeGen/should_gen_asm/all.T1
3 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_gen_asm/T18137.asm b/testsuite/tests/codeGen/should_gen_asm/T18137.asm
new file mode 100644
index 0000000000..c38e425b94
--- /dev/null
+++ b/testsuite/tests/codeGen/should_gen_asm/T18137.asm
@@ -0,0 +1 @@
+\.section \.data\.rel\.ro\.RelocRoData_SomeData_closure_tbl,"aw",(?:%|@)progbits \ No newline at end of file
diff --git a/testsuite/tests/codeGen/should_gen_asm/T18137.hs b/testsuite/tests/codeGen/should_gen_asm/T18137.hs
new file mode 100644
index 0000000000..f96960ba63
--- /dev/null
+++ b/testsuite/tests/codeGen/should_gen_asm/T18137.hs
@@ -0,0 +1,6 @@
+module RelocRoData
+ ( SomeData(..)
+ )
+where
+
+data SomeData = SomeConstr
diff --git a/testsuite/tests/codeGen/should_gen_asm/all.T b/testsuite/tests/codeGen/should_gen_asm/all.T
index fbacf2b86b..fa3ed1ccf5 100644
--- a/testsuite/tests/codeGen/should_gen_asm/all.T
+++ b/testsuite/tests/codeGen/should_gen_asm/all.T
@@ -9,3 +9,4 @@ test('memcpy-unroll-conprop', is_amd64_codegen, compile_cmp_asm, ['cmm', ''])
test('memset-unroll', is_amd64_codegen, compile_cmp_asm, ['cmm', ''])
test('bytearray-memset-unroll', is_amd64_codegen, compile_grep_asm, ['hs', True, ''])
test('bytearray-memcpy-unroll', is_amd64_codegen, compile_grep_asm, ['hs', True, ''])
+test('T18137', [when(opsys('darwin'), skip), only_ways(llvm_ways)], compile_grep_asm, ['hs', False, '-fllvm -split-sections'])