PR middle-end/58570
* tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Return
false if both components are bitfields.
From-SVN: r203315
+2013-10-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/58570
+ * tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Return
+ false if both components are bitfields.
+
2013-10-09 Alex Velenko <Alex.Velenko@arm.com>
* config/aarch64/arm_neon.h (vclz_s8, vclz_s16, vclz_s32)
+2013-10-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/pr58570.c: New test.
+
2013-10-09 Alex Velenko <Alex.Velenko@arm.com>
* gcc.target/aarch64/vclz.c: New testcase.
--- /dev/null
+#pragma pack(1)
+struct S
+{
+ int f0:15;
+ int f1:29;
+};
+
+int e = 1, i;
+static struct S d[6];
+
+int
+main (void)
+{
+ if (e)
+ {
+ d[i].f0 = 1;
+ d[i].f1 = 1;
+ }
+ if (d[0].f1 != 1)
+ __builtin_abort ();
+ return 0;
+}
if (type1 != type2 || TREE_CODE (type1) != RECORD_TYPE)
goto may_overlap;
- /* Different fields of the same record type cannot overlap. */
+ /* Different fields of the same record type cannot overlap.
+ ??? Bitfields can overlap at RTL level so punt on them. */
if (field1 != field2)
{
component_refs1.release ();
component_refs2.release ();
- return true;
+ return !(DECL_BIT_FIELD (field1) && DECL_BIT_FIELD (field2));
}
}