S.D.Mechveliani writes:
> Here is an  -O -ish  bug  in  ghc-3.02-i386-unknown...
> 
  ....
> remove  -Onot  and run    `make all'
> It reports
> -----------------------------------------------------------------
> several successful compilations, then
> 
> Vec0_.hs:22: Warning:
>     Warning: failed to find (optional) interface decl for
>     `AddSemigroup_sc1'
>     desired at
>     Semigr_.hi:311
> tcUnfolding failed with: Semigr_.zeroS{-riN-}
>                              export/Semigr_.hi:311:
>                     Warning: no binding for Semigr_.AddSemigroup_sc1
> 
> - and such things.
> 
> Then
> 
> tcUnfolding failed with: Semigr_.zeroS{-rh4-}
>                              export/Semigr_.hi:311:
>            Warning: no binding for Semigr_.AddSemigroup_sc1{-r2IX-}
>                  In an interface-file signature for Semigr_.zeroS{-rh4-}
> 
> panic! (the `impossible' happened):
>         lookupBindC:no info!
>  for: restore_smf5
>             (probably: data dependencies broken by an optimisation pass)
>                       static binds for:
>                       DPair.$g2{-g2-}
> ...
> -------------------------------------------------------------------------
> 

Hi,

thanks for a fine report. Your sources showed up a couple of problems
with 3.02:

- putting {-# INLINE #-} pragmas on overloaded functions doesn't
  work properly. (the compiler assumes that all super class selectors
  are unfolded away, but this wasn't happening on the RHS of a
  function marked as {-# INLINE #-} .)

- percolation of specialisation information was done in a cheap and
  cheerful manner for 3.02, something that came back to haunt us when
  compiling your sources (witness the lookupBindC panic above :-(

Both of these problems have now been fixed, but in the meantime I
suggest working around the problems as follows with 3.02:

- leave out {-# INLINE #-} pragmas on overloaded functions.
- compile with -fno-specialise the modules that elicits a panic from
  lookupBindC (there's two of them in DoCon, I think.)

--Sigbjorn

BTW, I had to change the DoCon Makefile to generate dependencies and
noticed that you're being bitten by a rather bad (but semi-known)
mkdependHS bug - it does not understand Haskell block comments:

--source/auxil/Common_.hs
...
module Common_ ( AlgTypeCons(..) ) 
where   
...
{- OLD ***********************************************************
--
-- The  Algebraic type construction is certain expression 
-- describing a type.
-- It is either  BasicType     <mode>  <typeName>           or
--               <constructor> <operands-parameters>
--
-- <mode> = "f"  means a finitely enumerated type, as, say, Char, 
--               or the type given by  data .. = v1 | ... | vn,
--          ""   - arbitrary.

import Group_ ( Properties_subgroup )
import Ring0_ ( Properties_subring, Properties_ideal )
import Ring_  ( PIRChineseIdeal(..)                  )

...

-}


i.e., the script will here generate dependencies on the above imports,
leading to all sorts of weird loops.

Reply via email to