int foo(shared int *p) { return !p; }
int bar(shared int *p) { return p ? 0 : 1; }
the bodies of the respective translations are:
return upcr_isnull_pshared(p);
return p ? 0 : 1;
The second one is incorrect.
With the struct-pts-rep this isn't valid C code.
Even with packed-pts-rep this is valid C, but is correct since 'p' might be non-zero and still be a shared NULL.
Given:
the bodies of the respective translations are:
The second one is incorrect. With the struct-pts-rep this isn't valid C code. Even with packed-pts-rep this is valid C, but is correct since 'p' might be non-zero and still be a shared NULL.
I will take a stab at fixing this.
-Paul