]> git.ipfire.org Git - thirdparty/gcc.git/commit
stmt: Handle %cc[name] in resolve_asm_operand_names [PR122133]
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Oct 2025 07:46:48 +0000 (09:46 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 6 Oct 2025 07:46:48 +0000 (09:46 +0200)
commit96c4a32cfec8c4b4c677de114164192cfd8ae54d
tree07dbcc734e07313bf5ab9fa93e33766b8840c22e
parenta7d8eca7244028990725ba01dd8a4ec6ebdac689
stmt: Handle %cc[name] in resolve_asm_operand_names [PR122133]

Last year I've extended the asm template syntax in inline asm to support
%cc0 etc., apparently the first 2 letter generic operand modifier.
As the following testcase shows, I forgot to tweak the [foo] handling
for it though.  As final.cc will error on any % ISALPHA not followed by
digit (with the exception of % c c digit), I think we can safely handle
this for any 2 letters in between % and [, instead of hardcoding it for
now only for %cc[ and changing it again next time we add something
two-letter.

2025-10-06  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/122133
* stmt.cc (resolve_asm_operand_names): Handle % and 2 letters followed
by open square.

* c-c++-common/toplevel-asm-9.c: New test.
gcc/stmt.cc
gcc/testsuite/c-c++-common/toplevel-asm-9.c [new file with mode: 0644]