
#11155: Trivial thunk gives "undefined reference to stg_ap_0_upd_info"
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| simplCore/should_compile/T11155
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* status: closed => new
* resolution: fixed =>
@@ -4,1 +4,1 @@
- {{{
+ {{{#!hs
New description:
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
{{{#!hs
{-# 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