https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100380
--- Comment #7 from Antoni <bouanto at zoho dot com> --- Since then, I found a workaround to fix the similar segfault in my other feature. It might work for solving this and goes like this: instead of trying to access the rvalue when first replaying the asm, create an intermediate memento that does the work of add_output_operand (and most likely the other actions like add_input_operand). It works since this memento will necessarily be created after both the asm and the variable and thus, both will have been replayed when it's time to replay the new 'add_output_operand' memento.