Intrepid/upc2c — pull request #80 by PHHargrove (2014-03-14 09:43:57+00:00)
Title: Alternative PTS-to-Integer conversion using upc_addrfield()

This commit implements conversion from pointer-to-shared to
integral types using the UPCR functions for implementing
upc_addrfield().

The previous code, which produced:
upcr_pshared_ptr_t _bupc_spilld0;
upcr_shared_ptr_t _bupc_spilld1;
int p = (_bupc_spilld0 = x , *(int *)&_bupc_spilld0);
int q = (_bupc_spilld1 = x , *(int *)&_bupc_spilld1);
which may return different portions of the PTS on little-vs-big
endian systems, and may not return the same values for two pointers
to the same object!

The new code produces
int p = (int)upcr_addrfield_pshared(x);
int y = (int)upcr_addrfield_shared(y);