llvmgen.c internal compiler error Topic is solved

If you have a simple question and just want an answer.
tylerjw
New User
Posts: 2
Joined: Thu Mar 13, 2014 6:39 pm

llvmgen.c internal compiler error

Post by tylerjw »

I'm getting this output when trying to compile some xc code.  What could cause this?

**** 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
 

This error apears when I added a function that I ported from a program I wrote in C.  If I comment the funciton out it goes away.  Here is the function definition:

 

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

 

The actual function is ~80 lines of code and rather straightforward.  It takes a list of points (x,y) values and populates the col_idx array with index values that coordinate whilch collumn each point apears in (columns are defined as points existing within a range of y values).



View Solution
tylerjw
New User
Posts: 2
Joined: Thu Mar 13, 2014 6:39 pm

Post by tylerjw »

I found a way to eliminate this error. If we are not allowed to create "dynamic" two dimensional arrays it should throw a regular error.  This might be a bug.

Within my function I had this line of code:

int working_array[size_points][2]; // array for copying data points[/code]By replacing this with these two lines: (and adjusting the rest of the code to work with two arrays instead of one)

int working_array_x[size_points]; // array for copying data pointsint working_array_y[size_points]; // array for copying data points[/code]I eliminated the error.