Ticket #2410 (closed merge: fixed)

Opened 5 months ago

Last modified 2 months ago

HEAD build fails when building way=p with WAY_p_OPTS='-prof -caf-all -auto-all'

Reported by: pgavin Assigned to: igloo
Priority: normal Milestone: 6.10.1
Component: Compiler Version: 6.9
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: Operating System: MacOS X
Architecture: x86

Description (Last modified by igloo)

Specifically, the failure happens while compiling libraries/base/Data/Complex.hs:

compiler output:

/Users/pgavin/local/ghc-6.9/src/ghc-6.9/compiler/stage1/ghc-inplace -package-name base-3.0 -hide-all-packages -split-objs -i -idist/build -i. -idist/build/autogen -Idist/build -Iinclude -#include "HsBase.h" -odir dist/build -hidir dist/build -stubdir dist/build -package ghc-prim-0.1 -package integer-0.1 -package rts-1.0 -O -package-name base -XMagicHash -XExistentialQuantification -XRank2Types -XScopedTypeVariables -XUnboxedTuples -XForeignFunctionInterface -XUnliftedFFITypes -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -XFlexibleInstances -XPatternSignatures -XStandaloneDeriving -XPatternGuards -XCPP -idist/build  -prof -caf-all -auto-all -hisuf p_hi -hcsuf p_hc -osuf p_o -H32m -O -H32m -O2 -O2 -Rghc-timing -XGenerics -O2 -Wall -fno-warn-deprecated-flags -w  -c Data/Complex.hs -o dist/build/Data/Complex.p_o  -ohi dist/build/Data/Complex.p_hi

/var/folders/o2/o2fca1ekG9SKEu61XaHsjE+++TI/-Tmp-/ghc51695_0/ghc51695_0.split__108.s:1256:0:
    FATAL:Symbol _base_DataziComplex_zeze_CAF_cc_ccs already defined.

Compilation succeeds if the SPECIALIZE pragmas are removed from the instance declarations for Num, Fractional, and Floating.

Change History

07/05/08 15:51:20 changed by igloo

  • difficulty set to Unknown.
  • description changed.

07/05/08 15:52:19 changed by igloo

  • milestone set to 6.10.1.

Thanks for the report; we'll have a look at what's going on.

09/27/08 16:01:17 changed by igloo

Testcase:

module C where

data RealFloat a => Complex a = !a :+ !a
    deriving (Eq, Show)

instance  (RealFloat a) => Num (Complex a)  where
    {-# SPECIALISE instance Num (Complex Float) #-}
    {-# SPECIALISE instance Num (Complex Double) #-}
    (x :+ y) + (x' :+ y')   =  (x + x') :+ (y + y')

With 6.11.20080927:

$ ghc -prof -caf-all -auto-all -O2 -c C.hs -fforce-recomp 
/tmp/ghc31271_0/ghc31271_0.s: Assembler messages:

/tmp/ghc31271_0/ghc31271_0.s:14944:0:
     Error: symbol `C_a_CAF_cc_ccs' is already defined

/tmp/ghc31271_0/ghc31271_0.s:14976:0:
     Error: symbol `C_a_CAF_cc_ccs' is already defined

10/01/08 04:06:59 changed by simonmar

  • owner set to igloo.
  • type changed from bug to merge.

Fixed:

Tue Sep 30 07:18:12 PDT 2008  Simon Marlow <marlowsd@gmail.com>
  * Fix #2410: carefully generate unique names for CAF CCs

10/03/08 15:57:15 changed by igloo

  • status changed from new to closed.
  • resolution set to fixed.

Merged