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

Re: Bug in sparc.md


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

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