From 6f6c3ae6b6039858f4dc7882f89f1344955a98c4 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sat, 17 Sep 2005 08:30:23 +0000 Subject: [PATCH] * varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs between different sizes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104368 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/varasm.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ba3fac..9115041 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-09-17 Eric Botcazou + + * varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs + between different sizes. + 2005-09-16 Paolo Bonzini PR 23903 diff --git a/gcc/varasm.c b/gcc/varasm.c index d0f7afc..a258c9e 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3880,8 +3880,9 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) HOST_WIDE_INT type_size = int_size_in_bytes (TREE_TYPE (exp)); 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. */ - if (type_size != op_size) + /* 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) internal_error ("no-op convert from %wd to %wd bytes in initializer", op_size, type_size); -- 2.7.4