https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107502
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Your testcase has no return in it. So there is a __builtin_unreachable added at the end of each function without returns. <source>: In function 'char* test(char*, char*)': <source>:34:1: warning: no return statement in function returning non-void [-Wreturn-type] 34 | } | ^ <source>: In function 'std::vector<char>::iterator test2(std::vector<char>::iterator, std::vector<char>::iterator)': <source>:40:1: warning: no return statement in function returning non-void [-Wreturn-type] 40 | } | ^ ASM generation compiler returned: 0 <source>: In function 'char* test(char*, char*)': <source>:34:1: warning: no return statement in function returning non-void [-Wreturn-type] 34 | } | ^ <source>: In function 'std::vector<char>::iterator test2(std::vector<char>::iterator, std::vector<char>::iterator)': <source>:40:1: warning: no return statement in function returning non-void [-Wreturn-type] 40 | } | ^