https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115426
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:a4bbdec2be1c9f8fb49276b8a54ee86024ceac17 commit r15-1837-ga4bbdec2be1c9f8fb49276b8a54ee86024ceac17 Author: Richard Biener <rguent...@suse.de> Date: Tue Jun 11 13:11:08 2024 +0200 middle-end/115426 - wrong gimplification of "rm" asm output operand When the operand is gimplified to an extract of a register or a register we have to disallow memory as we otherwise fail to gimplify it properly. Instead of __asm__("" : "=rm" __imag <r>); we want __asm__("" : "=rm" D.2772); _1 = REALPART_EXPR <r>; r = COMPLEX_EXPR <_1, D.2772>; otherwise SSA rewrite will fail and generate wrong code with 'r' left bare in the asm output. PR middle-end/115426 * gimplify.cc (gimplify_asm_expr): Handle "rm" output constraint gimplified to a register (operation). * gcc.dg/pr115426.c: New testcase.