https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72657
Bug ID: 72657 Summary: [7 regression][CHKP] internal compiler error: in ix86_expand_builtin Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: ienkovich at gcc dot gnu.org Target Milestone: --- Here is a reproducer: >cat small.i int a; int *b; static void __attribute__((noinline)) fn2 (const char *c) { if (!c) __builtin_abort (); } static int * fn1 () { if (a) fn2(__PRETTY_FUNCTION__); return 0; } int main () { b = fn1(); return a; } >gcc -O3 -flto -fcheck-pointer-bounds -mmpx -march=haswell small.i small.i: In function 'main.chkp': small.i:20:1: internal compiler error: in ix86_expand_builtin, at config/i386/i386.c:41299 main () ^ ... Regression is caused by r238709. Dump shows we don't inline call to fn1 properly. As a result we get __bound_tmp.2_5 = __builtin_ia32_bndret (0B); Which is invalid IL because we always expect SSA_NAME as an argument of bndret call.