gpt4 book ai didi

c - llvmgen.c 中的 xmos 内部编译器错误?

转载 作者:太空宇宙 更新时间:2023-11-04 00:37:56 27 4
gpt4 key购买 nike

我将我用 C 编写的一些代码移植到 XC,结果这就是我得到的构建输出。

**** Build of configuration Debug for project camera_with_memory ****

xmake CONFIG=Debug all
Creating dependencies for point.xc
Compiling point.xc
xcc1: internal compiler error
Failed in /build/swnb/autobuild/swview/MacOSX/build/sb/tools_xcc1_c_llvm/BackEnd/LLVM/llvmgen.c, line 9314
isExpVar(d->components->u.dimension)
For bug reporting instructions, please see:
http://www.xmos.com/support
xmake[1]: *** [.build_Debug/src/point.xc.o] Error 1
xmake: *** [bin/Debug/camera_with_memory_Debug.xe] Error 2

什么会导致这种情况?我真的很纳闷。我的 C 代码大约有 80 行。这是声明:

int sort_by_col(int center_points[num_points][2], static const unsigned int num_points, 
int col_idx[col_idx_size], static const unsigned int col_idx_size);

最佳答案

这是编译器中的错误。似乎您不能声明一个多维数组,其第一维是静态常量变量,例如

void f(static const unsigned n) {
unsigned a[n][2];
}

这应该是允许的。为了将来引用,由于此编译器由 XMOS 维护,您可以在此处向他们报告错误:

https://www.xmos.com/en/support/contact

此错误在 XMOS 编译器版本 13.0.2 中很明显。

披露:我在编译器上为 XMOS 工作,所以会报告这个错误。

关于c - llvmgen.c 中的 xmos 内部编译器错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22463833/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com