This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/6822: GCC 3.1.1 - Internal compiler error in extract_insn, at recog.c:2132
- From: "Eric Botcazou" <ebotcazou at libertysurf dot fr>
- To: "Glen Nakamura" <glen at imodulo dot com>
- Cc: <gcc-gnats at gcc dot gnu dot org>,<gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 29 May 2002 01:29:35 +0200
- Subject: Re: optimization/6822: GCC 3.1.1 - Internal compiler error in extract_insn, at recog.c:2132
- References: <20020528035454.A6106@modulo.internal.net>
> Previously, unsigned X < 128 would be converted to unsigned X <= 127 and
> then optimized to signed X >= 0. After changing the order of the
> transformations, the compiler only reduces the expression to X <= 127 ???
> The result is the reported ICE. This could very well be a latent bug
> in other parts of the compiler, but it seems the change results in missed
> opportunities to simplify expressions. I'll post an alternative patch
> in my next message...
I was almost sure to have checked the cross-dependencies between the various
blocks of code, but I overlooked this 'unsigned <= 0x7fffffff' thing... Your
patch is obviously better than mine in order to fix this chicken-and-egg
problem.
May I suggest you to add thorough cross-comments to the code ? I see you did
so for the second optimization and I think it would be nice to do it for the
first one too (saying that the current location of the optimization causes
the second one to be altered).
It looks like this doesn't fit with the GCC policy on the matter, but it
could also be worth leaving the original code inside an #if 0/#endif or a
comment.
--
Eric Botcazou
ebotcazou@multimania.com