#4283: Different behaviour with -O in concurrent program
---------------------------------+------------------------------------------
Reporter: simonpj | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone: 6.16.1
Component: Compiler | Version: 6.12.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Mitar ([email protected]) reports
I am attaching a program which locks (throws an exception <<loop>>) when
compiled like:
{{{
ghc --make -threaded -main-is Test.main Test.hs -o test
}}}
and doesn't lock when compiled with
{{{
ghc --make -threaded -main-is -O2 Test.main Test.hs -o test
}}}
This should probably not happen.
I am using 6.12.3 on Linux x86_64.
I reproduced this with the HEAD:
{{{
simo...@cam-04-unx:~/tmp$ ./test-opt
42
42
42
42
-- Ctrl-C out
simo...@cam-04-unx:~/tmp$ ./test-no-opt
42
test-no-opt: <<loop>>
/bin/bash: line 0: echo: write error: Broken pipe
/bin/bash: line 0: echo: write error: Broken pipe
/bin/bash: line 0: echo: write error: Broken pipe
-- Ctrl-C out
}}}
It's not 100% clear that it's a bug, but Simon M will look at it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4283>
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