Bug 8645 - unnecessary non-0 checks in stl_tree.h
Summary: unnecessary non-0 checks in stl_tree.h
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.0.2
: P3 normal
Target Milestone: ---
Assignee: Paolo Carlini
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2002-11-19 12:36 UTC by erseklaszlo
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description erseklaszlo 2002-11-19 12:36:02 UTC
This is not a bug, just two (I think) unnecessary non-0 checks in "g++-v3/bits/stl_tree.h", at lines 416 and 445. At these places, "__w->_M_left" and "__w->_M_right" can't be 0. (They are valid and red, which follows from lines 406-409, 414-415 and 435-438, 443-444).

Release:
3.0.2
Comment 1 Paolo Carlini 2002-11-22 05:11:28 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: Are yor willing to prepare and, possibly, test a patch against
    the current mainline library or that released with 3.2.1?
    Thanks, Paolo.
Comment 2 Paolo Carlini 2002-11-22 05:43:08 UTC
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-Why: Analysed.
Comment 3 Paolo Carlini 2002-11-22 10:57:14 UTC
State-Changed-From-To: feedback->closed
State-Changed-Why: Fixed with:
    http://gcc.gnu.org/ml/libstdc++/2002-11/msg00244.html
Comment 4 Paolo Carlini 2002-11-22 18:53:54 UTC
From: paolo@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/8645
Date: 22 Nov 2002 18:53:54 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	paolo@gcc.gnu.org	2002-11-22 10:53:54
 
 Modified files:
 	libstdc++-v3   : ChangeLog 
 	libstdc++-v3/include/bits: stl_tree.h 
 
 Log message:
 	2002-11-22  Laszlo Ersek  <erseklaszlo@chello.hu>
 	Paolo Carlini  <pcarlini@unitus.it>
 	
 	PR libstdc++/8645
 	* include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase):
 	Don't check that __w->_M_left != 0 and __w->_M_right != 0
 	when they can't be otherwise.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1445&r2=1.1446
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/stl_tree.h.diff?cvsroot=gcc&r1=1.16&r2=1.17