[PATCH] PR target/106877: Robustify reg-stack to malformed asm.

Roger Sayle roger@nextmovesoftware.com
Tue Sep 13 09:56:58 GMT 2022


This patch resolves PR target/106877 an ICE-on-invalid inline-asm
regression.  An innocent upstream change means that the test case
from PR inline-asm/84683 now hits a different assert in reg-stack.cc's
move_for_stack_reg.  Fixed by duplicating Jakub's solution to PR 84683
https://gcc.gnu.org/pipermail/gcc-patches/2018-March/495193.html
at this second (similar) gcc_assert.

This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
and make -k check, both with and without --target_board=unix{-m32},
with no new failures.  Ok for mainline?


2022-09-13  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
        PR target/106877
        * reg-stack.cc (move_for_stack_reg): Check for any_malformed_asm
        in gcc_assert.

gcc/testsuite/ChangeLog
        PR target/106877
        * g++.dg/ext/pr106877.C: New test case.


Thanks,
Roger
--

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchrs.txt
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220913/13f7b6a7/attachment.txt>


More information about the Gcc-patches mailing list