]> git.ipfire.org Git - thirdparty/gcc.git/commit
expand: Handle variable-length vector constructors with debug [PR123392]
authorTejas Belagod <tejas.belagod@arm.com>
Tue, 13 Jan 2026 16:58:38 +0000 (16:58 +0000)
committerTejas Belagod <tejas.belagod@arm.com>
Wed, 14 Jan 2026 15:45:02 +0000 (15:45 +0000)
commitc79bcca7fb46b77157e9c7b467e97acccbce64fc
tree6fa6a259bc82b415d4ba8f093517be56c309dd74
parentb4eb45a15d49f2a307387ef848b314756e56f94f
expand: Handle variable-length vector constructors with debug [PR123392]

Variable-length Vector initializer constructors currently only work in
non-debug mode.  It ICEs when compiled with -g.  This patch fixes it to handle
variable-length vector intialization by limiting the constructor elements to
the lower bound of the variable length poly which is also the maximum number
of elements allowed in the initializer.

PR middle-end/123392
gcc/
* cfgexpand.cc (expand_debug_expr): Handle variable-length initializer
for CONSTRUCTOR.

gcc/testsuite/

* gcc.target/aarch64/sve/acle/general/pr123392.c: New.
gcc/cfgexpand.cc
gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr123392.c [new file with mode: 0644]