[Git][ghc/ghc][wip/wasm-fix-T17920] testsuite: fix T17920 for wasm backend
Cheng Shao (@TerrorJack)
gitlab at gitlab.haskell.org
Mon May 13 00:25:33 UTC 2024
Cheng Shao pushed to branch wip/wasm-fix-T17920 at Glasgow Haskell Compiler / GHC
Commits:
f9582e77 by Cheng Shao at 2024-05-13T00:25:10+00:00
testsuite: fix T17920 for wasm backend
T17920 was marked as fragile on wasm before; it can be trivially fixed
by avoiding calling variadic printf() in cmm.
- - - - -
2 changed files:
- testsuite/tests/codeGen/should_run/T17920.cmm
- testsuite/tests/codeGen/should_run/all.T
Changes:
=====================================
testsuite/tests/codeGen/should_run/T17920.cmm
=====================================
@@ -1,5 +1,9 @@
#include "Cmm.h"
+#if !defined(UnregisterisedCompiler)
+import CLOSURE msg;
+#endif
+
section "rodata" { msg : bits8[] "Test\n"; }
section "data" { faketso : bits8[1000]; }
@@ -8,12 +12,13 @@ stg_myExit {
}
stg_foo {
-
+ CInt _unused;
+
BaseReg = faketso;
SAVE_REGS();
- foreign "C" printf(msg "ptr");
+ (_unused) = ccall puts(msg "ptr");
RESTORE_REGS();
=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -207,7 +207,7 @@ test('T16617', normal, compile_and_run, [''])
test('T16449_2', exit_code(0), compile_and_run, [''])
test('T16846', [only_ways(['optasm']), exit_code(1)], compile_and_run, [''])
-test('T17920', [cmm_src, when(arch('wasm32'), fragile(22854))], compile_and_run, [''])
+test('T17920', [cmm_src], compile_and_run, [''])
test('T18527', req_c, compile_and_run, ['T18527FFI.c'])
test('T19149', [req_c,only_ways('sanity')], compile_and_run, ['T19149_c.c'])
test('T20275', normal, compile_and_run, [''])
@@ -245,4 +245,3 @@ test('T24295a', normal, compile_and_run, ['-O -floopification'])
test('T24295b', normal, compile_and_run, ['-O -floopification -fpedantic-bottoms'])
test('T24664a', normal, compile_and_run, ['-O'])
test('T24664b', normal, compile_and_run, ['-O'])
-
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9582e7746234316e059c8d4dc8e16fd83e532b8
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9582e7746234316e059c8d4dc8e16fd83e532b8
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240512/a6991b0d/attachment-0001.html>
More information about the ghc-commits
mailing list