public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tg at swox dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/12654] [3.3/3.4 regression] Incorrect comparison code generated for Alpha
Date: Fri, 17 Oct 2003 15:25:00 -0000	[thread overview]
Message-ID: <20031017152225.16464.qmail@sources.redhat.com> (raw)
In-Reply-To: <20031017020801.12654.tg@swox.com>

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12654



------- Additional Comments From tg at swox dot com  2003-10-17 15:22 -------
Subject: Re:  [3.3/3.4 regression] Incorrect comparison code generated for Alpha

"falk at debian dot org" <gcc-bugzilla@gcc.gnu.org> writes:

  (the posted test case is technically invalid).
  
The test case is perfectly valid.
The test is the function foo.

In order to drive that portably, a somewhat odd expression is
needed.  Are you saying the ~0L is "technically invalid", since
it contains an overflow of signed data?  Is that relevant for the
test case's validity?  Please take a look at gcc's testsuite for
one million of examples where driver programs for constants that
ate "technically invalid".

I wrote the test in the c-torture style, intended for its execute
category, since I really don't want this sort of bugs to come
back.  We had problems like this back in the gcc 1.x days, and I
am disapppointed we now again have somebody with poor two's
complement understanding checking in code in gcc.

  gcc 2.95 got it right, 3.2 not. Probably target dependent, but I don't have 
  anything else to test currently.
  
Poking around the gcc sources (alpha.c alpha_emit_conditional_branch)
showns that the bogus code has been there for a while.

  The bogus variant is actually slightly better WRT register pressure, so we
  might want to retain it for int arguments.

Huh?  Not sure what you are suggesting.  Adding and then
comarping to 0 is *wrong* also for int arguments when since the
add risks to overflow.


  parent reply	other threads:[~2003-10-17 15:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-17  2:08 [Bug c/12654] New: " tg at swox dot com
2003-10-17  9:52 ` [Bug c/12654] [3.3/3.4 regression] " falk at debian dot org
2003-10-17 15:25 ` tg at swox dot com [this message]
2003-10-17 15:58 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-10-17 21:01 ` falk at debian dot org
2003-10-17 22:01 ` [Bug target/12654] " pinskia at gcc dot gnu dot org
2003-10-17 23:29 ` tg at swox dot com
2003-10-18 14:23 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-10-18 14:31 ` tg at swox dot com
2003-10-18 15:20 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-10-19  7:08 ` tg at swox dot com
2003-10-20  8:05 ` cvs-commit at gcc dot gnu dot org
2003-10-20  8:35 ` falk at debian dot org
2003-10-23  0:23 ` wilson at specifixinc dot com
2003-10-27 20:56 ` cvs-commit at gcc dot gnu dot org
2003-10-27 22:04 ` tg at swox dot com
2003-10-27 23:12 ` falk dot hueffner at student dot uni-tuebingen dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031017152225.16464.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).