[GHC] #4288: Poor -fspec-constr-count=n warning messages

GHC ghc-devs at haskell.org
Sun Nov 30 21:37:07 UTC 2014


#4288: Poor -fspec-constr-count=n warning messages
-------------------------------------+-------------------------------------
              Reporter:  igloo       |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  low         |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  6.13
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * difficulty:   => Unknown


Old description:

> The attached file, compiled with
> {{{
> ghc -O2 -fspec-constr-count=5 -c q.hs
> }}}
> gives a number of messages like
> {{{
> SpecConstr
>     Function `$j_X1BO{v} [lid]'
>       has one call pattern, but the limit is 0
>     Use -fspec-constr-count=n to set the bound
>     Use -dppr-debug to see specialisations
> SpecConstr
>     Function `$j_X1BR{v} [lid]'
>       has two call patterns, but the limit is 1
>     Use -fspec-constr-count=n to set the bound
>     Use -dppr-debug to see specialisations
> }}}
> Note that the limit doesn't match the `spec-constr-count` we set.
>
> The "limit" given is `sc_count`, but `decreaseSpecCount` changes
> `sc_count` from its default of `specConstrCount dflags`. However, if this
> was fixed then we would get even stranger messages like
> {{{
>       has two call patterns, but the limit is 5
> }}}

New description:

 The attached file, compiled with
 {{{
 ghc -O2 -fspec-constr-count=5 -ddpr-debug -c q.hs
 }}}
 gives a number of messages like
 {{{
 SpecConstr
     Function `$j_X1BO{v} [lid]'
       has one call pattern, but the limit is 0
     Use -fspec-constr-count=n to set the bound
     Use -dppr-debug to see specialisations
 SpecConstr
     Function `$j_X1BR{v} [lid]'
       has two call patterns, but the limit is 1
     Use -fspec-constr-count=n to set the bound
     Use -dppr-debug to see specialisations
 }}}
 Note that the limit doesn't match the `spec-constr-count` we set.

 The "limit" given is `sc_count`, but `decreaseSpecCount` changes
 `sc_count` from its default of `specConstrCount dflags`. However, if this
 was fixed then we would get even stranger messages like
 {{{
       has two call patterns, but the limit is 5
 }}}

--

Comment:

 The messages are suppressed, unless you use `-dppr-debug`. See #5125.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4288#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list