https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113900
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> --- This actually takes ages even when it doesn't ICE: ``` $ gcc -c ./slarith.i -O2 -ftime-report Time variable usr sys wall GGC phase setup : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 1841k ( 0%) phase parsing : 0.47 ( 1%) 0.41 ( 37%) 0.88 ( 2%) 24M ( 4%) phase opt and generate : 33.91 ( 99%) 0.70 ( 63%) 34.61 ( 97%) 633M ( 96%) garbage collection : 0.53 ( 2%) 0.01 ( 1%) 0.54 ( 2%) 0 ( 0%) dump files : 0.06 ( 0%) 0.00 ( 0%) 0.06 ( 0%) 0 ( 0%) callgraph construction : 0.02 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 8742k ( 1%) callgraph optimization : 0.05 ( 0%) 0.00 ( 0%) 0.06 ( 0%) 2200 ( 0%) callgraph functions expansion : 28.02 ( 82%) 0.45 ( 41%) 28.47 ( 80%) 500M ( 76%) callgraph ipa passes : 5.47 ( 16%) 0.21 ( 19%) 5.68 ( 16%) 70M ( 11%) ipa function summary : 0.34 ( 1%) 0.00 ( 0%) 0.37 ( 1%) 14M ( 2%) ipa devirtualization : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) ipa cp : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 151k ( 0%) ipa inlining heuristics : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 48k ( 0%) ipa function splitting : 0.00 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 9192 ( 0%) ipa reference : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) ipa profile : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) ipa pure const : 0.03 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 3792 ( 0%) ipa icf : 0.03 ( 0%) 0.00 ( 0%) 0.03 ( 0%) 48k ( 0%) ipa SRA : 0.02 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 37k ( 0%) ipa free inline summary : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 0 ( 0%) ipa modref : 0.04 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 459k ( 0%) cfg construction : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 2113k ( 0%) cfg cleanup : 0.19 ( 1%) 0.00 ( 0%) 0.21 ( 1%) 4518k ( 1%) CFG verifier : 0.90 ( 3%) 0.04 ( 4%) 0.82 ( 2%) 0 ( 0%) trivially dead code : 0.02 ( 0%) 0.00 ( 0%) 0.03 ( 0%) 0 ( 0%) df scan insns : 0.05 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 12k ( 0%) df reaching defs : 0.19 ( 1%) 0.00 ( 0%) 0.20 ( 1%) 0 ( 0%) df live regs : 0.40 ( 1%) 0.01 ( 1%) 0.39 ( 1%) 0 ( 0%) df live&initialized regs : 0.17 ( 0%) 0.00 ( 0%) 0.19 ( 1%) 0 ( 0%) df must-initialized regs : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) df use-def / def-use chains : 0.08 ( 0%) 0.00 ( 0%) 0.10 ( 0%) 0 ( 0%) df reg dead/unused notes : 0.17 ( 0%) 0.01 ( 1%) 0.15 ( 0%) 3314k ( 0%) register information : 0.04 ( 0%) 0.01 ( 1%) 0.01 ( 0%) 0 ( 0%) alias analysis : 0.08 ( 0%) 0.00 ( 0%) 0.12 ( 0%) 14M ( 2%) alias stmt walking : 0.15 ( 0%) 0.02 ( 2%) 0.24 ( 1%) 227k ( 0%) register scan : 0.03 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 154k ( 0%) rebuild jump labels : 0.02 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 768 ( 0%) preprocessing : 0.10 ( 0%) 0.11 ( 10%) 0.19 ( 1%) 500k ( 0%) lexical analysis : 0.12 ( 0%) 0.14 ( 13%) 0.36 ( 1%) 0 ( 0%) parser (global) : 0.02 ( 0%) 0.01 ( 1%) 0.03 ( 0%) 3270k ( 0%) parser function body : 0.19 ( 1%) 0.14 ( 13%) 0.28 ( 1%) 20M ( 3%) early inlining heuristics : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 23k ( 0%) inline parameters : 0.11 ( 0%) 0.00 ( 0%) 0.12 ( 0%) 801k ( 0%) tree gimplify : 0.12 ( 0%) 0.01 ( 1%) 0.12 ( 0%) 30M ( 5%) tree CFG construction : 0.06 ( 0%) 0.01 ( 1%) 0.06 ( 0%) 22M ( 3%) tree CFG cleanup : 0.36 ( 1%) 0.00 ( 0%) 0.24 ( 1%) 320k ( 0%) tree tail merge : 0.02 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 3392k ( 1%) tree VRP : 1.51 ( 4%) 0.01 ( 1%) 1.60 ( 5%) 20M ( 3%) tree Early VRP : 0.78 ( 2%) 0.02 ( 2%) 0.84 ( 2%) 11M ( 2%) tree copy propagation : 0.10 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 353k ( 0%) tree PTA : 0.22 ( 1%) 0.00 ( 0%) 0.18 ( 1%) 2501k ( 0%) tree SSA other : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) tree SSA rewrite : 0.03 ( 0%) 0.01 ( 1%) 0.09 ( 0%) 5749k ( 1%) tree SSA incremental : 0.10 ( 0%) 0.01 ( 1%) 0.09 ( 0%) 4424k ( 1%) tree operand scan : 0.08 ( 0%) 0.05 ( 5%) 0.09 ( 0%) 9419k ( 1%) dominator optimization : 0.99 ( 3%) 0.00 ( 0%) 1.05 ( 3%) 7120k ( 1%) backwards jump threading : 0.59 ( 2%) 0.00 ( 0%) 0.51 ( 1%) 1062k ( 0%) tree SRA : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 0 ( 0%) tree CCP : 1.81 ( 5%) 0.00 ( 0%) 1.88 ( 5%) 2790k ( 0%) tree split crit edges : 0.04 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 3148k ( 0%) tree reassociation : 0.05 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 11k ( 0%) tree PRE : 0.58 ( 2%) 0.01 ( 1%) 0.54 ( 2%) 9776k ( 1%) tree FRE : 0.71 ( 2%) 0.08 ( 7%) 0.74 ( 2%) 2240k ( 0%) tree RPO VN : 0.03 ( 0%) 0.01 ( 1%) 0.00 ( 0%) 973k ( 0%) tree code sinking : 0.03 ( 0%) 0.00 ( 0%) 0.03 ( 0%) 5259k ( 1%) tree linearize phis : 0.07 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 1195k ( 0%) tree backward propagate : 0.00 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 0 ( 0%) tree forward propagate : 0.15 ( 0%) 0.02 ( 2%) 0.13 ( 0%) 1359k ( 0%) tree phiprop : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 0 ( 0%) tree conservative DCE : 0.04 ( 0%) 0.03 ( 3%) 0.03 ( 0%) 104k ( 0%) tree aggressive DCE : 0.18 ( 1%) 0.00 ( 0%) 0.26 ( 1%) 14M ( 2%) tree DSE : 0.10 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 900k ( 0%) PHI merge : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 1360k ( 0%) tree loop optimization : 0.00 ( 0%) 0.01 ( 1%) 0.00 ( 0%) 0 ( 0%) tree loop invariant motion : 0.06 ( 0%) 0.00 ( 0%) 0.08 ( 0%) 0 ( 0%) tree canonical iv : 0.16 ( 0%) 0.00 ( 0%) 0.09 ( 0%) 5872k ( 1%) scev constant prop : 0.07 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 2690k ( 0%) complete unrolling : 0.56 ( 2%) 0.00 ( 0%) 0.52 ( 1%) 27M ( 4%) tree vectorization : 0.96 ( 3%) 0.00 ( 0%) 0.92 ( 3%) 99M ( 15%) tree slp vectorization : 0.35 ( 1%) 0.00 ( 0%) 0.32 ( 1%) 53M ( 8%) tree loop distribution : 0.10 ( 0%) 0.00 ( 0%) 0.19 ( 1%) 5678k ( 1%) tree iv optimization : 0.68 ( 2%) 0.02 ( 2%) 0.73 ( 2%) 25M ( 4%) predictive commoning : 0.17 ( 0%) 0.00 ( 0%) 0.23 ( 1%) 9610k ( 1%) tree copy headers : 0.36 ( 1%) 0.00 ( 0%) 0.37 ( 1%) 14M ( 2%) tree SSA uncprop : 0.00 ( 0%) 0.01 ( 1%) 0.00 ( 0%) 0 ( 0%) tree NRV optimization : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 4032 ( 0%) tree SSA verifier : 2.42 ( 7%) 0.07 ( 6%) 2.31 ( 7%) 0 ( 0%) tree STMT verifier : 2.45 ( 7%) 0.06 ( 5%) 2.61 ( 7%) 0 ( 0%) gimple widening/fma detection : 0.01 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 256 ( 0%) tree strlen optimization : 0.06 ( 0%) 0.00 ( 0%) 0.11 ( 0%) 3430k ( 1%) tree modref : 0.06 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 497k ( 0%) callgraph verifier : 0.09 ( 0%) 0.02 ( 2%) 0.08 ( 0%) 0 ( 0%) dominance frontiers : 0.00 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 0 ( 0%) dominance computation : 0.28 ( 1%) 0.03 ( 3%) 0.42 ( 1%) 0 ( 0%) control dependences : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) out of ssa : 0.03 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 283k ( 0%) expand vars : 0.02 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 6005k ( 1%) expand : 0.11 ( 0%) 0.00 ( 0%) 0.12 ( 0%) 21M ( 3%) post expand cleanups : 0.02 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 3074k ( 0%) lower subreg : 0.02 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 0 ( 0%) forward prop : 0.19 ( 1%) 0.00 ( 0%) 0.15 ( 0%) 740k ( 0%) CSE : 0.32 ( 1%) 0.00 ( 0%) 0.25 ( 1%) 955k ( 0%) dead code elimination : 0.11 ( 0%) 0.00 ( 0%) 0.12 ( 0%) 12k ( 0%) dead store elim1 : 0.09 ( 0%) 0.00 ( 0%) 0.12 ( 0%) 3782k ( 1%) dead store elim2 : 0.04 ( 0%) 0.00 ( 0%) 0.10 ( 0%) 3907k ( 1%) loop analysis : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) loop init : 0.56 ( 2%) 0.00 ( 0%) 0.43 ( 1%) 41M ( 6%) loop invariant motion : 2.79 ( 8%) 0.01 ( 1%) 2.83 ( 8%) 203k ( 0%) loop unrolling : 2.96 ( 9%) 0.03 ( 3%) 3.01 ( 8%) 6601k ( 1%) loop fini : 0.03 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 4096 ( 0%) CPROP : 0.36 ( 1%) 0.00 ( 0%) 0.48 ( 1%) 6688k ( 1%) PRE : 0.30 ( 1%) 0.00 ( 0%) 0.24 ( 1%) 33k ( 0%) CSE 2 : 0.21 ( 1%) 0.01 ( 1%) 0.17 ( 0%) 460k ( 0%) branch prediction : 0.23 ( 1%) 0.00 ( 0%) 0.22 ( 1%) 12M ( 2%) combiner : 0.51 ( 1%) 0.00 ( 0%) 0.47 ( 1%) 17M ( 3%) if-conversion : 0.16 ( 0%) 0.00 ( 0%) 0.17 ( 0%) 230k ( 0%) mode switching : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) integrated RA : 0.53 ( 2%) 0.01 ( 1%) 0.48 ( 1%) 25M ( 4%) LRA non-specific : 0.17 ( 0%) 0.00 ( 0%) 0.15 ( 0%) 711k ( 0%) LRA virtuals elimination : 0.02 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 107k ( 0%) LRA reload inheritance : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 36k ( 0%) LRA create live ranges : 0.06 ( 0%) 0.00 ( 0%) 0.08 ( 0%) 18k ( 0%) LRA hard reg assignment : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) LRA rematerialization : 0.02 ( 0%) 0.00 ( 0%) 0.03 ( 0%) 0 ( 0%) reload : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 6240 ( 0%) reload CSE regs : 0.19 ( 1%) 0.00 ( 0%) 0.25 ( 1%) 5298k ( 1%) ree : 0.09 ( 0%) 0.00 ( 0%) 0.06 ( 0%) 67k ( 0%) thread pro- & epilogue : 0.09 ( 0%) 0.01 ( 1%) 0.05 ( 0%) 469k ( 0%) if-conversion 2 : 0.05 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 19k ( 0%) combine stack adjustments : 0.02 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 6240 ( 0%) peephole 2 : 0.09 ( 0%) 0.00 ( 0%) 0.09 ( 0%) 667k ( 0%) hard reg cprop : 0.10 ( 0%) 0.00 ( 0%) 0.07 ( 0%) 33k ( 0%) scheduling 2 : 0.33 ( 1%) 0.00 ( 0%) 0.39 ( 1%) 996k ( 0%) machine dep reorg : 0.09 ( 0%) 0.01 ( 1%) 0.12 ( 0%) 12k ( 0%) reorder blocks : 0.08 ( 0%) 0.00 ( 0%) 0.07 ( 0%) 2289k ( 0%) shorten branches : 0.03 ( 0%) 0.00 ( 0%) 0.03 ( 0%) 0 ( 0%) reg stack : 0.02 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 75k ( 0%) final : 0.05 ( 0%) 0.01 ( 1%) 0.11 ( 0%) 5355k ( 1%) tree if-combine : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 252k ( 0%) if to switch conversion : 0.00 ( 0%) 0.00 ( 0%) 0.02 ( 0%) 1144 ( 0%) straight-line strength reduction : 0.04 ( 0%) 0.01 ( 1%) 0.04 ( 0%) 233k ( 0%) store merging : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 480 ( 0%) tree loop if-conversion : 0.11 ( 0%) 0.00 ( 0%) 0.12 ( 0%) 5909k ( 1%) access analysis : 0.18 ( 1%) 0.00 ( 0%) 0.16 ( 0%) 4496 ( 0%) early local passes : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) unaccounted optimizations : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) rest of compilation : 0.30 ( 1%) 0.01 ( 1%) 0.40 ( 1%) 2089k ( 0%) unaccounted post reload : 0.01 ( 0%) 0.00 ( 0%) 0.00 ( 0%) 0 ( 0%) remove unused locals : 0.02 ( 0%) 0.00 ( 0%) 0.03 ( 0%) 0 ( 0%) address taken : 0.03 ( 0%) 0.00 ( 0%) 0.04 ( 0%) 0 ( 0%) verify loop closed : 0.05 ( 0%) 0.01 ( 1%) 0.06 ( 0%) 0 ( 0%) verify RTL sharing : 0.68 ( 2%) 0.00 ( 0%) 0.75 ( 2%) 0 ( 0%) rebuild frequencies : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%) 0 ( 0%) repair loop structures : 0.03 ( 0%) 0.00 ( 0%) 0.05 ( 0%) 824 ( 0%) TOTAL : 34.38 1.11 35.50 660M Extra diagnostic checks enabled; compiler may run slowly. Configure with --enable-checking=release to disable checks. ``` Anyway, 'gcc -c ./slarith.i -O3 -march=znver2 -m32 -fno-strict-aliasing -fPIC makes it ICE at least, I'm not able to test many combinations though. Sorry! ``` $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0.9999 p, commit e6628b8411533cc14470a9404cca9047df81cb0f' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --without-isl --enable-default-pie --enable-host-pie --disable-host-bind-now --enable-default-ssp --with-build-config='bootstrap-O3 bootstrap-lto' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240212 (experimental) f3306a9455f4d2556ba941e5783c94d4bede3b58 (Gentoo 14.0.9999 p, commit e6628b8411533cc14470a9404cca9047df81cb0f) ```