Mercury Bugs - mercury
View Issue Details
0000268mercuryBugpublic2012-12-03 20:552012-12-04 18:22
Reporterttmrichter 
Assigned Tojuliensf 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionduplicate 
PlatformToshiba Satellite L512OSLinux MintOS Version11
Product Version 
Target VersionFixed in Version 
Summary0000268: Typo in :- end_module declaration leads to compiler crash.
Descriptionλ junk → cat test.m
%-----------------------------------------------------------------------------%
% vi: ft=mercury ts=4 sw=4 et wm=0 tw=0
%-----------------------------------------------------------------------------%
:- module test.

:- interface.

:- import_module integer.

:- func identity(integer) = integer.

:- implementation.

identity(X) = X.

:- end_module not_test.
λ junk → mmc --make test
Making Mercury/asm_fast.gc/x86_64-unknown-linux-gnu/Mercury/cs/test.c
Uncaught Mercury exception:
Software Error: parse_tree.equiv_type: predicate `parse_tree.equiv_type.replace_in_item_list'/13: Unexpected: module start or end
Stack dump not available in this grade.
** Error making `Mercury/asm_fast.gc/x86_64-unknown-linux-gnu/Mercury/cs/test.c'.
Steps To ReproduceAs above.
Additional InformationThis caused me a frustrating divide-and-conquer debugging session as I tried to figure out why a re-factored module was suddenly crashing the compiler. Generally a warning/error would be preferred to crashes. ;)
TagsNo tags attached.
duplicate of 0000041resolved juliensf unclear error message in case the end_module declaration differs from the :- module description 
Attached Files

There are no notes attached to this issue.

Issue History
2012-12-03 20:55ttmrichterNew Issue
2012-12-04 18:22juliensfRelationship addedduplicate of 0000041
2012-12-04 18:22juliensfStatusnew => resolved
2012-12-04 18:22juliensfResolutionopen => duplicate
2012-12-04 18:22juliensfAssigned To => juliensf