[GHC] #1366: GLOBAL_VAR being inlined?

GHC trac at galois.com
Sun May 20 09:58:35 EDT 2007


#1366: GLOBAL_VAR being inlined?
-----------------------+----------------------------------------------------
  Reporter:  mnislaih  |          Owner:         
      Type:  bug       |         Status:  new    
  Priority:  normal    |      Milestone:         
 Component:  Compiler  |        Version:  6.7    
  Severity:  major     |       Keywords:         
Difficulty:  Unknown   |             Os:  MacOS X
  Testcase:  ghci005   |   Architecture:  x86    
-----------------------+----------------------------------------------------
I noticed that :def wasn't working in my HEAD (as of today) build of ghc.
 It would accept my command definitions silently, but they were ignored.

 In InteractiveUI:
 {{{
 GLOBAL_VAR(commands, builtin_commands, [Command])

 builtin_commands :: [Command]
 builtin_commands = [ ...
 }}}

 After a random change :
 {{{
 builtin_commands = commands `seq` [
 ....
 ]
 }}}

 it seems to me that, under certain conditions (which?), GLOBAL_VARs can
 end up being inlined.

 To see if you can reproduce this issue, simply try defining a new command
 in a -O2 HEAD build of ghci using :def, and then calling it.

 Output of ghci005 here in my build of HEAD:
 {{{
 unknown command ':echo'
 use :? for help.
 unknown command ':echo'
 use :? for help.
 command 'echo' not defined
 unknown command ':echo'
 use :? for help.
 }}}

 With the seq'ing of commands above the test passes finely.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1366>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list