This is the mail archive of the gcc-patches@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] |
71913 is a case where unsafe_copy_elision_p was being too conservative. We can allow copy elision in a new expression; the only way we could end up initializing a base subobject without knowing it would be through a placement new, in which case we would already be using the wrong (complete object) constructor, so copy elision doesn't make it any worse. The second patch is for a case where we weren't being conservative enough; we need to beware of tail padding even when the copy constructor is trivial. Tested x86_64-pc-linux-gnu, applying to trunk. 71913 patch also applied to 6 branch.
Attachment:
71913.diff
Description: Text document
Attachment:
trivial-elide.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |