On 21 January 2005 at 19:02 Jira commented:

STR-14, martin:
Daniel submitted the following program, which causes the same problems: at -O 2 the match does not succeed, at -O 3 it does.


module foo
imports simple-traversal list-cons tuple-cons io
strategies

main = runtest3

runtest3 =
!( DeclId(Id(“a”{0}))
, DeclId(Id(“b”{1}))
, DeclId(Id(“c”{2}){3})
, DeclId(Id(“d”))
)

; topdown({t,t2,x:
test(!“c” ; ?t);
try(
DeclId(Id(test(?t))); (* works with O3 *)
debug(!“1st bang method matched ok:”));

     try(
     DeclId(Id(test(?t))); (* works with O3 *)
     debug(!"2nd bang method matched ok:"))
 })

signature
constructors
DeclId : Id -> DeclId
Id : String -> Id
———————————————————————–


On 29 October 2005 at 21:41 Jira commented:

STR-14, visser:
tests for this issue succeed now and have been added as regression tests to check future optimizations (especially constprop may mess with this stuff)

Log in to post comments