Skip to content

"ran out of registers" while building i386 linux kernel #41914

@arndb

Description

@arndb
mannequin
Bugzilla Link 42569
Version trunk
OS Linux
Blocks #4440
CC @Aaron1011,@topperc,@efriedma-quic,@fhahn,@RKSimon,@MatzeB,@nickdesaulniers,@qcolombet,@zygoloid,@rotateright

Extended Description

One file in the linux kernel produces an internal error from the register allocator. I reduced the test case to this:

typedef int (*tune_freq_func_t)(int , void * tuneargs);
static struct {
  int power_up;
  int power_down;
  tune_freq_func_t fm_tune_freq;
  tune_freq_func_t am_tune_freq;
  int fm_rsq_status;
  int agc_status;
  int intb_pin_cfg;
} a[1];
int b, c;
int fn1(void) { return a[c].fm_tune_freq(b, fn1); }
$ clang-9 -m32 -mregparm=3 -O2 -fno-strict-overflow -c si476x-cmd.c
error: ran out of registers during register allocation
1 error generated.

See https://godbolt.org/z/aQ96HC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions