2024-03-29 05:15 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000405mercuryBugpublic2016-02-23 03:24
ReporterFlyingJester 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
Platformamd64OSWindowsOS Version8.1
Product Version 
Target VersionFixed in Version 
Summary0000405: Compiler Software Exception in Certain Projects
DescriptionTrying to build my project MEdit, I run into the following error:

Uncaught Mercury exception:
Software Error: check_hlds.cse_detection: predicate `check_hlds.cse_detection.detect_cse_in_proc'/4: Unexpected: mode check fails when repeated

I had thought this was only an issue with Mercury 14, but it seems to occur with the newest ROTD as well.
Steps To ReproduceDownload the MEdit sources from https://github.com/FlyingJester/medit
Run either just `make` (which requires yasm) or `make medit_mercury`
Additional InformationI'm not really sure if this is actually an error in the compiler or in my own code, but if it is in my code the error reporting could be much improved.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000878

mark (administrator)

Last edited: 2016-02-20 13:00

View 2 revisions

The code relies on nested unique modes, which are not supported. This is a known limitation. In this case it seems to be compounded by another mode error in your code, in the use of SizeIn+0 as an input parameter. (Edit: disregard that last sentence.)

The compiler fails to report the problem accurately.

What is the purpose of writing SizeIn+0 instead of just SizeIn?

~0000879

FlyingJester (reporter)

Last edited: 2016-02-20 11:07

View 2 revisions

The purpose is to allow a unique output which is partially composed of a non-unique integer input.

What do you mean by nested unique modes?

~0000880

mark (administrator)

By nested unique modes I mean modes for structured terms in which the uniqueness of the subterms is significant. That includes being partially composed of a non-unique term, as is the case in what you are attempting.

Is the bug report just that the compiler throws an exception instead of giving a spurious mode error, as it says in the reference manual?

~0000881

FlyingJester (reporter)

Last edited: 2016-02-23 03:24

View 2 revisions

This bug report is simply that the compiler throws an exception.

~0000882

mark (administrator)

Confirm that this is a bug. The compiler should give a proper error message when attempting to use nested unique modes.

Note that the feature itself is officially NYI.
+Notes

-Issue History
Date Modified Username Field Change
2016-02-20 03:04 FlyingJester New Issue
2016-02-20 10:25 mark Assigned To => mark
2016-02-20 10:25 mark Status new => assigned
2016-02-20 10:25 mark Assigned To mark =>
2016-02-20 10:26 mark Status assigned => new
2016-02-20 10:50 mark Note Added: 0000878
2016-02-20 11:06 FlyingJester Note Added: 0000879
2016-02-20 11:07 FlyingJester Note Edited: 0000879 View Revisions
2016-02-20 12:58 mark Note Added: 0000880
2016-02-20 13:00 mark Note Edited: 0000878 View Revisions
2016-02-20 13:51 FlyingJester Note Added: 0000881
2016-02-20 15:23 mark Note Added: 0000882
2016-02-20 15:23 mark Status new => confirmed
2016-02-23 03:24 FlyingJester Note Edited: 0000881 View Revisions
+Issue History