Compiler bug found?

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Experienced Member
Posts: 70
Joined: Wed Jun 29, 2016 8:59 am

Compiler bug found?

Postby dsteinwe » Mon Feb 24, 2020 1:09 pm


I have programmed following function:

Code: Select all

static bool powerdown_output(client i2c_master_if i2c, t_output output) {
   // some I2C communication ...

    if (output == 0 || output == 4) {
        for (uint8_t i = output + 1; i < output + 4; i++) {
            if (OUTPUT_CONFIG[i].source == OUTPUT_SOURCE_LINK) {
                powerdown_output(i2c, i); // problematic code line

    return true;
It is no rocket science and works fine, as long as the calling code is the sole unit, that uses a core on a tile. If I use a further tile on the same tile, I get this compiler error:
Creating app_test3.xe
../src/app_test3.xc:( Error: Meta information ("_Spowerdown_output_0.nstackwords") for function "_Spowerdown_output_0" cannot be determined.
../src/app_test3.xc:( Error: lower bound could not be calculated (function is recursive?).
xmake[1]: *** [bin//app_test3.xe] Error 1
xmake: *** [bin//app_test3.xe] Error 2
If I have commented out the line:

Code: Select all

powerdown_output(i2c, i); // problematic code line
Now, I can compile it even with two core on the same tile. Yes, there is a recursion, but only with a depth of one.

This behaviour concerns the IDE version: Community_14.4.1 (build 235-acbb966, Dec-01-2019).

If you have more questions about it, feel free to ask.

Who is online

Users browsing this forum: No registered users and 3 guests