[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Add regression test for #18177
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: d9388e29 by Simon Jakobi at 2026-03-31T13:14:59-04:00 Add regression test for #18177 Closes #18177. Assisted-by: Codex - - - - - 6a10045c by mangoiv at 2026-03-31T13:15:43-04:00 ci: allow metric decrease for two tests on i386 There has been a nightly failure on i386 due to a compiler runtime improvement on i386 debian 12. We allow that. Metric Decrease (test_env='i386-linux-deb12'): T12707 T8095 - - - - - 585e4b4b by Simon Jakobi at 2026-03-31T13:48:54-04:00 Add perf test for #13960 Closes #13960. - - - - - d4a4055f by mangoiv at 2026-03-31T13:48:55-04:00 testsuite: ignore stderr of static001 This reactivates the test on x86_64 darwin as this should have been done long ago and ignores warnings emitted by ranlib on newer version of the darwin toolchain since they are benign. (no symbols for stub libraries) Fixes #27116 - - - - - 5 changed files: - testsuite/driver/testlib.py - + testsuite/tests/driver/T18177.hs - testsuite/tests/driver/all.T - + testsuite/tests/perf/compiler/T13960.hs - testsuite/tests/perf/compiler/all.T Changes: ===================================== testsuite/driver/testlib.py ===================================== @@ -3043,6 +3043,12 @@ def normalise_errmsg(s: str) -> str: # Old emcc warns when we export HEAP8 but new one requires it (see #26290) s = s.replace('warning: invalid item in EXPORTED_RUNTIME_METHODS: HEAP8\nwarning: invalid item in EXPORTED_RUNTIME_METHODS: HEAPU8\nemcc: warning: warnings in JS library compilation [-Wjs-compiler]\n','') + # on newer versions of MacOS X, the shipped ranlib warns about object files with no symbols, + # however, these are completely benign stubs. + # See https://gitlab.haskell.org/ghc/ghc/-/issues/27116 + if opsys('darwin'): + s = re.sub(r'ranlib: warning:.*has no symbols\n', '', s) + return s # normalise a .prof file, so that we can reasonably compare it against ===================================== testsuite/tests/driver/T18177.hs ===================================== @@ -0,0 +1 @@ +module T18177 where ===================================== testsuite/tests/driver/all.T ===================================== @@ -120,9 +120,7 @@ if config.os == 'darwin': else: only_darwin = skip -test('static001', [extra_files(['Static001.hs']), - only_darwin, - when(arch('x86_64'), expect_broken(8127))], +test('static001', [extra_files(['Static001.hs']), only_darwin], makefile_test, ['static001']) test('dynHelloWorld', @@ -314,6 +312,12 @@ test('MultiRootsErr', normal, multimod_compile_fail, ['MultiRootsErr', 'MultiRoo test('patch-level2', normal, compile, ['-Wcpp-undef']) test('T16476a', normal, makefile_test, []) test('T16476b', normal, makefile_test, []) + +# Test that GHC can handle an empty preprocessor response file. +# This used to cause GHC to hang indefinitely: #18177 +test('T18177', [js_skip, pre_cmd('touch cpp-args')], compile, + ['-v0 -fforce-recomp -fhpc -optP@cpp-args -optP-DX']) + test('T20569', extra_files(["T20569/"]), makefile_test, []) test('T21866', normal, multimod_compile, ['T21866','-no-link']) test('T21349', extra_files(['T21349']), makefile_test, []) ===================================== testsuite/tests/perf/compiler/T13960.hs ===================================== @@ -0,0 +1,72 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- GHC used to run out of simplifier ticks due to inlining the internals of +-- `toStrict . toLazyByteString`. +module T13960 (breaks) where + +import Data.ByteString (ByteString) +import Data.ByteString.Builder (Builder, stringUtf8, toLazyByteString) +import Data.ByteString.Lazy (toStrict) +import Data.String (IsString(..)) + +newtype Query = Query ByteString + +toByteString :: Builder -> ByteString +toByteString x = toStrict (toLazyByteString x) + +instance IsString Query where + fromString = Query . toByteString . stringUtf8 + +breaks :: [(Query, Query)] +breaks = + [ ("query001a", "query001b") + , ("query002a", "query002b") + , ("query003a", "query003b") + , ("query004a", "query004b") + , ("query005a", "query005b") + , ("query006a", "query006b") + , ("query007a", "query007b") + , ("query008a", "query008b") + , ("query009a", "query009b") + , ("query010a", "query010b") + , ("query011a", "query011b") + , ("query012a", "query012b") + , ("query013a", "query013b") + , ("query014a", "query014b") + , ("query015a", "query015b") + , ("query016a", "query016b") + , ("query017a", "query017b") + , ("query018a", "query018b") + , ("query019a", "query019b") + , ("query020a", "query020b") + , ("query021a", "query021b") + , ("query022a", "query022b") + , ("query023a", "query023b") + , ("query024a", "query024b") + , ("query025a", "query025b") + , ("query026a", "query026b") + , ("query027a", "query027b") + , ("query028a", "query028b") + , ("query029a", "query029b") + , ("query030a", "query030b") + , ("query031a", "query031b") + , ("query032a", "query032b") + , ("query033a", "query033b") + , ("query034a", "query034b") + , ("query035a", "query035b") + , ("query036a", "query036b") + , ("query037a", "query037b") + , ("query038a", "query038b") + , ("query039a", "query039b") + , ("query040a", "query040b") + , ("query041a", "query041b") + , ("query042a", "query042b") + , ("query043a", "query043b") + , ("query044a", "query044b") + , ("query045a", "query045b") + , ("query046a", "query046b") + , ("query047a", "query047b") + , ("query048a", "query048b") + , ("query049a", "query049b") + , ("query050a", "query050b") + ] ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -686,6 +686,12 @@ test ('T13820', ], compile, ['-v0']) +test ('T13960', + [ collect_compiler_stats('peak_megabytes_allocated', 20), + collect_compiler_stats('bytes allocated', 2), + ], + compile, + ['-O']) test ('T14766', [ collect_compiler_stats('bytes allocated',2), pre_cmd('python3 genT14766.py > T14766.hs'), View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c6cbeee4b9826409267e722f3ff325... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c6cbeee4b9826409267e722f3ff325... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)