https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121112
--- Comment #2 from Anonymous <njuwy at smail dot nju.edu.cn> --- (In reply to Anonymous from comment #0) > gcc version: > gcc version 16.0.0 20250704 (experimental) (GCC) > > src: > #include <stdio.h> > static void bar_impl(void) { puts("bar_impl called."); } > static void *bar_ifunc(void) { return &bar_impl; } > extern void bar(void) __attribute__((ifunc("bar_ifunc"))); > extern __typeof(bar) bar_alias __attribute__((alias("bar"))); > int main() { > bar(); > bar_alias(); > return 0; > } > > godbolt URL: > https://godbolt.org/z/1Ydqn39jo > > issue: > "bar_impl called." was output twice under -O0 -O1, while only once under -Os > -O2 and -O3. Is this a bug? sorry the right RUL is: https://godbolt.org/z/TdWTdh9vG