https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117437
Bug ID: 117437 Summary: ICE: in mem_loc_descriptor, at dwarf2out.cc:17079 at -O1 with "-fno-tree-dce" and -g and sanitizer Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- ******************************************************************************* OS and Platform: $ uname -a: Linux 65dac7c84719 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ******************************************************************************* 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 void __attribute__((no_sanitize("pointer-overflow"))) a() { int b, c; auto d = [b, &c]<typename e>(this e) {}; d(); } ******************************************************************************* Command Lines: $ gcc -O1 -g -fno-tree-dce -fsanitize=pointer-overflow -std=c++23 mutant.C (expr_list:REG_DEP_TRUE (reg:SI 5 di [ D.2816 ]) (const_int 0 [0]))during RTL pass: final mutant.C: In lambda function: mutant.C:3:41: internal compiler error: in mem_loc_descriptor, at dwarf2out.cc:17079 3 | auto d = [b, &c]<typename e>(this e) {}; | ^ 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 0x1a53095 mem_loc_descriptor(rtx_def*, machine_mode, machine_mode, var_init_status) ???:0 0x1a52f94 mem_loc_descriptor(rtx_def*, machine_mode, machine_mode, var_init_status) ???: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. Godbolt link: https://godbolt.org/z/EPPq1M1YE