https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106568
--- Comment #20 from Jeffrey Walton <noloader at gmail dot com> --- Hi Andrew. I went through the list of options that are enabled at -O2 from [1]. I built the library with each option separately at "-DNDEBUG -g2 -O2 -fno-xxx". Here is the list of suspects. I seem to recall having trouble with -fdevirtualize in the past: -fno-devirtualize -fno-indirect-inlining -fno-devirtualize Here are the full results: Failed to execute with -fno-align-functions Failed to execute with -fno-align-jumps Failed to execute with -fno-align-labels Failed to execute with -fno-align-loops Failed to execute with -fno-caller-saves Failed to execute with -fno-code-hoisting Failed to execute with -fno-crossjumping Failed to execute with -fno-cse-follow-jumps Failed to execute with -fno-cse-skip-blocks Failed to execute with -fno-delete-null-pointer-checks Ok! Ok! Ok! Ok! Ok! -fno-devirtualize Failed to execute with -fno-devirtualize-speculatively Failed to execute with -fno-expensive-optimizations Failed to execute with -fno-finite-loops Failed to execute with -fno-gcse Failed to execute with -fno-gcse-lm Failed to execute with -fno-hoist-adjacent-loads Failed to execute with -fno-inline-functions Failed to execute with -fno-inline-small-functions Ok! Ok! Ok! Ok! Ok! -fno-indirect-inlining Failed to execute with -fno-ipa-bit-cp Failed to execute with -fno-ipa-cp Failed to execute with -fno-ipa-icf Failed to execute with -fno-ipa-ra Failed to execute with -fno-ipa-sra Failed to execute with -fno-ipa-vrp Failed to execute with -fno-isolate-erroneous-paths-dereference Failed to execute with -fno-lra-remat Failed to execute with -fno-optimize-sibling-calls Failed to execute with -fno-optimize-strlen Failed to execute with -fno-partial-inlining Failed to execute with -fno-peephole2 Failed to build with -fno-reorder-blocks-algorithm=stc Failed to execute with -fno-reorder-blocks-and-partition Failed to execute with -fno-reorder-functions Failed to execute with -fno-rerun-cse-after-loop Failed to execute with -fno-schedule-insns Failed to execute with -fno-schedule-insns2 Failed to execute with -fno-sched-interblock Failed to execute with -fno-sched-spec Failed to execute with -fno-store-merging Ok! Ok! Ok! Ok! Ok! -fno-strict-aliasing Failed to execute with -fno-thread-jumps Failed to execute with -fno-tree-builtin-call-dce Failed to execute with -fno-tree-loop-vectorize Failed to execute with -fno-tree-pre Ok! Ok! Ok! Ok! Ok! -fno-tree-slp-vectorize Failed to execute with -fno-tree-switch-conversion Failed to execute with -fno-tree-tail-merge Failed to execute with -fno-tree-vrp Failed to build with -fno-vect-cost-model=very-cheap Attached is the script I used to repeatedly build the library.