aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/gimple-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/gimple-expr.c')
-rw-r--r--gcc-4.9/gcc/gimple-expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/gimple-expr.c b/gcc-4.9/gcc/gimple-expr.c
index da663d6fb..7827b5a0d 100644
--- a/gcc-4.9/gcc/gimple-expr.c
+++ b/gcc-4.9/gcc/gimple-expr.c
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "stor-layout.h"
#include "demangle.h"
#include "gimple-ssa.h"
+#include "l-ipo.h"
/* ----- Type related ----- */
@@ -278,7 +279,9 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
compared types. */
else if (AGGREGATE_TYPE_P (inner_type)
&& TREE_CODE (inner_type) == TREE_CODE (outer_type))
- return false;
+ return (L_IPO_COMP_MODE
+ && (equivalent_struct_types_for_tbaa (inner_type,
+ outer_type) == 1));
return false;
}