The options appear to be working correctly, based on the generated code/asm; they just aren't reported correctly by -Q. -falign-labels appears to be working and reported correctly. There are a few related bugs (bug 45996, bug 61588, and bug 43861); they appear independent/out-of-date but there's a chance fixing them will fix this too. For example: $ gcc -Os -Q --help=optimizers | grep align- -falign-functions [disabled] -falign-functions= 16 -falign-jumps [disabled] -falign-jumps= 16 -falign-labels [enabled] -falign-labels= 0 -falign-loops [disabled] -falign-loops= 16 $ gcc -O3 -Q --help=optimizers | grep align- -falign-functions [disabled] -falign-functions= 16 -falign-jumps [disabled] -falign-jumps= 16 -falign-labels [enabled] -falign-labels= 0 -falign-loops [disabled] -falign-loops= 16 $ gcc -O3 -fno-align-loops -fno-align-functions -Q --help=optimizers | grep align- -falign-functions [disabled] -falign-functions= 1 -falign-jumps [disabled] -falign-jumps= 16 -falign-labels [enabled] -falign-labels= 0 -falign-loops [disabled] -falign-loops= 1 $ gcc -O3 -falign-loops=32 -Q --help=optimizers | grep align- -falign-functions [disabled] -falign-functions= 16 -falign-jumps [disabled] -falign-jumps= 16 -falign-labels [enabled] -falign-labels= 0 -falign-loops [disabled] -falign-loops= 32 All of these generate the expected asm, with alignment for -O3 (except when explicitly turned off) and no alignment for -Os. gcc -v: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp Thread model: posix gcc version 8.1.1 20180531 (GCC)
Probably the option machinery / help code doesn't properly associate FOO and FOO= option variants like falign-loops Common Report Var(align_loops,0) Optimization UInteger Align the start of loops. falign-loops= Common RejectNegative Joined UInteger Var(align_loops) Optimization
Let me take a look.
Fixed in r262513.