https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116411
Bug ID: 116411 Summary: [15 Regression] ICE on readline-8.2p13: in factor_out_conditional_operation, at tree-ssa-phiopt.cc:407 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed ICE on today's gcc-master r15-2990-gf11bc0884467c6 when building readline-8.2p13. Extracted example: $ cat complete.c.c int rl_display_match_list_sind; char *rl_display_match_list_temp; char rl_display_match_list_t; unsigned long strlen (); void rl_display_match_list () { rl_display_match_list_sind = rl_display_match_list_temp ? strlen (rl_display_match_list_temp) : strlen (&rl_display_match_list_t); } Crashing: $ gcc -O1 -c complete.c.c during GIMPLE pass: phiopt complete.c.c: In function 'rl_display_match_list': complete.c.c:5:69: internal compiler error: in factor_out_conditional_operation, at tree-ssa-phiopt.cc:407 5 | void rl_display_match_list () { rl_display_match_list_sind = rl_display_match_list_temp ? strlen (rl_display_match_list_temp) : strlen (&rl_display_match_list_t); } | ^~~~ 0x2092efd diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x20a0a8f internal_error(char const*, ...) ???:0 0x754efb fancy_abort(char const*, int, char const*) ???:0 0x736659 factor_out_conditional_operation(edge_def*, edge_def*, gphi*, tree_node*, tree_node*, gimple*) [clone .cold] ???:0 0xfaea97 (anonymous namespace)::pass_phiopt::execute(function*) ???:0 $ gcc -v |& unnix Using built-in specs. COLLECT_GCC=/<<NIX>>/gcc-15.0.0/bin/gcc COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-15.0.0/libexec/gcc/x86_64-unknown-linux-gnu/15.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../source/configure --prefix=/<<NIX>>/gcc-15.0.0 --with-gmp-include=/<<NIX>>/gmp-6.3.0-dev/include --with-gmp-lib=/<<NIX>>/gmp-6.3.0/lib --with-mpfr-include=/<<NIX>>/mpfr-4.2.1-dev/include --with-mpfr-lib=/<<NIX>>/mpfr-4.2.1/lib --with-mpc=/<<NIX>>/libmpc-1.3.1 --with-native-system-header-dir=/<<NIX>>/glibc-2.39-52-dev/include --with-build-sysroot=/ --with-gxx-include-dir=/<<NIX>>/gcc-15.0.0/include/c++/15.0.0/ --program-prefix= --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=release --enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin --disable-libcc1 --with-isl=/<<NIX>>/isl-0.20 --disable-bootstrap --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 99999999 (experimental) (GCC)