From: Eric Botcazou Date: Sun, 18 Sep 2005 17:11:11 +0000 (+0000) Subject: varasm.c (output_constant): Do not abort on conversions to union types between differ... X-Git-Tag: misc/cutover-cvs2svn~566 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7952e0ac267cc56c14ebbb22c1815a23ad3cf2e;p=thirdparty%2Fgcc.git varasm.c (output_constant): Do not abort on conversions to union types between different sizes. * varasm.c (output_constant): Do not abort on conversions to union types between different sizes. From-SVN: r104404 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb03f70d6ed5..ffe4d2b97a43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-09-18 Eric Botcazou + + * varasm.c (output_constant): Do not abort on conversions to union + types between different sizes. + 2005-09-18 Richard Guenther PR middle-end/23944 diff --git a/gcc/varasm.c b/gcc/varasm.c index a258c9e66797..91d2ea0c8179 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3881,8 +3881,11 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) HOST_WIDE_INT op_size = int_size_in_bytes (TREE_TYPE (TREE_OPERAND (exp, 0))); /* Make sure eliminating the conversion is really a no-op, except with - VIEW_CONVERT_EXPR to allow for wild Ada unchecked conversions. */ - if (type_size != op_size && TREE_CODE (exp) != VIEW_CONVERT_EXPR) + VIEW_CONVERT_EXPRs to allow for wild Ada unchecked conversions and + union types to allow for Ada unchecked unions. */ + if (type_size != op_size + && TREE_CODE (exp) != VIEW_CONVERT_EXPR + && TREE_CODE (TREE_TYPE (exp)) != UNION_TYPE) internal_error ("no-op convert from %wd to %wd bytes in initializer", op_size, type_size);