This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-J784S4: CGT 4.1.0 and restrict keyword

Part Number: PROCESSOR-SDK-J784S4

Tool/software:

Hi TI,

I have a compiler failure building my C7X app, made of C++ code.


I was able to shrink the code to the following :

#include <c7x_scalable.h>

void test_func (
    const cfloat * RESTRICT X,
    cfloat * RESTRICT Y)
{
    for(uint32_t vt = 0u; vt < 10; vt++) Y[vt] = X[vt];  
}

void caller (const cfloat * RESTRICT const zi, cfloat * RESTRICT zo)
{
    test_func(zi, zo);
}
_

I compiled this with CGT 4.1.0 for C7X (DSP of J784S4).

With -DRESTRICT="", I have a compiler warning "advice #35000-D: (Performance) Consider adding the
restrict qualifier to the declaration of "Y" to improve loop performance."

With -DRESTRICT=restrict the compiler crashes if opt_level is 2 or 3 (OK with 0 or 1).

cl7x --c++14 -DSOC_J784S4 -DBUILD_C7X -DBUILD_C7X_1 -DFREERTOS -DA72_LINUX_OS -Dj784s4_evm=j784s4_evm -I(...)/ti-cgt-c7000_4.1.0.LTS/include --opt_level=2 -pds=238 -pds=880 -pds1110 -mv7120 --abi=eabi -q -mo -pden --endian=little -DRESTRICT=restrict --output_file=restrict1.o -c restrict.cpp
>> restrict.cpp, line 11: INTERNAL ERROR: no match for MCALL


This may be a serious problem. Please contact customer support with a
description of this problem and a sample of the source files that caused this
INTERNAL ERROR message to appear.

Cannot continue compilation - ABORTING!


>> Compilation failure

Help !