Skip to content

Commit

Permalink
varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs betwee…
Browse files Browse the repository at this point in the history
…n different sizes.

	* varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs
	between different sizes.

From-SVN: r104368
  • Loading branch information
Eric Botcazou authored and Eric Botcazou committed Sep 17, 2005
1 parent a49701f commit 69fcfd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2005-09-17 Eric Botcazou <[email protected]>

* varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs
between different sizes.

2005-09-16 Paolo Bonzini <[email protected]>

PR 23903
Expand Down
5 changes: 3 additions & 2 deletions gcc/varasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 69fcfd6

Please sign in to comment.