[Git][ghc/ghc][master] testsuite: fix T17920 for wasm backend

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu May 23 01:53:21 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04: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, [''])
@@ -246,4 +246,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/7b4c19983bf6bc11b519b437a6204c38672721ea

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7b4c19983bf6bc11b519b437a6204c38672721ea
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/20240522/e149383e/attachment-0001.html>


More information about the ghc-commits mailing list