Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC

Commits:

19 changed files:

Changes:

  • compile_flags.txt
    1
    +-fPIC
    
    2
    +-U__PIC__
    
    3
    +-D__PIC__
    
    1 4
     -Wimplicit
    
    2 5
     -include
    
    3 6
     rts/include/ghcversion.h
    
    ... ... @@ -27,3 +30,4 @@ rts/include/ghcversion.h
    27 30
     -DDEBUG
    
    28 31
     -DDYNAMIC
    
    29 32
     -DPROFILING
    
    33
    +-DRtsWay="rts_thr_debug_p_dyn"

  • compiler/GHC/Rename/Splice.hs
    ... ... @@ -182,12 +182,12 @@ rnUntypedBracket e br_body
    182 182
            }
    
    183 183
     
    
    184 184
     rn_utbracket :: HsQuote GhcPs -> RnM (HsQuote GhcRn, FreeVars)
    
    185
    -rn_utbracket (VarBr _ flg rdr_name)
    
    186
    -  = do { name <- lookupOccRn (if flg then WL_Term else WL_Type) (unLoc rdr_name)
    
    185
    +rn_utbracket (VarBr _ is_value_name rdr_name)
    
    186
    +  = do { name <- lookupOccRn (if is_value_name then WL_Term else WL_Type) (unLoc rdr_name)
    
    187 187
            ; let res_name = L (l2l (locA rdr_name)) (WithUserRdr (unLoc rdr_name) name)
    
    188
    -       ; if flg then checkThLocalNameNoLift res_name else checkThLocalTyName name
    
    189
    -       ; check_namespace flg name
    
    190
    -       ; return (VarBr noExtField flg (noLocA name), unitFV name) }
    
    188
    +       ; if is_value_name then checkThLocalNameNoLift res_name else checkThLocalTyName name
    
    189
    +       ; check_namespace is_value_name name
    
    190
    +       ; return (VarBr noExtField is_value_name (noLocA name), unitFV name) }
    
    191 191
     
    
    192 192
     rn_utbracket (ExpBr _ e) = do { (e', fvs) <- rnLExpr e
    
    193 193
                                     ; return (ExpBr noExtField e', fvs) }
    
    ... ... @@ -919,8 +919,7 @@ checkThLocalTyName name
    919 919
             ; case mb_local_use of {
    
    920 920
                  Nothing -> return () ;  -- Not a locally-bound thing
    
    921 921
                  Just (top_lvl, bind_lvl, use_lvl) ->
    
    922
    -    do  { let use_lvl_idx = thLevelIndex use_lvl
    
    923
    -        -- We don't check the well levelledness of name here.
    
    922
    +    do  -- We don't check the well levelledness of name here.
    
    924 923
             -- this would break test for #20969
    
    925 924
             --
    
    926 925
             -- Consequently there is no check&restiction for top level splices.
    
    ... ... @@ -929,11 +928,11 @@ checkThLocalTyName name
    929 928
             -- Therefore checkCrossLevelLiftingTy shouldn't assume anything
    
    930 929
             -- about bind_lvl and use_lvl relation.
    
    931 930
             --
    
    932
    -        ; traceRn "checkThLocalTyName" (ppr name <+> ppr bind_lvl
    
    931
    +        { traceRn "checkThLocalTyName" (ppr name <+> ppr bind_lvl
    
    933 932
                                                      <+> ppr use_lvl
    
    934 933
                                                      <+> ppr use_lvl)
    
    935 934
             ; dflags <- getDynFlags
    
    936
    -        ; checkCrossLevelLiftingTy dflags top_lvl bind_lvl use_lvl use_lvl_idx name } } }
    
    935
    +        ; checkCrossLevelLiftingTy dflags top_lvl bind_lvl use_lvl name } } }
    
    937 936
     
    
    938 937
     -- | Check whether we are allowed to use a Name in this context (for TH purposes)
    
    939 938
     -- In the case of a level incorrect program, attempt to fix it by using
    
    ... ... @@ -947,15 +946,18 @@ checkThLocalNameWithLift = checkThLocalName True
    947 946
     checkThLocalNameNoLift :: LIdOccP GhcRn -> RnM ()
    
    948 947
     checkThLocalNameNoLift name = checkThLocalName False name >> return ()
    
    949 948
     
    
    950
    --- | Implemenation of the level checks
    
    949
    +-- | Implementation of the level checks
    
    951 950
     -- See Note [Template Haskell levels]
    
    952 951
     checkThLocalName :: Bool -> LIdOccP GhcRn -> RnM (HsExpr GhcRn)
    
    953 952
     checkThLocalName allow_lifting name_var
    
    954 953
       -- Exact and Orig names are not imported, so presumed available at all levels.
    
    954
    +  -- whenever the user uses exact names, e.g. say @'mkNameG_v' "" "Foo" "bar"@,
    
    955
    +  -- even though the 'mkNameG_v' here is essentially a quotation, we do not do
    
    956
    +  -- level checks as we assume that the user was trying to bypass the level checks
    
    955 957
       | isExact (userRdrName (unLoc name_var)) || isOrig (userRdrName (unLoc name_var))
    
    956 958
       = return (HsVar noExtField name_var)
    
    957
    -  | isUnboundName name   -- Do not report two errors for
    
    958
    -  = return (HsVar noExtField name_var)            --   $(not_in_scope args)
    
    959
    +  | isUnboundName name                  -- Do not report two errors for
    
    960
    +  = return (HsVar noExtField name_var)  --   $(not_in_scope args)
    
    959 961
       | isWiredInName name
    
    960 962
       = return (HsVar noExtField name_var)
    
    961 963
       | otherwise
    
    ... ... @@ -964,16 +966,15 @@ checkThLocalName allow_lifting name_var
    964 966
             ; case mb_local_use of {
    
    965 967
                  Nothing -> return (HsVar noExtField name_var) ;  -- Not a locally-bound thing
    
    966 968
                  Just (top_lvl, bind_lvl, use_lvl) ->
    
    967
    -    do  { let use_lvl_idx = thLevelIndex use_lvl
    
    968
    -        ; cur_mod <- extractModule <$> getGblEnv
    
    969
    +    do  { cur_mod <- extractModule <$> getGblEnv
    
    969 970
             ; let is_local
    
    970 971
                       | Just mod <- nameModule_maybe name = mod == cur_mod
    
    971 972
                       | otherwise = True
    
    972
    -        ; traceRn "checkThLocalName" (ppr name <+> ppr bind_lvl <+> ppr use_lvl <+> ppr use_lvl)
    
    973
    +        ; traceRn "checkThLocalName" (ppr name <+> ppr bind_lvl <+> ppr use_lvl)
    
    973 974
             ; dflags <- getDynFlags
    
    974 975
             ; env <- getGlobalRdrEnv
    
    975 976
             ; let mgre = lookupGRE_Name env name
    
    976
    -        ; checkCrossLevelLifting dflags (LevelCheckSplice name mgre) top_lvl is_local allow_lifting bind_lvl use_lvl use_lvl_idx name_var } } }
    
    977
    +        ; checkCrossLevelLifting dflags (LevelCheckSplice name mgre) top_lvl is_local allow_lifting bind_lvl use_lvl name_var } } }
    
    977 978
       where
    
    978 979
         name = getName name_var
    
    979 980
     
    
    ... ... @@ -981,14 +982,21 @@ checkThLocalName allow_lifting name_var
    981 982
     checkCrossLevelLifting :: DynFlags
    
    982 983
                            -> LevelCheckReason
    
    983 984
                            -> TopLevelFlag
    
    985
    +                       -- ^ whether or not the identifier is a top level identifier
    
    984 986
                            -> Bool
    
    987
    +                       -- ^ the name of the current module is the name of the module
    
    988
    +                       --   of the name that we're examining (if it exists)
    
    985 989
                            -> Bool
    
    990
    +                       -- ^ whether or not the compiler is allowed to insert
    
    991
    +                       -- 'lift' to fix a potential staging error
    
    986 992
                            -> Set.Set ThLevelIndex
    
    993
    +                       -- ^ the levels at which the identifier is bound
    
    987 994
                            -> ThLevel
    
    988
    -                       -> ThLevelIndex
    
    995
    +                       -- ^ the level that the identifier is being used at
    
    989 996
                            -> LIdOccP GhcRn
    
    997
    +                       -- ^ the identifier that is being checked
    
    990 998
                            -> TcM (HsExpr GhcRn)
    
    991
    -checkCrossLevelLifting dflags reason top_lvl is_local allow_lifting bind_lvl use_lvl use_lvl_idx name_var
    
    999
    +checkCrossLevelLifting dflags reason top_lvl_flg is_local allow_lifting bind_lvl use_lvl name_var
    
    992 1000
       -- 1. If name is in-scope, at the correct level.
    
    993 1001
       | use_lvl_idx `Set.member` bind_lvl = return (HsVar noExtField name_var)
    
    994 1002
       -- 2. Name is imported with -XImplicitStagePersistence
    
    ... ... @@ -996,11 +1004,12 @@ checkCrossLevelLifting dflags reason top_lvl is_local allow_lifting bind_lvl use
    996 1004
       , xopt LangExt.ImplicitStagePersistence dflags = return (HsVar noExtField name_var)
    
    997 1005
       -- 3. Name is top-level, with -XImplicitStagePersistence, and needs
    
    998 1006
       -- to be persisted into the future.
    
    999
    -  | isTopLevel top_lvl
    
    1007
    +  | isTopLevel top_lvl_flg
    
    1000 1008
       , is_local
    
    1001 1009
       , any (use_lvl_idx >=) (Set.toList bind_lvl)
    
    1002 1010
       , xopt LangExt.ImplicitStagePersistence dflags = when (isExternalName name) (keepAlive name) >> return (HsVar noExtField name_var)
    
    1003 1011
       -- 4. Name is in a bracket, and lifting is allowed
    
    1012
    +  --    We need to increment at most once because nested brackets are not allowed
    
    1004 1013
       | Brack _ pending <- use_lvl
    
    1005 1014
       , any (\bind_idx -> use_lvl_idx == incThLevelIndex bind_idx) (Set.toList bind_lvl)
    
    1006 1015
       , allow_lifting
    
    ... ... @@ -1020,10 +1029,11 @@ checkCrossLevelLifting dflags reason top_lvl is_local allow_lifting bind_lvl use
    1020 1029
       | otherwise = addErrTc (TcRnBadlyLevelled reason bind_lvl use_lvl_idx Nothing ErrorWithoutFlag ) >> return (HsVar noExtField name_var)
    
    1021 1030
       where
    
    1022 1031
         name = getName name_var
    
    1032
    +    use_lvl_idx = thLevelIndex use_lvl
    
    1023 1033
     
    
    1024
    -checkCrossLevelLiftingTy :: DynFlags -> TopLevelFlag -> Set.Set ThLevelIndex -> ThLevel -> ThLevelIndex -> Name -> TcM ()
    
    1025
    -checkCrossLevelLiftingTy dflags top_lvl bind_lvl _use_lvl use_lvl_idx name
    
    1026
    -  | isTopLevel top_lvl
    
    1034
    +checkCrossLevelLiftingTy :: DynFlags -> TopLevelFlag -> Set.Set ThLevelIndex -> ThLevel -> Name -> TcM ()
    
    1035
    +checkCrossLevelLiftingTy dflags top_lvl_flg bind_lvl use_lvl name
    
    1036
    +  | isTopLevel top_lvl_flg
    
    1027 1037
       , xopt LangExt.ImplicitStagePersistence dflags
    
    1028 1038
       = return ()
    
    1029 1039
     
    
    ... ... @@ -1038,6 +1048,8 @@ checkCrossLevelLiftingTy dflags top_lvl bind_lvl _use_lvl use_lvl_idx name
    1038 1048
     
    
    1039 1049
       | otherwise
    
    1040 1050
       = return ()
    
    1051
    +  where
    
    1052
    +  use_lvl_idx = thLevelIndex use_lvl
    
    1041 1053
     
    
    1042 1054
     {-
    
    1043 1055
     Note [Keeping things alive for Template Haskell]
    

  • compiler/GHC/Tc/Solver/Monad.hs
    ... ... @@ -1683,17 +1683,15 @@ which is defined at the top-level and therefore fails with an error that we have
    1683 1683
     the stage restriction.
    
    1684 1684
     
    
    1685 1685
     ```
    
    1686
    -Main.hs:12:14: error:
    
    1687
    -    • GHC stage restriction:
    
    1688
    -        instance for ‘Show
    
    1689
    -                        (T ())’ is used in a top-level splice, quasi-quote, or annotation,
    
    1690
    -        and must be imported, not defined locally
    
    1686
    +Main.hs:10:14: error: [GHC-28914]
    
    1687
    +    • Level error: instance for ‘Show (T ())’ is bound at level 0
    
    1688
    +      but used at level -1
    
    1691 1689
         • In the expression: foo [|| T () ||]
    
    1692
    -      In the Template Haskell splice $$(foo [|| T () ||])
    
    1690
    +      In the typed Template Haskell splice: $$(foo [|| T () ||])
    
    1693 1691
           In the expression: $$(foo [|| T () ||])
    
    1694 1692
        |
    
    1695
    -12 |   let x = $$(foo [|| T () ||])
    
    1696
    -   |
    
    1693
    +10 |   let x = $$(foo [|| T () ||])
    
    1694
    +   |              ^^^
    
    1697 1695
     ```
    
    1698 1696
     
    
    1699 1697
     Solving a `Typeable (T t1 ...tn)` constraint generates code that relies on
    

  • compiler/GHC/Tc/Utils/Env.hs
    ... ... @@ -8,6 +8,7 @@
    8 8
                                           -- in module Language.Haskell.Syntax.Extension
    
    9 9
     {-# LANGUAGE TypeFamilies #-}
    
    10 10
     {-# LANGUAGE LambdaCase #-}
    
    11
    +{-# LANGUAGE MultiWayIf #-}
    
    11 12
     
    
    12 13
     module GHC.Tc.Utils.Env(
    
    13 14
             TyThing(..), TcTyThing(..), TcId,
    
    ... ... @@ -1213,6 +1214,20 @@ pprBinders bndrs = pprWithCommas ppr bndrs
    1213 1214
     notFound :: Name -> TcM TyThing
    
    1214 1215
     notFound name
    
    1215 1216
       = do { lcl_env <- getLclEnv
    
    1217
    +       ; lvls <- getCurrentAndBindLevel name
    
    1218
    +       ; if    -- See Note [Out of scope might be a staging error]
    
    1219
    +           | isUnboundName name -> failM  -- If the name really isn't in scope
    
    1220
    +                                          -- don't report it again (#11941)
    
    1221
    +                                          -- the
    
    1222
    +                                          -- the 'Nothing' case of 'getCurrentAndBindLevel'
    
    1223
    +                                          -- currently means 'isUnboundName' but to avoid
    
    1224
    +                                          -- introducing bugs after a refactoring of that
    
    1225
    +                                          -- function, we check this completely independently
    
    1226
    +                                          -- before scrutinizing lvls
    
    1227
    +           | Just (_top_lvl_flag, bind_lvls, lvl@Splice {}) <- lvls
    
    1228
    +               -> failWithTc (TcRnBadlyLevelled (LevelCheckSplice name Nothing) bind_lvls (thLevelIndex lvl) Nothing ErrorWithoutFlag)
    
    1229
    +           | otherwise  -> pure ()
    
    1230
    +
    
    1216 1231
            ; if isTermVarOrFieldNameSpace (nameNameSpace name)
    
    1217 1232
                then
    
    1218 1233
                    -- This code path is only reachable with RequiredTypeArguments enabled
    
    ... ... @@ -1243,14 +1258,23 @@ wrongThingErr expected thing name =
    1243 1258
     {- Note [Out of scope might be a staging error]
    
    1244 1259
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    1245 1260
     Consider
    
    1246
    -  x = 3
    
    1247
    -  data T = MkT $(foo x)
    
    1261
    +  type T = Int
    
    1262
    +  foo = $(1 :: T)
    
    1263
    +
    
    1264
    +GHC currently leaves the user some liberty when it comes to using
    
    1265
    +types in a manner that is theoretically not well-staged.
    
    1266
    +E.g. if `T` here were to be a value, we would reject the program with
    
    1267
    +a staging error. Since it is a type though, we allow it for backwards
    
    1268
    +compatibility reasons.
    
    1269
    +
    
    1270
    +However, in this case, we're just in the process of renaming a splice
    
    1271
    +when trying to type check an expression involving a type, that hasn't
    
    1272
    +even been added to the (type checking) environment yet. That is, why
    
    1273
    +it is out of scope.
    
    1248 1274
     
    
    1249
    -where 'foo' is imported from somewhere.
    
    1275
    +The reason why we cannot recognise this issue earlier is, that if we
    
    1276
    +are not actually type checking the splice, i.e. if we're only using the
    
    1277
    +name of the type (e.g. ''T), the program should be accepted.
    
    1250 1278
     
    
    1251
    -This is really a staging error, because we can't run code involving 'x'.
    
    1252
    -But in fact the type checker processes types first, so 'x' won't even be
    
    1253
    -in the type envt when we look for it in $(foo x).  So inside splices we
    
    1254
    -report something missing from the type env as a staging error.
    
    1255
    -See #5752 and #5795.
    
    1279
    +We stop and report a staging error.
    
    1256 1280
     -}

  • hadrian/src/Flavour.hs
    ... ... @@ -166,6 +166,7 @@ enableDebugInfo :: Flavour -> Flavour
    166 166
     enableDebugInfo = addArgs $ notStage0 ? mconcat
    
    167 167
         [ builder (Ghc CompileHs) ? pure ["-g3"]
    
    168 168
         , builder (Ghc CompileCWithGhc) ? pure ["-optc-g3"]
    
    169
    +    , builder (Ghc CompileCppWithGhc) ? pure ["-optcxx-g3"]
    
    169 170
         , builder (Cc CompileC) ? arg "-g3"
    
    170 171
         , builder (Cabal Setup) ? arg "--disable-library-stripping"
    
    171 172
         , builder (Cabal Setup) ? arg "--disable-executable-stripping"
    

  • hadrian/src/Settings/Packages.hs
    ... ... @@ -351,7 +351,7 @@ rtsPackageArgs = package rts ? do
    351 351
               , Debug     `wayUnit` way          ? pure [ "-DDEBUG"
    
    352 352
                                                         , "-fno-omit-frame-pointer"
    
    353 353
                                                         , "-g3"
    
    354
    -                                                    , "-O0" ]
    
    354
    +                                                    , "-Og" ]
    
    355 355
               -- Set the namespace for the rts fs functions
    
    356 356
               , arg $ "-DFS_NAMESPACE=rts"
    
    357 357
     
    

  • rts/linker/InitFini.c
    ... ... @@ -75,7 +75,7 @@ static void sortInitFiniList(struct InitFiniList **slist, enum SortOrder order)
    75 75
             while (*last != NULL && (*last)->next != NULL) {
    
    76 76
                 struct InitFiniList *s0 = *last;
    
    77 77
                 struct InitFiniList *s1 = s0->next;
    
    78
    -            bool flip;
    
    78
    +            bool flip = false;
    
    79 79
                 switch (order) {
    
    80 80
                     case INCREASING: flip = s0->priority > s1->priority; break;
    
    81 81
                     case DECREASING: flip = s0->priority < s1->priority; break;
    

  • rts/sm/Sanity.c
    ... ... @@ -692,7 +692,7 @@ checkCompactObjects(bdescr *bd)
    692 692
             ASSERT((W_)str == (W_)block + sizeof(StgCompactNFDataBlock));
    
    693 693
     
    
    694 694
             StgWord totalW = 0;
    
    695
    -        StgCompactNFDataBlock *last;
    
    695
    +        StgCompactNFDataBlock *last = block;
    
    696 696
             for ( ; block ; block = block->next) {
    
    697 697
                 last = block;
    
    698 698
                 ASSERT(block->owner == str);
    

  • testsuite/driver/testlib.py
    ... ... @@ -1971,7 +1971,7 @@ async def do_compile(name: TestName,
    1971 1971
         # of whether we expected the compilation to fail or not (successful
    
    1972 1972
         # compilations may generate warnings).
    
    1973 1973
     
    
    1974
    -    expected_stderr_file = find_expected_file(name, 'stderr')
    
    1974
    +    expected_stderr_file = find_expected_file(name, 'stderr', way)
    
    1975 1975
         actual_stderr_file = add_suffix(name, 'comp.stderr')
    
    1976 1976
         diff_file_name = in_testdir(add_suffix(name, 'comp.diff'))
    
    1977 1977
     
    
    ... ... @@ -2012,7 +2012,7 @@ async def compile_cmp_asm(name: TestName,
    2012 2012
         # of whether we expected the compilation to fail or not (successful
    
    2013 2013
         # compilations may generate warnings).
    
    2014 2014
     
    
    2015
    -    expected_asm_file = find_expected_file(name, 'asm')
    
    2015
    +    expected_asm_file = find_expected_file(name, 'asm', way)
    
    2016 2016
         actual_asm_file = add_suffix(name, 's')
    
    2017 2017
     
    
    2018 2018
         if not await compare_outputs(way, 'asm',
    
    ... ... @@ -2036,7 +2036,7 @@ async def compile_grep_asm(name: TestName,
    2036 2036
         if badResult(result):
    
    2037 2037
             return result
    
    2038 2038
     
    
    2039
    -    expected_pat_file = find_expected_file(name, 'asm')
    
    2039
    +    expected_pat_file = find_expected_file(name, 'asm', way)
    
    2040 2040
         actual_asm_file = add_suffix(name, 's')
    
    2041 2041
     
    
    2042 2042
         if not grep_output(join_normalisers(normalise_errmsg),
    
    ... ... @@ -2058,7 +2058,7 @@ async def compile_grep_core(name: TestName,
    2058 2058
         if badResult(result):
    
    2059 2059
             return result
    
    2060 2060
     
    
    2061
    -    expected_pat_file = find_expected_file(name, 'substr-simpl')
    
    2061
    +    expected_pat_file = find_expected_file(name, 'substr-simpl', way)
    
    2062 2062
         actual_core_file = add_suffix(name, 'dump-simpl')
    
    2063 2063
     
    
    2064 2064
         if not grep_output(join_normalisers(normalise_errmsg),
    
    ... ... @@ -2097,7 +2097,7 @@ async def compile_and_run__(name: TestName,
    2097 2097
                 return result
    
    2098 2098
     
    
    2099 2099
             if compile_stderr:
    
    2100
    -            expected_stderr_file = find_expected_file(name, 'ghc.stderr')
    
    2100
    +            expected_stderr_file = find_expected_file(name, 'ghc.stderr', way)
    
    2101 2101
                 actual_stderr_file = add_suffix(name, 'comp.stderr')
    
    2102 2102
                 diff_file_name = in_testdir(add_suffix(name, 'comp.diff'))
    
    2103 2103
     
    
    ... ... @@ -2556,7 +2556,7 @@ def get_compiler_flags() -> List[str]:
    2556 2556
     
    
    2557 2557
     async def stdout_ok(name: TestName, way: WayName) -> bool:
    
    2558 2558
        actual_stdout_file = add_suffix(name, 'run.stdout')
    
    2559
    -   expected_stdout_file = find_expected_file(name, 'stdout')
    
    2559
    +   expected_stdout_file = find_expected_file(name, 'stdout', way)
    
    2560 2560
     
    
    2561 2561
        extra_norm = join_normalisers(normalise_output, getTestOpts().extra_normaliser)
    
    2562 2562
     
    
    ... ... @@ -2583,7 +2583,7 @@ def dump_stdout( name: TestName ) -> None:
    2583 2583
     
    
    2584 2584
     async def stderr_ok(name: TestName, way: WayName) -> bool:
    
    2585 2585
        actual_stderr_file = add_suffix(name, 'run.stderr')
    
    2586
    -   expected_stderr_file = find_expected_file(name, 'stderr')
    
    2586
    +   expected_stderr_file = find_expected_file(name, 'stderr', way)
    
    2587 2587
     
    
    2588 2588
        return await compare_outputs(way, 'stderr',
    
    2589 2589
                               join_normalisers(normalise_errmsg, getTestOpts().extra_errmsg_normaliser), \
    
    ... ... @@ -2688,7 +2688,7 @@ async def check_hp_ok(name: TestName) -> bool:
    2688 2688
             return False
    
    2689 2689
     
    
    2690 2690
     async def check_prof_ok(name: TestName, way: WayName) -> bool:
    
    2691
    -    expected_prof_file = find_expected_file(name, 'prof.sample')
    
    2691
    +    expected_prof_file = find_expected_file(name, 'prof.sample', way)
    
    2692 2692
         expected_prof_path = in_testdir(expected_prof_file)
    
    2693 2693
     
    
    2694 2694
         # Check actual prof file only if we have an expected prof file to
    
    ... ... @@ -3368,18 +3368,19 @@ def in_statsdir(name: Union[Path, str], suffix: str='') -> Path:
    3368 3368
     
    
    3369 3369
     # Finding the sample output.  The filename is of the form
    
    3370 3370
     #
    
    3371
    -#   <test>.stdout[-ws-<wordsize>][-<platform>|-<os>]
    
    3371
    +#   <test>.stdout[-ws-<wordsize>][-<platform>|-<os>][-<way>]
    
    3372 3372
     #
    
    3373
    -def find_expected_file(name: TestName, suff: str) -> Path:
    
    3373
    +def find_expected_file(name: TestName, suff: str, way: WayName) -> Path:
    
    3374 3374
         basename = add_suffix(name, suff)
    
    3375 3375
         # Override the basename if the user has specified one, this will then be
    
    3376 3376
         # subjected to the same name mangling scheme as normal to allow platform
    
    3377 3377
         # specific overrides to work.
    
    3378 3378
         basename = getTestOpts().use_specs.get(suff, basename)
    
    3379 3379
     
    
    3380
    -    files = [str(basename) + ws + plat
    
    3380
    +    files = [str(basename) + ws + plat + way_ext
    
    3381 3381
                  for plat in ['-' + config.platform, '-' + config.os, '']
    
    3382
    -             for ws in ['-ws-' + config.wordsize, '']]
    
    3382
    +             for ws in ['-ws-' + config.wordsize, '']
    
    3383
    +             for way_ext in ['-' + way, '']]
    
    3383 3384
     
    
    3384 3385
         for f in files:
    
    3385 3386
             if in_srcdir(f).exists():
    

  • testsuite/tests/driver/T20696/T20696.stderr-ext-interp
    1
    +[1 of 3] Compiling C                ( C.hs, C.o )
    
    2
    +[2 of 3] Compiling B                ( B.hs, B.o )
    
    3
    +[3 of 3] Compiling A                ( A.hs, A.o )

  • testsuite/tests/driver/T20696/all.T
    1 1
     test('T20696', [extra_files(['A.hs', 'B.hs', 'C.hs'])
    
    2
    -               , expect_broken_for(26552, ['ext-interp'])
    
    3 2
                    , unless(ghc_dynamic(), skip)], multimod_compile, ['A', ''])
    
    4 3
     test('T20696-static', [extra_files(['A.hs', 'B.hs', 'C.hs'])
    
    5 4
                    , when(ghc_dynamic(), skip)], multimod_compile, ['A', ''])

  • testsuite/tests/driver/fat-iface/all.T
    ... ... @@ -9,12 +9,12 @@ test('fat010', [req_th,extra_files(['THA.hs', 'THB.hs', 'THC.hs']), copy_files],
    9 9
     # Check linking works when using -fbyte-code-and-object-code
    
    10 10
     test('fat011', [req_th, extra_files(['FatMain.hs', 'FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatMain', '-fbyte-code-and-object-code -fprefer-byte-code'])
    
    11 11
     # Check that we use interpreter rather than enable dynamic-too if needed for TH
    
    12
    -test('fat012', [req_th, expect_broken_for(26552, ['ext-interp']), unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fprefer-byte-code'])
    
    12
    +test('fat012', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fprefer-byte-code'])
    
    13 13
     # Check that no objects are generated if using -fno-code and -fprefer-byte-code
    
    14 14
     test('fat013', [req_th, req_bco, extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fno-code -fprefer-byte-code'])
    
    15 15
     # When using interpreter should not produce objects
    
    16 16
     test('fat014', [req_th, extra_files(['FatTH.hs', 'FatQuote.hs']), extra_run_opts('-fno-code')], ghci_script, ['fat014.script'])
    
    17
    -test('fat015', [req_th, expect_broken_for(26552, ['ext-interp']), unless(ghc_dynamic(), skip), extra_files(['FatQuote.hs', 'FatQuote1.hs', 'FatQuote2.hs', 'FatTH1.hs', 'FatTH2.hs', 'FatTHTop.hs'])], multimod_compile, ['FatTHTop', '-fno-code -fwrite-interface'])
    
    17
    +test('fat015', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatQuote.hs', 'FatQuote1.hs', 'FatQuote2.hs', 'FatTH1.hs', 'FatTH2.hs', 'FatTHTop.hs'])], multimod_compile, ['FatTHTop', '-fno-code -fwrite-interface'])
    
    18 18
     test('T22807', [req_th, unless(ghc_dynamic(), skip), extra_files(['T22807A.hs', 'T22807B.hs'])]
    
    19 19
                  , makefile_test, ['T22807'])
    
    20 20
     test('T22807_ghci', [req_th, unless(ghc_dynamic(), skip), extra_files(['T22807_ghci.hs'])]
    

  • testsuite/tests/driver/fat-iface/fat012.stderr-ext-interp
    1
    +[1 of 2] Compiling FatQuote         ( FatQuote.hs, FatQuote.o )
    
    2
    +[2 of 2] Compiling FatTH            ( FatTH.hs, FatTH.o )

  • testsuite/tests/driver/fat-iface/fat015.stderr-ext-interp
    1
    +[1 of 6] Compiling FatQuote         ( FatQuote.hs, FatQuote.o, interpreted )
    
    2
    +[2 of 6] Compiling FatQuote1        ( FatQuote1.hs, interpreted )
    
    3
    +[3 of 6] Compiling FatQuote2        ( FatQuote2.hs, FatQuote2.o )
    
    4
    +[4 of 6] Compiling FatTH1           ( FatTH1.hs, nothing )
    
    5
    +[5 of 6] Compiling FatTH2           ( FatTH2.hs, nothing )
    
    6
    +[6 of 6] Compiling FatTHTop         ( FatTHTop.hs, nothing )

  • testsuite/tests/splice-imports/SI07.stderr-ext-interp
    1
    +[1 of 3] Compiling SI05A            ( SI05A.hs, SI05A.o )
    
    2
    +[2 of 3] Compiling SI07A            ( SI07A.hs, nothing )
    
    3
    +[3 of 3] Compiling SI07             ( SI07.hs, nothing )

  • testsuite/tests/splice-imports/all.T
    ... ... @@ -9,7 +9,7 @@ test('SI03', [extra_files(["SI01A.hs"])], multimod_compile_fail, ['SI03', '-v0']
    9 9
     test('SI04', [extra_files(["SI01A.hs"])], multimod_compile, ['SI04', '-v0'])
    
    10 10
     test('SI05', [extra_files(["SI01A.hs"])], multimod_compile_fail, ['SI05', '-v0'])
    
    11 11
     test('SI06', [extra_files(["SI01A.hs"])], multimod_compile, ['SI06', '-v0'])
    
    12
    -test('SI07', [expect_broken_for(26552, ['ext-interp']), unless(ghc_dynamic(), skip), extra_files(["SI05A.hs"])], multimod_compile, ['SI07', '-fwrite-interface -fno-code'])
    
    12
    +test('SI07', [unless(ghc_dynamic(), skip), extra_files(["SI05A.hs"])], multimod_compile, ['SI07', '-fwrite-interface -fno-code'])
    
    13 13
     # Instance tests
    
    14 14
     test('SI08', [extra_files(["ClassA.hs", "InstanceA.hs"])], multimod_compile_fail, ['SI08', '-v0'])
    
    15 15
     test('SI09', [extra_files(["ClassA.hs", "InstanceA.hs"])], multimod_compile, ['SI09', '-v0'])
    

  • testsuite/tests/th/T26099.hs
    1
    +{-# LANGUAGE TemplateHaskell #-}
    
    2
    +module M where
    
    3
    +
    
    4
    +type T = Int
    
    5
    +
    
    6
    +a = $(3 :: T)

  • testsuite/tests/th/T26099.stderr
    1
    +T26099.hs:6:12: error: [GHC-28914]
    
    2
    +    • Level error: ‘T’ is bound at level 0 but used at level -1
    
    3
    +    • In an expression type signature: T
    
    4
    +      In the expression: 3 :: T
    
    5
    +      In the untyped splice: $(3 :: T)
    
    6
    +

  • testsuite/tests/th/all.T
    ... ... @@ -642,3 +642,4 @@ test('QQInQuote', normal, compile, [''])
    642 642
     test('QQTopError', normal, compile_fail, ['-fdiagnostics-show-caret'])
    
    643 643
     test('GadtConSigs_th_pprint1', normal, compile, [''])
    
    644 644
     test('GadtConSigs_th_dump1', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
    
    645
    +test('T26099', normal, compile_fail, [''])