导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→[转帖]llvmgen.c内置编译器错误[liufengzhong]

 *第63799篇: [转帖]llvmgen.c内置编译器错误

  
楼 主:liufengzhong 2014年8月6日17:08
 [转帖]llvmgen.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:

xmake[1]: *** [.build_Debug/src/point.xc.o] Error 1
xmake: *** [bin/Debug/camera_with_memory_Debug.xe] Error 2
 

这个错误出现在当我加入一个移植自我写的程序的一个函数在C的时候。如果我添加功能注释它就消失了。这是函数定义:


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);

实际函数是~80行代码和相当简单的。它需要一个点(x,y)值和填充柱坐标进行索引值,每个点似乎在col_idx阵列(列被定义为在一个y值的范围存在的点)

回答:

我发现一个方法来消除这个错误。如果我们不允许创建“动态”的二维数组,它应该是定期的错误。这个可能是个BUG。

在我的函数里我有这行代码:

int working_array[size_points][2]; // array for copying data points

通过替换这两行:(调整代码的其余部分与两个数组而不是一个工作)

int working_array_x[size_points]; // array for copying data points
int working_array_y[size_points]; // array for copying data points

我除去错误。


>>>>>>对该主题发表你的看法

本主题贴数1,分页: [第1页]


[上一篇主题]:[转帖]如何为 XC - 2以太网kit?

[下一篇主题]:[转帖]在xCORE中有多少流媒体通道是可用的?