+2012-12-05 Richard Biener <rguenther@suse.de>
+
+ PR lto/55525
+ * gimple-streamer-in.c (input_gimple_stmt): Fixup ARRAY_REFs as well.
+
2012-12-04 Ian Lance Taylor <iant@google.com>
* godump.c (find_dummy_types): Output a dummy type if we couldn't
if (!op)
continue;
- /* Fixup FIELD_DECLs in COMPONENT_REFs, they are not handled
- by decl merging. */
if (TREE_CODE (op) == ADDR_EXPR)
op = TREE_OPERAND (op, 0);
while (handled_component_p (op))
{
if (TREE_CODE (op) == COMPONENT_REF)
{
+ /* Fixup FIELD_DECLs in COMPONENT_REFs, they are not handled
+ by decl merging. */
tree field, type, tem;
tree closest_match = NULL_TREE;
field = TREE_OPERAND (op, 1);
else
TREE_OPERAND (op, 1) = tem;
}
+ else if ((TREE_CODE (op) == ARRAY_REF
+ || TREE_CODE (op) == ARRAY_RANGE_REF)
+ && (TREE_CODE (TREE_TYPE (TREE_OPERAND (op, 0)))
+ != ARRAY_TYPE))
+ {
+ /* And ARRAY_REFs to objects that had mismatched types
+ during symbol merging to avoid ICEs. */
+ TREE_OPERAND (op, 0)
+ = build1 (VIEW_CONVERT_EXPR,
+ build_array_type (TREE_TYPE (op), NULL_TREE),
+ TREE_OPERAND (op, 0));
+ }
op = TREE_OPERAND (op, 0);
}
+2012-12-05 Richard Biener <rguenther@suse.de>
+
+ PR lto/55525
+ * gcc.dg/lto/pr55525_0.c: New testcase.
+ * gcc.dg/lto/pr55525_1.c: Likewise.
+
2012-12-04 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/quad_3.f90: Really fix an if condition.