[patch] Fix ICE on aligned architectures

Mark Mitchell mark@codesourcery.com
Wed Oct 25 13:57:00 GMT 2000


>>>>> "Richard" == Richard Henderson <rth@cygnus.com> writes:

    Richard> On Wed, Oct 25, 2000 at 01:47:52PM +0100, Nathan Sidwell
    Richard> wrote:
    >> * tree.c (make_node, case 't'): Set alignment to that of
    >> char_type_node.  * expr.c (move_by_pieces_ninsns): Abort if
    >> some length remains.

    Richard> I'm fairly certain that there was some reason why we
    Richard> weren't doing this, but I can't seem to remember what.

Well, one bit is a decidedly goofy default alignment value. :-)

I thought maybe this had to do with the conversion from bytes to bits
or vice versa in representing this kind of stuff.

Let's see what breaks, unless anyone can remind us of the reason why
this is a bad idea.

To me, another consistent thing would be to use zero (meaning
alignment not yet known), and then assert we always have a non-zero
value whenever we try to read the value.  That would force front-ends
to set the alignment for all types, which is arguably more robust than
Nathan's approach.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list