[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Testsuite: fix deprecation warning
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Feb 19 19:34:17 UTC 2025
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
a3f0a506 by Sylvain Henry at 2025-02-19T05:27:30-05:00
Testsuite: fix deprecation warning
> DeprecationWarning: 'count' is passed as positional argument
- - - - -
ef5470a2 by Ben Gamari at 2025-02-19T16:30:53+00:00
Cmm/Parser: Add surface syntax for Mul2 MachOps
These are otherwise very hard to test in isolation.
- - - - -
237a9204 by Cheng Shao at 2025-02-19T14:33:49-05:00
testsuite: fix InternalCounters test with +debug_ghc
The `InternalCounters` test case fails when ghc is built with
`+debug_ghc`. This patch skips it in that case and allows the
testsuite to pass for the `+debug_ghc` flavour transformer.
- - - - -
aa21815c by M Farkas-Dyck at 2025-02-19T14:33:53-05:00
Scrub a use of `head` in `GHC.Driver.Make.downsweep_imports.checkDuplicates`.
- - - - -
4 changed files:
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Driver/Make.hs
- testsuite/driver/testlib.py
- testsuite/tests/rts/all.T
Changes:
=====================================
compiler/GHC/Cmm/Parser.y
=====================================
@@ -1194,6 +1194,8 @@ callishMachOps platform = listToUFM $
, allWidths "fetch_nand" (\w -> MO_AtomicRMW w AMO_Nand)
, allWidths "fetch_or" (\w -> MO_AtomicRMW w AMO_Or)
, allWidths "fetch_xor" (\w -> MO_AtomicRMW w AMO_Xor)
+ , allWidths "mul2_" (\w -> MO_S_Mul2 w)
+ , allWidths "mul2u_" (\w -> MO_U_Mul2 w)
]
where
allWidths
=====================================
compiler/GHC/Driver/Make.hs
=====================================
@@ -1682,9 +1682,9 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro
:: DownsweepCache
-> IO ()
checkDuplicates root_map
- | allow_dup_roots = return ()
- | null dup_roots = return ()
- | otherwise = liftIO $ multiRootsErr (head dup_roots)
+ | not allow_dup_roots
+ , dup_root:_ <- dup_roots = liftIO $ multiRootsErr dup_root
+ | otherwise = pure ()
where
dup_roots :: [[ModSummary]] -- Each at least of length 2
dup_roots = filterOut isSingleton $ map rights (M.elems root_map)
=====================================
testsuite/driver/testlib.py
=====================================
@@ -1733,7 +1733,7 @@ async def do_test(name: TestName,
dst_makefile = in_testdir('Makefile')
if src_makefile.exists():
makefile = src_makefile.read_text(encoding='UTF-8')
- makefile = re.sub('TOP=.*', 'TOP=%s' % config.top, makefile, 1)
+ makefile = re.sub('TOP=.*', 'TOP=%s' % config.top, makefile, count=1)
dst_makefile.write_text(makefile, encoding='UTF-8')
if opts.pre_cmd:
=====================================
testsuite/tests/rts/all.T
=====================================
@@ -470,6 +470,8 @@ test('InternalCounters',
# The ways which build against the debug RTS are built with PROF_SPIN and
# therefore differ in output
, omit_ways(['nonmoving_thr_sanity', 'threaded2_sanity', 'sanity'])
+ # Likewise when ghc is linked with debug RTS using +debug_ghc
+ , when(debug_rts(), skip)
], makefile_test, ['InternalCounters'])
test('alloccounter1', js_broken(22261), compile_and_run,
[
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ee7877db7b5fbd7fd4af6d01bbeeb75c420692a3...aa21815ce7ef5192a3e158435cf1226a4aee0231
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ee7877db7b5fbd7fd4af6d01bbeeb75c420692a3...aa21815ce7ef5192a3e158435cf1226a4aee0231
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/20250219/f146ebe7/attachment-0001.html>
More information about the ghc-commits
mailing list