https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64801
Bug ID: 64801
Summary: [5 Regression] kernel build failure due to ICF
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
Created attachment 34574
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34574&action=edit
unreduced testcase
Seen on x86_64 with kernel's defconfig.
...
CC init/version.o
LD init/built-in.o
drivers/built-in.o:psmouse-base.c:function psmouse_extensions: error: undefined
reference to 'fsp_detect'
-fno-ipa-icf "fixes" the issue.
markus@x4 tmp % cat psmouse-base.i
int a;
int
elantech_detect (void)
{
return -38;
}
inline int
fsp_detect (void)
{
return -38;
}
void
psmouse_extensions (void)
{
int (*b)() = fsp_detect;
a = b ();
}
markus@x4 tmp % gcc -c -O2 psmouse-base.i
markus@x4 tmp % nm psmouse-base.o| grep fsp_detect
U fsp_detect