https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110048
Bug ID: 110048
Summary: undefined reference when build with O0
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: yinyuefengyi at gmail dot com
Target Milestone: ---
The below case failed to link with O0 since gcc 5.1, is it a regression?
Though clang always failed to link...
The case links success with O1+ or 'inline' removed.
https://godbolt.org/z/9PEhWrov8
inline void foo(void)
{
}
int main(void)
{
foo();
}