aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-10-09 12:59:02 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-10-09 12:59:02 +0000
commit378f8976f26a17a53c5c306f7277971e8e7a6aa7 (patch)
tree8fe48efb934d00e67f7202795323adb3f8a915e2 /gcc/tree-ssa-alias.c
parent0fe04f5c3185fa3a3beb39fb811df019ed41569c (diff)
downloadgcc-378f8976f26a17a53c5c306f7277971e8e7a6aa7.zip
gcc-378f8976f26a17a53c5c306f7277971e8e7a6aa7.tar.gz
gcc-378f8976f26a17a53c5c306f7277971e8e7a6aa7.tar.bz2
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
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 0d3c15c..4aaa98b 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -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));
}
}