This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/80519] if(p)free(p) with -Os
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Apr 2017 17:55:40 +0000
- Subject: [Bug tree-optimization/80519] if(p)free(p) with -Os
- Auto-submitted: auto-generated
- References: <bug-80519-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80519
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
In some (many?) cases the null test is eliminated by
-fdelete-null-pointer-checks as a consequence of the pointer having been
dereferenced. What remains is the cases where GCC doesn't see any such
dereferences. It would be interesting to get an idea of what proportion they
constitute and how much they or their removal might contribute to the size and
efficiency of code. David Malcolm's remarks could help reveal some of these
data points.