From patchwork Wed Oct 20 03:16:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 68387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 37C62B70A6 for ; Wed, 20 Oct 2010 14:17:06 +1100 (EST) Received: (qmail 1146 invoked by alias); 20 Oct 2010 03:17:03 -0000 Received: (qmail 1137 invoked by uid 22791); 20 Oct 2010 03:17:03 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Oct 2010 03:16:58 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9K3GvX7002801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Oct 2010 23:16:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9K3GuRk007803; Tue, 19 Oct 2010 23:16:56 -0400 Received: from 1005.home ([10.3.112.14]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o9K3GsPg000597; Tue, 19 Oct 2010 23:16:55 -0400 Message-ID: <4CBE5F03.4080801@redhat.com> Date: Tue, 19 Oct 2010 23:16:19 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4 MIME-Version: 1.0 To: gcc-patches CC: law@redhat.com Subject: Patch to solve PR42169. X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The following patch solves the problem. The details of the PR can be found on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42169 I checked that the patch fixes the problem on gcc4.5 (it is not reproducible on the trunk any more). Is it OK to commit to gcc4.4, gcc4.5 branches and the trunk? 2010-10-19 Vladimir Makarov PR fortran/42169 * ira-emit.c (store_can_be_removed_p): Return false instead of gcc_unreachable. Index: ira-emit.c =================================================================== --- ira-emit.c (revision 165712) +++ ira-emit.c (working copy) @@ -367,7 +367,8 @@ store_can_be_removed_p (ira_allocno_t sr prohibit removal of the store in such complicated case. */ return false; } - gcc_unreachable (); + /* It is actually a loop entry -- do not remove the store. */ + return false; } /* Generate and attach moves to the edge E. This looks at the final