https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102761
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> --- diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index fb656094e9e..5d019f8e058 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13921,7 +13921,10 @@ ix86_print_operand_address_as (FILE *file, rtx addr, static void ix86_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr) { - ix86_print_operand_address_as (file, addr, ADDR_SPACE_GENERIC, false); + if (this_is_asm_operands && ! address_operand (addr, VOIDmode)) + output_operand_lossage ("invalid constraints for operand"); + else + ix86_print_operand_address_as (file, addr, ADDR_SPACE_GENERIC, false); } /* Implementation of TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA. */