Mercury Bugs - mercury
View Issue Details
0000229mercuryBugpublic2011-11-15 11:222011-11-24 11:36
Assigned Towangp 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000229: problem with static data on high-level C grades
DescriptionThe high-level C backend crashes on the given test case. It seems to be related to constants in the arms of lookup switches. Writing the switch as if-then-else or setting --no-common-struct both work around the problem.

% mmc -s hlc.gc -C lookup_switch_const
Uncaught Mercury exception:
Software Error: map.lookup: key not found
        Key Type: term.var(parse_tree.prog_data.prog_var_type)
        Key Value: var(4)
        Value Type: ml_backend.ml_gen_info.ml_ground_term
TagsNo tags attached.
Attached Files? lookup_switch_const.m (551) 2011-11-15 11:22

2011-11-24 11:36   
Fix committed yesterday.

Issue History
2011-11-15 11:22wangpNew Issue
2011-11-15 11:22wangpFile Added: lookup_switch_const.m
2011-11-23 12:18wangpStatusnew => assigned
2011-11-23 12:18wangpAssigned To => wangp
2011-11-24 11:36wangpNote Added: 0000409
2011-11-24 11:36wangpStatusassigned => resolved
2011-11-24 11:36wangpResolutionopen => fixed