Commit 378f8976 by Eric Botcazou Committed by Eric Botcazou

re PR middle-end/58570 (wrong code for bitfields at -O2 and above)

	PR middle-end/58570
	* tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Return
	false if both components are bitfields.

From-SVN: r203315
parent 0fe04f5c
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.
......
#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;
}
......@@ -803,12 +803,13 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2)
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));
}
}
......
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