This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43787] [4.5/4.6 Regression] memory copy of empty class (sizeof is one)
- From: "navin dot kumar at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Apr 2010 23:44:19 -0000
- Subject: [Bug c++/43787] [4.5/4.6 Regression] memory copy of empty class (sizeof is one)
- References: <bug-43787-17658@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from navin dot kumar at gmail dot com 2010-04-19 23:44 -------
Wolfgang,
The opening post was a bad example, and it unfortunately is drawing attention.
I agree, it is invalid code for deferencing a NULL pointer. However, please
see my other posts, detailing how the actual issue is a performance bug (missed
optimization) regression in GCC 4.5.0 for the following (valid) code:
empty_t a;
empty_t b = a;
GCC4.4.2 did not do any memory copying in the above example, but GCC4.5.0 does.
--
navin dot kumar at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43787