Opened 5 years ago

Closed 5 years ago

#7049 closed bug (fixed)

LLVM backend miscompiles GHC stage2

Reported by: kgardas Owned by: dterei
Priority: normal Milestone: 7.8.1
Component: Compiler (LLVM) Version: 7.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:



I've been hunting issue where ghc-stage2 fails with

"inplace/bin/ghc-stage2" -H32m -O -hide-all-packages -i -iutils/haddock/src -iutils/haddock/dist/build -iutils/haddock/dist/build/autogen -Iutils/haddock/dist/build -Iutils/haddock/dist/build/autogen -optP-DIN_GHC_TREE -optP-include -optPutils/haddock/dist/build/autogen/cabal_macros.h -package Cabal-1.15.0 -package array- -package base- -package containers- -package directory- -package filepath- -package ghc-7.5.20120703 -package pretty- -package xhtml-3000.2.0.5 -funbox-strict-fields -O2 -Wall -fwarn-tabs -XHaskell2010 -XCPP -XDeriveDataTypeable -XScopedTypeVariables -XMagicHash -no-user-package-db -rtsopts -odir utils/haddock/dist/build -hidir utils/haddock/dist/build -stubdir utils/haddock/dist/build -hisuf hi -osuf o -hcsuf hc -c utils/haddock/src/Haddock/GhcUtils.hs -o utils/haddock/dist/build/Haddock/GhcUtils.o
Illegal record syntax (use -XTraditionalRecordSyntax): d {objectDir = Just
make[1]: *** [utils/haddock/dist/build/Haddock/GhcUtils.o] Error 1

from time to time. It happens on ARM builder: since build 9. Build 8 was OK. I've been trying to find the precise patch which causes the failure but so far not successful on this. I just suspect the set of patches which happens between those two builds on libraries/containers. Anyway, this is just an issue trigger. The real issue is not on ARM, but probably in LLVM or LLVM backend as I've been also able yesterday to duplicate exactly the same issue on my opensolaris/x86 host while performing perf-llvm build flavor. This is also probably the reason only ARM builder caught this issue as all others are using NCG for building GHC stage2 by default.

Last note: this is a regression from 7.4.x branch.

Change History (5)

comment:1 Changed 5 years ago by kgardas

Component: CompilerCompiler (LLVM)
Owner: set to dterei

comment:2 Changed 5 years ago by igloo

difficulty: Unknown
Milestone: 7.8.1

comment:3 Changed 5 years ago by dterei

Status: newinfoneeded

kgardas are you able to confirm if this bug still occurs? I've fixed a fair few bugs lately and suspect I may have solved this issue....

comment:4 Changed 5 years ago by kgardas

Hi David, thanks for looking into this old bug, however I'm not able to duplicate this already for some time now. Anyway, I tested on i386-solaris and arm-linux and both were able to build quick-llvm and with arm-linux I've also tested perf-llvm which is IIRC how the bug was found and there is nothing failing. Or better I get to a known failure in ghci which is caused by our not so well ARM support in rts/Linker.c. So please close this. Thanks! Karel

comment:5 Changed 5 years ago by dterei

Resolution: fixed
Status: infoneededclosed
Note: See TracTickets for help on using tickets.