Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / effc5.C
blob43fdd0952164eec811c3d4916b14024196446907
1 // PR c++/98841
2 // { dg-do compile }
3 // { dg-options "-Weffc++" }
5 struct S {
6   template <typename T>
7   S& operator=(const T&) { return *this; }      // { dg-bogus "should return a reference to" }
8   S& operator=(const S&) { return *this; }
9 };
11 void
12 foo ()
14   S s, t;
15   s = 1;
16   s = t;