This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in sparc.md
- To: Martin Ohmacht <ohmacht at mst dot uni-hannover dot de>
- Subject: Re: Bug in sparc.md
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 22 Nov 2000 13:09:14 -0500
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <Pine.GSO.4.30.0011221832340.4131-300000@sparkle>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 22, 2000 at 06:46:12PM +0100, Martin Ohmacht wrote:
> The sparc machine description has a severe bug. For the addsi3, the
> constraints allow two immediate operands as inputs. If the second is
> const_int 4096, the insn is emitted as a subtraction by -4096. The
> subtraction disallows an immediate operand as first operand, so the sub
> insn isn't recognized and the compiler aborts.
> The bug appeared when compiling pine 4.30 with gcc 2.95.2 on a Sparc
> Solaris 2.7 (32 bit mode) in module mbx.c. I added the mbx.i. The
> compiler crashes when compiling line 9331:
> if (((MBXLOCAL *) stream->local) ->buflen < (4096 + 4 )) {
> ^^^^^^^^^
> I solved the problem using the small patch attached to this mail.
This has been already fixed in main trunk, see
http://gcc.gnu.org/ml/gcc-patches/2000-10/msg01085.html
Jakub