2005-07-27 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (push_fields_onto_fieldstack):
Avoid pushing again if current struct contains only
fields we decomposed.
* gcc.dg/tree-ssa/salias-1.c: New testcase.
From-SVN: r102424
+2005-07-27 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (push_fields_onto_fieldstack):
+ Avoid pushing again if current struct contains only
+ fields we decomposed.
+
2005-07-27 Jan Hubicka <jh@suse.cz>
PR tree-optimization/22574
+2005-07-27 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/salias-1.c: New testcase.
+
2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR fortran/22503
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-salias" } */
+
+struct {
+ struct {
+ struct {
+ int i, j;
+ } c;
+ } b;
+} a;
+
+int foo(void)
+{
+ a.b.c.i = 0;
+ return a.b.c.j;
+}
+
+/* { dg-final { scan-tree-dump-times "SFT" 2 "salias" } } */
+/* { dg-final { cleanup-tree-dump "salias" } } */
if (TREE_CODE (field) == FIELD_DECL)
{
bool push = false;
+ int pushed = 0;
if (has_union
&& (TREE_CODE (TREE_TYPE (field)) == QUAL_UNION_TYPE
if (!var_can_have_subvars (field))
push = true;
- else if (!(push_fields_onto_fieldstack
+ else if (!(pushed = push_fields_onto_fieldstack
(TREE_TYPE (field), fieldstack,
offset + bitpos_of_field (field), has_union))
&& DECL_SIZE (field)
pair->offset = offset + bitpos_of_field (field);
count++;
}
+ else
+ count += pushed;
}
return count;