2024-11-22 04:03 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000441mercuryBugpublic2017-10-18 23:42
Reporterjuliensf 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000441: Invalid C code for program in hlc.gc grade
DescriptionThe attached program compiles and runs successfully in the asm_fast.gc grade. The generated C code
fails to compile in the hlc.gc grade with the following error:

Mercury/cs/test_vfm2.c: In function ‘test_vfm2__hello_1_f_0’:
Mercury/cs/test_vfm2.c:130:18: error: void value not ignored as it ought to be
     HeadVar__2_2 = vfm2__printLine_2_f_0(TypeCtorInfo_5_5, TypeCtorInfo_6_6, ((MR_Box) (Var_4)), FIO_3);
                  ^
** Error making `Mercury/os/test_vfm2.o'.

This is using rotd-2017-10-15 (although it also occurs with old roads).
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000958

zs (developer)

The problem is NOT we generate the line that the error message is for.
The problem is that vfm2.m knows that fio is a dummy type, and makes
the return type of vfm2__printline_2_f_0 void accordingly, even though it keeps
the definition of fio(T) *private*. This means that fio is NOT known to be a dummy
type anywhere but inside the vfm2 module.

We will need to split the concept of "dummy type" into two: dummy types
that are known to be dummy everywhere, and those known to be dummy
only in their defining module.
+Notes

-Issue History
Date Modified Username Field Change
2017-10-18 22:47 juliensf New Issue
2017-10-18 22:47 juliensf File Added: vfm2_bug.tar.gz
2017-10-18 23:28 zs Assigned To => zs
2017-10-18 23:28 zs Status new => assigned
2017-10-18 23:42 zs Note Added: 0000958
+Issue History