bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in gas from gcc code


From: Nick Clifton
Subject: Re: bug in gas from gcc code
Date: 12 Nov 2001 18:37:37 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

Hi James,

> Sorry about the attachment problem.  I'm trying again to attach the
> file.

Thanks very much.  I am now able to reproduce the problem, and I have
a much better understanding of what is going on.

I now agree with you that we should be trying harder to grow the frag
if we can.  I am attaching a patch below to do this, which appears to
make the test case you sent assemble correctly.

This is still something in the nature of a workaround though, since if
the frag cannot be grown then a new frag will be created and the
problem will reappear.  I am not sure if this is a real problem
though, as I am not sure how we would be unable to grow the current
frag, but still be able to create a new one.

Let me know if the patch solves your problem, and if so I will check
it in.

Cheers
        Nick

2001-11-12  Nick Clifton  <address@hidden>

        * frags.c (frag_grow): Use frag_make_room() to grow the
        obstack.

Index: gas/frags.c
===================================================================
RCS file: /cvs/src/src/gas/frags.c,v
retrieving revision 1.10
diff -p -c -r1.10 frags.c
*** frags.c     2001/08/01 01:44:25     1.10
--- frags.c     2001/11/12 18:37:23
*************** void
*** 65,70 ****
--- 65,76 ----
  frag_grow (nchars)
       unsigned int nchars;
  {
+   /* Try really hard to grow the obstack.  Creating a new obstack can
+      disable expression optimisations that would otherwise occur if
+      two symbols were located in the same obstack.  */
+   if (obstack_room (&frchain_now->frch_obstack) < nchars)
+     obstack_make_room (& frchain_now->frch_obstack, 2 * nchars);
+ 
    if (obstack_room (&frchain_now->frch_obstack) < nchars)
      {
        unsigned int n;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]