From patchwork Mon Aug 1 01:42:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 654437 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s2hvY54cQz9sR8 for ; Mon, 1 Aug 2016 11:44:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=BBHV18Fe; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; q=dns; s=default; b=ZV6Q7Zi1ceEGtHNWrU9 ZfRrspfH1VJ6EDkrMErJ3VhAL80rRaSswK7mPD2udMX0bpCL2Fltp6U26/ZSqHMd aeyfwixspI03ZI+ZOt4RsA+A5DYHPZNAaPKZR+TCwPYkHFYLa1taCrFpuMLakWZs wG3uTBkz5CcM9UCz2NUhb/t8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; s=default; bh=eoguNOYnES9VrtAuRkPFZNl0j kI=; b=BBHV18FeMYgvB1Dc6c7c0lvdqA1Gn9Lv16WljArCssw1EIF1mvqxJC93e 0GT27Q2IXsNhaX0eT609Ykpnp6sYBLe38wiJP3hbWabOOIdyTyyuv6O/ZEg9ucTf O5SJuDnoR6Z9zhoC8iL4GW5og0Dk1RG3J1SAIm4HFi3HWmNBWQ= Received: (qmail 100883 invoked by alias); 1 Aug 2016 01:43:25 -0000 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 Received: (qmail 100762 invoked by uid 89); 1 Aug 2016 01:43:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=sk:segher@, sk:segher, U*segher, D*crashing.org X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Aug 2016 01:43:09 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 232A31C06D2; Mon, 1 Aug 2016 01:43:07 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: bschmidt@redhat.com, Segher Boessenkool Subject: [PATCH 2/9] cfgcleanup: Don't confuse CFI when -fshrink-wrap-separate Date: Mon, 1 Aug 2016 01:42:39 +0000 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes cfgcleanup would try to join noreturn paths with different components handled. This then fails in dwarf2cfi. 2016-06-07 Segher Boessenkool * cfgcleanup.c (outgoing_edges_match): Don't join noreturn calls if shrink_wrapped_separate. --- gcc/cfgcleanup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 023b9d2..e3f205b 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1824,6 +1824,11 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) || !find_reg_note (last1, REG_ARGS_SIZE, NULL))) return false; + /* If shrink-wrapping separate components, joining noreturn calls that + have different components set up will confuse dwarf2cfi. */ + if (!nonfakeedges && crtl->shrink_wrapped_separate) + return false; + /* fallthru edges must be forwarded to the same destination. */ if (fallthru1) {