public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Can we have egcs 1.0.3 please?
       [not found] <2107.892965241@hurl.cygnus.com>
@ 1998-04-26 12:45 ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1998-04-26 12:45 UTC (permalink / raw)
  To: law; +Cc: zing, Ulrich Drepper

> 
> 
>   In message <m0yQNZt-00058vC@ocean.lucon.org>you write:
>   > There is a bad typo in libio. I have sent a patch twice.
> I asked Ulrich to take a look at the libio patch not too long
> ago.  I haven't heard back from him yet.
> 
> I'd really like everything going into the 1.0.3 tree to have
> been reviewed by at least one person other than the author.
> 
> Maybe if you explained what is wrong and how your patch fixes
> the problem, someone could try to evaluate the patch.  Instead
> you just said "it's a typo" with zero explanation about what's
> going on.

See

http://www.cygnus.com/ml/egcs-bugs/1998-Apr/0028.html
http://www.cygnus.com/ml/egcs-bugs/1998-Apr/0046.html

I am enclosing my original patch with the typo in it here. As you can
see, I changed "count" to "_gcount" in "if" without removing count.

-- 
H.J. Lu (hjl@gnu.org)
---
--- /home/work/misc/gnu/import/egcs/libio/isgetline.cc	Thu Aug 21 15:58:19 1997
+++ isgetline.cc	Mon Feb 16 10:48:27 1998
@@ -67,8 +68,9 @@
   if (ipfx1())
     {
       streambuf *sbuf = rdbuf();
-      long count = _IO_getline(sbuf, buf, len - 1, delim, -1);
-      if (count == 0 && sbuf->sgetc() == EOF)
+      int ch;
+      long count = _IO_getline_info(sbuf, buf, len - 1, delim, -1, &ch);
+      if (_gcount == 0 && ch == EOF)
 	set(ios::failbit|ios::eofbit);
       else
 	_gcount = count;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can we have egcs 1.0.3 please?
  1998-04-18 22:14 ` Jeffrey A Law
@ 1998-04-20 12:05   ` Jim Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Wilson @ 1998-04-20 12:05 UTC (permalink / raw)
  To: law; +Cc: H.J. Lu, Cristian Gafton, egcs

	Jim is correct, except for one minor nit.
	REG_N_REFS must never be zero if references to the register still
	remain in the insn chain. 

I was just making a general statement, to avoid a panic about a bug that
wasn't there.  It wasn't intended to be complete.

But, as long as we are nit picking, I'll add another clarification.

REG_N_REFS must never be two unless there are exactly two references to the
register.  Local-alloc treats this case specially, and will perform an invalid
optimization if REG_N_REFS is two but there are more than two references in
the RTL.  This is why combine deliberately sets REG_N_REFS to three in one
place.

Jim

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can we have egcs 1.0.3 please?
       [not found] <199804182235.PAA27290@rtl.cygnus.com>
@ 1998-04-18 22:14 ` Jeffrey A Law
  1998-04-20 12:05   ` Jim Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey A Law @ 1998-04-18 22:14 UTC (permalink / raw)
  To: Jim Wilson; +Cc: H.J. Lu, Cristian Gafton, egcs

[ Note The change in cc-line, this is suitable for the egcs
  discussion list :-) ]

  In message <199804182235.PAA27290@rtl.cygnus.com>you write:
  > There is no requirement that REG_N_REFS be exactly correct, and many
  > optimizations passes after flow don't bother to try to maintain it.
  > Thus the fact that REG_N_REFS is wrong is itself not necessarily a bug.
Jim is correct, except for one minor nit.

REG_N_REFS must never be zero if references to the register still
remain in the insn chain.  Other than that, REG_N_REFS can have
any value without effecting the correctness of the generated code.

Of course accurate REG_N_REFS is likely to lead to better register
allocation.

jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-26 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2107.892965241@hurl.cygnus.com>
1998-04-26 12:45 ` Can we have egcs 1.0.3 please? H.J. Lu
     [not found] <199804182235.PAA27290@rtl.cygnus.com>
1998-04-18 22:14 ` Jeffrey A Law
1998-04-20 12:05   ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).