#3983: -O2 makes exception disappear
---------------------------------+------------------------------------------
    Reporter:  benjamin_scarlet  |       Owner:                        
        Type:  bug               |      Status:  new                   
    Priority:  normal            |   Component:  Compiler              
     Version:  6.12.1            |    Keywords:  exception optimization
          Os:  Unknown/Multiple  |    Testcase:                        
Architecture:  x86_64 (amd64)    |     Failure:  None/Unknown          
---------------------------------+------------------------------------------

Comment(by benjamin_scarlet):

 The Bar module has two functions, one to throw an exception and one to
 catch it.
 Think "boiled down HUnit": the throw is a boiled down assert, the catch is
 a boiled down test-runner function.

 The Foo module has a function which conditionally uses the throw function
 with conditionally-chosen data. Think "boiled down test case." With the
 arguments given, the test should fail.

 The Test module contains main, which calls the function in Foo so as to
 cause an exception, and tries to catch that exception. Think "test
 driver".

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3983#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to