https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87150
--- Comment #15 from Stephan Bergmann <sbergman at redhat dot com> --- I see that with the fix from comment 13 included, the slightly changed source #include <utility> struct S1 { S1(S1 &&); }; struct S2: S1 {}; S1 f(S2 s) { return std::move(s); } causes -Wredundant-move (when that warning is explicitly requested).