Mercury Bugs - mercury
View Issue Details
0000383mercuryBugpublic2015-03-25 13:592015-03-25 19:53
Reporterjuliensf 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000383: Program behaviour changes when trie string switches are used
DescriptionThe behaviour of the attached program with the attached input differs depending on
whether the predicate cadmium_op_table/2 is compiled into a trie string switch or not.
Steps To Reproduce  $ mmc --make bug
  $ ./bug < bug.inp

yields:

error("Syntax error at token \'main\': operator precedence error", 5)

  $ mmc --no-smart-indexing --make bug
  $ ./bug < bug.inp

yields:

term(varset(var_supply(0), empty, empty), functor(atom("transform"), [functor(atom("="), [functor(atom("main"), [], context("<standard input>", 5)), functor(atom("."), [functor(atom("zinc2merc"), [], context("<standard input>", 5)), functor(atom("high_level"), [], context("<standard input>", 5))], context("<standard input>", 5))], context("<standard input>", 5))], context("<standard input>", 5)))

The latter is the expected output for this program.

Additional InformationThe problem did not exist in rotd-2015-02-20. It exists in rotd-2015-02-27 onwards.
(The change that added trie string switches was committed on 2015-02-24; the next
rotd build was 2015-02-27.)
TagsNo tags attached.
Attached Files? bug.m (7,737) 2015-03-25 14:00
https://bugs.mercurylang.org/file_download.php?file_id=241&type=bug
? bug.inp (435) 2015-03-25 14:00
https://bugs.mercurylang.org/file_download.php?file_id=242&type=bug

Notes
(0000820)
zs   
2015-03-25 19:53   
Fix committed in commit c1e0499140ec5c38369b0cacb546618f56061ed2.

Issue History
2015-03-25 13:59juliensfNew Issue
2015-03-25 13:59juliensfFile Added: bug.inp
2015-03-25 14:00juliensfFile Deleted: bug.inp
2015-03-25 14:00juliensfFile Added: bug.m
2015-03-25 14:00juliensfFile Added: bug.inp
2015-03-25 17:39zsAssigned To => zs
2015-03-25 17:39zsStatusnew => assigned
2015-03-25 19:53zsNote Added: 0000820
2015-03-25 19:53zsStatusassigned => resolved
2015-03-25 19:53zsResolutionopen => fixed