From e3cadb61514ed37efea2d991401844a352083783 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 17 Aug 2004 13:29:04 +0000 Subject: [PATCH] regclass.c (init_reg_sets_1): Add ENABLE_CHECKING sanity tests to ensure that call_used_regs is a superset of... * regclass.c (init_reg_sets_1): Add ENABLE_CHECKING sanity tests to ensure that call_used_regs is a superset of both fixed_regs and call_really_used_regs. From-SVN: r86119 --- gcc/ChangeLog | 6 ++++++ gcc/regclass.c | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca8f544901e..055fc374808 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-08-17 Roger Sayle + + * regclass.c (init_reg_sets_1): Add ENABLE_CHECKING sanity tests to + ensure that call_used_regs is a superset of both fixed_regs and + call_really_used_regs. + 2004-08-17 Daniel Bornstein PR target/17019 diff --git a/gcc/regclass.c b/gcc/regclass.c index 1f51af610c2..1304313d90d 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -427,6 +427,17 @@ init_reg_sets_1 (void) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { +#ifdef ENABLE_CHECKING + /* call_used_regs must include fixed_regs. */ + if (fixed_regs[i] && !call_used_regs[i]) + abort (); +#ifdef CALL_REALLY_USED_REGISTERS + /* call_used_regs must include call_really_used_regs. */ + if (call_really_used_regs[i] && !call_used_regs[i]) + abort (); +#endif +#endif + if (fixed_regs[i]) SET_HARD_REG_BIT (fixed_reg_set, i); else -- 2.30.2