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
This commit is contained in:
Alexandre Oliva 2007-02-19 06:22:43 +00:00 committed by Alexandre Oliva
parent 3328fbb7d1
commit 300471993f
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
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>
PR middle-end/30833

View File

@ -1731,12 +1731,14 @@ generate_element_ref (struct sra_elt *elt)
static tree
sra_build_assignment (tree dst, tree src)
{
#if 0 /* ENABLE_CHECKING */
/* This test ought to pass, but it is unfortunately too strict for
now. */
gcc_assert (TYPE_CANONICAL (TYPE_MAIN_VARIANT (TREE_TYPE (dst)))
== TYPE_CANONICAL (TYPE_MAIN_VARIANT (TREE_TYPE (src))));
#endif
/* It was hoped that we could perform some type sanity checking
here, but since front-ends can emit accesses of fields in types
different from their nominal types and copy structures containing
them as a whole, we'd have to handle such differences here.
Since such accesses under different types require compatibility
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);
}