This is the mail archive of the gcc@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: Ada bootstrap broken on x86 and x86_64


    this should fix the problem.  I think that the actual value of ADDR_EXPR
    (VIEW_CONVERT_EXPR (something)) is equivalent to ADDR_EXPR (something)
    so I can just ignore it when computing the offsets.

Yes, but a lot of code code in peel_address looks quite wrong to me.  You
should never use TREE_INT_CST_LOW without checking that there's no high part
set: that's what the function tree_low_cst is all about.  I added that
function back in March of 2000: nobody should be using TREE_CST_CST_LOW in
this way.

Moreover, the offset for a COMPONENT_REF must include DECL_FIELD_OFFSET and
for an ARRAY_REF, you have to take into account the lower bound.  he new
functions in stor-layout.c (array_ref_low_bound, etc) should be used for this.

But why not simply use get_inner_reference so that everybody finds offsets
the same way?  The bug with VIEW_CONVERT_EXPR couldn't have occurred if that
were used.


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