gcc/testsuite/g++.dg/torture/pr85496.C
raw| 1 | // PR middle-end/85496 |
| 2 | // Reported by Marek Polacek <[email protected]> |
| 3 | |
| 4 | template <typename> class complex; |
| 5 | template <typename _Tp> complex<_Tp> operator*(complex<_Tp>, complex<_Tp>); |
| 6 | template <> struct complex<float> { _Complex float _M_value; }; |
| 7 | class A { |
| 8 | complex<float> _f0, _f1; |
| 9 | |
| 10 | public: |
| 11 | complex<float> &m_fn1() { return _f1; } |
| 12 | }; |
| 13 | complex<float> a; |
| 14 | void cos() { |
| 15 | A b; |
| 16 | complex<float> c; |
| 17 | b.m_fn1() = c * a; |
| 18 | } |