public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/26763] [4.1 Regression] wrong final value of induction variable calculated
Date: Mon, 03 Apr 2006 16:59:00 -0000 [thread overview]
Message-ID: <20060403165925.28254.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26763-5724@http.gcc.gnu.org/bugzilla/>
------- Comment #9 from rguenther at suse dot de 2006-04-03 16:59 -------
Subject: Re: [4.1 Regression] wrong final value
of induction variable calculated
On Mon, 3 Apr 2006, rakdver at gcc dot gnu dot org wrote:
> (In reply to comment #6)
> > I believe c-common.c:pointer_int_sum is wrong in relying on pointer overflow
> > during conversion of the integer offset to an unsigned pointer. I'm sending
> > a patch that fixes this for comments.
>
> The patch seems a bit too conservative to me; perhaps just always comparing the
> offsets as signed could work?
I'm not a language lawyer here - and as this is the second (or third)
patch to this folding to correct problems I'd rather be safe than sorry
this time. I'm sure jsm can construct a testcase where comparing offsets
as signed leads to wrong code. Maybe
char *memory = 0;
int foo(void)
{
return memory + 0x80000000 < memory;
}
int main()
{
if (foo())
abort ();
}
i.e. have a mapping >2Gb on a 32bit machine. A corner case, but valid I
guess.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763
next prev parent reply other threads:[~2006-04-03 16:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-19 23:03 [Bug tree-optimization/26763] New: wrong final value of indaction " debian-gcc at lists dot debian dot org
2006-03-19 23:09 ` [Bug tree-optimization/26763] [4.1 Regression] " pinskia at gcc dot gnu dot org
2006-03-20 10:15 ` [Bug tree-optimization/26763] [4.1 Regression] wrong final value of induction " rguenth at gcc dot gnu dot org
2006-03-25 22:14 ` rguenth at gcc dot gnu dot org
2006-03-27 15:43 ` rakdver at gcc dot gnu dot org
2006-03-27 22:33 ` rakdver at gcc dot gnu dot org
2006-03-28 12:08 ` rakdver at gcc dot gnu dot org
2006-03-28 13:33 ` rguenth at gcc dot gnu dot org
2006-03-31 21:12 ` rguenth at gcc dot gnu dot org
2006-04-03 16:45 ` patchapp at dberlin dot org
2006-04-03 16:53 ` rakdver at gcc dot gnu dot org
2006-04-03 16:59 ` rguenther at suse dot de [this message]
2006-04-03 17:22 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2006-04-04 8:15 ` patchapp at dberlin dot org
2006-04-05 8:16 ` [Bug tree-optimization/26763] [4.1/4.2 " rguenth at gcc dot gnu dot org
2006-04-05 8:20 ` rguenth at gcc dot gnu dot org
2006-04-05 8:22 ` rguenth at gcc dot gnu dot org
2006-04-17 2:27 ` pinskia at gcc dot gnu dot org
2006-04-17 10:10 ` rguenth at gcc dot gnu dot org
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=20060403165925.28254.qmail@sourceware.org \
--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).