public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull.
@ 2005-06-19 3:43 kazu at cs dot umass dot edu
2005-06-19 13:15 ` [Bug tree-optimization/22117] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-06-19 3:43 UTC (permalink / raw)
To: gcc-bugs
Consider:
void
foo (int *p, int q)
{
if (p == 0)
{
if (q == 0)
{
int *r = &p[q];
if (r != 0)
link_error ();
}
}
}
Note that the innermost "if" condition should be folded to false,
but VRP folds that to true.
Under "if (q == 0)", both p and q are known to be zero,
but VRP thinks that regardless of their values, p + q is always nonnull.
--
Summary: VRP thinks <ptr type> + <ptr type> is always nonnull.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/22117] [4.1 Regression] VRP thinks <ptr type> + <ptr type> is always nonnull.
2005-06-19 3:43 [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull kazu at cs dot umass dot edu
@ 2005-06-19 13:15 ` pinskia at gcc dot gnu dot org
2005-06-21 14:49 ` kazu at cs dot umass dot edu
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-19 13:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-19 13:15 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-06-19 13:15:06
date| |
Summary|VRP thinks <ptr type> + <ptr|[4.1 Regression] VRP thinks
|type> is always nonnull. |<ptr type> + <ptr type> is
| |always nonnull.
Target Milestone|--- |4.1.0
Version|unknown |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/22117] [4.1 Regression] VRP thinks <ptr type> + <ptr type> is always nonnull.
2005-06-19 3:43 [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull kazu at cs dot umass dot edu
2005-06-19 13:15 ` [Bug tree-optimization/22117] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-21 14:49 ` kazu at cs dot umass dot edu
2005-06-23 16:04 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-06-21 14:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |kazu at cs dot umass dot edu
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/22117] [4.1 Regression] VRP thinks <ptr type> + <ptr type> is always nonnull.
2005-06-19 3:43 [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull kazu at cs dot umass dot edu
2005-06-19 13:15 ` [Bug tree-optimization/22117] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-21 14:49 ` kazu at cs dot umass dot edu
@ 2005-06-23 16:04 ` cvs-commit at gcc dot gnu dot org
2005-06-24 1:59 ` kazu at cs dot umass dot edu
2005-06-24 14:16 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-23 16:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-23 16:04 -------
Subject: Bug 22117
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: kazu@gcc.gnu.org 2005-06-23 16:04:10
Modified files:
gcc : ChangeLog tree-vrp.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: pr22117.c
Log message:
gcc/
PR tree-optimization/22117
* tree-vrp.c (extract_range_from_binary_expr): Compute a
correct range when adding two pointers.
testsuite/
PR tree-optimization/22117
* gcc.dg/tree-ssa/pr22117.c: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9212&r2=2.9213
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vrp.c.diff?cvsroot=gcc&r1=2.32&r2=2.33
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5674&r2=1.5675
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/22117] [4.1 Regression] VRP thinks <ptr type> + <ptr type> is always nonnull.
2005-06-19 3:43 [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull kazu at cs dot umass dot edu
` (2 preceding siblings ...)
2005-06-23 16:04 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-24 1:59 ` kazu at cs dot umass dot edu
2005-06-24 14:16 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-06-24 1:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-06-24 01:59 -------
Just checked in a patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/22117] [4.1 Regression] VRP thinks <ptr type> + <ptr type> is always nonnull.
2005-06-19 3:43 [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull kazu at cs dot umass dot edu
` (3 preceding siblings ...)
2005-06-24 1:59 ` kazu at cs dot umass dot edu
@ 2005-06-24 14:16 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-24 14:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-24 14:16 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22117
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-24 14:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-19 3:43 [Bug tree-optimization/22117] New: VRP thinks <ptr type> + <ptr type> is always nonnull kazu at cs dot umass dot edu
2005-06-19 13:15 ` [Bug tree-optimization/22117] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-21 14:49 ` kazu at cs dot umass dot edu
2005-06-23 16:04 ` cvs-commit at gcc dot gnu dot org
2005-06-24 1:59 ` kazu at cs dot umass dot edu
2005-06-24 14:16 ` pinskia at gcc dot gnu dot org
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).