https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106061
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:bd246ac68239d944b01c213c39d6e212362c1b40 commit r13-5436-gbd246ac68239d944b01c213c39d6e212362c1b40 Author: Jakub Jelinek <ja...@redhat.com> Date: Fri Jan 27 11:16:43 2023 +0100 cgraph: Adjust verify_corresponds_to_fndecl [PR106061] IPA passes redirect some calls in what it determines to be unreachable code to builtin_decl_unreachable. But that function returns sometimes builtin_decl_explicit (BUILT_IN_UNREACHABLE) (which was what GCC 12 and earlier did always), or builtin_decl_explicit (BUILT_IN_TRAP) (e.g. for -funreachable-traps, -O0, -Og). Now the cgraph verification code has a code to verify cgraph edges and has there an exception for these redirections to BUILT_IN_UNREACHABLE, but doesn't have for BUILT_IN_TRAP, so e.g. the following testcase ICEs during that verification. The following patch just adds BUILT_IN_TRAP to those exceptions. 2023-01-27 Jakub Jelinek <ja...@redhat.com> PR ipa/106061 * cgraph.cc (cgraph_edge::verify_corresponds_to_fndecl): Allow redirection of calls to __builtin_trap in addition to redirection to __builtin_unreachable. * gcc.dg/pr106061.c: New test.