You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this test case, I think that the first two assertions cannot be reached, since f(p) is non-terminating for the if-then case.
Could you advise if these assertions should be removed, or the first function call f(p) should be removed alternatively?
// cs_test/recur4.c
#include "aliascheck.h"
int **x, *y;
int z;
void f(int **p);
void main(){
x = &y;
f(x);
}
void f(int **p){
int k;
y = &k;
if (z){
f(p);
*p = &z;
__assert_must_alias(y,&z);
__assert_no_alias(y,&k);
f(p);
}
/// y will not alias to &z as the value flow
/// of y after it is updated at "*p=&z" will
/// flow into f(p) again and then be updated
/// by the first statement "y=&k".
__assert_no_alias(y,&z);
__assert_may_alias(y,&k);
}
The text was updated successfully, but these errors were encountered:
Hi,
For this test case, I think that the first two assertions cannot be reached, since
f(p)
is non-terminating for theif-then
case.Could you advise if these assertions should be removed, or the first function call
f(p)
should be removed alternatively?The text was updated successfully, but these errors were encountered: