From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3538 invoked by alias); 27 Jan 2015 06:58:01 -0000 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 Received: (qmail 3421 invoked by uid 48); 27 Jan 2015 06:57:52 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64815] ICE caused by volatile_refs_p doesn't skip NULL operand Date: Tue, 27 Jan 2015 06:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg03004.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64815 --- Comment #3 from Andrew Pinski --- (In reply to Terry Guo from comment #2) > (In reply to Andrew Pinski from comment #1) > > I don't think you need to call volatile_refs_p on the notes part of the > > instruciton. > > The volatile_refs_p works in a recursive way which makes itself to scan the > notes part. I just call volatile_refs_p to the insn. > > Do you mean I should update volatile_refs_p to avoid recursively scanning > the notes part of the insn? Oh you should be using volatile_refs_p on the insn but only the set; maybe even just the lhs or rhs of the set. --- Comment #4 from Andrew Pinski --- (In reply to Terry Guo from comment #2) > (In reply to Andrew Pinski from comment #1) > > I don't think you need to call volatile_refs_p on the notes part of the > > instruciton. > > The volatile_refs_p works in a recursive way which makes itself to scan the > notes part. I just call volatile_refs_p to the insn. > > Do you mean I should update volatile_refs_p to avoid recursively scanning > the notes part of the insn? Oh you should be using volatile_refs_p on the insn but only the set. dse.c: || volatile_refs_p (PATTERN (insn))