This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ira,reload] Invalid assert in reload1.c::finish_spills?


Hi,

gcc/testsuite/c-c++-common/pr60101.c fails with an ICE for the avr target,
because of a gccassert firing at reload1.c:4233.

The assert looks bogus to me, as it's in the if block of
if (! iraconflictsp || regrenumber[i] >= 0)

For this testcase and for the avr target, iraconflictsp is false because
buildconflictbittable figured that the conflict table will be too big. If
regrenumber[i] is now negative, the assert fires and causes the ICE.

Getting rid of the assert (as in the below patch) makes the ICE go away, but
I'm not sure if that's the right fix. In any case, either the assert or the
conditional in the if statement is wrong, I think.

Comments?

Regards
Senthil

diff –git gcc/reload1.c gcc/reload1.c
index 38ee356a791..5acba706bee 100644
— gcc/reload1.c
+ gcc/reload1.c
@@ -4230,7 +4230,6 @@ finishspills (int global)
/* Record the current hard register the pseudo is allocated to
in pseudopreviousregs so we avoid reallocating it to the
same hard reg in a later pass. */

  *   gccassert (regrenumber[i] >= 0);

SETHARDREGBIT (pseudopreviousregs[i], regrenumber[i]);
* Mark it as no longer having a hard register home. *


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]