This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43528] ICE: in tree_low_cst, at tree.c:6198 with -mms-bitfields at x86_64-linux
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2010 12:52:16 -0000
- Subject: [Bug tree-optimization/43528] ICE: in tree_low_cst, at tree.c:6198 with -mms-bitfields at x86_64-linux
- References: <bug-43528-14164@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from ubizjak at gmail dot com 2010-03-27 12:52 -------
This patch also works:
Index: stor-layout.c
===================================================================
--- stor-layout.c (revision 157756)
+++ stor-layout.c (working copy)
@@ -1346,11 +1346,12 @@ place_field (record_layout_info rli, tre
until we see a bitfield (and come by here again) we just skip
calculating it. */
if (DECL_SIZE (field) != NULL
- && host_integerp (TYPE_SIZE (TREE_TYPE (field)), 0)
- && host_integerp (DECL_SIZE (field), 0))
+ && host_integerp (TYPE_SIZE (TREE_TYPE (field)), 1)
+ && host_integerp (DECL_SIZE (field), 1))
{
- HOST_WIDE_INT bitsize = tree_low_cst (DECL_SIZE (field), 1);
- HOST_WIDE_INT typesize
+ unsigned HOST_WIDE_INT bitsize
+ = tree_low_cst (DECL_SIZE (field), 1);
+ unsigned HOST_WIDE_INT typesize
= tree_low_cst (TYPE_SIZE (TREE_TYPE (field)), 1);
if (typesize < bitsize)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43528