https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117461
Bug ID: 117461 Summary: ICE: in verify_dominators, at dominance.cc:1194 (during GIMPLE pass: asan) with -O1 and -fsanitize=address Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- Compiler Explorer: https://godbolt.org/z/T6YYGx5PW ******************************************************************************* gcc version: Using built-in specs. COLLECT_GCC=/home/software/gcc-trunk-3aa004f/bin/gcc COLLECT_LTO_WRAPPER=/home/software/gcc-trunk-3aa004f/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --disable-multilib --disable-bootstrap --enable-languages=c,c++ --prefix=/home/software/gcc-trunk-3aa004f --enable-coverage Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240630 (experimental) (GCC) ******************************************************************************* Program: $ cat mutant.C struct b { int *begin(); struct c { int d; friend bool __attribute__((returns_twice)) operator!=(int *, c); }; c end(); }; int main() { b a; for (auto e : a) ; } ******************************************************************************* Command Lines: $ gcc -O1 -fsanitize=address mutant.C mutant.C: In function 'int main()': mutant.C:9:5: error: dominator of 5 should be 2, not 13 9 | int main() { | ^~~~ during GIMPLE pass: asan mutant.C:9:5: internal compiler error: in verify_dominators, at dominance.cc:1194 0x576c1eb diagnostic_context::report_diagnostic(diagnostic_info*) ???:0 0x576cabd diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x578c98b internal_error(char const*, ...) ???:0 0x576d000 fancy_abort(char const*, int, char const*) ???:0 0x19cf214 verify_dominators(cdi_direction) ???:0 0x19d1305 checking_verify_dominators(cdi_direction) ???:0 0x19cd8af calculate_dominance_info(cdi_direction, bool) ???:0 0x2748e0c update_ssa(unsigned int) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.