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 to allow Ada to work with tree-ssa


    Surely you're applying highest_pow2_factor step-by-step as you walk
    down the components.  Which means that the TYPE_ALIGN is just fine.

No, it's done once at the end.  And TYPE_ALIGN isn't fine, as I said,
because there's no assurance that fields are aligned corresponding to
their type.

    I'm absolutely certain that this *must* change.  For exactly the same
    reason that we added TYPE_SIZE_UNIT, we do not want to be doing pointer
    arithmetic in units other than bytes.

I don't follow.  TYPE_SIZE_UNIT was added because TYPE_SIZE was too large
to represent in an integer.  Doing arithmetic in units *larger* than
bytes doesn't have that problem.

But I agree this needs to change.  Look at all the kludges related to
this in ada/decl.c for example.  Another was added recently as a result
of a reported bug.

I've had a number of ideas to fix this over time, but none I really
liked.  Most of them are no longer applicable in a tree-ssa context,
though.  But this is really a different topic, so we should take it
out of this thread.

    This is wrong.  REALPART_EXPR is not like other gimple operands 
    because (irritatingly) it is an lvalue.  You can take its address.

    It has *exactly* the same semantics as <COMPONENT_REF var real_part>
    or <ARRAY_REF var 0>.  So it should be treated the same way.

OK.


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