[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

2010-04-18 Thread navin dot kumar at gmail dot com


--- Comment #6 from navin dot kumar at gmail dot com  2010-04-19 00:22 
---
Andrew,

What about the performance bug?

empty_t x; // line1
empty_t y = x;  // line2

Line2 should not result in copying memory for empty classes.  And that was the
old behavior pre-4.5.0


-- 

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



[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

2010-04-18 Thread navin dot kumar at gmail dot com


--- Comment #5 from navin dot kumar at gmail dot com  2010-04-19 00:22 
---
Andrew,

What about the performance bug?

empty_t x; // line1
empty_t y = x;  // line2

Line2 should not result in copying memory for empty classes.  And that was the
old behavior pre-4.5.0


-- 


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



[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

2010-04-18 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2010-04-18 22:29 ---
This is invalid because you access a null pointer


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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



[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

2010-04-18 Thread navin dot kumar at gmail dot com


--- Comment #3 from navin dot kumar at gmail dot com  2010-04-18 18:33 
---
At the very least, you'd agree that it's a performance bug to be copying bytes
from memory when the class is empty.  At the severe use-case, it breaks
existing code.


-- 


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



[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

2010-04-18 Thread navin dot kumar at gmail dot com


--- Comment #2 from navin dot kumar at gmail dot com  2010-04-18 18:31 
---
Only GCC4.5.0 is emitting a copy-constructor that copies 1 byte of data
(probably because sizeof(empty_t) == 1 according to the C++ ABI).   The
copy-constructor *should* be a noop, and indeed GCC4.4.2 issues a noop for
copying empty classes.


-- 


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



[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

2010-04-18 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-04-18 18:13 ---
I'm not sure the testcase is valid.  We copy a single byte at 0.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-04-18 18:13:57
   date||
Summary|regression on copy- |[4.5/4.6 Regression]
   |constructor of empty class  |regression on copy-
   ||constructor of empty class
   Target Milestone|--- |4.5.1


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