https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941
--- Comment #30 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:76fe494230477a69f8fa8c8ca2d493acaf343eb1 commit r12-6666-g76fe494230477a69f8fa8c8ca2d493acaf343eb1 Author: Andrew Pinski <apin...@marvell.com> Date: Wed Nov 17 02:45:22 2021 +0000 Fix tree-optimization/101941: IPA splitting out function with error attribute The Linux kernel started to fail compile when the jump threader was improved (r12-2591-g2e96b5f14e4025691). This failure was due to the IPA splitting code decided now to split off the basic block which contained two functions, one of those functions included the error attribute on them. This patch fixes the problem by disallowing basic blocks from being split which contain functions that have either the error or warning attribute on them. The two new testcases are to make sure we still split the function for other places if we reject the one case. Committed as approved after Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/101941 gcc/ChangeLog: * ipa-split.cc (visit_bb): Disallow function calls where the function has either error or warning attribute. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr101941-1.c: New test. * gcc.dg/tree-ssa/pr101941-1.c: New test.