2 /* { dg-options "-O -fdump-tree-forwprop1" } */
7 Value(double value_) : value (value_) {}
8 operator double() const { return value; }
9 Value& operator=(double other) { value = other; }
15 Ref(const Value& m_) : m(m_) {}
16 operator double() const { return m; }
22 Diff(const Value& lhs_, const Value& rhs_) : lhs(lhs_), rhs(rhs_) {}
23 operator double() const { return lhs - rhs; }
26 extern "C" void abort (void);
27 int main(int argc, char *argv[])
30 for(int a = 0; a < 1000; a++)
38 /* Check that we forward propagated
39 D.2182_13 = (struct Ref *) &D.2137.lhs;
41 D.2182_13->lhs.m ={v} &I;
43 D.2137.lhs.m ={v} &I; */
45 /* { dg-final { scan-tree-dump-times "D\\\.....\\\..hs\\\.m =" 2 "forwprop1" } } */
46 /* { dg-final { cleanup-tree-dump "forwprop1" } } */