+2019-07-02 Jan Hubicka <jh@suse.cz>
+
+ * tree-inline.c (remap_gimple_stmt): Do not subtitute handled components
+ to clobber of return value.
+
2019-07-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/cortex-a57.md (cortex_a57_neon_type): Use neon_arith_basic
for is_neon_type instructions that have not already been categorized.
-
2019-07-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/58483
+2019-07-02 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/lto/pr90990_0.C: New testcase.
+
2019-07-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/58483
--- /dev/null
+// { dg-lto-do link }
+/* { dg-extra-ld-options { -r -nostdlib } } */
+class A {
+public:
+ float m_floats;
+ A() {}
+};
+class B {
+public:
+ A operator[](int);
+};
+class C {
+ B m_basis;
+
+public:
+ A operator()(A) {
+ m_basis[1] = m_basis[2];
+ A a;
+ return a;
+ }
+};
+class D {
+public:
+ C m_fn1();
+};
+class F {
+ A m_pivotInB;
+ F(D &, const A &);
+};
+F::F(D &p1, const A &p2) : m_pivotInB(p1.m_fn1()(p2)) {}
+
return NULL;
}
}
+
+ /* We do not allow CLOBBERs of handled components. In case
+ returned value is stored via such handled component, remove
+ the clobber so stmt verifier is happy. */
+ if (gimple_clobber_p (stmt)
+ && TREE_CODE (gimple_assign_lhs (stmt)) == RESULT_DECL)
+ {
+ tree remapped = remap_decl (gimple_assign_lhs (stmt), id);
+ if (!DECL_P (remapped)
+ && TREE_CODE (remapped) != MEM_REF)
+ return NULL;
+ }
if (gimple_debug_bind_p (stmt))
{