https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92469
Bug ID: 92469 Summary: [9/10 Regression] ICE: output_operand: invalid use of register 'frame' Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat test.c void foo ( void ) { register int x asm ( "19" ) ; int y = x; } My command line to compile GCC is ../sourecode_dir/configure --prefix=../install_dir --enable-languages=c,c++ --disable-multilib $ gcc-snapshot10 --version gcc (GCC) 10.0.0 20191110 (experimental) Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc-snapshot10 test.c during RTL pass: final test.c: In function ‘foo’: test.c:7:1: internal compiler error: output_operand: invalid use of register 'frame' 7 | } | ^ 0x9bff96 output_operand_lossage(char const*, ...) ../../gcc-10-20191110/gcc/final.c:3610 0x9c11a1 output_operand(rtx_def*, int) ../../gcc-10-20191110/gcc/final.c:4052 0x9c1660 output_asm_insn(char const*, rtx_def**) ../../gcc-10-20191110/gcc/final.c:3964 0x9c3674 final_scan_insn_1 ../../gcc-10-20191110/gcc/final.c:3107 0x9c395b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../gcc-10-20191110/gcc/final.c:3153 0x9c3a56 final_1 ../../gcc-10-20191110/gcc/final.c:2021 0x9c4654 rest_of_handle_final ../../gcc-10-20191110/gcc/final.c:4659 0x9c4654 execute ../../gcc-10-20191110/gcc/final.c:4737 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ gcc-snapshot9 --version gcc (GCC) 9.2.1 20191109 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc-snapshot9 test.c during RTL pass: final test.c: In function ‘foo’: test.c:7:1: internal compiler error: output_operand: invalid use of register 'frame' 7 | } | ^ 0x7f4ce6 output_operand_lossage(char const*, ...) ../../gcc-9-20191109/gcc/final.c:3610 0xd63454 ix86_print_operand(_IO_FILE*, rtx_def*, int) ../../gcc-9-20191109/gcc/config/i386/i386.c:18356 0x7f5011 output_operand(rtx_def*, int) ../../gcc-9-20191109/gcc/final.c:4052 0x7f5acc output_asm_insn(char const*, rtx_def**) ../../gcc-9-20191109/gcc/final.c:3964 0x7f7192 final_scan_insn_1 ../../gcc-9-20191109/gcc/final.c:3107 0x7f73eb final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../gcc-9-20191109/gcc/final.c:3153 0x7f76c4 final_1 ../../gcc-9-20191109/gcc/final.c:2021 0x7f80a4 rest_of_handle_final ../../gcc-9-20191109/gcc/final.c:4659 0x7f80a4 execute ../../gcc-9-20191109/gcc/final.c:4737 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. This ICE seems doesn't affect gcc-8 and earlier versions. $ gcc-snapshot8 --version gcc (GCC) 8.3.1 20191101 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc-snapshot8 test.c test.c: In function ‘foo’: test.c:4:18: error: the register specified for ‘x’ is not general enough to be used as a register variable register int x asm ( "19" ) ; ^