Bugs item #604889, was opened at 2002-09-05 04:54 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=604889&group_id=8032
Category: Compiler Group: 5.04 Status: Open Resolution: None Priority: 5 Submitted By: Henrik Nilsson (nhn) Assigned to: Nobody/Anonymous (nobody) Summary: Optimizer introduces non-termination Initial Comment: When compiled with GHC 5.04 and optimization turned on (-O), AFRP's regression tests fail to terminate. When compiled with -O0, everything works, except that somewhat dubious C code seems to be generated (see below). I've included a version of the regression tests with as much code as possible commented out, but you may need the entire AFRP distribution to make progress on this one. You can get it as part of the AFrob/AFRP bundle at www.haskell.org/afrp. In the regression tests, the following logical conjunction is used to check if all tests succeeded: allGood = {- arr_tr && comp_tr && -} first_tr && second_tr && laws_tr && loop_tr {- && looplaws_tr && basicsf_tr && evsrc_tr && coc_tr && switch_tr && kswitch_tr && rswitch_tr && pswitch_tr && rpswitch_tr && wfg_tr && accum_tr && delay_tr && der_tr && loopPre_tr && loopIntegral_tr && react_tr && embed_tr && utils_tr && task_tr -} With only the code for the tests "first", "second", "laws", and "loop" left, and consequently only the corresponding four boolean test results left in the above conjunction, the regression tests fail to terminate when compiled with -O. However, if I comment out ANY ONE (or more) of the four boolean result flags from the conjunction above, the remaining tests do terminate. Thus there does not appear to be one single test that fails, but somehow it is the combination of these four tests that for some reason results in invalid optimizations. Additionally, when I compile the main module (testAFRPMain.hs) with no optimization (-O0), I get the follwing warning: ghc -c -fglasgow-exts -O -package lang -package concurrent -i/usr/local/lib/ghc/imports/arrow:../src -O0 -o testAFRPMain.o testAFRPMain.hs /tmp/ghc17120.hc:1150: warning: initialization discards qualifiers from pointer target type Again, I'm a bit surprised that C code is generated here? I thought I was using the native code generator? This is on a Linux x86 platform. /Henrik -- Henrik Nilsson Yale University [EMAIL PROTECTED] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=604889&group_id=8032 _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs