Note the (char*) cast. The address of ‘x’ is properly word aligned. By casting the resulting pointer to a (char*) and then offsetting by one the code constructs an address at the next higher byte (not word!). This address thus is no longer word-aligned. The code then casts the pointer back to an int* and tries to dereference it for a word access. Since on the GPU, all accesses must be naturally aligned (aligned to the access width) this causes undefined behavior.
If for example the address of ‘x’ is 4, the code tries to access a 4-byte int at address 5.