https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127198

            Bug ID: 127198
           Summary: [16/17 Regression] ICE: in validate, at
                    analyzer/store.cc:720 with -Og -fanalyzer
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 65487
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65487&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Og -fanalyzer testcase.c 
during IPA pass: analyzer
testcase.c: In function 'main':
testcase.c:8:7: internal compiler error: in validate, at analyzer/store.cc:720
    8 |       __builtin_strncpy(2360986523 + (char *)&b, c, 4);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x2f07a9d internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xe5c0f3 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x980d13 ana::concrete_binding_map::validate() const
        /repo/gcc-trunk/gcc/analyzer/store.cc:720
0x1be8951 ana::binding_cluster::validate() const
        /repo/gcc-trunk/gcc/analyzer/store.cc:1783
0x1be8951 ana::store::validate() const
        /repo/gcc-trunk/gcc/analyzer/store.cc:3001
0x1b49c70 ana::exploded_graph::get_or_create_node(ana::program_point const&,
ana::program_state const&, ana::exploded_node*, bool)
        /repo/gcc-trunk/gcc/analyzer/engine.cc:2500
0x1b6ef52 ana::gimple_stmt_op::execute_on_state(ana::operation_context&,
ana::program_state) const
        /repo/gcc-trunk/gcc/analyzer/ops.cc:501
0x1b6fa4a ana::call_and_return_op::execute(ana::operation_context&) const
        /repo/gcc-trunk/gcc/analyzer/ops.cc:989
0x1b4ce6b ana::exploded_graph::process_node(ana::exploded_node*)
        /repo/gcc-trunk/gcc/analyzer/engine.cc:3519
0x1b4d4fa ana::exploded_graph::process_worklist()
        /repo/gcc-trunk/gcc/analyzer/engine.cc:3147
0x1b4fddb ana::impl_run_checkers(ana::logger*)
        /repo/gcc-trunk/gcc/analyzer/engine.cc:4846
0x1b50c06 ana::run_checkers()
        /repo/gcc-trunk/gcc/analyzer/engine.cc:4937
0x1b42268 execute
        /repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:81
/repo/gcc-trunk/binary-trunk-20260903062222-r17-3885-gf8a30de08d21d3-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260903062222-r17-3885-gf8a30de08d21d3-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -Og -fanalyzer -o /tmp/ccUrL0YC.s
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260903062222-r17-3885-gf8a30de08d21d3-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --enable-libsanitizer --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260903062222-r17-3885-gf8a30de08d21d3-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260903 (experimental) (GCC)

Reply via email to