occa
occa copied to clipboard
Missing initial index value on `@inner`/`@outer` loops causes a segfault during translation.
Description
If the index variable of an @inner or @outer for loop is not assigned an initial value, then a segfault occurs during OKL translation.
Details
- Can be reproduced calling
occa translatefrom the command line - The error occurs for all backends
- No useful debugging information is printed suggesting the cause.
Example:
@kernel void f() {
@outer for(int o=0; o < 1; ++o) {
@inner for(int i; i < 1; ++i) { //missing initial loop index value
int a = 0;
}
}
}