
#11155: Trivial error thunk gives "undefined reference to stg_ap_0_upd_info"
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
This error popped up when Alan was coding the solution for #11028. The
error is utterly unrelated to what Alan was working on. Here's a
reproducer
{{{
{-# OPTIONS_GHC -O -fno-full-laziness #-}
module Main where
foo :: Bool
{-# NOINLINE foo #-}
foo = error "rk"
bar x = let t :: Char
t = case foo of { True -> 'v'; False -> 'y' }
in [t]
main = print (bar ())
}}}
Just compile that and you get
{{{
Foo.o: In function `c1Sm_info':
(.text+0x29a): undefined reference to `stg_ap_0_upd_info'
}}}
Why do we get that unresolved symbol? The STG code for `bar` looks like
{{{
Main.bar :: forall t_aup. t_aup -> [GHC.Types.Char]
[GblId, Arity=1, Str=DmdType