Commit fb6807b8 by Uros Bizjak Committed by Uros Bizjak

re PR tree-optimization/43528 (ICE: in tree_low_cst, at tree.c:6198 with…

re PR tree-optimization/43528 (ICE: in tree_low_cst, at tree.c:6198 with -mms-bitfields at x86_64-linux)

	PR tree-optimization/43528
	* stor-layout.c (place_field): Check that constant fits into
	unsigned HWI when skipping calculation of MS bitfield layout.

testsuite/ChangeLog:

	PR tree-optimization/43528
	* gcc.target/i386/pr43528.c: New test.

From-SVN: r157776
parent a9deb256
2010-03-27 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/43528
* stor-layout.c (place_field): Check that constant fits into
unsigned HWI when skipping calculation of MS bitfield layout.
2010-03-27 Jan Hubicka <jh@suse.cz>
PR middle-end/43391
......
......@@ -1346,11 +1346,12 @@ place_field (record_layout_info rli, tree field)
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)
......
2010-03-27 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/43528
* gcc.target/i386/pr43528.c: New test.
2010-03-26 Joseph Myers <joseph@codesourcery.com>
PR c/43381
......
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-mms-bitfields" } */
struct S { int i[(1LL << 60) - 1]; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment