modernc.org/cc@v1.0.1/v2/testdata/bug/16.c (about) 1 #include <assert.h> 2 #include <errno.h> 3 4 int foo() { return 42; } 5 6 int main() { 7 int j = foo(); 8 __errno_location(); 9 int *p = __errno_location(); 10 int i = *__errno_location(); 11 p = &*__errno_location(); 12 errno = 42; 13 assert(*p == 42); 14 p = &(*__errno_location()); 15 errno = 421; 16 assert(*p == 421); 17 }