-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Singlepath: crashes on break from nested loop #19
Comments
I tried manually executing all compilation steps. I.e. use |
The same problem is seen when |
Trying to #include <stdio.h>
int init_func(int pre, int inner, int post){
int x = 0, y = 0, z = 0;
outer_loop:
#pragma loopbound min 0 max 9
while(x < pre){
x++;
#pragma loopbound min 0 max 9
for(int i = 0; i < inner; i++){
y++;
if(z >= post){
goto outer_loop; //Continue outer loop
}
}
z++;
}
return (x*10000) + (y*10) + z;
}
int main(){
int pre, inner, post;
scanf("%d %d %d", &pre, &inner, &post);
printf("%d\n", init_func(pre, inner, post));
} It compiles successfully and when run with the input |
llc
crashes on an assertion error when trying to compile a program, using singlepath, where an inner loop breaks out of an outer loop:Compiling using the command
patmos-clang main.c -mpatmos-singlepath=init_func
results in the following error:The text was updated successfully, but these errors were encountered: