From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1792 invoked by alias); 10 Dec 2008 08:50:15 -0000 Received: (qmail 32168 invoked by uid 48); 10 Dec 2008 08:48:55 -0000 Date: Wed, 10 Dec 2008 08:50:00 -0000 Message-ID: <20081210084855.32167.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/38459] [graphite] SEGFAULT in cloog_clast_create In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "grosser at gcc dot gnu dot org" 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: 2008-12/txt/msg00965.txt.bz2 ------- Comment #8 from grosser at gcc dot gnu dot org 2008-12-10 08:48 ------- Created an attachment (id=16869) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16869&action=view) Fix OK. I got the fix. We had a problem with invalid CloogDomain data structures. We did not detect all parameters in find_scop_parameters(), but detected some later during the domain creation. This was wrong, as the domains are always with the number of parameters in mind created. If this number changes during domain creation the already created domains are wrong/invalid. To detect this easier the next time I added an assert in the code path. If we would add parameters after find_scop_parameters() we simply fail.parameters. And why did we not detect all parameters? Before commit 142384 we had this order: 1. Detect all bbs 2. Detect parameters 3. Remove unnecessary bbs. Now we have do not even create the bbs in 1. So we do not check all bbs for parameters and some of the bbs we do not check contained conditions with parameters. Solution: Change the way we find parameters in conditions. Do not look in the bbs for conditions, but directly in GBB_CONDITIONS. With this fix applied I can compile CP2K with "-O2 -fgraphite" so there are only backend bugs left. These will be found with "-O2 -fgraphite-identity" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38459