https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84100
--- Comment #7 from Chris Hall <gcc at gmch dot uk> --- And here's a funny thing... ... if I compile "-O3 -falign-functions -falign-loops=32" I get the alignment I ask for. ... if I compile "-O3 -falign-functions -falign-loops=32 -fno-tree-vectorize" I get the alignment I ask for (and I avoid Bug 84101). ... if I compile "-O3 -falign-functions -falign-loops=32" but with: _Pragma("GCC optimize(\"no-tree-vectorize\")") extern int func_x(int num) ; extern int func_y(int num) ; extern uint64_pair_t pair(int num) ; extern int func_z(int num) ; I no longer get the alignment I asked for, I get the default alignment for -O3 ! And, for further amusement: extern int func_x(int num) ; extern int func_y(int num) ; extern uint64_pair_t pair(int num) __attribute__((optimize("no-tree-vectorize"))) ; extern int func_z(int num) ; has exactly the same effect ! FWIW, I have tried _Pragma("GCC push/pop/reset_options") -- the effect of which is hard to determine; but I can say that pop/reset do not restore all optimization option settings.