Commit 30047199 by Alexandre Oliva Committed by Alexandre Oliva

tree-sra.c (sra_build_assignment): Replace assertion checking with a comment…

tree-sra.c (sra_build_assignment): Replace assertion checking with a comment explaining why it can't be done.

* tree-sra.c (sra_build_assignment): Replace assertion
checking with a comment explaining why it can't be done.

From-SVN: r122123
parent 3328fbb7
2007-02-19 Alexandre Oliva <aoliva@redhat.com>
* tree-sra.c (sra_build_assignment): Replace assertion
checking with a comment explaining why it can't be done.
2007-02-18 Sandra Loosemore <sandra@codesourcery.com> 2007-02-18 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/30833 PR middle-end/30833
......
...@@ -1731,12 +1731,14 @@ generate_element_ref (struct sra_elt *elt) ...@@ -1731,12 +1731,14 @@ generate_element_ref (struct sra_elt *elt)
static tree static tree
sra_build_assignment (tree dst, tree src) sra_build_assignment (tree dst, tree src)
{ {
#if 0 /* ENABLE_CHECKING */ /* It was hoped that we could perform some type sanity checking
/* This test ought to pass, but it is unfortunately too strict for here, but since front-ends can emit accesses of fields in types
now. */ different from their nominal types and copy structures containing
gcc_assert (TYPE_CANONICAL (TYPE_MAIN_VARIANT (TREE_TYPE (dst))) them as a whole, we'd have to handle such differences here.
== TYPE_CANONICAL (TYPE_MAIN_VARIANT (TREE_TYPE (src)))); Since such accesses under different types require compatibility
#endif anyway, there's little point in making tests and/or adding
conversions to ensure the types of src and dst are the same.
So we just assume type differences at this point are ok. */
return build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src); return build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src);
} }
......
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