https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93799
Bug ID: 93799 Summary: [10 Regression] ice in propagate_vals_across_arith_jfunc, at ipa-cp.c:2039 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de CC: marxin at gcc dot gnu.org Target Milestone: --- The following code ICEs ```c++ struct search_param { int total; }; void search_trivial(search_param error_left) { search_trivial(error_left); search_param error_left2{error_left}; error_left2.total--; search_trivial(error_left2); } void search_algo_uni(search_param error_left) { search_trivial(error_left); } void search_algo(search_param error_left) { search_algo_uni(error_left); } int main() { search_algo({}); return 0; } ``` https://godbolt.org/z/aPnCGi with ``` > g++-git -O3 -c ice.cpp during IPA pass: cp ice.cpp:12:41: internal compiler error: in propagate_vals_across_arith_jfunc, at ipa-cp.c:2039 12 | int main() { search_algo({}); return 0; } | ^ 0x639286 propagate_vals_across_arith_jfunc /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:2039 0x14d5f24 propagate_aggregate_lattice /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:2690 0x14d5f24 propagate_aggs_across_jump_function /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:2781 0x14d5f24 propagate_constants_across_call /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:2875 0x14d62a6 propagate_constants_topo /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:3794 0x14da490 ipcp_propagate_stage /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:3910 0x14da490 ipcp_driver /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:5899 0x14da490 execute /home/marehr/Packages/gcc-git/src/gcc/gcc/ipa-cp.c:5992 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://bugs.archlinux.org/> for instructions. ``` This might be the same ICE as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93763, but I reported it as a new issue, because they have different stack-traces. ``` > g++-git -v Using built-in specs. COLLECT_GCC=g++-git COLLECT_LTO_WRAPPER=/opt/gcc/gcc-git/bin/../lib/gcc/x86_64-pc-linux-gnu/10.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/marehr/Packages/gcc-git/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++ --enable-shared --enable-threads=posix --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 --enable-cet=auto --disable-boostrap Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200217 (experimental) (GCC) ```