[PR98096] inline-asm: Take inout operands into account for access to labels by names.
authorVladimir N. Makarov <vmakarov@redhat.com>
Tue, 16 Feb 2021 15:27:56 +0000 (10:27 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Tue, 16 Feb 2021 15:30:10 +0000 (10:30 -0500)
commit72d78655a91bb2f89ac4432cfd6374380d6f9987
tree58e1991a7c059630e352f1d0033972240ad82fbc
parentebf9b6c13f0847ddcc22e540a5fcdbf644e85a9c
[PR98096] inline-asm: Take inout operands into account for access to labels by names.

GCC splits inout operands into output and new matched input operands
during gimplfication.  Addressing operands by name or number is not
problem as the new input operands are added at the end of existing
input operands.  However it became a problem for labels in asm goto
with output reloads.  Addressing labels should take into account the
new input operands.  The patch solves the problem.

gcc/ChangeLog:

PR inline-asm/98096
* stmt.c (resolve_operand_name_1): Take inout operands into account
for access to labels by names.
* doc/extend.texi: Describe counting operands for accessing labels.

gcc/testsuite/ChangeLog:

PR inline-asm/98096
* gcc.c-torture/compile/pr98096.c: New.
gcc/doc/extend.texi
gcc/stmt.c
gcc/testsuite/gcc.c-torture/compile/pr98096.c [new file with mode: 0644]