[GHC] #14221: yaml-0.8.23.3 fails to build with -g

GHC ghc-devs at haskell.org
Tue Sep 12 08:17:05 UTC 2017


#14221: yaml-0.8.23.3 fails to build with -g
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler (NCG)    |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Old description:

> `yaml-0.8.23.3` fails to build with an assembler error,
> {{{
> $ cabal unpack yaml-0.8.23.3
> $ ghc Data/Yaml/Internal.hs -O -g
> [1 of 2] Compiling Text.Libyaml     ( Text/Libyaml.hs, Text/Libyaml.o )
> [Data.Conduit changed]
> [2 of 2] Compiling Data.Yaml.Internal ( Data/Yaml/Internal.hs,
> Data/Yaml/Internal.o )
> /tmp/ghc17780_0/ghc_9.s: Assembler messages:
>
> /tmp/ghc17780_0/ghc_9.s:64575:0: error:
>      Error: can't resolve `.LcJO0_entry_end' {*UND* section} -
> `cJO0_entry' {*UND* section}
>       |
> 64575 |         .quad .LcJO0_entry_end-cJO0_entry
>       | ^
> `gcc' failed in phase `Assembler'. (Exit code: 1)
> }}}
>
> Strangely enough, the symbols `.LcJO0` and `.LcJO0_end` are defined in
> the resulting assembler, but not `.LcJO0_entry_end` nor `cJO0_entry`. I
> suspect the backend

New description:

 `yaml-0.8.23.3` fails to build with an assembler error,
 {{{
 $ cabal unpack yaml-0.8.23.3
 $ ghc Data/Yaml/Internal.hs -O -g -keep-tmp-files -ddump-cmm -ddump-to-
 file -ddump-stg -ddump-cmm-verbose
 [2 of 2] Compiling Data.Yaml.Internal ( Data/Yaml/Internal.hs,
 Data/Yaml/Internal.o )
 /tmp/ghc26515_0/ghc_6.s: Assembler messages:

 /tmp/ghc26515_0/ghc_6.s:64491:0: error:
      Error: can't resolve `.LcsyP_entry_end' {*UND* section} -
 `csyP_entry' {*UND* section}
       |
 64491 |         .quad .LcsyP_entry_end-csyP_entry
       | ^
 `gcc' failed in phase `Assembler'. (Exit code: 1)

 }}}

 Strangely enough, there are local symbols `.LcsyP` and `.LcsyP_end` are
 defined in the resulting assembler (as local labels within
 `DataziYamlziInternal_zdwisNumeric_info`), but not `.LcsyP_entry_end` nor
 `csyP_entry`.

--

Comment (by bgamari):

 Here is a minimal reproducer,
 {{{#!hs
 module T14221 where

 import Data.Text as T

 isNumeric :: Text -> Bool
 isNumeric t =
     T.all isNumeric' t && T.any isNumber t
   where
     isNumber c = '0' <= c && c <= '9'
     isNumeric' c = isNumber c
                 || c == 'e'
                 || c == 'E'
                 || c == '.'
                 || c == '-'
                 || c == '+'
 }}}

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


More information about the ghc-tickets mailing list