GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-09-24T22:59:24Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/17235Job Failed #1614272019-09-24T22:59:24ZGabor GreifJob Failed #161427I have never seen T16916 failing before, so maybe this is a flakey test with a very small probability? I think better report it.
Job [#161427](https://gitlab.haskell.org/ghc/ghc/-/jobs/161427) failed for c9349144f15697f15d356c96eff62636...I have never seen T16916 failing before, so maybe this is a flakey test with a very small probability? I think better report it.
Job [#161427](https://gitlab.haskell.org/ghc/ghc/-/jobs/161427) failed for c9349144f15697f15d356c96eff62636566f9c21:8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/16897T13615 segfaults on CI with threaded1 way2019-10-09T21:22:03ZÖmer Sinan AğacanT13615 segfaults on CI with threaded1 waySee https://gitlab.haskell.org/ghc/ghc/-/jobs/115770
Would be good to investigate more.See https://gitlab.haskell.org/ghc/ghc/-/jobs/115770
Would be good to investigate more.8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/16855T16608 tests fail on Darwin2019-06-27T03:10:01ZBen GamariT16608 tests fail on Darwin```patch
--- driver/T16608/T16608_2.run/T16608_2.stdout.normalised 2019-06-21 23:15:43.000000000 -0700
+++ driver/T16608/T16608_2.run/T16608_2.run.stdout.normalised 2019-06-21 23:15:43.000000000 -0700
@@ -2,6 +2,4 @@
[2 of 2] Compiling ...```patch
--- driver/T16608/T16608_2.run/T16608_2.stdout.normalised 2019-06-21 23:15:43.000000000 -0700
+++ driver/T16608/T16608_2.run/T16608_2.run.stdout.normalised 2019-06-21 23:15:43.000000000 -0700
@@ -2,6 +2,4 @@
[2 of 2] Compiling Main ( T16608_2.hs, T16608_2.o )
Linking T16608_2 ...
41
-[1 of 2] Compiling MyInteger ( MyInteger.hs, MyInteger.o )
-Linking T16608_2 ...
-42
+41
```8.10.1Ömer Sinan AğacanÖmer Sinan Ağacanhttps://gitlab.haskell.org/ghc/ghc/-/issues/16738cc017 fails on GHC built with Hadrian2019-06-14T03:39:42ZBen Gamaricc017 fails on GHC built with HadrianSpecifically in the `validate-x86_64-linux-deb8-hadrian` CI job.
```
--- /dev/null 2019-06-03 18:18:50.395150890 +0000
+++ "/tmp/ghctest-a8ya0e43/test spaces/testsuite/tests/ffi/should_compile/cc017.run/cc017.comp.stderr.normalised" 2...Specifically in the `validate-x86_64-linux-deb8-hadrian` CI job.
```
--- /dev/null 2019-06-03 18:18:50.395150890 +0000
+++ "/tmp/ghctest-a8ya0e43/test spaces/testsuite/tests/ffi/should_compile/cc017.run/cc017.comp.stderr.normalised" 2019-06-03 20:02:42.909216827 +0000
@@ -0,0 +1 @@
+cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++
```
When run with a `make`-built compiler we see
```
=====> cc017(normal) 1 of 1 [0, 0, 0]
cd "ffi/should_compile/cc017.run" && "/mnt/work/ghc/ghc/inplace/bin/ghc-stage2" -c cc017.hs -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output -XForeignFunctionInterface -optc-Wno-implicit -optc=-DC -optcxx=-DCXX -optcxx=-std=c++11
```8.10.1Alp MestanogullariAlp Mestanogullarihttps://gitlab.haskell.org/ghc/ghc/-/issues/16389T16190 fails on Windows2019-07-07T18:00:16ZBen GamariT16190 fails on Windows```
=====> T16190(normal) 3408 of 6839 [0, 7, 0]
cd "perf/compiler/T16190.run" && "/c/GitLabRunner/builds/8fc0e283/0/ghc/ghc/inplace/bin/ghc-stage2.exe" --make T16190.hs -dstg-lint -no-user-package-db -rtsopts -fno-warn-missed-speciali...```
=====> T16190(normal) 3408 of 6839 [0, 7, 0]
cd "perf/compiler/T16190.run" && "/c/GitLabRunner/builds/8fc0e283/0/ghc/ghc/inplace/bin/ghc-stage2.exe" --make T16190.hs -dstg-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output -v0
Compile failed (exit code 1) errors were:
C:\\GitLabRunner\\builds\\8fc0e283\\0\\ghc\\ghc\\tmp\\ghc368_0\\ghc_5.s: Assembler messages:
C:\\GitLabRunner\\builds\\8fc0e283\\0\\ghc\\ghc\\tmp\\ghc368_0\\ghc_5.s:5: Error: file not found: C:GitLabRunneruildsfc0e283
`gcc.exe' failed in phase `Assembler'. (Exit code: 1)
*** unexpected failure for T16190(normal)
```
There is some use of TemplateHaskell's `embedBytes`.8.10.1Sylvain HenrySylvain Henryhttps://gitlab.haskell.org/ghc/ghc/-/issues/16201ghci063 failing on Darwin2021-01-23T06:58:41ZBen Gamarighci063 failing on Darwin```diff
--- /dev/null 2019-01-16 12:17:41.000000000 -0800
+++ ghci/scripts/ghci063.run/ghci063.run.stderr.normalised 2019-01-16 12:17:42.000000000 -0800
@@ -0,0 +1,2 @@
+
+B.hs:1:1: parse error on input ‘***’
```
The test in question is...```diff
--- /dev/null 2019-01-16 12:17:41.000000000 -0800
+++ ghci/scripts/ghci063.run/ghci063.run.stderr.normalised 2019-01-16 12:17:42.000000000 -0800
@@ -0,0 +1,2 @@
+
+B.hs:1:1: parse error on input ‘***’
```
The test in question is just a normal `ghci_script` test:
```
:! echo module A where {} >A.hs
:! echo module B where { import A } >B.hs
:load B
-- We're going to replace B.hs with an invalid module but without
-- changing its timestamp. A :reload should *not* look at the
-- contents of the file, because the timestamp hasn't changed.
:! cp B.hs B.hs-copy
:! touch -r B.hs B.hs-copy
:! echo "*** INVALID ***" >B.hs
:! touch -r B.hs-copy B.hs
:reload
-- Put the original file back, now it should work
:! cp B.hs-copy B.hs
:reload
```
I have no idea why GHCi would be trying to parse the `!echo`, much less only on Darwin.
This is currently the last issue Darwin issue keeping us from setting `allow_failure` to false so I'm going to mark this as broken.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghci063 failing on Darwin","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{#!diff\r\n--- /dev/null\t2019-01-16 12:17:41.000000000 -0800\r\n+++ ghci/scripts/ghci063.run/ghci063.run.stderr.normalised\t2019-01-16 12:17:42.000000000 -0800\r\n@@ -0,0 +1,2 @@\r\n+\r\n+B.hs:1:1: parse error on input ‘***’\r\n}}}\r\n\r\nThe test in question is just a normal `ghci_script` test:\r\n{{{\r\n:! echo module A where {} >A.hs\r\n:! echo module B where { import A } >B.hs\r\n\r\n:load B\r\n\r\n-- We're going to replace B.hs with an invalid module but without\r\n-- changing its timestamp. A :reload should *not* look at the\r\n-- contents of the file, because the timestamp hasn't changed.\r\n:! cp B.hs B.hs-copy\r\n:! touch -r B.hs B.hs-copy\r\n:! echo \"*** INVALID ***\" >B.hs\r\n:! touch -r B.hs-copy B.hs\r\n\r\n:reload\r\n\r\n-- Put the original file back, now it should work\r\n:! cp B.hs-copy B.hs\r\n:reload\r\n}}}\r\n\r\nI have no idea why GHCi would be trying to parse the `!echo`, much less only on Darwin.\r\n\r\nThis is currently the last issue Darwin issue keeping us from setting `allow_failure` to false so I'm going to mark this as broken.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/14670-XRebindableSyntax needs return?2019-07-07T18:16:04Zjackkelly-XRebindableSyntax needs return?The documentation for -XRebindableSyntax ( https://downloads.haskell.org/\~ghc/latest/docs/html/users_guide/glasgow_exts.html\#rebindable-syntax-and-the-implicit-prelude-import ) reads:
> “Do” notation is translated using whatever funct...The documentation for -XRebindableSyntax ( https://downloads.haskell.org/\~ghc/latest/docs/html/users_guide/glasgow_exts.html\#rebindable-syntax-and-the-implicit-prelude-import ) reads:
> “Do” notation is translated using whatever functions (\>\>=), (\>\>), and fail, are in scope (not the Prelude versions). List comprehensions, mdo (The recursive do-notation), and parallel array comprehensions, are unaffected.
The following code fails to compile (also confirmed to fail on GHC 8.0.2):
```
{-# LANGUAGE RebindableSyntax #-}
module Lib where
import Prelude (IO)
foo :: IO ()
foo = do
pure ()
```
It fails with this error:
```
/home/kel317/z/src/Lib.hs:9:3: error:
Not in scope: ‘return’
Perhaps you want to add ‘return’ to the import list
in the import of ‘Prelude’ (src/Lib.hs:5:1-19).
|
9 | pure ()
| ^^^^^^^
```
To my reading, either something funky is going on with the way the do-notation is desugared, or the documentation needs to be corrected.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"-XRebindableSyntax needs return?","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.2","keywords":["RebindableSyntax"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The documentation for -XRebindableSyntax ( https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#rebindable-syntax-and-the-implicit-prelude-import ) reads:\r\n\r\n> “Do” notation is translated using whatever functions (>>=), (>>), and fail, are in scope (not the Prelude versions). List comprehensions, mdo (The recursive do-notation), and parallel array comprehensions, are unaffected.\r\n\r\nThe following code fails to compile (also confirmed to fail on GHC 8.0.2):\r\n\r\n{{{\r\n{-# LANGUAGE RebindableSyntax #-}\r\n\r\nmodule Lib where\r\n\r\nimport Prelude (IO)\r\n\r\nfoo :: IO ()\r\nfoo = do\r\n pure ()\r\n}}}\r\n\r\nIt fails with this error:\r\n\r\n{{{\r\n/home/kel317/z/src/Lib.hs:9:3: error:\r\n Not in scope: ‘return’\r\n Perhaps you want to add ‘return’ to the import list\r\n in the import of ‘Prelude’ (src/Lib.hs:5:1-19).\r\n |\r\n9 | pure ()\r\n | ^^^^^^^\r\n}}}\r\n\r\nTo my reading, either something funky is going on with the way the do-notation is desugared, or the documentation needs to be corrected.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/14251LLVM Code Gen messes up registers2020-06-04T18:29:12ZMoritz AngermannLLVM Code Gen messes up registersDue to the way the LLVM Code Gen generates Function Singnatures, it is possible to end up mixed up registers.
A slightly adapted T8064
```hs
{-# LANGUAGE MagicHash, BangPatterns #-}
module Main where
import GHC.Exts
{-# NOINLINE f #-...Due to the way the LLVM Code Gen generates Function Singnatures, it is possible to end up mixed up registers.
A slightly adapted T8064
```hs
{-# LANGUAGE MagicHash, BangPatterns #-}
module Main where
import GHC.Exts
{-# NOINLINE f #-}
f :: (Int# -> Float# -> Double# -> Float# -> Double# -> String) -> String
f g = g 3# 4.0# 5.0## 6.0# 6.9## ++ " World!"
{-# NOINLINE p #-}
p :: Int# -> Float# -> Double# -> Float# -> Double# -> String
p i j k l m = "Hello"
{-# NOINLINE q #-}
q :: Int# -> Int# -> Float# -> Double# -> Float# -> Double# -> String
q _ i j k l m = "Hello " ++ show (F# l) ++ " " ++ show (D# m)
{-# NOINLINE r #-}
r :: Int# -> Float# -> Double# -> Float# -> Double# -> String
r i = let !(I# z) = length [I# 1# .. I# i] in \j k l m -> p z j k l m
-- ghc won't eta-expand around the length, because it has unknown cost
main = do
putStrLn (f p) -- fast call
putStrLn (f r) -- slow call: function but wrong arity
let g = last [q 1#]
putStrLn (f g) -- slow call: thunk
```
will produce the following results:
```
../inplace/bin/ghc-stage1 -fllvm -fforce-recomp T6084.hs -O2 -o T6084-llvm && ./T6084-llvm
[1 of 1] Compiling Main ( T6084.hs, T6084.o )
Linking T6084-llvm ...
Hello World!
Hello World!
Hello 4.0 5.0 World!
../inplace/bin/ghc-stage1 -fasm -fforce-recomp T6084.hs -O2 -o T6084-asm && ./T6084-asm
[1 of 1] Compiling Main ( T6084.hs, T6084.o )
Linking T6084-asm ...
Hello World!
Hello World!
Hello 6.0 6.9 World!
```
The underlying reason is that (at least for X86_64) the Float and Double registers alternate.
The llvm code gen creates function signatures based on the live registers (instead of all).
For `q` only the last Float and Double register are `live`. However when calling `q` we pass
`f1: Float -> d1: Double -> f2: Float -> d2: Double`. `f2` and `d2` are silently ignored, and in
the function body, we now have `f2 <- f1` and `d2 <- d1`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------- |
| Version | 8.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler (LLVM) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | bgamari, carter, simonmar |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"LLVM Code Gen messes up registers","status":"New","operating_system":"","component":"Compiler (LLVM)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["bgamari","carter","simonmar"],"type":"Bug","description":"Due to the way the LLVM Code Gen generates Function Singnatures, it is possible to end up mixed up registers.\r\n\r\nA slightly adapted T8064\r\n{{{#!hs\r\n{-# LANGUAGE MagicHash, BangPatterns #-}\r\nmodule Main where\r\n\r\nimport GHC.Exts\r\n\r\n{-# NOINLINE f #-}\r\nf :: (Int# -> Float# -> Double# -> Float# -> Double# -> String) -> String\r\nf g = g 3# 4.0# 5.0## 6.0# 6.9## ++ \" World!\"\r\n\r\n{-# NOINLINE p #-}\r\np :: Int# -> Float# -> Double# -> Float# -> Double# -> String\r\np i j k l m = \"Hello\"\r\n\r\n{-# NOINLINE q #-}\r\nq :: Int# -> Int# -> Float# -> Double# -> Float# -> Double# -> String\r\nq _ i j k l m = \"Hello \" ++ show (F# l) ++ \" \" ++ show (D# m)\r\n\r\n{-# NOINLINE r #-}\r\nr :: Int# -> Float# -> Double# -> Float# -> Double# -> String\r\nr i = let !(I# z) = length [I# 1# .. I# i] in \\j k l m -> p z j k l m\r\n -- ghc won't eta-expand around the length, because it has unknown cost\r\n\r\nmain = do\r\n putStrLn (f p) -- fast call\r\n putStrLn (f r) -- slow call: function but wrong arity\r\n let g = last [q 1#]\r\n putStrLn (f g) -- slow call: thunk\r\n}}}\r\n\r\nwill produce the following results:\r\n\r\n{{{\r\n../inplace/bin/ghc-stage1 -fllvm -fforce-recomp T6084.hs -O2 -o T6084-llvm && ./T6084-llvm\r\n[1 of 1] Compiling Main ( T6084.hs, T6084.o )\r\nLinking T6084-llvm ...\r\nHello World!\r\nHello World!\r\nHello 4.0 5.0 World!\r\n\r\n../inplace/bin/ghc-stage1 -fasm -fforce-recomp T6084.hs -O2 -o T6084-asm && ./T6084-asm\r\n[1 of 1] Compiling Main ( T6084.hs, T6084.o )\r\nLinking T6084-asm ...\r\nHello World!\r\nHello World!\r\nHello 6.0 6.9 World!\r\n}}}\r\n\r\nThe underlying reason is that (at least for X86_64) the Float and Double registers alternate.\r\nThe llvm code gen creates function signatures based on the live registers (instead of all).\r\n\r\nFor `q` only the last Float and Double register are `live`. However when calling `q` we pass\r\n`f1: Float -> d1: Double -> f2: Float -> d2: Double`. `f2` and `d2` are silently ignored, and in\r\nthe function body, we now have `f2 <- f1` and `d2 <- d1`.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Kavon FarvardinKavon Farvardin