2024-12-14 08:53 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000225mercuryBugpublic2011-11-04 00:33
Reportercolanderman 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000225: Module-level mutable with type "semaphore" causes hlc grade compilation to break.
DescriptionCompile attached program with -H. It will produce the following error:

sema_hlc.m:6:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token

Compiling under asm_fast does not produce this error.
Additional InformationAlso appears with --java.

Compiler version is 11.07-beta-2011-09-30.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000375

wangp (developer)

The underlying problem is bug 0000019.

For now I will work around it for the hlc case. There should be no problem with the Java grades; at least I couldn't reproduce it with 2011-10-23.

~0000376

colanderman (reporter)

I only see the bug in the Java grade when I compile with --parallel also:

$ mmc --java --parallel --rebuild sema_hlc.class
Making Mercury/javas/jmercury/sema_hlc.java
sema_hlc.m:001: Warning: interface for module `sema_hlc' does not export
sema_hlc.m:001: anything.
Making Mercury/classs/jmercury/sema_hlc.class
Mercury/javas/jmercury/sema_hlc.java:83: cannot find symbol
symbol : variable thread__semaphore
location: class jmercury.sema_hlc
        V_1_1 = thread__semaphore.init_1_f_0(V_2_2);
                ^
1 error
** Error making `Mercury/classs/jmercury/sema_hlc.class'.

~0000378

wangp (developer)

Ok, that'd because there is no 'java.par' grade. You *could* install it, but it would be exactly the same as the 'java' grade.

~0000379

colanderman (reporter)

Ahh gotcha. I never realized that...

~0000385

juliensf (administrator)

I suspect attempting to install and/or use the grade "java.par" may have some "interesting" effects on
the compiler and other tools since they probably don't recognise it as a valid combination of grade
components.
+Notes

-Issue History
Date Modified Username Field Change
2011-11-03 10:20 colanderman New Issue
2011-11-03 10:20 colanderman File Added: sema_hlc.m
2011-11-03 11:04 wangp Note Added: 0000375
2011-11-03 11:18 colanderman Note Added: 0000376
2011-11-03 11:26 wangp Note Added: 0000378
2011-11-03 11:29 colanderman Note Added: 0000379
2011-11-04 00:33 juliensf Note Added: 0000385
+Issue History