This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/47579] STL size() == 0 does unnecessary shift
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 1 Feb 2011 22:54:21 +0000
- Subject: [Bug tree-optimization/47579] STL size() == 0 does unnecessary shift
- Auto-submitted: auto-generated
- References: <bug-47579-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47579
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-01 22:54:19 UTC ---
I think v.size() should be simply optimized to work on char * pointer
differences. Recognizing the optimization opportunity requires to see
dereferences of the pointers to deduce their alignment.