[m-rev.] Error in the C code generated by the compiler

Volker Wysk post at volker-wysk.de
Mon Jan 8 06:20:19 AEDT 2024


Hello.

I have what I believe is a compiler bug. After I added a semaphore as an
input argument to this predicate:

:- pred process(
    fis_args::in,                                
    odbc.connection::in,                         
    thread.channel.channel(work_message)::in,    
    thread.channel.channel(result_message)::in,    
    thread.semaphore.semaphore::in,
    io::di, io::uo)
is cc_multi.

... I get this compiler message:

Mercury/cs/worker.c:237:1: error:
‘mercury_data_thread__semaphore__type_ctor_info_9_0’ undeclared here (not in
a function); did you mean
‘mercury_data_thread__semaphore__type_ctor_info_semaphore_0’?

There's no error message about the Mercury code, the problem occurs in the
generated C code. Therefore I believe that it's a compiler bug.

Should I send a program that reproduces the problem?

Regards,
Volker


More information about the reviews mailing list