[Bug middle-end/28160] Bogus "size of array 'foo' is too large" error with -mms-bitfields
seongbae dot park at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 26 21:10:00 GMT 2006
------- Comment #3 from seongbae dot park at gmail dot com 2006-06-26 21:08 -------
The immediate cause of the problem is in stor-layout.c:place_field():
1118 if (DECL_SIZE (field) != NULL
1119 && host_integerp (TYPE_SIZE (TREE_TYPE (field)), 0)
1120 && host_integerp (DECL_SIZE (field), 0))
1121 rli->remaining_in_alignment
1122 = tree_low_cst (TYPE_SIZE (TREE_TYPE(field)), 1)
1123 - tree_low_cst (DECL_SIZE (field), 1);
For the field "d",
remiaining_in_alignment becomes negative after line 1121-1123
- because the DECL_SIZE is larger than TYPE_SIZE for "d".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28160
More information about the Gcc-bugs
mailing list