2024-11-22 00:23 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000043mercuryBugpublic2008-03-05 18:51
Reporterwangp 
Assigned Towangp 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000043: intermod unused args analysis and typeclass constraints
DescriptionThe compiler aborts on the following module, when performing unused argument
analysis while making the intermodule optimisation file, i.e.

mmc --intermod-unused-args --make-optimisation-interface bug


The seems to require these conditions:

a function f has a typeclass constraint, and
f is type specialised, and
the type that f is specialised for is polymorphic

Additional InformationHere's a stack trace.

Uncaught Mercury exception:
Software Error: map.lookup: key not found
        Key Type: term.var(parse_tree.prog_data.tvar_type)
        Key Value: var(1)
        Value Type: hlds.hlds_rtti.type_info_locn
Stack dump follows:
   0 pred exception.throw_impl/1-0 (erroneous) (exception.m:816)
   1 pred exception.throw/1-0 (erroneous) (exception.m:388)
   2 pred require.error/1-0 (erroneous) (require.m:122)
   3 pred require.report_lookup_error/3-0 (erroneous) (require.m:98)
   4 pred map.lookup/3-0 (det) (map.m:612)
   5 pred hlds.hlds_rtti.rtti_lookup_type_info_locn/3-0 (det) (hlds_rtti.m:438)
   6 pred transform_hlds.unused_args.lambda_unused_args_m_553/3-0 (det) (unused_args.m:554)
   7 pred list.map/3-0 (det) (list.m:1890)
   8 pred transform_hlds.unused_args.setup_typeinfo_dep/6-0 (det) (unused_args.m:553)
   9 pred transform_hlds.unused_args.setup_typeinfo_deps/6-0 (det) (unused_args.m:544)
  10 pred transform_hlds.unused_args.setup_proc_args/12-0 (det) (unused_args.m:503)
  11 pred transform_hlds.unused_args.setup_pred_args/12-0 (det) (unused_args.m:379)
  12 pred transform_hlds.unused_args.maybe_setup_pred_args/11-0 (det) (unused_args.m:365)
  13 91* pred transform_hlds.unused_args.setup_local_var_usage/11-0 (det) (unused_args.m:336 and others)
 104 pred transform_hlds.unused_args.init_var_usage/7-0 (det) (unused_args.m:323)
 105 pred transform_hlds.unused_args.process_module/6-0 (det) (unused_args.m:224)
 106 pred top_level.mercury_compile.maybe_unused_args/6-0 (det) (mercury_compile.m:4004)
 107 pred top_level.mercury_compile.maybe_write_optfile/7-0 (det) (mercury_compile.m:2336)
 108 pred top_level.mercury_compile.frontend_pass_no_type_error/9-0 (det) (mercury_compile.m:2242)
 109 pred top_level.mercury_compile.frontend_pass/11-0 (det) (mercury_compile.m:2120)
 110 pred top_level.mercury_compile.mercury_compile/8-0 (det) (mercury_compile.m:1518)
 111 pred top_level.mercury_compile.compile/10-0 (det) (mercury_compile.m:1497)
TagsNo tags attached.
Attached Files
  • ? file icon bug.m (252 bytes) 2008-02-04 17:14

-Relationships
+Relationships

-Notes

~0000086

wangp (developer)

Patch committed 2008-03-05.
+Notes

-Issue History
Date Modified Username Field Change
2008-02-04 17:14 wangp New Issue
2008-02-04 17:14 wangp File Added: bug.m
2008-03-05 18:51 wangp Status new => resolved
2008-03-05 18:51 wangp Resolution open => fixed
2008-03-05 18:51 wangp Assigned To => wangp
2008-03-05 18:51 wangp Note Added: 0000086
+Issue History