diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2005-09-17 08:30:23 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2005-09-17 08:30:23 +0000 |
commit | 69fcfd68cef46eb67983168b59915b51aa559e07 (patch) | |
tree | 2fd4fdf4307b0af3d012f01b8fd4883428fd93c1 /gcc/varasm.c | |
parent | a49701f9e09698e2bf35bb266837c796c8de066a (diff) | |
download | gcc-69fcfd68cef46eb67983168b59915b51aa559e07.zip gcc-69fcfd68cef46eb67983168b59915b51aa559e07.tar.gz gcc-69fcfd68cef46eb67983168b59915b51aa559e07.tar.bz2 |
varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs between different sizes.
* varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs
between different sizes.
From-SVN: r104368
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |