]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs between different...
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 17 Sep 2005 08:30:23 +0000 (08:30 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 17 Sep 2005 08:30:23 +0000 (08:30 +0000)
* varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs
between different sizes.

From-SVN: r104368

gcc/ChangeLog
gcc/varasm.c

index 1ba3fac2d0223aa7ee67b18f38a36fddcfd9fe62..91150416660ffeb169285daa03a9c933fc429bf1 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-17  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs
+       between different sizes.
+
 2005-09-16  Paolo Bonzini  <bonzini@gnu.org>
 
        PR 23903
index d0f7afc884654d77ea256160acfec7a72846d153..a258c9e66797fdca1ade1235ac6d946658f5d4a2 100644 (file)
@@ -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);