This is the mail archive of the gcc@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]

Re: Problem when build glibc on IA64


Ô¬Á¢Íþ wrote:
I'm a guy working on IA64 and I need to compile glibc with gcc4.2.
I tried gcc version 4.2.2 to build glibc 2.5, 2.6 and 2.7, all failed with:
internal compiler error: RTL flag check: INSN_DELETED_P used with
unexpected rtx code 'plus' in output_constant_pool_1, at varasm.c:
3393

This is lacking some info about how to reproduce. You didn't mention which file in glibc fails to compile. You didn't how anything was configured. Etc.


Googling for an error isn't always useful, as there are many different ways to trigger some failures. Unfortunately, since you didn't mention which web page you were looking at, I can't comment on that further. I have no idea what you were looking at.

One thing I did notice, however, is that you got an internal consistency checking failure for a release, which is odd, as releases default to --enable-checking=release which disables most of the internal consistency checks. So I tried building a release with --enable-checking=yes and was able to reproduce the problem.

The failure happens with top of tree on the gcc-4.2 branch. The failure occurs with the file iconvdata/iso-2022-cn-ext.c. I used top of tree glibc for the test build. I can not reproduce the failure with mainline gcc with this testcase, but the bug still appears to be there.

The problem is in output_constant_pool_1 in varasm.c. There is code that tries to handle a LABEL_REF and also (CONST (PLUS (LABEL_REF) ...)). It does this
tmp = x;
switch (GET_CODE (x))
{
case CONST:
...
tmp = XEXP (XEXP (x, 0), 0);
/* FALLTHRU */
case LABEL_REF:
tmp = XEXP (x, 0);
which obviously doesn't work for the CONST case. We end up with a PLUS instead of a CODE_LABEL after falling through. The fix here is to replace every use of "x" with "tmp" inside this switch statement.


The bug is still present in gcc mainline (4.3), but I don't have a testcase that reproduces it there.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com



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