From 28afe3fc7b02e8dd8925d35c7d5f062712885d47 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 21 Dec 2012 23:06:38 +0100 Subject: re PR tree-optimization/55355 (internal compiler error: in tree_low_cst, at tree.c:6415) 2012-12-21 Martin Jambor PR tree-optimization/55355 * tree-sra.c (type_internals_preclude_sra_p): Also check that bit_position is small enough to fit a single HOST_WIDE_INT. * testsuite/g++.dg/torture/pr55355.C: New test. From-SVN: r194682 --- gcc/tree-sra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/tree-sra.c') diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 21d8a51..286ef26 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -714,7 +714,12 @@ type_internals_preclude_sra_p (tree type, const char **msg) { *msg = "structure field size not fixed"; return true; - } + } + if (!host_integerp (bit_position (fld), 0)) + { + *msg = "structure field size too big"; + return true; + } if (AGGREGATE_TYPE_P (ft) && int_bit_position (fld) % BITS_PER_UNIT != 0) { -- cgit v1.1