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]

Re: [patch c++]: Fix for PR/65390


On 03/16/2015 03:22 PM, Kai Tietz wrote:
2015-03-16 19:07 GMT+01:00 Jason Merrill <jason@redhat.com>:
If there is an alignment mismatch without user intervention, there is a
problem, we can't just ignore it.

Where we run into trouble is with array types where the version built
earlier has not been laid out yet but the new one has been.  I've been
trying to deal with that by making sure that we lay out the original type as
well, but obviously that isn't working for this case.  Why not?

Well, TYPE_ALIGN (t) is set to 32, and it differs to TYPE_ALIGN
(result) (value 8), and TYPE_USER_ALIGN isn't set.

I suppose we could avoid checking TYPE_ALIGN if neither TYPE_USER_ALIGN nor
TYPE_SIZE are set on 't', but checking TYPE_USER_ALIGN isn't enough.

For t TYPE_SIZE is set, but it isn't a constant (as it is an variably
modified type).

TYPE_ALIGN should still be correct in that case. So we need to figure out why result is getting the wrong alignment.

Jason


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