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 lto/47900] Missed optimization with LTO


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47900

--- Comment #2 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-02-27 19:57:01 UTC ---
A null pointer check (... && ! &p->i) is not eliminated, notwithstanding the
fact that the pointer has been dereferenced. If it is not null, bar is not
called; otherwise, there is an undefined behavior, and bar is not called.

Or is it too an unimportant problem?

(It's interesting, after changing S_ptr p to struct S *p, the non-LTO build
also fails with "undefined reference to `bar'".)


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