https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69857
--- Comment #7 from ktkachov at gcc dot gnu.org --- Yes, that's an approach that can be taken. Once such a case is found, you could also try using a reducer program like creduce to create a small testcase appropriate for the testsuite. Removing the return there would probably be an optimisation, which is why I recommended it for GCC 7. GCC 6 is now in a regression fixing stage, so for it to go in now we would need to find a testcase where we were performing an optimisation before r197530 and after r197530 (with the bogus return) we stopped doing. Considering that r197530 was supposed to introduce that optimisation, it's unlikely that such a case can be found.