https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119171

            Bug ID: 119171
           Summary: [15 Regression] error: ‘asm’ operand has impossible
                    constraints or there are not enough registers
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

On x86-64, r15-7900-g622968990beee7 gave:

[hjl@gnu-tgl-3 pr119083]$ cat x.i
long current_stack_pointer;
void perf_ibs_event_update(void *);
void perf_ibs_handle_irq(void *perf_ibs)
{
  asm("" : "=D"(current_stack_pointer) : "D"(0));
  perf_ibs_event_update(perf_ibs);
}
[hjl@gnu-tgl-3 pr119083]$ make
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/ -O2 -S
x.i
x.i: In function ‘perf_ibs_handle_irq’:
x.i:5:3: error: ‘asm’ operand has impossible constraints or there are not
enough registers
    5 |   asm("" : "=D"(current_stack_pointer) : "D"(0));
      |   ^~~
make: *** [Makefile:42: x.s] Error 1
[hjl@gnu-tgl-3 pr119083]$

Reply via email to