Bug when using elemental functions and chars

Bug when using elemental functions and chars


 i have a small program using an elemental function to compute the edit distance of two strings:

int compare(char x, char y) {
    if (x == y) {
    } else {
int main()
    char a[3] = {'A','A','A'};
    char b[3] = {'A','A','A'};
    int c[3];
    for (int i = 0; i < 3; i++) {
        c[i] = compare(a[i], b[i]);
        cout << c[i];
    return 0;

When compiling, i receive the following error message:

test.cpp: In function ‘__vector(4) int compare._simdsimd_B4m_v1(char, char)’:
test.cpp:9:5: internal compiler error: in convert_move, at expr.c:353
int compare(char x, char y) {

This does not happen, if i use an array of integers instead of chars.

I use the latest version of the gcc cilkplus-branch (checked out today).


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

with Intel composer XE 2013 which also has Cilk, this issue does not come.
which compiler did you check with? I am not sure we can do anthing with gcc cilkplus branch.
though if you need more clarification, you can send the details for analysis.

Leave a Comment

Please sign in to add a comment. Not a member? Join today