This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/27336] "this" pointer is not assumed to be not null


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]