Ticket #4044 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

Compilation of my ghc tree with ghc-6.12.2 -dcore-lint fails.

Reported by: milan Owned by:
Priority: normal Milestone: 7.0.1
Component: Compiler Version: 6.12.2
Keywords: Cc: simonpj@…, ben_moseley@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: GHC rejects valid program Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by simonpj) (diff)

In the middle of the work on GHC backend I triggered a bug in GHC 6.12.2. When using 6.12.2 to compile compiler/cmm/CmmSpillReload.hs we get:

*** Core Lint Errors: in result of Simplifier mode gentle, iteration 1 out of 4 ***
	<no location info>:
	    In the expression: ic_a1xa @ $co$_a1wz
	    Kinds don't match in type application:
	    Type variable: co_wild_B1 :: e_a1tx ~ Compiler.Hoopl.Graph.C
	    Arg type: $co$_a1wz :: e_a1zK ~ Compiler.Hoopl.Graph.C

After discussing with simonpj, I have snapshotted the source tree, as I could not reduce the test case.

When compiling with ghc-6.12.2 -dcore-lint, the compilation fails in the stage 1. It is enough to invoke 'make' in the tree to get to the compilation error. I attach the dump of -dcore-lint output.

The file causing the bug is compiler/cmm/CmmSpillReload.hs. On line 131, there is a description of a change that makes the source compile.

Attachments

dump.txt Download (110.5 KB) - added by milan 3 years ago.
The dump of ghc -dcore-lint error message.
compile.output1.zip Download (30.5 KB) - added by BenMoseley 3 years ago.

Change History

Changed 3 years ago by milan

The dump of ghc -dcore-lint error message.

Changed 3 years ago by milan

The tree is at /64playpen/t-mistra/ghc-bug-4044. Anyone in GHC group can modify everything.

Changed 3 years ago by simonpj

  • description modified (diff)

Changed 3 years ago by igloo

  • milestone set to 6.14.1

Changed 3 years ago by BenMoseley

  • cc ben_moseley@… added

We're seeing what seems to be this bug too (GHC 6.12.1). (Were getting segfaults in the finished program which compiled fine without "-dcore-lint", the segfaults disappear with "-O0" and appear with "-O1" and "-O2").

Building GenBarriers?

ghc.exe -odir ../Build\obj -hidir ../Build\obj -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing -fno-warn-type-defaults -fno-warn-unused-do-bind -package conf=C:\ws\fpfdev\depot\QA\EDG\EDG_priv\FPF_Dev.br\ThirdParty?/haskell_packages\fpf.package.conf flags.c -O2 -Werror -i.. -XTemplateHaskell --make BackendBarriers/GenBarriers?.hs -main-is BackendBarriers?.GenBarriers?.main -o ..\Out\EXEs\5\GenBarriers?.exe 
*** Core Lint Errors: in result of Simplifier mode gentle, iteration 1 out of 4 *** <no location info>:

In the expression: ic_a700 @ $co$_a6ZE Kinds don't match in type application:

Type variable: co_wild_B1

a_a6I4 ~ Utils.RangeAnalysis?.FC.FCQty

Arg type: $co$_a6ZE

a_a7k7 ~ Utils.RangeAnalysis?.FC.FCQty 
*** Offending Program ***

Changed 3 years ago by BenMoseley

Changed 3 years ago by simonpj

Hmm. Milan saw this when compiling (a variant of) GHC itself, and that was pretty hard to reproduce. Maybe your test case is smaller?

Is it possible for you to make a reproducible test case? It's embarassing that 6.12 doesn't work properly, even though I'm busy rewriting that very part of the type checker!

Simon

Changed 3 years ago by BenMoseley

Sadly it's in one of our more complex bits of code so it would take some effort to try and reduce it to a small example. Unfortunately I don't have the time to investigate further right now.

Changed 3 years ago by simonpj

OK fair enough. I'm not rushing to fix this if it's not getting in anyone's way, because the new type checker is very different.

Changed 3 years ago by BenMoseley

No problem, right now it's not a major issue for us. If it becomes so I'll investigate further, try to boil it down to a small reproducible case and post that here.

Changed 3 years ago by simonpj

This bug was never reproducible and seems to have gone away, so I'm closing it.

Changed 3 years ago by simonpj

  • status changed from new to closed
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.