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

Commits:

6 changed files:

Changes:

  • compiler/GHC/Stg/EnforceEpt/Types.hs
    ... ... @@ -39,8 +39,8 @@ type InferStgAlt = GenStgAlt 'InferTaggedBinders
    39 39
     combineAltInfo :: TagInfo -> TagInfo -> TagInfo
    
    40 40
     combineAltInfo TagDunno         _              = TagDunno
    
    41 41
     combineAltInfo _                TagDunno       = TagDunno
    
    42
    -combineAltInfo (TagTuple {})    TagProper      = panic "Combining unboxed tuple with non-tuple result"
    
    43
    -combineAltInfo TagProper       (TagTuple {})   = panic "Combining unboxed tuple with non-tuple result"
    
    42
    +combineAltInfo (TagTuple {})    TagProper      = TagDunno  -- This can happen with rep-polymorphic result, see #26107
    
    43
    +combineAltInfo TagProper       (TagTuple {})   = TagDunno  -- This can happen with rep-polymorphic result, see #26107
    
    44 44
     combineAltInfo TagProper        TagProper      = TagProper
    
    45 45
     combineAltInfo (TagTuple is1)  (TagTuple is2)  = TagTuple (zipWithEqual combineAltInfo is1 is2)
    
    46 46
     combineAltInfo (TagTagged)      ti             = ti
    

  • m4/fp_gcc_supports_no_pie.m4
    ... ... @@ -7,9 +7,9 @@ AC_DEFUN([FP_GCC_SUPPORTS_NO_PIE],
    7 7
        AC_REQUIRE([AC_PROG_CC])
    
    8 8
        AC_MSG_CHECKING([whether CC supports -no-pie])
    
    9 9
        echo 'int main() { return 0; }' > conftest.c
    
    10
    -   "$CC" $CONF_GCC_CC_OPTS_STAGE2 -c conftest.c
    
    10
    +   "$CC" -c conftest.c
    
    11 11
        # Some GCC versions only warn when passed an unrecognized flag.
    
    12
    -   if "$CC" $CONF_GCC_LINKER_OPTS_STAGE2 -no-pie -Werror conftest.o -o conftest > conftest.txt 2>&1 && ! grep -i unrecognized conftest.txt > /dev/null 2>&1; then
    
    12
    +   if "$CC" -no-pie -Werror conftest.o -o conftest > conftest.txt 2>&1 && ! grep -i unrecognized conftest.txt > /dev/null 2>&1; then
    
    13 13
            CONF_GCC_SUPPORTS_NO_PIE=YES
    
    14 14
            AC_MSG_RESULT([yes])
    
    15 15
        else
    

  • m4/fptools_set_c_ld_flags.m4
    ... ... @@ -109,6 +109,9 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
    109 109
             $2="$$2 -mcmodel=medium"
    
    110 110
             ;;
    
    111 111
     
    
    112
    +    javascript*)
    
    113
    +        $3="$$3 -sEXPORTED_RUNTIME_METHODS=HEAP8,HEAPU8"
    
    114
    +
    
    112 115
         esac
    
    113 116
     
    
    114 117
         AC_MSG_RESULT([done])
    

  • testsuite/tests/rep-poly/T26107.hs
    1
    +{-# LANGUAGE GADTs, UnboxedTuples #-}
    
    2
    +module T26107 where
    
    3
    +
    
    4
    +import Data.Kind
    
    5
    +import GHC.Exts
    
    6
    +
    
    7
    +type T :: TYPE rep -> Type
    
    8
    +data T a where
    
    9
    +  A :: T Bool
    
    10
    +  B :: T (# #)
    
    11
    +
    
    12
    +f :: forall rep (a :: TYPE rep). T a -> a
    
    13
    +f A = True
    
    14
    +f B = (# #)

  • testsuite/tests/rep-poly/all.T
    ... ... @@ -41,6 +41,7 @@ test('T23883a', normal, compile_fail, [''])
    41 41
     test('T23883b', normal, compile_fail, [''])
    
    42 42
     test('T23883c', normal, compile_fail, [''])
    
    43 43
     test('T23903', normal, compile_fail, [''])
    
    44
    +test('T26107', normal, compile, ['-O'])
    
    44 45
     
    
    45 46
     test('EtaExpandDataCon', normal, compile, ['-O'])
    
    46 47
     test('EtaExpandStupid1', normal, compile, ['-Wno-deprecated-flags'])
    

  • utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
    ... ... @@ -324,6 +324,10 @@ addPlatformDepLinkFlags archOs cc ccLink0 = do
    324 324
         ArchOS ArchPPC OSAIX ->
    
    325 325
           -- We need `-D_THREAD_SAFE` to unlock the thread-local `errno`.
    
    326 326
           return $ ccLink2 & over _prgFlags (++["-D_THREAD_SAFE","-Wl,-bnotextro"])
    
    327
    +    ArchOS ArchJavaScript OSGhcjs ->
    
    328
    +      -- Since https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#407---041525
    
    329
    +      -- the emcc linker does not export the HEAP8 memory view which is used by the js RTS by default anymore.
    
    330
    +      return $ ccLink2 & _prgFlags %++ "-sEXPORTED_RUNTIME_METHODS=HEAP8,HEAPU8"
    
    327 331
         _ ->
    
    328 332
           return ccLink2
    
    329 333