#5486: LLVM can't compile HsOpenSSL
---------------------------------+------------------------------------------
    Reporter:  dterei            |       Owner:  dterei            
        Type:  bug               |      Status:  new               
    Priority:  normal            |   Component:  Compiler (LLVM)   
     Version:  7.2.1             |    Keywords:                    
    Testcase:                    |   Blockedby:                    
          Os:  Unknown/Multiple  |    Blocking:                    
Architecture:  Unknown/Multiple  |     Failure:  Compile-time crash
---------------------------------+------------------------------------------

Comment(by dterei):

 OK so its one of the annoying type mismatch issues where LLVM uses a
 different intrinsic type for functions then the standard C library ones.

 memcpy for libc is:
 void *memcpy(void *dst, const void *src, size_t n);

 memcpy for llvm is:

 void memcpy(i8 *dst, i8 *src, i64 n);

 Actually. No this isn't the problem as the code in question isn't using
 the LLVM intrinsic. I should check how the LLVM intrinsic is handled as
 the above may be an issue.

 The problem is the cmm code generated uses two different types for memcpy.

 (_s3::I64, PtrHint) = foreign "ccall" memcpy(...)

 and

 foreign "ccall" memcpy(...)

 So sometimes cmm treats it as (void) other times as (void *). Probably
 better to fix up the Cmm code gen to be consistent and leave LLVM as its
 really doing the right thing.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5486#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to