https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404
Philip Lorenz <gccgc at bithub dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from Philip Lorenz <gccgc at bithub dot de> --- I understand that the issue seems odd at first so let me provide some additional background on how I encountered this issue: I was analysing a segmentation fault in pseudo's [1] statx() wrapper function which was caused by the elimination of the null pointer check before dereferencing of its "path" parameter for a comparison. GCC removed this check as glibc marks statx's() pointer arguments as nonnull. However, the statx() man page explicitly mentions that null arguments trigger yield a EFAULT which is used by the Rust standard library implementation to determine support of the statx() on the host machine. I erroneously assumed that the "-fno-delete-null-pointer-checks" option may be used to disable this behaviour but I understand that this isn't actually the case so if there is no way to disable the optimization I'll work around the optimization by moving access to the pointers into a (non-inlinable) helper function instead. [1] http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/