https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48363
Konstantin Kharlamov <Hi-Angel at yandex dot ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Hi-Angel at yandex dot ru --- Comment #4 from Konstantin Kharlamov <Hi-Angel at yandex dot ru> --- I think this is solved. For gcc 9.2.0, when I build the testcase as `gcc test.c -o a -g -O2`, and then look at the assembly with `objdump -d a | vim -`, I see `main` function has just a single `callq`, which is to `printf`. So the whole code was apparently optimized and inlined into main().