[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 --- Comment #7 from Andrew Pinski --- There is a way from keeping the compiler from knowing what the value of the incoming pointer is to hide it behind an inline-asm which does nothing: int __attribute__ ((nonnull)) isnull(char *ptr) {

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-05 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 --- Comment #6 from Andreas Schwab --- EFAULT is always optional. POSIX is clear about that: [EFAULT] Bad address. The system detected an invalid address in attempting to use an argument of a call. The reliable detection of this error cannot

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-05 Thread gccgc at bithub dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 Philip Lorenz changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 Richard Biener changed: What|Removed |Added Last reconfirmed||2021-05-04 Ever confirmed|0

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 --- Comment #2 from Richard Biener --- There is -fno-delete-null-pointer-checks

[Bug tree-optimization/100404] Unable to disable removal of null pointer checks for nonnull function arguments

2021-05-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100404 --- Comment #1 from Jonathan Wakely --- I'm pretty sure what the docs mean is that the compiler will not optimise the caller to assume that anything passed to the function is non-null. Inside the function it will still assume the parameter is