[Git][ghc/ghc][master] 3 commits: Ensure T14272 is run in optasm way
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: fff362cf by Simon Jakobi at 2026-03-11T15:03:49-04:00 Ensure T14272 is run in optasm way Closes #16539. - - - - - ec81ec2c by Simon Jakobi at 2026-03-11T15:03:49-04:00 Add regression test for #24632 Closes #24632. - - - - - cefec47b by Simon Jakobi at 2026-03-11T15:03:50-04:00 Fix module name of T9675: T6975 -> T9675 - - - - - 6 changed files: - + testsuite/tests/ghci/scripts/T24632.hs - + testsuite/tests/ghci/scripts/T24632.script - + testsuite/tests/ghci/scripts/T24632.stdout - testsuite/tests/ghci/scripts/all.T - testsuite/tests/perf/compiler/T9675.hs - testsuite/tests/simplCore/should_compile/all.T Changes: ===================================== testsuite/tests/ghci/scripts/T24632.hs ===================================== @@ -0,0 +1,22 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE DataKinds #-} + +module T24632 where + +import GHC.TypeLits +import Data.Proxy + +data N (n :: Nat) where + O :: (n ~ 0) => N n + S :: (1 <= n) => N n + +f :: forall n. KnownNat n => (1 <= n => N n) -> N n +f c = case cmpNat @1 @n Proxy Proxy of EQI -> c + +g :: KnownNat n => N n +g = f S + +--x :: N 1 -- With type signature: no issue +x = g @1 + +-- ghci> :force x --> internal error: stg_ap_p_ret ===================================== testsuite/tests/ghci/scripts/T24632.script ===================================== @@ -0,0 +1,2 @@ +:load T24632.hs +seq x () ===================================== testsuite/tests/ghci/scripts/T24632.stdout ===================================== @@ -0,0 +1 @@ +() ===================================== testsuite/tests/ghci/scripts/all.T ===================================== @@ -384,6 +384,7 @@ test('T13869', extra_files(['T13869a.hs', 'T13869b.hs']), ghci_script, ['T13869. test('ListTuplePunsPpr', normal, ghci_script, ['ListTuplePunsPpr.script']) test('ListTuplePunsPprNoAbbrevTuple', [expect_broken(23135), limit_stdout_lines(13)], ghci_script, ['ListTuplePunsPprNoAbbrevTuple.script']) test('T24459', normal, ghci_script, ['T24459.script']) +test('T24632', normal, ghci_script, ['T24632.script']) # Test package renaming in GHCi session test('GhciPackageRename', ===================================== testsuite/tests/perf/compiler/T9675.hs ===================================== @@ -1,4 +1,4 @@ -module T6975 where +module T9675 where data Foo = Foo { field1 :: Int -> Int , field2 :: Int -> Int ===================================== testsuite/tests/simplCore/should_compile/all.T ===================================== @@ -270,7 +270,8 @@ test('T14140', normal, makefile_test, ['T14140']) -test('T14272', normal, compile, ['']) +# T14272 used to cause a compiler heap overflow in optasm: #16539 +test('T14272', only_ways(['optasm']), compile, ['']) test('T14270a', normal, compile, ['']) test('T14152', [ only_ways(['optasm']), check_errmsg(r'dead code') ], compile, ['-ddump-simpl']) test('T14152a', [extra_files(['T14152.hs']), pre_cmd('cp T14152.hs T14152a.hs'), View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/517cf64e88567383017c0307d3c4f32... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/517cf64e88567383017c0307d3c4f32... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)