2017-11-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/82902
* tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
* g++.dg/torture/pr82902.C: New testcase.
From-SVN: r254575
+2017-11-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/82902
+ * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
+
2017-11-09 Martin Liska <mliska@suse.cz>
PR target/82863
+2017-11-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/82902
+ * g++.dg/torture/pr82902.C: New testcase.
+
2017-11-09 Martin Liska <mliska@suse.cz>
PR target/82863
--- /dev/null
+// { dg-do compile }
+
+typedef struct el_t {
+ el_t *next;
+ int elem[];
+} EL;
+el_t a, c;
+void *b;
+void *fn1() {
+ if (b)
+ return a.elem;
+ return c.elem;
+}
+typedef struct {
+ int x;
+} EV_T;
+EV_T *d;
+void fn2() {
+ EV_T *e = (EV_T *)fn1();
+ d[0] = *e;
+}
/* Found a proper dereference with an aggregate copy. Just
insert aggregate copies on the edges instead. */
- if (!is_gimple_reg_type (TREE_TYPE (TREE_TYPE (ptr))))
+ if (!is_gimple_reg_type (TREE_TYPE (gimple_assign_lhs (use_stmt))))
{
if (!gimple_vdef (use_stmt))
goto next;