LLVM Backend generates assembly unparsable by gnu toolchains
module Main where
import System.Random
import qualified Data.Vector as V
g1 = mkStdGen 0 :: StdGen
v2 = take 10000 $ randoms g1 :: [Int]
main :: IO ()
main = do
undefined
$ /e/ghc_regSpill/inplace/bin/ghc-stage2.exe Repro.hs -O2 -fllvm -O2
Loaded package environment from C:\ghc\msys64\home\Andi\tmp\minmax\unpred\.ghc.environment.x86_64-mingw32-8.7.20190215
[1 of 1] Compiling Main ( Repro.hs, Repro.o )
C:\\ghc\\msys64\\tmp\\ghc385768_0\\ghc_6.s: Assembler messages:
C:\\ghc\\msys64\\tmp\\ghc385768_0\\ghc_6.s:354: Error: junk at end of line, first unrecognized character is `,'
`gcc.exe' failed in phase `Assembler'. (Exit code: 1)
I've reproduced this with ghc 8.4/8.6 and HEAD using llvm 7.0.1 on windows.
It only occurs with -O2.
The issues arise from these directives:
.section .rdata,"dr",discard,__xmm@000000000000004e0000000000000000
Trac metadata
Trac field | Value |
---|---|
Version | 8.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | high |
Resolution | Unresolved |
Component | Compiler (LLVM) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown/Multiple |
Architecture |