https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93051
--- Comment #3 from Alexander Cherepanov <ch3root at openwall dot com> --- For completeness, an example with a guessed pointer, based on the testcase from bug 65752, comment 0, gcc-only (dom2): ---------------------------------------------------------------------- #include <stdint.h> #include <stdio.h> __attribute__((noipa)) // imagine it in a separate TU static uintptr_t opaque_to_int(void *p) { return (uintptr_t)p; } int main() { int x; int *p = &x; uintptr_t ip = (uintptr_t)p; uintptr_t iq = 0; while (iq < ip) iq++; uintptr_t ir = opaque_to_int(p); // hide provenance of p if (ir == iq) { *p = 1; *(int *)ir = 2; printf("result: %d\n", *p); } } ---------------------------------------------------------------------- $ gcc -std=c11 -pedantic -Wall -Wextra -O3 test.c && ./a.out result: 1 ---------------------------------------------------------------------- gcc x86-64 version: gcc (GCC) 10.0.0 20191224 (experimental) ----------------------------------------------------------------------