------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-06-07 12:26 ------- > It's hard to argue for me as Ada is not a language I'm familiar with, but > the problematic assignment is: > > return Ch.Attr; > > in Get_Character_Attribute() and both Ch.Attr and the return value of the > function are declared as Character_Attribute_Set, so I guess they are both > of the same type, aren't they.
No, the types are not the same in the IL, that's why they can get different machine modes. > Of course it changes the ABI -- if any member of a record (which is an > equivalent to a C structure) gets its alignment increased, then the alignment > of the containing record (structure) gets adjusted appropriately. Sure, but since all records of this type will be laid out the same way, where is the problem? This only happens for packed records or records with representation clauses, both not bound to any ABI rules as far as Ada is concerned. > If I understand code correctly compute_record_mode() should still be able to > use one of the integer modes for platforms that don't care about alignment. x86 is not (yet) the only platform out there. :-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21937