From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18522 invoked by alias); 17 Dec 2010 12:05:32 -0000 Received: (qmail 18505 invoked by uid 22791); 17 Dec 2010 12:05:30 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Dec 2010 12:05:26 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/46985] [4.4/4.5/4.6 Regression] ICE: SIGSEGV in is_gimple_min_invariant (gimple.c:2742) with -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: ice-on-valid-code 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: 4.6.0 X-Bugzilla-Changed-Fields: Status Last reconfirmed CC 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 Date: Fri, 17 Dec 2010 12:05:00 -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 X-SW-Source: 2010-12/txt/msg02086.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46985 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.17 12:05:09 CC| |jakub at gcc dot gnu.org, | |spop at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Jakub Jelinek 2010-12-17 12:05:09 UTC --- instantiate_scev_r is called on: {&tar[ptr$dim$0$lbound_81 + -1].i, +, 4}_3 and the problem is with that COMPONENT_REF inside of it. COMPONENT_REF has 3 operands, but the last one is optional (there are lots of other trees like that), but instantiate_scev_r/instantiate_scev_[123] assume all operands must be non-NULL. So, one possible fix would be to: if (automatically_generated_chrec_p (chrec) + || chrec == NULL || is_gimple_min_invariant (chrec)) return chrec; at the beginning of instantiate_scev_r. Or maybe it is just wrong to call instantiate_scev_r with such arguments and the bug is earlier.