]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/104786 - ICE with asm and VLA
authorRichard Biener <rguenther@suse.de>
Wed, 9 Mar 2022 09:55:49 +0000 (10:55 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 16 Mar 2022 07:17:40 +0000 (08:17 +0100)
commitc4ac43fad3dff78e6e16e4d6ff36e77428332e4d
tree0450bb95c6c30272d8f5ce01858ba8444b84ccbb
parentd261855943584e25c43fc59dfbc75e50e24a66b8
middle-end/104786 - ICE with asm and VLA

The following fixes an ICE observed with a MEM_REF allows_mem asm
operand referencing a VLA.  The following makes sure to not attempt
to go the temporary creation way when we cannot.

2022-03-09  Richard Biener  <rguenther@suse.de>

PR middle-end/104786
* cfgexpand.c (expand_asm_stmt): Do not generate a copy
for VLAs without an upper size bound.

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

(cherry picked from commit ba3ff5e35144e2afff4ccef4ccbbbbaba9870afb)
gcc/cfgexpand.c
gcc/testsuite/gcc.dg/pr104786.c [new file with mode: 0644]