5.7.7.46 Toplevel-reorder Option

The -ftoplevel-reorder option allows the compiler to reorder top-level functions, variables, and asm statements, in which case, they might not be output in the same order that they appear in the input file. This option also allows the compiler to remove unreferenced static variables.

Enabled at level -O0. When disabled explicitly using the -fno-toplevel-reorder option, it also implies -fno-section-anchors, which is otherwise enabled at -O0 on some targets.