]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/117254 - ICE with access diangostics
authorRichard Biener <rguenther@suse.de>
Tue, 22 Oct 2024 09:46:47 +0000 (11:46 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Jan 2025 08:53:20 +0000 (09:53 +0100)
commit2b12998ff9370f4a0aa8c0562f933c2e7efdb41d
treee8622e1523008cea375c1bad30b98f8a49250df7
parent72d7bdbdd9fe1e575b7ad6da0fd7587627912ddb
tree-optimization/117254 - ICE with access diangostics

The diagnostics code fails to handle non-constant domain max.

PR tree-optimization/117254
* gimple-ssa-warn-access.cc (maybe_warn_nonstring_arg):
Check the array domain max is constant before using it.

* gcc.dg/pr117254.c: New testcase.

(cherry picked from commit d464a52d0678dfea523a60efe8b792ba1b8d40db)
gcc/gimple-ssa-warn-access.cc
gcc/testsuite/gcc.dg/pr117254.c [new file with mode: 0644]