Mercury Bugs - mercury
View Issue Details
0000552mercuryBugpublic2022-03-16 21:312022-03-17 15:00
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000552: Compiler aborts in deep_profiler directory in Java grade with --intermod-opt
DescriptionBuilding the Mercury system with

    MCFLAGS = --intermod-opt -O0

in the Java grade causes the following abort in the deep_profiler directory

Making Mercury/javas/jmercury/
Making Mercury/javas/jmercury/
Making Mercury/javas/jmercury/
Uncaught Mercury exception:
Software Error: map.lookup: key not found
        Key Type: term.var(parse_tree.prog_data.prog_var_type)
        Key Value: var(287)
        Value Type: ml_backend.ml_gen_info.ml_ground_terma

Additional InformationMercury: 22.01-beta-2022-03-16, rotd-2022-03-16
GCC: 4.8.5
OS: CentOS 7
TagsNo tags attached.
Attached Files

2022-03-16 21:42   
That is a strange pair of build flags. Do not optimize anything,
but do so across module boundaries? :-)
2022-03-16 22:00   
Yes and no. It's not something I would do by choice. The script I am using to test the release steps through all combinations of -O0 -> -O6 with and without --intermod-opt; the problem arose there. I suspect the issue may arise at other optimisation levels as well.
2022-03-17 09:09   
I know the cause of the problem. I am testing a fix.
2022-03-17 15:00   
Fix committed 2022 mar 17.

Issue History
2022-03-16 21:31juliensfNew Issue
2022-03-16 21:42zsNote Added: 0001182
2022-03-16 22:00juliensfNote Added: 0001183
2022-03-17 09:09zsNote Added: 0001184
2022-03-17 15:00zsAssigned To => zs
2022-03-17 15:00zsStatusnew => resolved
2022-03-17 15:00zsResolutionopen => fixed
2022-03-17 15:00zsNote Added: 0001185