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.

[参考译文] C7x C/C++编译器在编译期间抛出错误报告错误

Guru**** 2343770 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1275634/c7x-c-c-compiler-throws-bug-report-error-during-compilation

使用 J721E RTOS SDK 附带的 C7x 编译器、我获得以下输出、以编译一些代码:

>>>> Optimizer terminated abnormally
>>>>    in function complexDivideRealConst()
>>>>    in file "benchmark_float.c"
This is caused by a defect in the TI C/C++ Optimizer.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler".  See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment


>> Compilation failure

SDK 中包含的此编译器版本为"ti-cgt-c7000_3.0.STS"。

我成功获得了一个最小的复制盒、如下所示:

#include <c7x.h>
#include <stdint.h>

#define NUM_BATCHES 512
#define NUM_POINTS  512

static __SE_TEMPLATE_v1 divideSE;
static __SA_TEMPLATE_v1 divideSA;

// Ok for out to equal either dividend (destructive)
void complexDivideRealConst(float *dividend, uint32_t divisor, float *out)
{
    __SE0_OPEN((void *)dividend, divideSE);
    __SA0_OPEN(divideSA);

    for(int i = 0; i < NUM_BATCHES * NUM_POINTS * 2 / 16; i++)
        *__SA0ADV(float16, out) = __SE0ADV(float16) / divisor;

    __SE0_CLOSE();
    __SA0_CLOSE();
}

这会在以下编译命令行时显示问题:

/opt/ti-cgt-c7000_3.0.0.STS/bin/cl7x -c --c99 -O3 --issue_remarks --emit_warnings_as_errors -pden --abi=eabi --silicon_version=7100 --silicon_errata_i2117 -I/opt/ti-cgt-c7000_3.0.0.STS/include -D=C71="C71" -D=C7100 -D=__C7X_UNSTABLE_API -ppc --preproc_with_compile benchmark_float.c -fe benchmark_float.o

我将尝试按照请求附加预处理输出(在此处初始帖子似乎无法这样做)。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    以下是预处理文件(必须重命名才能上传):

    e2e.ti.com/.../benchmark_5F00_float.pp.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您提交一个简短的测试用例。  我可以在版本3.0.STS 中重现相同行为。  当我使用最新版本3.1.0.LTS 时、其构建简洁。  升级到版本3.1.0.LTS 是否实用?  要了解 STS 版本和 LTS 版本之间的区别、请参阅文章 编译器版本号及其含义

    谢谢。此致、

    -乔治

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    同意,新版本似乎为我修复它(虽然它确实在不同的代码出于某种原因,我还没有完全调查)。

    如果需要、我将就此提出一个新问题。