This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27336] "this" pointer is not assumed to be not null
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Aug 2016 15:50:33 +0000
- Subject: [Bug middle-end/27336] "this" pointer is not assumed to be not null
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-27336-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27336
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This missed optimization is not really specific to *this (nor C++). We also do
not optimize the following as Steven says in comment #5.
extern void g2(A *that) __attribute__((nonnull));
bool f2(A *a) {
g2(a);
return a;
}
I guess once we optimize the above, *this will get optimized automatically.