Description
For the following program (extracted from the axel
benchmark of Concrat), Goblint crashes with
Fatal error: exception Cilfacade.TypeOfError(typeOffset: Index on a non-array (0, struct a ))
struct a {
pthread_mutex_t b;
};
struct c {
struct a *conn;
} d();
int main() {
struct a str = {0};
struct c axel = {0};
axel.conn = &str;
pthread_mutex_t* ptr = &((axel.conn + 0)->b);
pthread_mutex_lock(ptr);
pthread_mutex_unlock(ptr);
pthread_mutex_lock(&((axel.conn + 0)->b));
}
whereas gcc -Wall
accepts the program without any issues.