From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25200 invoked by alias); 28 Nov 2012 14:48:03 -0000 Received: (qmail 24889 invoked by uid 48); 28 Nov 2012 14:47:35 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/55358] Valgrind errors Date: Wed, 28 Nov 2012 14:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02744.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55358 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-11-28 Ever Confirmed|0 |1 --- Comment #8 from Jakub Jelinek 2012-11-28 14:47:33 UTC --- (In reply to comment #7) > diff --git a/gcc/dse.c b/gcc/dse.c > index f879adb..8d12e8d 100644 > --- a/gcc/dse.c > +++ b/gcc/dse.c > @@ -2869,7 +2869,7 @@ dse_step1 (void) > INSN_UID (s_info->redundant_reason->insn)); > delete_dead_store_insn (ptr); > } > - if (s_info) > + if (ptr->store_rec && s_info) > s_info->redundant_reason = NULL; > free_store_info (ptr); > } Actually, I fail to see what is that if (s_info) s_info->redundant_reason = NULL; good for, the following free_store_info (ptr) should pool_free s_info if delete_dead_store_insn hasn't already called free_store_info. And it doesn't seem that pool_alloced store info recs would rely on the field being cleared, it seems we initialize it always: store_info->redundant_reason = redundant_reason; Thus, my preference would be just drop the two lines instead.